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: Why does LAME 3.93 have higher SNR than 3.98? (Read 15382 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Why does LAME 3.93 have higher SNR than 3.98?

Reply #25
2 robert
Finally! Thank you very much. Indeed, --scale 1 raised the SNR by ~3. If you could probably help me by suggesting other settings that may influence that, please do so.

This is the verbose output of the default encoding:

Code: [Select]
lame_3_98_4.exe --cbr -b 192 ..\CNT\8.wav --resample 4410
0 -m s tmp -q 0 --verbose
LAME 3.98.4 32bits (http://lame.sf.net/)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band: 18671 Hz - 19205 Hz
Encoding ..\CNT\8.wav to tmp
Encoding as 44.1 kHz stereo MPEG-1 Layer III (7.3x) 192 kbps qval=0

misc:

        scaling: 0.97
        ch0 (left) scaling: 0
        ch1 (right) scaling: 0
        huffman search: best (outside loop)
        experimental Y=0
        ...

stream format:

        MPEG-1 Layer 3
        2 channel - stereo
        padding: off
        constant bitrate - CBR
        using LAME Tag
        ...

psychoacoustic:

        using short blocks: channel coupled
        subblock gain: 1
        adjust masking: -4 dB
        adjust masking short: -4.4 dB
        quantization comparison: 9
        ^ comparison short blocks: 9
        noise shaping: 1
        ^ amplification: 2
        ^ stopping: 1
        ATH: using
        ^ type: 4
        ^ shape: 3 (only for type 4)
        ^ level adjustement: -0.7
        ^ adjust type: 3
        ^ adjust sensitivity power: 1.000000
        ^ adapt threshold type: 2
        experimental psy tunings by Naoki Shibata
          adjust masking bass=0 dB, alto=0 dB, treble=0 dB, sfb21=0 dB
        using temporal masking effect: yes
        interchannel masking ratio: 0
        ...

    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  1200/7724  (16%)|    0:08/    0:56|    0:08/    0:56|  3.5825x|    0:47
------------02:50--------------------------------------------------------------
  kbps        LR  %    long switch short %
  192.0      100.0        99.5  0.3  0.2                                   
Code: [Select]
lame_3_93_1.exe --cbr -b 192 ..\CNT\8.wav --resample 4410
0 -m s tmp --verbose
LAME version 3.93 MMX  (http://www.mp3dev.org)
(Win32 binaries from:  [url=http://www.hot.ee/smpman/mp3)]http://www.hot.ee/smpman/mp3)[/url]
CPU features: i387, MMX (ASM used), SIMD, SIMD2
Using polyphase lowpass  filter, transition band: 18671 Hz - 19205 Hz
Encoding ..\CNT\8.wav to tmp
Encoding as 44.1 kHz 192 kbps stereo MPEG-1 Layer III (7.3x) qval=2

misc:

        scaling: 0.000000
        ch0 (left) scaling: 0.000000
        ch1 (right) scaling: 0.000000
        filter type: 0
        quantization: xr^3/4
        huffman search: best (outside loop)
        experimental X=0 Y=0 Z=0
        ...

stream format:

        MPEG-1 Layer 3
        2 channel - stereo
        padding: auto
        constant bitrate - CBR
        using LAME Tag
        ...

psychoacoustic:

        tonality estimation limit: 8871.700195 Hz
        using short blocks: allowed
        adjust masking: 0.000000 dB
        psymodel: 1
        noise shaping: 1
        ^ amplification: 1
        ^ stopping: 1
        ATH: using
        ^ type: 2
        ^ adjust type: 0
        ^ adapt threshold type: 2
        using temporal masking effect: yes
        interchannel masking ratio: 0.000000
        ...

    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  700/7724  ( 9%)|    0:01/    0:13|    0:02/    0:22|  15.001x|    0:20
2 everyone else
Oh my god, people! Kohlrabi, i link the post so that you understand better what i'm talking about. People here came to the point of acusing me in misunderstanding SNR that i took right from the book, and wiki confirms that. Thats why i provide another post, just so you people dont acuse me of calculating it wrong! db1989, why are you mentioning psychoacoustics again and my "lack of knowledge". HOW DOES IT MATTER HERE? Look above. robert did EXACTLY what i was looking for - gave me at least one change that was decreasing SNR. And that indeed changed over the versions, and that indeed DECREASED signal to noise ratio. How come psycoacoustics matter here? This is just simple scaling that was distorting the waveform (obviously)!


Why does LAME 3.93 have higher SNR than 3.98?

Reply #27
Don't you now see the folly of how you are interpreting your results? Even a tiny change in scaling, not enough to be audible, changes your number significantly!

And I know how to calculate a SNR. What I was disputing was what you are defining as noise, which, as shown above, is bogus.

Why does LAME 3.93 have higher SNR than 3.98?

Reply #28
I never argued about that! What i need to know is wether i am doing something wrong with 3.98.3 that i receive a more distorted file, or wether i am doing nothing wrong, and drop in SNR is intended, and indeed, less SNR brings more HEARING QUALITY in this case.


Second reply in this thread.  Read it until you understand it. 

Just look here http://www.claessonedwards.com/forum/viewtopic.php?p=9839
Believe your eyes. More waveform distortion with 3.98.3, less with 3.93.1


That link is painful to read.  Don't listen to any of those people, they're completely confused. 

I typed the console output. Since all three say "Using polyphase lowpass filter, transition band: 18671 Hz - 19205 Hz" can i assume that lowpass settings are the same? What parameters shall i input to make sure that ALL filter settings are the same?


I would specify a lowpass filter setting when doing this to be certain the same was used for each compile.

If you know how to do it, tell me. If you dont, tell me you dont know how to do it. If i cannot explain to you importance of something it doesnt mean it is not important to me. A kid cannot explain importance of healthy food, or how does it affect his body health, but it is still important to him, right?


You can't explain why its important because its actually not important. 

Why does LAME 3.93 have higher SNR than 3.98?

Reply #29
2 your Second reply (and your last post as well since it states the same)

on first part (lowpass settings) -  I asked numerous times now, what keys shall i input to make sure ALL lowpass settings are set? Setting transition band isnt of any use, as from what i see in output window, every codec uses same frequencies ("transition band: 18671 Hz - 19205 Hz"). What else do i have to set?

on second part (snr is useless) - Okay. Let me state the point clearly.
Over absolutely randomly chosen examples of pairs of mp3 encoded sound waves (both encoded from same file, each with different algorithm/settings), over 50% cases will show that increase in SNR will match with an increase in hearing quality (or the hearing quality will remain the same), provided no input stream modification was made prior to encoding (like tuning the volume down aka scaling etc).
(Clarification - we are comparing SNR and hearing quality ONLY between two files in a pair, both resulting from the same single source file: SNR of each of the resulting files calculated against the source file, hearing quality of the two resulting files compared to each other. We do not compare two files procduced from different source files, or that were altered by scale filters and such as part of encoding)

Now if you can prove otherwise, prove that most of the time, increase in SNR will mean a decrease in percieved hearing quality (meaning it will be less than 50), or that it is totally unrelated (meaning it will be 50/50) i am 100% willing to listen to the proof, and upon receiving the proof i will cease any questions on the matter, because that would indeed prove that SNR is not important.

However, what you (and most of the people on this forum) are talking about is that if we take two random source files, encode them with random settings, and then compare their SNR (one source file to its encoded result, second to its own encoded result), then by comparing this SNR we cannot tell which of them was encoded by better (better meaning better hearing quality) codec. Or that if we add distortions to source wave (like, tune down the volume aka scaling) it will influence SNR greatly but not the hearing sound quality. This is indeed obviously TRUE and i dont argue about that!

What i am trying to achieve is to find out wether i am using different codec settings or encoding algorithm is bugged somehow or anything else intervenes. Thats just it. I am trying to find out, since LAME algorithm didnt change much, what kind of filters it is now applying that it didnt before, And that CAN be achieved by comparing SNR, as proved by the previous post where one such difference in settings was indeed found to be changed in 3.98.3 defaults and caused an SNR drop.

-

Guys, once again, i understand that maybe my english is hard to understand or i sound too harsh or impatient or ignorant, but please... please understand. I DONT WANT TO COMPARE HEARING QUALITY OF THE TWO CODECS.

All i want to know is what has changed in the defaults, to sort out everything else before i start to study the algorithm to find out what changed in algorithms.
And i am only using SNR as an easy metric to see that two codecs have DIFFERECES. And that the one with lesser SNR, obviously, distorts the signal more than the other.
But you are bringing up the "SNR is not a metric to compare quality" argument over and over and over... Instead of just keeping it to the point of my topic.

Why does LAME 3.93 have higher SNR than 3.98?

Reply #30
What i am trying to achieve is to find out wether i am using different codec settings or encoding algorithm is bugged somehow or anything else intervenes. Thats just it. I am trying to find out, since LAME algorithm didnt change much, what kind of filters it is now applying that it didnt before, And that CAN be achieved by comparing SNR, as proved by the previous post where one such difference in settings was indeed found to be changed in 3.98.3 defaults and caused an SNR drop.

From that I gather that you haven't studied either LAME changelogs, development or even the answers in this thread, and expect someone to spoon-feed all the information to you? Reread robert's answers:

Since LAME version 3.94, the ABR/CBR/VBR modes use some presets, so no more plain old GPsycho psy model. (look out for NSPsycho, Naoki Shibata's psy tunings)
http://lame.cvs.sourceforge.net/viewvc/lam...l?revision=HEAD

This is (part of) what changed. Since the developer posted that, this might be important to investigate.

So, robert, can i using some input parameters "emulate" 3.93 behavior on 3.98? I mean, can i tweak 3.98 by changing some settings so it would encode like 3.93 does by default?


No.

Stop asking for settings to emulate the old behaviour, this has been denied before.

If you call LAME with --verbose command line parameter, you will notice, 3.98 does some scaling of the input data. FWIW, add --scale 1.

The difference of your two signals became smaller when you scaled them the same way.


Over absolutely randomly chosen examples of pairs of mp3 encoded sound waves (both encoded from same file, each with different algorithm/settings), over 50% cases will show that increase in SNR will match with an increase in hearing quality (or the hearing quality will remain the same), provided no input stream modification was made prior to encoding (like tuning the volume down aka scaling etc).

Now if you can prove otherwise, prove that most of the time, increase in SNR will mean a decrease in percieved hearing quality (meaning it will be less than 50), or that it is totally unrelated (meaning it will be 50/50) i am 100% willing to listen to the proof, and upon receiving the proof i will cease any questions on the matter, because that would indeed prove that SNR is not important.


I thought you didn't want to make claims about audio quality anymore, and here you go again. Where does your 50% number come from? How much more than 50%, or rather around 50%? It very well proves that SNR has no impact, since 50% means you can flip a coin to determine the outcome, which is to be expected for a completely random binary decision, where the variable you investigate is completely unrelated to the final result. So, you have your own proof here, that SNR and perceived audio quality are unrelated, congratulations.
It's only audiophile if it's inconvenient.

Why does LAME 3.93 have higher SNR than 3.98?

Reply #31
So many emotions!
I think there's nothing wrong to worry about a decreased SNR no matter how weak this is related to audible quality.
On the other hand, Istrebitel: Robert gave you an explanation for this behavior. It did not explain it totally, but it doesn't looi like you can get a perfect answer.
lame3995o -Q1.7 --lowpass 17

Why does LAME 3.93 have higher SNR than 3.98?

Reply #32
on second part (snr is useless) - Okay. Let me state the point clearly.
Over absolutely randomly chosen examples of pairs of mp3 encoded sound waves (both encoded from same file, each with different algorithm/settings), over 50% cases will show that increase in SNR will match with an increase in hearing quality (or the hearing quality will remain the same), provided no input stream modification was made prior to encoding (like tuning the volume down aka scaling etc).
(Clarification - we are comparing SNR and hearing quality ONLY between two files in a pair, both resulting from the same single source file: SNR of each of the resulting files calculated against the source file, hearing quality of the two resulting files compared to each other. We do not compare two files procduced from different source files, or that were altered by scale filters and such as part of encoding)

Now if you can prove otherwise, prove that most of the time, increase in SNR will mean a decrease in percieved hearing quality (meaning it will be less than 50), or that it is totally unrelated (meaning it will be 50/50) i am 100% willing to listen to the proof, and upon receiving the proof i will cease any questions on the matter, because that would indeed prove that SNR is not important.
Why would we seek to prove that to you?

It's obvious that SNR is weakly and imperfectly correlated with perceived audio quality across the world of all possible psycho-acoustic based codecs. The global correlation is not zero and is not negative.

But it's a poor correlation, and there are plenty of subsets where the correlation is negative. It's trivial to increase SNR while decreasing perceived quality. Anyone can do that. The talented can decrease SNR while increasing perceived quality. So why on earth would you put a minute more of your time into this futile method of analysis?

I'm guessing you haven't read my link in post 27.

Cheers,
David.

Why does LAME 3.93 have higher SNR than 3.98?

Reply #33
on second part (snr is useless) - Okay. Let me state the point clearly.
Over absolutely randomly chosen examples of pairs of mp3 encoded sound waves (both encoded from same file, each with different algorithm/settings), over 50% cases will show that increase in SNR will match with an increase in hearing quality (or the hearing quality will remain the same), provided no input stream modification was made prior to encoding (like tuning the volume down aka scaling etc).


No that is not correct. 

As I said before SNR is useless.

What i am trying to achieve is to find out wether i am using different codec settings or encoding algorithm is bugged somehow or anything else intervenes. Thats just it. I am trying to find out, since LAME algorithm didnt change much, what kind of filters it is now applying that it didnt before, And that CAN be achieved by comparing SNR, as proved by the previous post where one such difference in settings was indeed found to be changed in 3.98.3 defaults and caused an SNR drop.


To be clear, you cannot accomplish this goal using SNR measurements. 

All i want to know is what has changed in the defaults, to sort out everything else before i start to study the algorithm to find out what changed in algorithms.


An enormous number of things have changed over the years.  If you want to learn about them, check out the source and begin sifting through the commit logs.

Why does LAME 3.93 have higher SNR than 3.98?

Reply #34
@Istrebitel: I'm not a mod, but you are clearly violatng TOS #8 by making unsubstantiated claims about audible quality. Please stop trying to convince us of this absurd notion of yours. It's not going to happen.

Listening tests have shown convincingly that there has been a continual improvement in the quality of LAME encodes between 3.93 and 3.98, so that is a direct contradition of your claim of a correlation between quality and "SNR".

Why does LAME 3.93 have higher SNR than 3.98?

Reply #35
What I was disputing was what you are defining as noise, which, as shown above, is bogus.
Amen, brother.

differences due to scaling = noise 


Why would we seek to prove that to you?

Especially when we aren't the ones championing the existence of the flying spaghetti monster:
I know SNR isnt totally meaningful to understand mp3 file quality, but still, it does corellate with quality. SNR for bigger bitrate would always be bigger than for lower bitrate.
Such a difference in signal-to-noise ration feels like the quality of 3.98.4 went down compared to 3.93.1.
If i cannot explain to you importance of something it doesnt mean it is not important to me. A kid cannot explain importance of healthy food, or how does it affect his body health, but it is still important to him, right?
Now if you can prove otherwise, prove that most of the time, increase in SNR will mean a decrease in percieved hearing quality (meaning it will be less than 50), or that it is totally unrelated (meaning it will be 50/50) i am 100% willing to listen to the proof, and upon receiving the proof i will cease any questions on the matter, because that would indeed prove that SNR is not important.

http://uncyclopedia.wikia.com/wiki/Proof