On Mar 29, 2007, at 12:44, Harry Sack wrote:> 2007/3/29, Josh Green <josh@resonance.org>: > As far as I know 24 bit FLAC support is broken. It often doesn't > compress the audio at all, but instead stores the chunks as verbatim > type (although the FLAC format supports 24 bit). Perhaps this is > fixed? > If so, do let me know. > > I also want to know if this is fixed.Harry, your question doesn't make it clear as to whether you're actually having a problem, or just curious about the answer. Josh Green says he's having a problem where compression doesn't seem to work. Harry, are you actually seeing a problem with 24-bit? What is the problem you're seeing? Are you just writing in because you're curious about the status? There actually is no problem with 24-bit support, as I stated earlier. So before people start chiming in with "me too" - I'd like to request that you actually say what problem you're seeing, along with a few details. Let's not start a rumor fest here.> I agree that perhaps 32 bit float/pcm isn't > entirely necessary when it comes to storing different qualities. But > when wanting to preserve floating point audio, I would think it > would be > a nice feature. I believe 32 bit floats have a precision of 23 bits > when the audio is +/- 1.0, so in theory that would mean that 24 bit > would have more precision but less dynamic range (if the floating > point > range is outside of +/- 1.0). > > Is it possible to explain me a bit further what "less dynamic > range" exactly means? Can this difference actually be heard and if > yes, in what audio quality sources? I have just discovered FLAC and > I'm not an audio professional, but I wanted to know what the "real" > difference between 32 bit float and 24 bit int precission is when > comparing audio quality.You cannot hear 32-bit audio because there is no such thing as a 32- bit digital-to-analog converter. And there is absolutely no floating- point D/A of any bit-depth. So you cannot compare the audio quality of 32-bit to anything. All digital audio must be converted to 24-bit or less before you can hear it. This conversion is not part of FLAC, so you probably should look elsewhere to learn about general digital audio technology. FLAC is lossless when compressing any audio that comes from an A/D. FLAC is lossless when compressing any audio that is properly prepared for D/A, and thus ready for listening. Any other format not supported by FLAC is an intermediate format used by audio engineers and not typically for distribution, except perhaps in scientific circles. Note: there are non-linear DACs for 8-bit codes, but those are not true floating point, even though the bit code has a mantissa and exponent.> And I'm also guessing for reasons why WavPack actually uses 32 bit > floats. Is it true then that FLAC is not completely lossless if you > look at the encoder when using 24 bit int's vs. using 32 bit > float's? Does this storage thing influences the audio quality of > just regular Audio-CD quality (16 bits, 44.1 kHz, stereo) after > compression, because that's the main reason I use FLAC. >Lossless means lossless. 16/44.1 CDDA audio quality is identical before and after FLAC. CDDA audio does not use 24-bit or 32-bit codes at any point. It is all 16-bit integers. FLAC does not support 32-bit float, so it is pointless to say whether it is completely lossless when storing 32-float as 24-bit int. If you convert 32-float to 24-bit outside FLAC, then the loss occurs elsewhere, not in FLAC. FLAC is completely lossless for all formats that it supports. I'm sorry that I confused things in my earlier message by pointing out that you can convert 32-bit float to a format that FLAC supports or that you can write your own encoder/decoder for 32-bit integer FLAC. You really need to understand floating point numbers and what kind of audio data you have before trying to analyze FLAC this way. Brian Willoughby Sound Consulting -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20070329/14b0e9a7/attachment.html
On Thu, Mar 29, 2007 at 01:15:12PM -0700, Brian Willoughby wrote:> that it supports. I'm sorry that I confused things in my earlier > message by pointing out that you can convert 32-bit float to a format > that FLAC supports or that you can write your own encoder/decoder for > 32-bit integer FLAC. You really need to understand floating point > numbers and what kind of audio data you have before trying to analyze > FLAC this way.can you suggest a good primer on the differences between floating point and integer audio formats? I see from googling that perhaps the motivation for using floating-point formats is that modern x86 CPUs are better at floats than ints, is there more to it than that? danno -- dan pritts danno@umich.edu 734-929-9770
2007/3/29, Brian Willoughby <brianw@sounds.wa.com>:> > > On Mar 29, 2007, at 12:44, Harry Sack wrote: > > 2007/3/29, Josh Green <josh@resonance.org>: > > > > As far as I know 24 bit FLAC support is broken. It often doesn't > > compress the audio at all, but instead stores the chunks as verbatim > > type (although the FLAC format supports 24 bit). Perhaps this is fixed? > > If so, do let me know. > > > I also want to know if this is fixed. > > > Harry, your question doesn't make it clear as to whether you're actually > having a problem, or just curious about the answer. Josh Green says he's > having a problem where compression doesn't seem to work. Harry, are you > actually seeing a problem with 24-bit? What is the problem you're seeing? > Are you just writing in because you're curious about the status? >yes sorry, I was just curious about the status, I have never tried 24-bit myself. There actually is no problem with 24-bit support, as I stated earlier. So> before people start chiming in with "me too" - I'd like to request that you > actually say what problem you're seeing, along with a few details. Let's > not start a rumor fest here. > > > I agree that perhaps 32 bit float/pcm isn't > > entirely necessary when it comes to storing different qualities. But > > when wanting to preserve floating point audio, I would think it would be > > a nice feature. I believe 32 bit floats have a precision of 23 bits > > when the audio is +/- 1.0, so in theory that would mean that 24 bit > > would have more precision but less dynamic range (if the floating point > > range is outside of +/- 1.0). > > > Is it possible to explain me a bit further what "less dynamic range" > exactly means? Can this difference actually be heard and if yes, in what > audio quality sources? I have just discovered FLAC and I'm not an audio > professional, but I wanted to know what the "real" difference between 32 bit > float and 24 bit int precission is when comparing audio quality. > > > You cannot hear 32-bit audio because there is no such thing as a 32-bit > digital-to-analog converter. And there is absolutely no floating-point D/A > of any bit-depth. So you cannot compare the audio quality of 32-bit to > anything. All digital audio must be converted to 24-bit or less before you > can hear it. This conversion is not part of FLAC, so you probably should > look elsewhere to learn about general digital audio technology. > > FLAC is lossless when compressing any audio that comes from an A/D. FLAC > is lossless when compressing any audio that is properly prepared for D/A, > and thus ready for listening. Any other format not supported by FLAC is an > intermediate format used by audio engineers and not typically for > distribution, except perhaps in scientific circles. > > Note: there are non-linear DACs for 8-bit codes, but those are not true > floating point, even though the bit code has a mantissa and exponent. > > > And I'm also guessing for reasons why WavPack actually uses 32 bit floats. > Is it true then that FLAC is not completely lossless if you look at the > encoder when using 24 bit int's vs. using 32 bit float's? Does this storage > thing influences the audio quality of just regular Audio-CD quality (16 > bits, 44.1 kHz, stereo) after compression, because that's the main reason > I use FLAC. > > > Lossless means lossless. 16/44.1 CDDA audio quality is identical before > and after FLAC. CDDA audio does not use 24-bit or 32-bit codes at any > point. It is all 16-bit integers. > > FLAC does not support 32-bit float, so it is pointless to say whether it > is completely lossless when storing 32-float as 24-bit int. If you convert > 32-float to 24-bit outside FLAC, then the loss occurs elsewhere, not in > FLAC. FLAC is completely lossless for all formats that it supports. I'm > sorry that I confused things in my earlier message by pointing out that you > can convert 32-bit float to a format that FLAC supports or that you can > write your own encoder/decoder for 32-bit integer FLAC. You really need to > understand floating point numbers and what kind of audio data you have > before trying to analyze FLAC this way. >thanks, now it's all clear for me ! Brian Willoughby> Sound Consulting > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20070330/4cf6fd11/attachment.html
Harry Sack wrote:> > > 2007/3/29, Brian Willoughby <brianw@sounds.wa.com > <mailto:brianw@sounds.wa.com>>: > > There actually is no problem with 24-bit support, as I stated > earlier. So before people start chiming in with "me too" - I'd > like to request that you actually say what problem you're seeing, > along with a few details. Let's not start a rumor fest here. >I actually joined this list because I wanted to see if this problem could be addressed... oh well we just tell people to use WavPack... -Justin
Brian Willoughby
2007-Mar-30 17:07 UTC
[Flac-dev] [OT] primer on differences between floating point and integer audio formats
Dan, It's hard to say. I'm sure there are many reasons for using float. Historically, a lot of research software used float because their software was producing and processing float anyway, so that's the format they used. None of those tools were real-time anyway, so CPU efficiency was not the primary concern in choosing a format. Much of this software is older than any of the programs you see today. Newer software came about when real-time was possible, and then size became an issue, as well as the fact that early audio software ran on computers with poor float performance. Now that floating point performance is on par with integer, software is using float again where its advantages can be realized. As far as psychoacoustics is concerned, I've heard some criticisms of float. Fixed point integer formats have a constant digital quantization noise floor, and a fixed step size per increase in sample value. An interesting thing about integer is that the number of significant bits changes with amplitude. Only a full-scale sample has all 24 bits of precision because there are never any fractional amount allowed. 6 dB down is 23 bits, 12 dB down is 22 bits, etc. The weird thing about float is that all samples have 24 bits of precision. A sample at -12 dBFS has 22 bits of precision with the 24- bit integer range, but then 2 more bits of fractional precision. As audio samples get closer to zero, they can take smaller and smaller steps, although you'll never be able to hear these small steps with even the latest DACs. In the opposite direction, exceeding the standard +/- 1.0 value in floating point samples means that sample jump 2 codes at a time, exceeding +/- 2.0 jumps 4 codes at a time. Because of this, the quantization noise level floats up and down depending upon the signal level. Not the average signal level, but the instantaneous sample value. The critics of floating point are complaining about this. However, it probably isn't an issue if the float values are properly dithered when converted to 24-bit integer values, and also if audio exceeding +/- 1.0 is brought down in level before the conversion. If anyone has links to psychoacoustic research regarding floating point audio, I would be very interested in learning more. I think the biggest reason for float usage today is to avoid clipping in intermediate processing. Pro Tools plugins almost all have clipping built-in to clamp samples to +/- 1.0, making it crucial that you pay attention to gain staging in Pro Tools session, but float does not strictly require this. I'm not trying to lay down a definite comparison of floating point vs. integer. I just don't know of any primer on the subject. Personally, I'm quite interested to know if there are any floating point DACs, and also whether psychoacoustic research can been done on the format differences. In the early days of CD Players, some manufacturers used a 14-bit DAC with shifting precision, such that loud samples were converted with 14-bit precision (hoping that the quantization noise would be masked by the loud passages), signals at -6 dB were converted with 15-bit precision, and signals at -12 dB were converted with effective 16-bit precision. These DACs had to switch precision without creating clicks in the audio. It seems like similar technology could be used to create a floating point DAC, but it's really hard to create an analog circuit which maintains the 144 dB dynamic range of 24-bit audio, and I imagine it would be almost fruitless to attempt to exceed that dynamic range. Brian Willoughby Sound Consulting On Mar 29, 2007, at 13:26, Dan Pritts wrote:> On Thu, Mar 29, 2007 at 01:15:12PM -0700, Brian Willoughby wrote: >> that it supports. I'm sorry that I confused things in my earlier >> message by pointing out that you can convert 32-bit float to a format >> that FLAC supports or that you can write your own encoder/decoder for >> 32-bit integer FLAC. You really need to understand floating point >> numbers and what kind of audio data you have before trying to analyze >> FLAC this way. > > can you suggest a good primer on the differences between floating > point and integer audio formats? I see from googling that perhaps > the motivation for using floating-point formats is that modern x86 > CPUs are better at floats than ints, is there more to it than that? > > danno > -- > dan pritts > danno@umich.edu