In digital signal processing, quantization is the process of approximating a continuous signal by a set of discrete symbols or integer values; that is, converting an analog signal to a digital one. In general, a quantization operator can be represented as
where x is a real number, Q(x) an integer, and f(x) is an arbitrary real-valued function that controls the "quantization law" of the particular coder.
In computer audio, a linear scale is most common. If x is a real valued number between -1 and 1, the quantization operator can therefore be alternately expressed as,
where floor() returns the highest integer less than or equal to x and M is the number of bits used to quantize the value. Using this quantization law, the signal to noise ratio can be approximated as
- .
From this equation, it is often said that the SNR is approximately 6dB per bit.
In digital telephony, two popular quantization schemes are the 'A-law' (dominant in Europe) and 'µ-law' (dominant in North America and Japan). These schemes map a linearly quantized 14 bit integer value to an 8 bit scale. The scale is nearly linear for small values and then increase logarithmically as amplitude grows, providing a greater dynamic range than a purely linear scale.
See also: