Answeredmp3 bit depth of 24 (effective of 20) and floating point?

Author
mettelus
Max Output Level: -22 dBFS
  • Total Posts : 5321
  • Joined: 2005/08/05 03:19:25
  • Location: Maryland, USA
  • Status: offline
2015/04/20 13:42:29 (permalink)

mp3 bit depth of 24 (effective of 20) and floating point?

I was always curious why Adobe Audition shows opened mp3s (it has rendered) as 32-bit (float), and assumed it was a bug in the program. I went on a search this morning and this post left me scratching my head. http://taperssection.com/index.php?PHPSESSID=72d25e1e94dd723a7e42258fbb4bb5f8&topic=136471.msg1779929#msg1779929
 
A couple comments he makes stand out big time (but he also posted a truckload of supporting info):
 
"From what I understand, mp3's are floating point representations..."
 
[and last paragraph] "As to the original question, according to the IEC standard, mp3's can input/output at 24bits, and have 20bits of effective dynamic range.  Based on this, it seems that you would get better sound from converting 24bit pcm files directly to mp3, rather than dithering to 16bits first and then encoding...."
 
I always assumed mp3s were 16-bit (and fixed), but this guy is making the assertion that they are effectively 20-bit (and floats). Is this true?
 

ASUS ROG Maximus X Hero (Wi-Fi AC), i7-8700k, 16GB RAM, GTX-1070Ti, Win 10 Pro, Saffire PRO 24 DSP, A-300 PRO, plus numerous gadgets and gizmos that make or manipulate sound in some way.
#1
drewfx1
Max Output Level: -9.5 dBFS
  • Total Posts : 6585
  • Joined: 2008/08/04 16:19:11
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/20 16:28:07 (permalink) ☼ Best Answerby mettelus 2015/04/21 07:52:28
You can't equate an mp3's bit depth with the audio bit depth that we are familiar with.
 
Internally they do use a 32bit floating point data type, but we aren't talking about anything like a stream of samples at that bit depth (except perhaps near the input of an encoder or near the output of a decoder). If we want to try to think about the equivalent bit depth, the problem is that once the compression happens it is constantly changing with both time and frequency.
 
The decoder converts the compressed data back to a conventional stream of PCM samples and outputs it in fixed point. And an encoder will likely accept the 32 bit floating point audio that Sonar and most DAWs use internally.

 In order, then, to discover the limit of deepest tones, it is necessary not only to produce very violent agitations in the air but to give these the form of simple pendular vibrations. - Hermann von Helmholtz, predicting the role of the electric bassist in 1877.
#2
Sycraft
Max Output Level: -73 dBFS
  • Total Posts : 871
  • Joined: 2012/05/04 21:06:10
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/20 16:50:56 (permalink)
So MP3s can indeed represent more than 16-bits of dynamic range. You can test it, if you've a good enough setup, my encoding a sine wave below -96dB and then playing it back (provided your decoder decodes to 24-bit). It'll work, I've done it.
 
Now as to how much difference higher bit input makes, I dunno. Probably very little, if any, since part of what MP3s do is use knowledge about psychoacoustics where louder sounds mask quieter ones.
 
Internally they aren't really based on bits at all, at least not in the PCM sense. The way they deal with sound is complex, but it is more or less breaking it down in to a bunch of cosine waves and analyzing/storing information on that. So it isn't storing sample data as you might think of it, rather it stores information on how to do a mathematical approximation of the original data.
 
That math is generally done floating point, since computers these days loves them some floating point math, and it eliminates quantization errors in the reconstruction.
#3
mettelus
Max Output Level: -22 dBFS
  • Total Posts : 5321
  • Joined: 2005/08/05 03:19:25
  • Location: Maryland, USA
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/21 07:54:09 (permalink)
Thanks got that explanation Drew. I guess I have always simply associated it with the encoder window, since most give "bit depth" options. In Audition, regardless of what you choose it just "does its own thing" and the only user controlled parameters are really bit rate and CBR/VBR options.
 
Leaving everything else the same, choosing a bit depth in Audition when creating an mp3 has no effect on the render whatsoever, so realizing its algorithm doesn't correlate apples-to-apples helps a lot.

