IPB

Welcome Guest ( Log In | Register )

3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
SNR of MP3, Split from Topic ID #96702
Arnold B. Kruege...
post Aug 31 2012, 20:07
Post #26





Group: Members
Posts: 3537
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (Alexey Lukin @ Aug 30 2012, 15:42) *
I still think that the best way to measure mp3 noise is to do a subtraction test.


I can't think of a worse general way to measure anything than subtraction tests, because they frequently conflate a myriad of differences into one signal.
Go to the top of the page
+Quote Post
benski
post Aug 31 2012, 21:08
Post #27


Winamp Developer


Group: Developer
Posts: 669
Joined: 17-July 05
From: Ashburn, VA
Member No.: 23375



QUOTE (pdq @ Aug 31 2012, 09:52) *
QUOTE (benski @ Aug 28 2012, 13:37) *
The SNR of an MP3 is around 25-30dB. Does this mean that I only need to decode them to 6-bit PCM to capture all the details?

So, after all of the back and forth of how to measure the SNR of an mp3, has this question been answered?


It was a rhetorical question. Of course it's not enough to capture the output of MP3. LPCM's quantization noise is spread out evenly across the entire spectrum (noise-shape dither can do some juggling, but not much), but of course MP3 has low distortion levels "where it counts".

The main point of bringing up the subject, and I hope everyone gets the point, is that simply taking the SNR or THD+N and dividing by 6.02dB and saying "use this many bits" is not an accurate model.
Go to the top of the page
+Quote Post
greynol
post Aug 31 2012, 21:58
Post #28





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



Ignoring that people may have missed the point or are simply ignoring the point in order to argue a different one and then nitpick when things don't go their way, maybe you could offer some insight as to how you arrived at the figure you provided?


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
2Bdecided
post Sep 3 2012, 09:50
Post #29


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (benski @ Aug 31 2012, 21:08) *
The main point of bringing up the subject, and I hope everyone gets the point, is that simply taking the SNR or THD+N and dividing by 6.02dB and saying "use this many bits" is not an accurate model.
...but looking at the minimum point in the noise floor, and figuring out how many bits are needed to preserve that, works pretty well (see LossyWAV).

Cheers,
David.

Go to the top of the page
+Quote Post
Neuron
post Dec 29 2012, 18:30
Post #30





Group: Members
Posts: 141
Joined: 14-December 12
Member No.: 105171



What is the THD+N of 16-bit 44.1 Khz PCM?
Go to the top of the page
+Quote Post
greynol
post Dec 29 2012, 18:52
Post #31





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



-96dB without playing games with dither and it's all N; there is no THD.

Perhaps a little research into digital sampling is in order?


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
Neuron
post Dec 29 2012, 19:04
Post #32





Group: Members
Posts: 141
Joined: 14-December 12
Member No.: 105171



Anyways, anyone who ever heard a 6-bit PCM file knows this is funny. 6-bit PCM is incredibly noisy and it is the equivalent of the rough maximum resolution you can do with digital audio on the PC Speaker. Yes, I mean that little tiny beeper.

Here is a short part of a 192 kbps mp3 bitcrushed to 6-bits:
http://www.hydrogenaudio.org/forums/index....showtopic=98564
Go to the top of the page
+Quote Post
saratoga
post Dec 29 2012, 22:21
Post #33





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



QUOTE (Neuron @ Dec 29 2012, 13:04) *
Anyways, anyone who ever heard a 6-bit PCM file knows this is funny. 6-bit PCM is incredibly noisy and it is the equivalent of the rough maximum resolution you can do with digital audio on the PC Speaker. Yes, I mean that little tiny beeper.

Here is a short part of a 192 kbps mp3 bitcrushed to 6-bits:
http://www.hydrogenaudio.org/forums/index....showtopic=98564


To be clear, MP3 does not work the same as PCM. 128kbit/s @ 44.1k is 2.9 bits per sample. Throw in ~ 2:1 lossless compression and you get very roughly 6 bits per sample. Actually when I tried this via the subtraction method (and using WMA rather then MP3) I got closer to 5 bits per sample. This puts a hard limit on the SNR because you only have a few bits, thus noise will be large as in your sample. However, lossy codecs are quite clever about distributing that quantization noise, and so you will find that 2.9 bits/sample on mp3 sounds quite a lot better then 6 bits/sample PCM.
Go to the top of the page
+Quote Post
IgorC
post Dec 29 2012, 23:44
Post #34





Group: Members
Posts: 1506
Joined: 3-January 05
From: Argentina, Bs As
Member No.: 18803



In other words SNR is not enough representative metrics. It doesn't take psychoacoustics into account.

This post has been edited by IgorC: Dec 29 2012, 23:44
Go to the top of the page
+Quote Post
Neuron
post Dec 30 2012, 00:05
Post #35





Group: Members
Posts: 141
Joined: 14-December 12
Member No.: 105171



