IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
noise floor with lame.exe (3.99.5), why is it higher than with lame_enc.dll (3.99.5) ?
Sebastian_L
post Aug 21 2013, 00:36
Post #1





Group: Members
Posts: 4
Joined: 20-August 13
Member No.: 109706



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?
Go to the top of the page
+Quote Post
db1989
post Aug 21 2013, 00:40
Post #2





Group: Super Moderator
Posts: 5159
Joined: 23-June 06
Member No.: 32180



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.
Go to the top of the page
+Quote Post
Sebastian_L
post Aug 21 2013, 01:10
Post #3





Group: Members
Posts: 4
Joined: 20-August 13
Member No.: 109706



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.
Go to the top of the page
+Quote Post
db1989
post Aug 21 2013, 01:21
Post #4





Group: Super Moderator
Posts: 5159
Joined: 23-June 06
Member No.: 32180



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!
Go to the top of the page
+Quote Post
lvqcl
post Aug 21 2013, 16:17
Post #5





Group: Developer
Posts: 3214
Joined: 2-December 07
Member No.: 49183



QUOTE (Sebastian_L @ Aug 21 2013, 03:36) *
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').
Go to the top of the page
+Quote Post
Sebastian_L
post Aug 21 2013, 22:53
Post #6





Group: Members
Posts: 4
Joined: 20-August 13
Member No.: 109706



QUOTE (lvqcl @ Aug 21 2013, 17:17) *
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.

QUOTE (db1989 @ Aug 21 2013, 02:21) *
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! smile.gif
Go to the top of the page
+Quote Post
Sebastian_L
post Aug 22 2013, 00:43
Post #7





Group: Members
Posts: 4
Joined: 20-August 13
Member No.: 109706



So far, I found no compile time coditionals pointing in that direction. sad.gif But maybe that's not saying much. Hmm... Any Ideas?
Go to the top of the page
+Quote Post
saratoga
post Aug 22 2013, 05:31
Post #8





Group: Members
Posts: 4718
Joined: 2-September 02
Member No.: 3264



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.
Go to the top of the page
+Quote Post
marus_nebunu
post Nov 11 2013, 16:57
Post #9





Group: Members
Posts: 2
Joined: 11-November 13
Member No.: 112133



What application did you use to get the noise floor ?
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st April 2014 - 04:27