ASUS ROG Maximus X Hero (Wi-Fi AC), i7-8700k, 16GB RAM, GTX-1070Ti, Win 10 Pro, Saffire PRO 24 DSP, A-300 PRO, plus numerous gadgets and gizmos that make or manipulate sound in some way.
#4
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
  • Total Posts : 26036
  • Joined: 2006/09/17 11:23:23
  • Location: Everett, WA USA
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/21 10:38:50 (permalink)
This was a great question, mettelus, because it made me stop and think.
 
I'd always assumed that of all the things MP3 encoding messes with, dynamics wasn't one of them. At least, not directly. The process takes advantage of the masking effect, which I've long believed was the extent of its magic. Masking has nothing to do with dynamic range.
 
But after I thought about it, I realized that I did not know this to be a fact. After all, perceptual coding is all about tossing away stuff you can't hear, and surely that would include tiny fluctuations down near the noise floor. 
 
So I read up on it, looking for anything that would tell me if dynamics are ever sacrificed by lossy encoding. I found nothing that would suggest that it does, but also found nothing that explicitly assured me that it doesn't. So, as is often the case, I turned to experimentation to find out.
 
Long story short, I tested it and confirmed that MP3 encoding does not alter dynamic range, regardless of quality settings. The only thing it does do is lose a small amount of accuracy, small-enough of an error that it would not be audible.
 


All else is in doubt, so this is the truth I cling to. 

My Stuff
#5
drewfx1
Max Output Level: -9.5 dBFS
  • Total Posts : 6585
  • Joined: 2008/08/04 16:19:11
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/21 13:50:55 (permalink)
bitflipper
So I read up on it, looking for anything that would tell me if dynamics are ever sacrificed by lossy encoding. I found nothing that would suggest that it does, but also found nothing that explicitly assured me that it doesn't. So, as is often the case, I turned to experimentation to find out.

 
I believe every little piece gets non-linearly scaled a few times so you end up sacrificing some SNR on a piece by piece basis but maintain the overall dynamic range. But I'm not sure what the outer limits are.



 In order, then, to discover the limit of deepest tones, it is necessary not only to produce very violent agitations in the air but to give these the form of simple pendular vibrations. - Hermann von Helmholtz, predicting the role of the electric bassist in 1877.
#6
John
Forum Host
  • Total Posts : 30467
  • Joined: 2003/11/06 11:53:17
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/21 15:05:48 (permalink)
I thought I knew about MP3s. After reading this I know nothing about MP3s. 

Best
John
#7
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
  • Total Posts : 26036
  • Joined: 2006/09/17 11:23:23
  • Location: Everett, WA USA
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/21 22:47:53 (permalink)
drewfx1
I believe every little piece gets non-linearly scaled a few times so you end up sacrificing some SNR on a piece by piece basis but maintain the overall dynamic range. But I'm not sure what the outer limits are.



This lines up with what I observed: a slight increase in noise, which I guess you could call quantization noise for lack of a better word. Certainly not a noticeable amount, a fraction of a decibel.


All else is in doubt, so this is the truth I cling to. 

My Stuff
#8
mudgel
Moderator
  • Total Posts : 12010
  • Joined: 2004/08/13 00:56:05
  • Location: Linton Victoria (Near Ballarat)
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/22 03:37:47 (permalink)
It sounds like you're all saying that MP3 doesn't sound any worse but I know that's not true.

Surely the loss of data and quality must be different for MP3 files created at lower bitrate say 64 as compared to 320. Vs the sound of a 16 bit 44.1khz PCM wav file.

Mike V. (MUDGEL)

