Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 Doom9's Forum Practical Effects of Audio Bit Depth?
 Register FAQ Calendar Search Today's Posts Mark Forums Read

13th November 2015, 22:05   #1  |  Link
Asmodian
Registered User

Join Date: Feb 2002
Location: San Jose, California
Posts: 4,372
Practical Effects of Audio Bit Depth?

This is a question triggered by a post in the eac3to thread but further discussion of it would be off-topic there.

Quote:
 Originally Posted by Zenitram They are not. as 0 does not say the same thing as 0.0000 (and yes, quantization bits are similar to float). I understand this is same for your ears, but it may be different for some compression algorithm and/or for people looking for the count of bits used for quantization (again, zeroes with 16-bit is not same as zeroes with 24-bit, zeroes with 24-bit quantization say that this is more sure that it is silence for real) It is all about precision information, I understand that you don't care, but that does not mean it is useless for everybody. It is very important for a couple of people I work for.
Is this true in practice? I understand the point of sigfigs when thinking of scientific measurement but I do not believe it applies here. If I feed 24-bit with 0 for the 8 LSBs to a 24-bit DAC do I get different output than if I had fed that same DAC with 16-bit data? Significant figures are not applicable to digital integer formats in that:

1111111111111111, means exactly the same thing as 111111111111111100000000 in a digital integer format.

A DAC would give exactly the same output with either input. A DAC effectively pads any input bit depth below its bit depth with zeros.

I suppose if you understand the ADC very well 16-bit or 24-bit with the 8 LSBs as 0 are different, by a tiny amount. If 24-bit represents 0 to 1, the 16 MSBs represent 0 to 0.99998480 (an error of 0.00152% compared to a 16-bit ADC). However, if you know the ADC used you don't care what the current format is.

This means the ADC and DAC both need to use the same bit depth to avoid quantization errors but truncating to 16 bit or using 24 bits with 8 trailing zeros would both give identical and correct output when using the same DAC. The storage bit depth has no effect on the quantization error at all, only the DAC bit depth compared to the ADC bit depth matters.

Truncating 24-bit with 8 zeros in the LSBs to 16-bit would not cause any additional error, even thinking mathematically, during audio playback.
__________________

 13th November 2015, 22:11 #2  |  Link Nevilne Registered User   Join Date: Aug 2010 Posts: 134
 13th November 2015, 22:40 #3  |  Link raffriff42 Retried Guesser     Join Date: Jun 2012 Posts: 1,373 No, a DAC adds a small amount of noise, called Dither aka Noise Shaping. More dither is needed for a lower-precision digital format. Increasing "precision" by adding zeros fools the DAC into not adding enough dither, which may result in digital harshness on the output (albeit at a very low level). Decreasing precision by truncating, without dither, has the same problem. http://www.digido.com/articles-and-d...16-dither.html https://en.wikipedia.org/wiki/Dither#Digital_audio
14th November 2015, 00:00   #4  |  Link
Asmodian
Registered User

Join Date: Feb 2002
Location: San Jose, California
Posts: 4,372
Quote:
 Originally Posted by Nevilne
This question is only in the context of 24-bit audio with all 8 LSBs always containing 0. This is relevant to eac3to's automatic conversion to 16-bit FLAC (instead of using 24-bit FLAC) if there was never a single 1 in the 8 LSBs of the nominally 24-bit audio. Those links are discussing normal 24-bit where the LSBs sometimes contain 1s.

I am sure there is no real 24-bit audio where all LSBs are 0, it must be 16-bit padded to 24, but if there was?

Quote:
 Originally Posted by raffriff42 No, a DAC adds a small amount of noise, called Dither aka Noise Shaping. More dither is needed for a lower-precision digital format. Increasing "precision" by adding zeros fools the DAC into not adding enough dither, which may result in digital harshness on the output (albeit at a very low level). Decreasing precision by truncating, without dither, has the same problem. http://www.digido.com/articles-and-d...16-dither.html https://en.wikipedia.org/wiki/Dither#Digital_audio
