Mu-law algorithm
|
In telecommunication, a mu-law algorithm (μ-law) is a standard analog signal compression or companding algorithm, used in digital communications systems of the North American and Japanese digital hierarchies, to optimize, i.e., modify, the dynamic range of an audio analog signal prior to digitizing. It is similar to the A-law algorithm used in Europe.
For a given input x, the equation for μ-law encoding is as follows,
- <math>
F(x) = \sgn(x) \frac{\ln(1+ \mu |x|)}{\ln(1+\mu)}~~~~-1 \leq x \leq 1 <math>,
where μ = 255 (8 bits) in the North American and Japanese standards.
μ-law expansion is then given by the inverse equation:
- <math>
F^{-1}(y) = \sgn(y) (1 / \mu ) [(1 + \mu)^{|y|}- 1]~~~~-1 \leq y \leq 1 <math>
This encoding is used because speech has a wide dynamic range that does not lend itself well to efficient linear digital encoding. Moreover, perceived intensity (loudness) is logarithmic. Mu-law encoding effectively reduces the dynamic range of the signal, thereby increasing the coding efficiency and resulting in a signal-to-distortion ratio that is greater than that obtained by linear encoding for a given number of bits.
The mu-law algorithm is also used in some rather standard programming language approaches for storing and creating sound (such as the sun.audio classes in java 1.1, in the .au format, and in some C# methods).
Source: from Federal Standard 1037C
See also
External links
- Waveform Coding Techniques (http://www.cisco.com/warp/public/788/signalling/waveform_coding.html) - Has details of implementation
- A-Law and mu-Law Companding Implementations Using the TMS320C54x (http://www.eettaiwan.com/ARTICLES/2001MAY/PDF1/2001MAY02_NTEK_DSP_AN1135.PDF) (PDF)de:Mu-law