STUDIO: Win 10 Pro x64, SPlat & CbB x64,
PC: ASUS Z370-A, INTEL i7 8700k, 32GIG DDR4 2400, OC 4.7Ghz.
Storage: 7 TB SATA III, 750GiG SSD & Samsung 500 Gig 960 EVO NVMe M.2.
Monitors: Adam A7X, JBL 10” Sub.
Audio I/O & DSP Server: DIGIGRID IOS & IOX.
Screen: Raven MTi + 43" HD 4K TV Monitor.
Keyboard Controller: Native Instruments Komplete Kontrol S88.
#9
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
  • Total Posts : 26036
  • Joined: 2006/09/17 11:23:23
  • Location: Everett, WA USA
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/22 11:15:13 (permalink)
No, Mike, we're just saying that MP3s preserve dynamic range. Obviously, lots of other things get lost in translation, in particular short-term events and high frequencies. But they'll still be just as loud!


All else is in doubt, so this is the truth I cling to. 

My Stuff
#10
interpolated
Max Output Level: -74 dBFS
  • Total Posts : 830
  • Joined: 2015/03/26 17:34:58
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/22 11:39:10 (permalink)
No amount of oversampling or post-processing can truly mask a MP3 files flaws (or indeed any lossy file format). Although a 20:4 bit ratio should yield a good enough playback. In comparison to say, 24/48Khz FLAC format the difference is very discrete however as this is not a common format used by major music vendors it will take a while before they realise that "us audiophiles" aren't that impressed. MP3 is over ten years old now although the LAME encoder does make some improvements over the original algorithms.
 
Try saying that drunk.

I have computer stuff.
 
https://soundcloud.com/sigmadelta
#11
pwalpwal
Max Output Level: -43 dBFS
  • Total Posts : 3249
  • Joined: 2015/01/17 03:52:50
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/22 12:16:56 (permalink)
slightly ot, interesting site here http://theghostinthemp3.com/

just a sec

#12
drewfx1
Max Output Level: -9.5 dBFS
  • Total Posts : 6585
  • Joined: 2008/08/04 16:19:11
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/22 12:33:26 (permalink)
interpolated
No amount of oversampling or post-processing can truly mask a MP3 files flaws (or indeed any lossy file format).



But luckily our ears very often can.
 
Of course you have to understand just how profoundly lossy our ears are and how much data they throw away before it even gets to the auditory nerves and thus the brain. 
 
If a lossy format manages to only throw away the exact same stuff that the ears do, it is completely transparent. The trick is in coming up with an algorithm that automatically does that for as many very different signals as possible, while making good compromises in the situations where stuff can't be masked completely. And of course it becomes more and more difficult at higher and higher compression ratios.
 
One also must not be too lazy or overconfident to do some careful ABX or double blind testing to separate the real artifacts that do remain audible from the many, many imaginary ones. That's really the only effective way to evaluate lossy compression if one cares about reality.

 In order, then, to discover the limit of deepest tones, it is necessary not only to produce very violent agitations in the air but to give these the form of simple pendular vibrations. - Hermann von Helmholtz, predicting the role of the electric bassist in 1877.
#13
interpolated
Max Output Level: -74 dBFS
  • Total Posts : 830
  • Joined: 2015/03/26 17:34:58
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/23 04:15:19 (permalink)
Inverting the phase of the mp3 against the original before the render took place would display any sonic differences as a waveform. Just a small signature. You wiuld need a more forensic approach to notice anything else like spectral display or such like.

I have computer stuff.
 
https://soundcloud.com/sigmadelta
#14
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
  • Total Posts : 26036
  • Joined: 2006/09/17 11:23:23
  • Location: Everett, WA USA
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/23 10:32:45 (permalink)
interpolated
Inverting the phase of the mp3 against the original before the render took place would display any sonic differences as a waveform. Just a small signature. You wiuld need a more forensic approach to notice anything else like spectral display or such like.

Not quite. It would reveal data differences, not sonic differences. "Sonic" implies audibility.
 
There's a plugin that does MP3 conversion on the fly so you can hear what your mix will sound like when encoded. It also has a feature that lets you hear only what's been removed. It freaks users out! 
But what they forget is that ideally the conversion is merely removing what your ears and brain would have removed anyway.


All else is in doubt, so this is the truth I cling to. 

My Stuff
#15
interpolated
Max Output Level: -74 dBFS
  • Total Posts : 830
  • Joined: 2015/03/26 17:34:58
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/23 11:07:44 (permalink)
Pernickity bitflippity!
 
