HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - Tech => Topic started by: Jebus on 2003-04-04 00:13:34

Title: Dibrom's ICS vs. MSVC compiles...
Post by: Jebus on 2003-04-04 00:13:34
I know the MSVC compile is a bit slower and produces slightly smaller MP3s, but my question is whether or not this is ABXable with --alt-preset standard? Like, am I getting a better MP3 with the ICL compile or is it negligable? My ears just aren't good enough - anyone?
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Garf on 2003-04-04 00:21:47
The difference shouldn't be noticeable, but I'd never trust an ICL compile myself.
Title: Dibrom's ICS vs. MSVC compiles...
Post by: _Balint_ on 2003-04-04 01:40:21
Quote
[...] I'd never trust an ICL compile myself.

Could you please explain that a little more?
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Garf on 2003-04-04 15:11:45
ICL occasionally miscompiles stuff, you don't always notice it right away.

The 'trusted' LAME compiles have been checked though, so they should be safe.
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Gabriel on 2003-04-04 15:40:32
Well, I'd say that msvc also sometimes miscompiles things and gcc too.

Those are just programs made by programmers, there can be bugs.
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Garf on 2003-04-04 15:58:50
The difference is in the frequency.
Title: Dibrom's ICS vs. MSVC compiles...
Post by: PatchWorKs on 2003-04-04 16:33:06
I'm really curious to know speed and quality results of these compilers:

- DJGPP (http://www.delorie.com/djgpp/)
- LCC-Win32 (http://www.cs.virginia.edu/~lcc-win32/)
- Digital Mars (http://www.digitalmars.com/download/freecompiler.html)
- Borland (http://www.borland.com/products/downloads/download_cbuilder.html)
- Open Watcom (http://www.openwatcom.org/)
- MinGW (http://www.mingw.org/)
- TenDRA (http://www.tendra.org/)



Thanx a lot ! 
Title: Dibrom's ICS vs. MSVC compiles...
Post by: dev0 on 2003-04-04 16:47:40
Both DJGPP and MinGW are based upon GCC and other GNU utils.
DJGPP = DOS port
MinGW = native Win32 port
Additionally there is cygwin (http://www.cygwin.com/), which is a UNIX compatibility layer for Win32 used to port *nix apps over with almost no modifications to the original code.

dev0
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Tripwire on 2003-04-04 17:12:38
Err?

Isn't the same source code compiled with whatever compiler supposed to generate the same results each time? How does it come that there's a difference between ICL and MSVC compiles? That an issue with the math libraries they use?
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Chun-Yu on 2003-04-04 17:18:26
Quote
Err?

Isn't the same source code compiled with whatever compiler supposed to generate the same results each time? How does it come that there's a difference between ICL and MSVC compiles? That an issue with the math libraries they use?

No, the results will depend on the optimizations the compiler performs.  For example, one time a wrote a simple reverb that worked perfectly in VC++ and blew up in ICL release mode (worked fine in ICL debug mode).
Title: Dibrom's ICS vs. MSVC compiles...
Post by: NumLOCK on 2003-04-04 18:03:34
Chun-Yu:

I have a nice example, using 2 lines of integer C code without any library call, which gives the wrong result in VC++ and the right one on all other compilers 

Reported to M$ 3 years ago, still not fixed.
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Jebus on 2003-04-04 18:06:17
Quote
Err?

Isn't the same source code compiled with whatever compiler supposed to generate the same results each time? How does it come that there's a difference between ICL and MSVC compiles? That an issue with the math libraries they use?

The thing is, when dealing with floating point numbers, some compilers round differently and use different precisions. as a result. MSVC tends to make mp3s a bit smaller than the recommended ICL compile.

I'm still wondering if this is an audible difference... anyone?
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Chun-Yu on 2003-04-04 18:12:22
Quote
Chun-Yu:

I have a nice example, using 2 lines of integer C code without any library call, which gives the wrong result in VC++ and the right one on all other compilers  

Reported to M$ 3 years ago, still not fixed.

Really?  What is it?
Title: Dibrom's ICS vs. MSVC compiles...
Post by: NumLOCK on 2003-04-04 19:15:56
I have a stronger example on my main computer (currently inaccesible / put in boxes - I'm moving places).

However, I can remember of this one:

void testing()
{
int toto=32;
int u=1<<32; // gives u=0 - ok
int v=1<<toto;  // gives u=1 instead of 0
}

Microsoft claims a correct result is not guaranteed with toto >= 32. I answered them: in this case, why do I see no compilation warning - you bunch of morons 

For the record, this behavior is related with Intel's x86 SHR and SHL instructions - which are badly implemented since the 8086 

This strange behavior (using VC++) was a major factor in the failure of digital signature authentication units for ballistic missiles in the U.S army.

Cheers
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Garf on 2003-04-04 19:29:44
Quote
Microsoft claims a correct result is not guaranteed with toto >= 32. I answered them: in this case, why do I see no compilation warning - you bunch of morons 

You are writing code that is undefined per spec and you complain the result is undefined?

Pot. Kettle. Black.
Title: Dibrom's ICS vs. MSVC compiles...
Post by: NumLOCK on 2003-04-04 21:17:29
Actually the spec is vague and permissive on this point. This is very much like the max_huff "bug" in winamp versions of the past..

Anyway, that was just an example I had in mind. The real one is in an obscure path on the other pc 

Quote
Pot. Kettle. Black.

umm.. What do you mean?   
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Bedeox on 2003-04-04 22:23:45
Well, this seems like a bug in MSVC, the behaviour is probably defined in IEEE standard...
But it might be that you've enabled some math optimizations similar to GCCs -ffast-math
Title: Dibrom's ICS vs. MSVC compiles...
Post by: NumLOCK on 2003-04-04 22:42:27
Quote
Well, this seems like a bug in MSVC, the behaviour is probably defined in IEEE standard...

Not completely: they say that an undefined behaviour is allowed in the case "left or right shift over X bits or more" where X is the integer type's number of bits.

Quote
But it might be that you've enabled some math optimizations similar to GCCs -ffast-math

Nope.. plain default config of VC++ 6.0.  BTW, it's not floating-point stuff (so FP math optimizations would have few effect on this - if any).
Title: Dibrom's ICS vs. MSVC compiles...
Post by: Bedeox on 2003-04-04 22:48:48
Actually -ffast-math does also fixed-point optimisations...
-funsafe-math-optimizations does only floating-point ones.
-ffast-math implies -funsafe-math-optmizations

Is there any standard which specifies proper behaviour?

<edit>
Spelling, spelling, spelling... (that should be my mantra)
</edit>