 thumb|350px|graph of Î¼-law & a-law algorithms an a-law algorithm is a standard companding algorithm, used in european 8-bit pcm digital communications systems to optimize, i.e., modify, the dynamic range of an analog signal for digitizing. it is similar to the Î¼-law algorithm used in north america and japan. for a given input x, the equation for a-law encoding is as follows, : f(x) = \sgn(x) \begin{cases} {a |x| \over 1 + \ln(a)}, & |x| < {1 \over a} \\ \frac{1+ \ln(a |x|)}{1 + \ln(a)}, & {1 \over a} \leq |x| \leq 1, \end{cases} where a is the compression parameter. in europe, a = 87.7; the value 87.6 is also used. a-law expansion is given by the inverse function, : f^{-1}(y) = \sgn(y) \begin{cases} {|y| (1 + \ln(a)) \over a}, & |y| < {1 \over 1 + \ln(a)} \\ {\exp(|y| (1 + \ln(a)) - 1) \over a}, & {1 \over 1 + \ln(a)} \leq |y| < 1. \end{cases} the reason for this encoding is that the wide dynamic range of speech does not lend itself well to efficient linear digital encoding. a-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 superior to that obtained by linear encoding for a given number of bits. == comparison to Î¼-law == the Î¼-law algorithm provides a slightly larger dynamic range than the a-law at the cost of worse proportional distortion for small signals. by convention, a-law is used for an international connection if at least one country uses it. == see also == * Î¼-law algorithm * audio level compression * signal compression * companding * g.711 * ds0 == external links == * waveform coding techniques - has details of implementation (but note that the a-law equation is incorrect) * a-law and Î¼-law companding implementations using the tms320c54x (pdf) * a-law implementation in c-language with example code 
Audio_codecs