A placebo effect, you can't miss what you never heard.
 
 

I have computer stuff.
 
https://soundcloud.com/sigmadelta
#16
drewfx1
Max Output Level: -9.5 dBFS
  • Total Posts : 6585
  • Joined: 2008/08/04 16:19:11
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/23 12:30:46 (permalink)
Yes. The problem with using a difference signal is that the evaluation needs to take the psychoacoustic masking into consideration or it's completely useless, because the psychoacoustics is exactly what the stuff in the difference signal is based on. And in creating the difference signal you just took away all the stuff that's doing the masking.

 In order, then, to discover the limit of deepest tones, it is necessary not only to produce very violent agitations in the air but to give these the form of simple pendular vibrations. - Hermann von Helmholtz, predicting the role of the electric bassist in 1877.
#17
interpolated
Max Output Level: -74 dBFS
  • Total Posts : 830
  • Joined: 2015/03/26 17:34:58
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/23 14:47:55 (permalink)
So what you're saying it's money for old rope then? 

I have computer stuff.
 
https://soundcloud.com/sigmadelta
#18
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
  • Total Posts : 26036
  • Joined: 2006/09/17 11:23:23
  • Location: Everett, WA USA
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/23 16:57:52 (permalink)
I wouldn't use that phrase, but that's mainly because it's a British aphorism and I speak 'Markan.
 
Perceptual coding can seem like magic, and at some level it kinda is, because few understand it beyond the general conceptual level. Look it up on wikipedia, but jump down to the references at the bottom and read some of the source literature. If you can make it through the whole thing without falling asleep, you have a greater attention span than I do.


All else is in doubt, so this is the truth I cling to. 

My Stuff
#19
interpolated
Max Output Level: -74 dBFS
  • Total Posts : 830
  • Joined: 2015/03/26 17:34:58
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/04/23 18:04:06 (permalink)

post edited by interpolated - 2015/04/24 15:46:14

I have computer stuff.
 
https://soundcloud.com/sigmadelta
#20
mettelus
Max Output Level: -22 dBFS
  • Total Posts : 5321
  • Joined: 2005/08/05 03:19:25
  • Location: Maryland, USA
  • Status: offline
Re: mp3 bit depth of 24 (effective of 20) and floating point? 2015/05/01 00:03:29 (permalink)
Doh! I just realized this thread "took off"... I think one of my take-aways from the OP was an error in "work flow," as it were. Specifically, people seem to be throwing in an additional step to dither down audio to 16-bit prior to the mp3 conversion... even SONAR's embedded mp3 conversion "leads" me to believe this is the case (i.e. you must select 16-bit in order to make an mp3???).
 
When I convert a file, I pass the 32-bit float from SONAR to Audition via the Utilities menu. The audio (at that point) is completely unaltered, then I do minor last-minute tweaking with Audition and use its converter to make the mp3.
 
So much behind that mp3 conversion is a mystery (to me), and Adobe certainly doesn't make it any more obvious. Since I use Audition's NR early in the process (and sometimes again prior to mastering), the noise floor is so "deep" that I do not get an audible difference in the mp3 created (unless driving the bit-rate down). Even 128Kb/s is pretty good, but I admit I have not yet pulled those mp3s back into SONAR to null test that. If I play the initial wave vs mp3 in WMP I do not hear any difference in these.
 
When I do think to do this test, I may actually do two passes... 1) pull the mp3 in with SONAR only and 2) have Audition convert the mp3 back to a 32-bit float first (i.e. undo its own handiwork).
 
Thank you for the replies! In reading this all, it leads me to believe that mp3s are not as "atrocious" as many try to portray. I will admit from a file sharing (and cell phone storage) perspective, they have been indispensable for me (I even batch converted a lot of mp3s down to 128 just so I could fit them into my phone).

ASUS ROG Maximus X Hero (Wi-Fi AC), i7-8700k, 16GB RAM, GTX-1070Ti, Win 10 Pro, Saffire PRO 24 DSP, A-300 PRO, plus numerous gadgets and gizmos that make or manipulate sound in some way.
#21
Jump to:
© 2024 APG vNext Commercial Version 5.1