So what would be the "percievable SNR" for an average mp3?
Go to the top of the page
+Quote Post
greynol
post Dec 30 2012, 00:28
Post #36





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



What do you mean?

The whole point of this discussion is that applying SNR as a metric to qualify MP3 is a lot more than just a little silly. SNR of MP3 is low, or far lower than what people would normally deem acceptable from a hi-fi system. The lower it can go without being noticed or found offensive, I'd say the better the encoder is doing its job.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
saratoga
post Dec 30 2012, 02:45
Post #37





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



QUOTE (Neuron @ Dec 29 2012, 18:05) *
So what would be the "percievable SNR" for an average mp3?


What do you think perceivable snr would mean?
Go to the top of the page
+Quote Post
Woodinville
post Dec 30 2012, 03:42
Post #38





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (Arnold B. Krueger @ Aug 29 2012, 03:41) *
QUOTE (benski @ Aug 28 2012, 13:37) *
QUOTE (jensend @ Aug 27 2012, 11:45) *
The LP noise floor is rather high- maybe -70dB under very good conditions. 12-bit sampling (RMS noise floor of -72dB) would be sufficient for LP use as long as your levels are right (peak signal above -6dB). (12-bit sampling was used for DV but hasn't seen any other widespread use).


The SNR of an MP3 is around 25-30dB.



In which alternative universe? At what ludicrously low bit rate?

SNR is a measurable quantity. I've measured it in high-bit rate MP3s. The exact number escapes me but I seem to recall some number north of 80 dB. It was so high that I questioned the use of bandwidth to maintain it.


The SNR of a good-sounding MP3 will be in the 30dB range. Dynamic range is much, much higher. Consider it floating-point like.

This is not alternative universe, this is perceptual coding 101.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
Woodinville
post Dec 30 2012, 03:44
Post #39





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (Alexey Lukin @ Aug 30 2012, 11:42) *
I still think that the best way to measure mp3 noise is to do a subtraction test.


You're still dead one right, too!


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
Woodinville
post Dec 30 2012, 03:47
Post #40





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (Arnold B. Krueger @ Aug 31 2012, 11:07) *
QUOTE (Alexey Lukin @ Aug 30 2012, 15:42) *
I still think that the best way to measure mp3 noise is to do a subtraction test.


I can't think of a worse general way to measure anything than subtraction tests, because they frequently conflate a myriad of differences into one signal.


Since MP3 has no phase shift or frequency shaping to speak of, delay-compensated direct difference is exactly the right way to measure SNR.

In fact, it's ALWAYS the right way to measure SNR, which is formally mathematically defined as

SNR = sum( (x*x))/sum( (x-y)^2)

So Arny, you're right that it makes little sense in perceptual terms, which is why I say in my talks "SNR is mostly useless for perceptual purposes". None the less, SNR is the relevant question when asking "bits of resolution", courtesy of Mr. Shannon.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
Woodinville
post Dec 30 2012, 03:49
Post #41





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



Of course, as a later codec using noiseshaped DPCM showed clearly, 6 bits/sample is more than sufficient, but there is substantial noise shaping as well as power adaptation.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
Neuron
post Dec 30 2012, 10:23
Post #42





Group: Members
Posts: 141
Joined: 14-December 12
Member No.: 105171



QUOTE (Woodinville @ Dec 30 2012, 03:49) *
Of course, as a later codec using noiseshaped DPCM showed clearly, 6 bits/sample is more than sufficient, but there is substantial noise shaping as well as power adaptation.


Pardon my ignorance, but which codec is that? And 6-bit DPCM does in fact have more bits of resolution, given that it encodes sample differences, not the samples themselves. 4-bit ADPCM ordinarily gives around 10-14 bit of resolution, even without any dithering or noise shaping.

This post has been edited by Neuron: Dec 30 2012, 10:28
Go to the top of the page
+Quote Post
hlloyge
post Dec 30 2012, 11:15
Post #43





Group: Members
Posts: 689
Joined: 10-January 06
From: Zagreb
Member No.: 27018



I don't get it. If I encode 1 kHz at 0 dB to mp3, will that mean I will get noise at -30 dB?
I find that hard to believe. Is there any sample that I can use to measure noise level in some program like Audacity, for example?
Go to the top of the page
+Quote Post
Woodinville
post Dec 30 2012, 12:09
Post #44





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (Neuron @ Dec 30 2012, 01:23) *
QUOTE (Woodinville @ Dec 30 2012, 03:49) *
Of course, as a later codec using noiseshaped DPCM showed clearly, 6 bits/sample is more than sufficient, but there is substantial noise shaping as well as power adaptation.


Pardon my ignorance, but which codec is that? And 6-bit DPCM does in fact have more bits of resolution, given that it encodes sample differences, not the samples themselves. 4-bit ADPCM ordinarily gives around 10-14 bit of resolution, even without any dithering or noise shaping.



You're missing the key point, look-ahead noise shaping, ala Jayant-Noll A*DPCM.

I also think you're confusing dynamic range with SNR.

The paper was from the dire end of Lucent and its subsequent slit into a bunch of companies.

This post has been edited by Woodinville: Dec 30 2012, 12:10


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
Woodinville
post Dec 30 2012, 12:12
Post #45





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (hlloyge @ Dec 30 2012, 02:15) *
I don't get it. If I encode 1 kHz at 0 dB to mp3, will that mean I will get noise at -30 dB?
I find that hard to believe. Is there any sample that I can use to measure noise level in some program like Audacity, for example?



You can use any music you want, just time-align your before and after, and then give on a gain of +1 and the other -1.

You can believe what you want, and with a single sine wave, you will get more than 30dB even though you don't need it, but you really need to understand how noise shaping works in a perceptual coder.

You are aware of the "13dB Miracle" yes?


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
saratoga
post Dec 30 2012, 19:02
Post #46





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



QUOTE (hlloyge @ Dec 30 2012, 05:15) *
I find that hard to believe.


That 5 or 6 bits worth of information has a lot more quantization noise then 15 or 16? What about that is unexpected?
Go to the top of the page
+Quote Post
Neuron
post Dec 30 2012, 21:47
Post #47





Group: Members
Posts: 141
Joined: 14-December 12
Member No.: 105171



QUOTE (saratoga @ Dec 30 2012, 19:02) *
QUOTE (hlloyge @ Dec 30 2012, 05:15) *
I find that hard to believe.


That 5 or 6 bits worth of information has a lot more quantization noise then 15 or 16? What about that is unexpected?


Yes, but MP3 is not 5 or 6 bit PCM. It is a 32 bit floating point file that contains lossily compressed information which is stored in a non-PCM way. Some guy on this forum once said that mp3 files vs. wav files are like vector graphics files vs bitmap files. By the type of reasoning some people think here, MIDI files would be around perhaps 0.001 bit.

A file with 2.9 bits of resolution would divide the waveform into only cca 7.4 steps and distort the sound wave into a near-squarewave shape. It would be unlistenable even with the most clever dithering and noise shaping in the universe unless you sampled it at megahertz rates, which mp3 definitely does not do.

And LPs can definitely not be stored in just 12 bits. SNR does not tell the whole picture. Quantization error is not "noise", it is ugly disharmonic distortion. Dither prevents that, but it increases dynamic range only, the SNR is actually worse. A dithered 12 bit recording would get rid of most of the distortion, but it would have more noise than an LP. The reason why tapes and LPs are sampled at 16 or 24 bits when digitalizing is that the noise floor of a tape or an LP is very different from digital quantization "noise". You can actually hear signals below the noise level on analog mediums while on undithered digital the signal just drops off.

A CD is definitely superior to LP in noise level, however this does not apply to low resolution digital recordings. A cheap 1980s tape boombox and an 8-bit file might have a similiar SNR, but the tape boombox will sound better as the noise on it is just hiss while 8-bit file will have an ugly, swishy noisy distortion sound in the quiet parts. That is because quantization noise is not static or white noise, it is just how our ears percieve a "steppier" waveform. I am no analog fanboy, but digital quantization error definitely sounds worse than analog noise. That is the same reason why an overdriven tube/transistor analog distortion pedal creates cool rock/metal guitar sounds while digital clipping creates horrible sound. Try digitally clipping a guitar recording in Audacity, you are not going to get a cool rock sound, you are gonna get some seriously horrible sound. Both phenomena are caused by clipping, but forms of clipping are very different from each other just like forms of noise.
Go to the top of the page
+Quote Post
Nick.C
post Dec 30 2012, 22:09
Post #48


lossyWAV Developer


Group: Developer
Posts: 1772
Joined: 11-April 07
From: Wherever here is
Member No.: 42400



The 2.9 bits/sample quoted is not a literal 2.9 bits for every sample - rather an average. Not all samples are stored equally in MP3.


--------------------
lossyWAV -q X -a 4 --feedback 4| FLAC -8 ~= 320kbps
Go to the top of the page
+Quote Post
Neuron
post Dec 30 2012, 22:17
Post #49





Group: Members
Posts: 141
Joined: 14-December 12
Member No.: 105171



QUOTE (Nick.C @ Dec 30 2012, 22:09) *
The 2.9 bits/sample quoted is not a literal 2.9 bits for every sample - rather an average. Not all samples are stored equally in MP3.


Yes, but still, 2.9 bits would divide the waveform into only 7 steps. A sine wave would look like a rough stairway. This is clearly not the case with MP3.
Go to the top of the page
+Quote Post
lvqcl
post Dec 30 2012, 22:33
Post #50





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



No, MP3 doesn't store wave data in PCM format.
Go to the top of the page
+Quote Post

3 Pages V  < 1 2 3 >
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 - 08:43