Digital Signal Processing Reference
In-Depth Information
EXAMPLE 11.4
In a digital companding system , decode each of the following 8-bit compressed PCM codes into a 12-bit linear
PCM code.
a. 10000101
b. 01001101
Solution:
a. Using Table 11.4 , we notice that S ¼ 1, A ¼ 0, B ¼ 1, C ¼ 0, and D ¼ 1, and the code is in segment 0. Decoding
leads to 1 0 0 0 0 0 0 0 0 1 0 1, which is identical to the 12-bit PCM code in (a) in Example 11.3. We expect
this result, since there is no compression for segment 0 and segment 1.
b. Applying Table 11.4 , it follows that S ¼ 0, A ¼ 1, B ¼ 1, C ¼ 0, and D ¼ 1, and the code resides in segment 4.
Decoding achieves 0 0 0 0 1 1 1 0 1 1 0 0. As expected, this code is the approximation of the code in (b) in
Example 11.3. Since segment 4 has compression, the last 3 bits in the original 12-bit linear code, that is,
XXX ¼ 010 ¼ 2 in decimal, are discarded during transmission or storage. When we recover these three bits,
the best guess should be the middle value: XXX ¼ 100 ¼ 4 in decimal for the 3-bit coding range from 0 to 7.
Now we apply the m 255 compander to compress 12-bit speech data as shown in Figure 11.10 ( a).
The 8-bit compressed code is plotted in Figure 11.10 ( b). Plots (c) and (d) in the figure show the 12-bit
(a)
1000
0
-1000
0
200
400
600
800
1000
1200
1400
1600
1800
2000
(b)
100
0
-100
0
200
400
600
800
1000
1200
1400
1600
1800
2000
(c)
1000
0
-1000
0
200
400
600
800
1000
1200
1400
1600
1800
2000
(d)
40
20
0
-20
-40
0
200
400
600
800
1000
1200
1400
1600
1800
2000
Sample number
FIGURE 11.10
The m 255 compressor and expander: (a) 12-bit speech data; (b) 8-bit compressed data; (c) 12-bit decoded
speech; (d) quantization error.
 
Search WWH ::




Custom Search