• 沒有找到結果。

Decoding Group-Searching Scheme and overall group-based

3.3. The Proposed Group-Based VLC Encoding and Decoding

3.3.5. Decoding Group-Searching Scheme and overall group-based

Because the decoding procedures are performed after the group information is acquired, and efficient group-searching scheme with low complexity and high operation rate determines the performance of a group-based VLC decoding system. To realize such a group searching scheme, we abandon the conventional group-searching scheme which is to calculate the range of PCLC_codenum to fetch the decoding group. If the number of decoding group is large, we have to iterate the group-searching scheme until the correct range is found. Besides, if we use PCLC_codenum group-searching scheme, we have to save the PCLC_mincode with the longest codeword length. Therefore, the conventional group-searching scheme is not efficient enough about group-searching time and memory usage. We use the proposed group-searching scheme called prefix-zero-group-searching (PZGS) and inter-group symbol memory mapping to realize the decoding group searching.

A PZGS scheme is to count the leading zeros of the received codeword and the value of the leading zeros is the base of the group number. Then, we have to fetch the additional group number according to the value of NUM_VLC in CAVLC or the table which is used in MPEG-2. The relative additional group numbers are 0, 16, 32, and 48 for NUM_VLC0, NUM_VLC1, NUM_VLC2, and NUM_VLC3 in CAVLC, and those are 0 and 32 for MPEG-2 table B14 and B15. The sum of the base group number and additional group number is the group number we have to access. Based on the codeword group table, the base addresses have to be assigned in group number order, i.e. base_addr0 < base_addr1 < … < base_addrn for inter-group symbol memory mapping. An example of the PZGS table and the intra-/inter-group symbol memory map is shown in Table 3-10. The group information of the PZGS table is given in

Table 3-11.

group symbol prefix NUM_VLC symbol

address suffix_offset

Table 3-10 : CAVLC PZGS table and intra-/inter-group symbol memory map

group suffix_adjust leading_0s base_address suffix_length suffix_min

0 0 1 0 0 1

Table 3-11 : CAVLC group information of the coding table shown in Table 3-10

Before realizing the decoding processes, the word lengths of both suffix_offset and suffix_num operands have to be determined, since it is difficult to implement arithmetic units with variable length inputs. To perform memory mapping, the supported symbol memory must satisfy the requirement of coding tables.

Consequently, the value of suffix_offsets and suffix_num will not exceed the address space of the symbol memory. For this reason, it is reasonable that the word length of the suffix_offset and suffix_num operands equal that of the base address.

Based on the word lengths of the operands discussed above, the VLC decoding algorithm is completed by the group searching scheme and the intra-group decoding procedures. Detailed descriptions of the VLC decoding processes and corresponding example based the coding table in Table 3-11, Table 3-12, and Figure 3-13.

Figure 3-13 : CAVLC decoding processes and corresponding examples

Figure 3-14 : The memory usage for conventional symbol memory

In the conventional symbol memory, two symbols, run and level, are directly stored into the symbol memory, and the length of binary number for run is 5-bit, and the length of binary number of level is 7-bit including the sign bit. Besides, the memory is 256-entry. If we decrease 4 bits of the symbol memory, we can reduce 1024-bit memories. In order to memory reduction, we add one step for MPEG-2 decoding processes, but under will pipelined scheme it doesn’t make great influence on the decoding throughput. We take advantage of the feature of symbol groups, that is, when we fetch the group number, the group number can be translated into one symbol. We only save the value of the other symbol, and finally we can get all decoded symbols. Therefore, the symbols groups have to provide the group information about which decoded symbol derived from symbol groups and its value.

The group information of MPEG-2 symbol groups is shown in Table 3-12.

Symbol_adjust also helps reduce the memory usage. When we put the entire value of levels into symbol memories, we have to use 6-bit memory width. Therefore, we separate the levels, 1 ~ 31, and the level, 32 ~ 40, into two groups in Table 3-6. In symbol memories, we only save the least 5-bit binary number of levels, and when symbol_adjust is equal to 1, we get the result of decoded level by adding the level derived from symbol memories and 32. The variable, run_or_level, means the value stored in the mapping symbol group is run or level, and 1 is to store run. Of course, symbol means the value of decoded symbol stored in symbol groups.

group symbol_adjust run_or_level base_address symbol

G0 0 1 0 00

G1 1 1 31 00

G2 0 1 40 01

G3 0 1 58 10

G4 0 1 63 11

G5 0 0 67 01

Table 3-12 : An example of MPEG-2 symbol group information

group symbol prefix Table symbol

address suffix_offset

S030 2 B14 7 0

S031 3 B14 8 1

S032 3 B14 9 2

G3

S033 3 B14 10 3

Table 3-13 : MPEG-2 PZGS table and intra-/inter-group symbol memory map

group suffix_adjust leading_0s base_address suffix_length suffix_min

0 0 1 0 0 1

1 1 1 1 2 0

2 0 1 4 2 1

3 0 1 7 2 0

Table 3-14 : An example of MPEG-2 group information of the coding table

Figure 3-15 : MPEG-2 decoding processes and corresponding examples

3.3.6.

3.3.6.

3.3.6.

3.3.6. Encoding Group-Searching Scheme and overall

相關文件