Dither: Difference between revisions

From Hydrogenaudio Knowledgebase
(Page improved.)
(revert questionable edits)
Line 1: Line 1:
Dither is random noise added to a signal in order to increase the degree to which the quantization and sampling process accurately reproduces the image of the input signal. The simplest dither is quiet white noise, but more complicated forms of dither are possible using [[noise shaping]].
Dither is random or semi-random noise added to a signal in order to mask quantization noise and/or extend dynamic range. The simplest dither is quiet white noise, but more complicated forms of dither are possible using [[noise shaping]], and they can even be completely inaudible.
Signal details smaller than the quantization level are retained, after quantization, when Dither Noise is added to the source material.
==Explanation.==
A small signal detail with height less than the size of a quantization step, and centred half way between two quantization steps, is too small to cross a quantization step. It is lost when the waveform is quantized. With a Dither Noise waveform added, the height of the two waveforms summed is occasionally greater than the quantization level. At these occasional points the waveform crosses a quantization step. So now when this waveform is quantized, although the result is noisy, the shape of the original signal detail is retained.


==Bit depth reduction==
A common use for dither is to improve the perceived audio quality when converting a digital signal from a higher bit depth to a lower one, e.g. from 24-bit to 16-bit.


When a small variation in the signal is adjacent to, and switches between quantization steps, it will be highly distorted, e.g. converted into a square wave. Dither will then reduce the distortion. Frequently flipping the least signifficant bit by the sum of the small signal and the dither noise retaines the shape that the waveform originally had. With the dither, the accuracy of the recording is greater than with quantization alone.
From [http://www.hydrogenaudio.org/forums/index.php?showtopic=87045&view=findpost&p=745851 a HydrogenAudio forum post] by AndyH-ha:


==Bit depth reduction==
"When you reduce bit depth there will be resulting distortion. This has two aspects, the change (error) in the waveform itself and an unpleasant addition to the sound because of the error. The waveform error is expressed in the output signal as noise, but noise related to (correlated to) the audio from which it is derived. This is a quality of noise that is generally found to be unpleasant.
A common use for dither is to retain the waveform shape defined in the bits to be lost when converting a digital signal from a higher bit depth to a lower one, e.g. from 24-bit to 16-bit.
 
"Adding dither before reducing the bit depth randomizes the error. This completely eliminates the unpleasant sound aspect of the error. Instead it will result in a benign white noise kind of background sound. There is thus new noise from two sources in the bit depth reduced audio. The first is the dither noise added prior to bit reduction. The second is the error noise (quantization error) of the bit reduction process. Without the first, randomizing noise, the second noises add an unpleasant aspect to the audio. With the dither, the total noise is much less objectionable than the quantization noise alone.


"This is mathematically correct, and observable with the proper equipment. It is doctrinally correct in the church of quality audio: always add dither when reducing the bit depth. However, I challenge you or anyone else to be able to ABX any real 16 bit music, dithered against non-dithered — unless perhaps some really bad software is used to do the bit reduction. Going to lower bit depths, such as to 8 bit, frequently makes the dither vs non-dither difference obvious and so this is the way it is demonstrated."


When you reduce bit depth without dither there will be resulting distortion as well as the loss of the fine detail. This has two aspects, the change (error) in the waveform itself and an unpleasant addition to the sound because of the error. Noise correlated to the audio from which it is derived is generally found to be unpleasant.
==Is dither really necessary?==
<!--adapted from another Andy H-ha post in the same thread-->
Going from 24-bit to 16-bit, the quantization error is very small and the distortion/noise is extremely unlikely to be heard in any real music. Since quantization error isn’t audible in any real music at useable listening levels, whether dither must be used is more a matter of doctrine than functionality.


Many sources (e.g. cassettes and LPs) already have considerable noise such as tape hiss. Even the best live recordings get some noise from the equipment, especially microphone preamplifiers. This might not make the best dither, but it acts in the same way, to largely de-correlate the quantization error from the signal.


Going from 24-bit to 16-bit, the quantization error is small.
Anyone who believes dither is always necessary for conversions to 16-bit should submit, on the HydrogenAudio forums, samples that can be discriminated in blind testing.
Many sources (e.g. cassettes and LPs) already have considerable noise such as tape hiss. Even the best live recordings get some noise from the equipment, especially microphone preamplifiers. This might not make the best dither, but it acts in the same way.


HydrogenAudio is forum where examples of dithered conversions to 16-bit can be submitted for evaluating and blind testing.
{{stub}}

Revision as of 01:05, 22 March 2012

Dither is random or semi-random noise added to a signal in order to mask quantization noise and/or extend dynamic range. The simplest dither is quiet white noise, but more complicated forms of dither are possible using noise shaping, and they can even be completely inaudible.

Bit depth reduction

A common use for dither is to improve the perceived audio quality when converting a digital signal from a higher bit depth to a lower one, e.g. from 24-bit to 16-bit.

From a HydrogenAudio forum post by AndyH-ha:

"When you reduce bit depth there will be resulting distortion. This has two aspects, the change (error) in the waveform itself and an unpleasant addition to the sound because of the error. The waveform error is expressed in the output signal as noise, but noise related to (correlated to) the audio from which it is derived. This is a quality of noise that is generally found to be unpleasant.

"Adding dither before reducing the bit depth randomizes the error. This completely eliminates the unpleasant sound aspect of the error. Instead it will result in a benign white noise kind of background sound. There is thus new noise from two sources in the bit depth reduced audio. The first is the dither noise added prior to bit reduction. The second is the error noise (quantization error) of the bit reduction process. Without the first, randomizing noise, the second noises add an unpleasant aspect to the audio. With the dither, the total noise is much less objectionable than the quantization noise alone.

"This is mathematically correct, and observable with the proper equipment. It is doctrinally correct in the church of quality audio: always add dither when reducing the bit depth. However, I challenge you or anyone else to be able to ABX any real 16 bit music, dithered against non-dithered — unless perhaps some really bad software is used to do the bit reduction. Going to lower bit depths, such as to 8 bit, frequently makes the dither vs non-dither difference obvious and so this is the way it is demonstrated."

Is dither really necessary?

Going from 24-bit to 16-bit, the quantization error is very small and the distortion/noise is extremely unlikely to be heard in any real music. Since quantization error isn’t audible in any real music at useable listening levels, whether dither must be used is more a matter of doctrine than functionality.

Many sources (e.g. cassettes and LPs) already have considerable noise such as tape hiss. Even the best live recordings get some noise from the equipment, especially microphone preamplifiers. This might not make the best dither, but it acts in the same way, to largely de-correlate the quantization error from the signal.

Anyone who believes dither is always necessary for conversions to 16-bit should submit, on the HydrogenAudio forums, samples that can be discriminated in blind testing.