A-law algorithm
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 one of the two companding algorithms in the G.711 standard from ITU-T, the other being the similar μ-law, used in North America and Japan.
For a given input [math]\displaystyle{ x }[/math], the equation for A-law encoding is as follows: [math]\displaystyle{ F(x) = \sgn(x) \begin{cases} \dfrac{A |x|}{1 + \ln(A)}, & |x| \lt \dfrac{1}{A}, \\[1ex] \dfrac{1+ \ln(A |x|)}{1 + \ln(A)}, & \dfrac{1}{A} \leq |x| \leq 1, \end{cases} }[/math]
where [math]\displaystyle{ A }[/math] is the compression parameter. In Europe, [math]\displaystyle{ A = 87.6 }[/math].
A-law expansion is given by the inverse function: [math]\displaystyle{ F^{-1}(y) = \sgn(y) \begin{cases} \dfrac{|y| (1 + \ln(A))}{A}, & |y| \lt \dfrac{1}{1 + \ln(A)}, \\ \dfrac{e^{-1 + |y| (1 + \ln(A))}}{A}, & \dfrac{1}{1 + \ln(A)} \leq |y| \lt 1. \end{cases} }[/math]
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
- Tapered floating point
External links
- Waveform Coding Techniques - Has details of implementation (but note that the A-law equation is incorrect)
- A-law implementation in C-language with example code
Original source: https://en.wikipedia.org/wiki/A-law algorithm.
Read more |