MPEG encoding:Coding of DCT coefficients

Coding of DCT coefficients

The coding of the quantised DCT coefficients employs two compression techniques: run-length coding (RLC) and variable-length coding (VLC). RLC exploits the fact that among the non-zero DCT coefficients, there are likely to be several successive occurrences of zero coefficients. Instead of transmitting these coefficients as zeros, the number of zero coefficients is encoded as part of the next non-zero coefficient. Consider the following set of DCT values:

14, 6, 0, 4, 3, 0, 0, 5, 7, 0, 0, 0, 0, 0

RLC will form the series of DCT values into the following groups: (14) (6) (0, 4) (3) (0, 0, 5) (7) (0, 0, 0) The number of codes required to transmit these values has thus been reduced from 14 to 7 by grouping any zero coefficient or a run of zero coefficients together with the following non-zero coefficient, (0, 4) and (0, 0, 5). Each group is then given a unique code. The final run of zeros is grouped together and replaced by a single EOB code.

The actual code allocated for each group is determined by the proba- bility of its occurrence. Those occurring most frequently are given a shorter code word than those that occur infrequently. This is the princi- ple of VLC, also known as entropy coding. The most well-known method for VLC is the Huffman code, which assumes previous knowledge of the probability of each DCT value. For instance, a DCT value 3 which occurs frequently may be allocated a 6-bit code word; the infrequent DCT value 12 is allocated a 14-bit code word and a zero followed by a 4 is allocated a 9-bit code word. EOB is the most frequently occurring string and it may be allocated a mere 2-bit code word. The code words are held in a lookup table in read-only memory (ROM). At the receiving end, the bitstream has to be resolved into its original code words. Both RLC and VLC are known as lossless coding techniques. Lossless codes, as the name sug- gests, do not introduce any losses and they are fully reversible at the receiving end.

Buffering

Quantisation, RLC and VLC produce a bit rate that depends upon the complexity of the picture content as well as the amount and type of movement involved. A variable bit rate would occupy a varying amount of bandwidth and may exceed the total available bandwidth with detri- mental effect on picture quality. To avoid this, a constant bit rate is neces- sary. This is obtained by dynamically changing the quantisation of the DCT matrix block (Figure 4.21). The bit-stream is first fed into a memory store before being fed out at a constant rate for transmission. If the bit rate increases, and the buffer begins to overflow, the bit rate control unit is activated; this causes the quantisation level to be reduced, thus decreasing the data bit rate.

MPEG encoding-0529

Leave a comment

Your email address will not be published. Required fields are marked *