Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Companding

L-11

The compression process is logarithmic. The compression increases as the sample signals increase. In other words, the larger sample signals are compressed more than the smaller sample signals. This causes the quantization noise to increase as the sample signal increases. A logarithmic increase in quantization noise throughout the dynamic range of an input sample signal keeps the SNR constant throughout this dynamic range.

A-Law and -Law


The ITU-T standards for companding are called A-law and -law. A-law and -law are audio compression schemes 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 standard is primarily used by Europe and the rest of the world. -law is used by North America and Japan.

Similarities Between A-law and -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).

Similarities Between A-law and -law

Both break a dynamic range into a total of 16 segments: 1. Eight positive and eight negative segments. 2. Each segment is twice the length of the preceding one. 3. Uniform quantization is used within each segment. Both use a similar approach to coding the eight-bit word: 1. First (MSB) identifies polarity. 2. Bits two, three, and four identify segment. 3. Final four bits quantize the segment.

Compressed Code format

Sign bit 3-Bit 1=+ segment 0=identifier 000 to 111

4-bit quantization Interval ABCD 0000 to 1111

Differences Between A-law and -law

Different linear approximations lead to different lengths and slopes. A-law provides a greater dynamic range than -law . -law (15-segment) provides better signal/distortion performance for low level signals than A-law (13-segment). An international connection needs to use A-law, to A conversion is the responsibility of the -law country.

15-segment - law

Segments with same slope

13-segment A - law

Discrete
With digital companding the analog sample is first sampled, coded and then digitally compressed. For example: 12-bit to 8-bit compression

Encoded PCM Segment 12-bit linear code 8-bit compressed code s000ABCD s001ABCD s010ABCD s011ABCD s100ABCD s101ABCD s110ABCD s111ABCD

0 1 2 3 4 5 6 7

s0000000ABCD s0000001ABCD s000001ABCDX s00001ABCDXX s0001ABCDXXX s001ABCDXXXX s01ABCDXXXXX s1ABCDXXXXXX

Compressed Code format

Sign bit 3-Bit 1=+ segment 0=identifier 000 to 111

4-bit quantization Interval ABCD 0000 to 1111

Decoded PCM 8-bit compressed code s000ABCD s001ABCD s010ABCD s011ABCD s100ABCD s101ABCD s110ABCD s111ABCD 12-bit recovered linear code s0000000ABCD s0000001ABCD s000001ABCD1 s00001ABCD10 s0001ABCD100 s001ABCD1000 s01ABCD10000 s1ABCD100000 Segment

0 1 2 3 4 5 6 7

Digital Compression Error

% error =

12bit encoded voltage - 12bit decoded voltage 100 12bit decoded voltage

Performance of a 255 PCM Encoder


The SQR for a maximum amplitude sine wave in the first segment of 255 codec is

SQR( A = 31) = 7.78 + 20 log10 (


The SQRs for larger amplitude sinusoids are not easy to calculate since the lengths of q vary with the sample size.

31 ) = 31.6dB 2

Thus a general calculation of quantizing noise power involves finding the expected value of the power of the quantization errors.

Performance of a 255 PCM Encoder


noise power = 1 7 pi qi2 12 i = 0

where, pi = probability of a sample in ith segment qi = quantization size for segment i, = 2i+1 for segmented 255 coding SQR for a full range sinusoid, SQR (A = 8159) = 39.3 dB The SQR for a maximum amplitude sine wave in the last segment of 255 codec is

SQR( A = 8159) = 7.78 + 20 log10 (

8159 ) = 37.8dB 256

Performance of a 255 PCM Encoder


The difference (39.3 37.8 =) 1.5 dB reflects the fact that a full-scale sine wave spends 67% of the time in the upper segment (p7 = 0.67) A voice signal, however has a higher peak-to-average ratio than a sine wave. The average quantization error is smaller, but so is the average signal power. Hence the SQR is approximately the same.

Performance of a 255 PCM Encoder


The dynamic range of a segmented PCM encoder is determined as the signal power difference between a low-level signal occupying the entire range of the first segment and a high level signal extending to the limits of code. Thus the dynamic range of a segmented 255 coder is

DR( A = 31 to A = 8159) = 20 log10 (

8159 ) = 48.4dB 31

In summary, an 8-bit 255 PCM codec provides a theoretical SQR greater than 30 dB across a dynamic range of 48 dB
No. of bits reqd. by a uniform encoder for equivalent performance?

You might also like