Wer's ganz genau wissen will:
Quelle:
Cisco Waveform Coding Techniques
A-law and u-law Companding
A-law and u-law are audio compression schemes (codecs) defined by Consultative Committee for International Telephony And Telegraphy (CCITT) G.711 which compress 16-bit linear PCM data down to eight bits of logarithmic data.
A-law Compander
Limiting the linear sample values to twelve magnitude bits, the A-law compression is defined by this equation, where A is the compression parameter (A=87.7 in Europe), and x is the normalized integer to be compressed.
u-law Compander
Limiting the linear sample values to thirteen magnitude bits, the u-law (u-law and Mu- law are used interchangeably in this document) compression is defined by this equation, where m is the compression parameter (m =255 in the U.S. and Japan) and x is the normalized integer to be compressed.
A-law standard is primarily used by Europe and the rest of the world. u-law is used by North America and Japan.
Similarities Between A-law and u-law
Both are linear approximations of logarithmic input/output relationship.
Both are implemented using eight-bit code words (256 levels, one for each quantization interval). Eight-bit code words allow for a bit rate of 64 kilobits per second (kbps). This is calculated by multiplying the sampling rate (twice the input frequency) by the size of the code word (2 x 4 kHz x 8 bits = 64 kbps).
Both break a dynamic range into a total of 16 segments:
Eight positive and eight negative segments.
Each segment is twice the length of the preceding one.
Uniform quantization is used within each segment.
Both use a similar approach to coding the eight-bit word:
First (MSB) identifies polarity.
Bits two, three, and four identify segment.
Final four bits quantize the segment are the lower signal levels than A-law.
Differences Between A-law and u-law
Different linear approximations lead to different lengths and slopes.
The numerical assignment of the bit positions in the eight-bit code word to segments and the quantization levels within segments are different.
A-law provides a greater dynamic range than u-law.
u-law provides better signal/distortion performance for low level signals than A-law.
A-law requires 13-bits for a uniform PCM equivalent. u-law requires 14-bits for a uniform PCM equivalent.
An international connection needs to use A-law, u to A conversion is the responsibility of the u-law country.