Again, that link is not discussing the situation as discussed (I think?). I don't think dithering is relevant when there is no error, is it? What do you dither if absolutely all LSBs are 0?
__________________

14th November 2015, 02:02   #5  |  Link
raffriff42
Retried Guesser

Join Date: Jun 2012
Posts: 1,373
Quote:
 Originally Posted by Asmodian If I feed 24-bit with 0 for the 8 LSBs to a 24-bit DAC do I get different output than if I had fed that same DAC with 16-bit data?
I believe the answer is 'yes.' A well-designed DAC will add noise with an amplitude of (I think) 1 LSB. So in the first case, the amplitude will be 1/(2^24) and in the second, 1/(2^16).

EDIT After re-reading the question, I'm not so sure. I don't know how a given 24-bit DAC will handle 16-bit data. Would have to look at the spec sheet.

Last edited by raffriff42; 14th November 2015 at 05:03.

 14th November 2015, 02:05 #6  |  Link markanini Registered User   Join Date: Apr 2006 Posts: 300 The LSBs normally contain noise as either dither or real analogue noise.
23rd November 2015, 13:25   #7  |  Link
pandy
Registered User

Join Date: Mar 2006
Posts: 1,051
Quote:
 Originally Posted by raffriff42 No, a DAC adds a small amount of noise, called Dither aka Noise Shaping. More dither is needed for a lower-precision digital format. Increasing "precision" by adding zeros fools the DAC into not adding enough dither, which may result in digital harshness on the output (albeit at a very low level). Decreasing precision by truncating, without dither, has the same problem. http://www.digido.com/articles-and-d...16-dither.html https://en.wikipedia.org/wiki/Dither#Digital_audio
Well not particularly true... - fair for some Delta Sigma DAC and not correct for most monolithic converters.

Dither and/or Noise Shaping are usually added at post processing stage, dither is sometimes added to improve overall Delta Sigma DAC stability (usually important for 1 bit DS, usually not so important for multibit DS DAC).

16 bit to 24 bit is equal to multiplication by known number and it is fully lossless and reversible - more important is that usually 16 bit data is anyway converted for more bits to perform processing - classical example are lowpass filters where 16 data are multiplied by for example 12 bit coefficient and as such result is 28 bit new sample value. Nowadays 56 and more bits for audio is not unusual especially in IIR filters (which are more common in consumer audio than FIR filters).

Quote:
 Originally Posted by raffriff42 I believe the answer is 'yes.' A well-designed DAC will add noise with an amplitude of (I think) 1 LSB. So in the first case, the amplitude will be 1/(2^24) and in the second, 1/(2^16). EDIT After re-reading the question, I'm not so sure. I don't know how a given 24-bit DAC will handle 16-bit data. Would have to look at the spec sheet.
Well designed DAC will NOT add dither - adding dither is only to deal with DAC limitations - to improve stability for DS DAC i.e. is a workaround.
And this is clear operation from mathematical perspective for this - multiplying by integer value ie shifting bits (8 bits give us 256).

DAC conversion is something else than quantization error processing (dithering and/or noise shaping).

And dither level for TPDF is 2LSB - rectangular dither can be 1LSB but it is insufficient from signal perspective - usually instead TPDF a HP TPDF is used.

Last edited by pandy; 23rd November 2015 at 13:33.

 23rd November 2015, 21:15 #8  |  Link raffriff42 Retried Guesser     Join Date: Jun 2012 Posts: 1,373 Thanks Pandy, I stand corrected, and apologize for posting misinformation.
24th November 2015, 09:48   #9  |  Link
pandy
Registered User

Join Date: Mar 2006
Posts: 1,051
Quote:
 Originally Posted by raffriff42 Thanks Pandy, I stand corrected, and apologize for posting misinformation.
No need to apologize - this is tricky and not so obvious - most important is to remember that quantization (requantization) may require (it is recommended) presence of dither as dither will "linearize" quantizer.