Log in

View Full Version : Practical Effects of Audio Bit Depth?


Asmodian
13th November 2015, 22:05
This is a question triggered by a post in the eac3to thread but further discussion of it would be off-topic there.

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.

Nevilne
13th November 2015, 22:11
http://people.xiph.org/~xiphmont/demo/neil-young.html
http://xiph.org/video/vid2.shtml

raffriff42
13th November 2015, 22:40
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-demos12/13-bob-katz/16-dither.html
https://en.wikipedia.org/wiki/Dither#Digital_audio

Asmodian
14th November 2015, 00:00
http://people.xiph.org/~xiphmont/demo/neil-young.html
http://xiph.org/video/vid2.shtml

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?

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-demos12/13-bob-katz/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?

raffriff42
14th November 2015, 02:02
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.

markanini
14th November 2015, 02:05
The LSBs normally contain noise as either dither or real analogue noise.

pandy
23rd November 2015, 13:25
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-demos12/13-bob-katz/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).

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.

raffriff42
23rd November 2015, 21:15
Thanks Pandy, I stand corrected, and apologize for posting misinformation.

pandy
24th November 2015, 09:48
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.