In the last few days I was dealing with LAME v3.90.3, different compilers, different systems and so on. These are my results:
First of all, I have used the following 3 files for my work:
LAME v3.90.3modified, 'official' windows compile (using ICL 4.5?), obviously one of the most used binaries (compiled by dibrom?):
1) http://rarewares.soniccompression.com/file...0.3modified.zip
Its source code (modifications done by dibrom?):
2) http://rarewares.soniccompression.com/file...modifiedsrc.zip
The original source code, without those 'modifications':
3) http://rarewares.soniccompression.com/file...3-linux.tar.bz2
A short overview what it's all about: The 'official' binary from 1) is compiled with Intel's C Compiler, it generates different MP3 files using "alt-preset standard", than a binary compiled from 2) using MS VC 6.0 compiler or gcc. The difference looks like this:
QUOTE
Intel compiled lame.exe from 1):
32 [ 1]
128 [ 12]
160 [ 181]
192 [2429]
224 [2203]
256 [ 544]
320 [ 845]
average: 225.3 kbps LR: 5720 (92.04%) MS: 495 (7.965%)
32 [ 1]
128 [ 12]
160 [ 181]
192 [2429]
224 [2203]
256 [ 544]
320 [ 845]
average: 225.3 kbps LR: 5720 (92.04%) MS: 495 (7.965%)
QUOTE
MS VC 6.0 compiled lame.exe, default compile: NASM + /O3 from 2):
32 [ 1]
128 [ 18]
160 [ 396]
192 [2933]
224 [1665]
256 [ 376]
320 [ 826]
average: 219.2 kbps LR: 5706 (91.81%) MS: 509 (8.190%)
32 [ 1]
128 [ 18]
160 [ 396]
192 [2933]
224 [1665]
256 [ 376]
320 [ 826]
average: 219.2 kbps LR: 5706 (91.81%) MS: 509 (8.190%)
As you can see in the above example the bitrates are different by using the SAME source code and settings (alt-preset standard, no additional switches!).
The MP3s encoded using the Intel binary are always ~3-4% larger, the bitrate arrangement however differs much more.
Of course the same wave file was used during all tests, (Beatles - Back In The U.S.S.R, 2min:42sec, ripped from an original CD).
I have tried to compile 2) with MSVC6, cygwin+gcc, linux+gcc, MacOSX+gcc and Intel C++ Compiler v8.0 (I don't have v4.5 yet):
Only ICC8 compiled a binary which encoded the file at 225.3 kbps.
ALL other compiles end up in a binary which encodes this wave at the SAME bitrate: 219.2 kbps!
The ICC8 compiled binary however still produced a different MP3 compared to the one encoded with 1) - its not byte-identical. I guess I need ICL v4.5 to achieve a 1:1 compile as in 1).
I also discovered: changing the MS VC 6.0 optimization flags (O1=size, O2=speed, O3=project default) would result in byte-different MP3 files - however the bitrate stays equal! Changing from "NASM" to "no ASM" didn't seem to have any impact on the encodes, just as changing the optimization in ICC8 from OPT=ULTRA to OPT=NORMAL.
It appears also, that binaries compiled with gcc and MSVC6 create again different encodes - however the bitrate stays identical!
Compiling the original LAME v3.90.3 source "not modified" as in 3) with MSVC6 and ICC8 leads to the same results, however with no "preset tag" in the header (which is what the modification is all about).
My conclusion:
As C source code usually should result in a deterministic binary... There must be either a problem with the Intel compiler and LAME v3.90.3, or a problem within the LAME v3.90.3 source code.
The higher bitrates might be a result of the Intel compiler behaving different and even "wrong" with some of the LAME source code, I would suspect the floating-point parts to be the criminal.
I assume LAME development is using mainly gcc for their work, thus I believe the resulted encodes achieved with Intel binary from 1) are "wrong" from their viewpoint.
In first place, I would like to know WHY Intel compiler behaves that much different.
Secondly, I would like to know, if the bitrate difference is hearable to any of the ultra-ears in here with their ultra-soundsystems (as I have none of those) :)
Some of my compiled binaries:
http://balder.prohosting.com/2lame/LAME.v3...VC6-O1-NASM.zip
http://balder.prohosting.com/2lame/LAME.v3...efault-NASM.zip
http://balder.prohosting.com/2lame/LAME.v3...efault-NASM.zip
(That free-hosting sucks, so try a couple of browsers if it doesn't work for you.)
It is not very hard to compile LAME v3.90.3, so I recommend you to compile it on your own and see for yourself, if you doubt about my results :)
Many thanks for reading and enlightening...
