Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: noise floor with lame.exe (3.99.5) (Read 10339 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

noise floor with lame.exe (3.99.5)

Hi everybody!

For quite some time I am playing around with the code of lame 3.99.5 to improve my understanding of lossy compression and real-world DSP (which my university doesnt offer). Recently, I was curious, if my compilation of lame 3.99.5 on linux behaves the same way as lame 3.99.5 on windows. There, I discovered something unexpected (at least for me) - while the lame.exe and my lame-compilation produced the same output, encoding via lame_enc.dll differs from them:

testnoise.wav: White noise with lowpass around 9 kHz, peak -4,7dBFS, 16 bit, 44,1kHz, stereo
File1.mp3 encoded by: lame_enc.dll 3.99.5 controlled by Aimp Audio Converter v3.50 build 1277 (settings: Joint Stereo/CBR/320 kbps)
File2.mp3 encoded by: lame.exe 3.99.5 (settings: -b 320 -q 0 -m j )
(lame.exe and lame_enc.dll are the latest downloads from rarewares )

Power spectral density estimate of testnoise.wav:

Power spectral density estimate of File1.mp3:

Power spectral density estimate of File2.mp3:


You see the noise floor of File2 is up to 15dB above the one of File1, which preserves the noise floor of testnoise.wav quite good. I tried out many different settings (including the experimental switches for developers) with lame.exe, but no setting for lame.exe reproduced the low noise floor of File1. I could reproduce the differences with other lowpass frequencies (e.g. 12 kHz, 16 kHz) as well as with a bandstop filter. Since they are going down to the same according noise floor, I uploaded only these 2 examples.

Where does this difference in the noise floor come from? Is it possible, that there's a difference in version 3.99.5 between lame.exe (together with lame compiled from source) vs. lame_enc.dll?

noise floor with lame.exe (3.99.5)

Reply #1
If you have been studying the source, have you checked whether there are any compile-time conditionals that change things based upon whether the target is an executable or a library? That would be the first place to look, I think.

noise floor with lame.exe (3.99.5)

Reply #2
Wow, that was fast! Thanks for your answer, db1989! Very good point indeed - I'll try that tomorrow (since it's already 2 am here) and post my possible findings here.

noise floor with lame.exe (3.99.5)

Reply #3
I’m not sure how likely it is, really, but it’s definitely a good thing to check first.

But anyway, perhaps users with more experience in the code than either of us will have better ideas!

noise floor with lame.exe (3.99.5)

Reply #4
File1.mp3 encoded by: lame_enc.dll 3.99.5 controlled by Aimp Audio Converter v3.50 build 1277 (settings: Joint Stereo/CBR/320 kbps)
File2.mp3 encoded by: lame.exe 3.99.5 (settings: -b 320 -q 0 -m j )

I don't think that AIMP sets q value to 0. Try to encode the file using 'lame -b 320 -q 3 -m j' (or simply 'lame -b 320').

noise floor with lame.exe (3.99.5)

Reply #5
I don't think that AIMP sets q value to 0. Try to encode the file using 'lame -b 320 -q 3 -m j' (or simply 'lame -b 320').

Thanks for the suggestion. I just tried that with the above testcase.wav, but still no improvement.

But anyway, perhaps users with more experience in the code than either of us will have better ideas!

I'm going to check the compile-time conditionals now, but I am indeed not an experienced coder. So help would be greatly appreciated!

 

noise floor with lame.exe (3.99.5)

Reply #6
So far, I found no compile time coditionals pointing in that direction.  But maybe that's not saying much. Hmm... Any Ideas?

noise floor with lame.exe (3.99.5)

Reply #7
Slightly different default parameters between those two programs would be my guess.  If you can compile on windows, you could probably edit the source to dump the exact parameters used in each case.

noise floor with lame.exe (3.99.5)

Reply #8
What application did you use to get the noise floor ?