Method and apparatus for decoding variable length codes
DCFirst Claim
1. A method of performing variable length decoding on a coded bitstream, the method comprising the steps of:
- receiving a coded bitstream;
determining which of a major table or a minor table contains an entry corresponding to a first variable length code (VLC) of the code bitstream, said major table containing entries corresponding to frequently used VLCs, said minor table containing entries corresponding to less frequently used VLCs;
retrieving the entry corresponding to the VLC from the table determined to contain the entry in said determining step; and
performing both run length decoding and inverse quantization for the first VLC prior to determining a next entry corresponding to a second VLC.
1 Assignment
Litigations
0 Petitions
Accused Products
Abstract
A method and apparatus for performing variable length decoding on a coded bitstream produced by an encoding apparatus is provided. The coded bitstream includes one or more variable length codes (VLCs) produced by a Huffman code. Upon receiving the coded bitstream, for each of the VLCs in the coded bitstream a determination is made as to which of a major table or a minor table contains an entry corresponding to the VLC. The major table has been statistically optimized to contain entries corresponding to frequently used VLCs. The minor table has been optimized for space and contains entries corresponding to VLCs that are less frequently used. The optimized tables provide a more efficient method and apparatus for decoding variable length codes. Specifically, the optimized tables provide a method of variable length decoding that can run efficiently on a target platform having a limited data and code cache.
135 Citations
12 Claims
-
1. A method of performing variable length decoding on a coded bitstream, the method comprising the steps of:
-
receiving a coded bitstream; determining which of a major table or a minor table contains an entry corresponding to a first variable length code (VLC) of the code bitstream, said major table containing entries corresponding to frequently used VLCs, said minor table containing entries corresponding to less frequently used VLCs; retrieving the entry corresponding to the VLC from the table determined to contain the entry in said determining step; and performing both run length decoding and inverse quantization for the first VLC prior to determining a next entry corresponding to a second VLC. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer system comprising:
-
a processor configured to receive a coded video bitstream, said coded video bitstream containing a plurality of variable length codes (VLCs) including a first VLC; and a memory coupled to said processor, said memory having stored therein a table including information for use by a program to facilitate efficient decoding of the coded video bitstream, and sequences of instructions which, when executed by said processor, cause said processor to perform the steps of; retrieving an entry from the table corresponding to the first VLC; and
performing multiple functions together in a single loop, the multiple functions including run length decoding and inverse quantization using the retrieved entry.
-
-
7. A method of performing variable length decoding, comprising the steps of:
-
receiving a coded bitstream; for each variable length code (VLC) in the coded bitstream concurrently retrieving a first entry from a first table based upon a first subset of bits from the coded bitstream, the first table containing entries corresponding to statistically frequently occurring VLCs, and retrieving a second entry from a second table base upon a second subset of bits from the coded bitstream, the second table containing entries corresponding to statistically less frequently occuring VLCs; and decoding the VLC based upon the entry of the first or second entry that corresponds to the VLC. - View Dependent Claims (8, 9)
-
-
10. A table driven method of decoding a coded video bitstream, the method comprising the steps of:
-
(A) receiving a coded video bitstream comprising one or more variable length codes (VLCs); (B) decoding a current VLC by (1) reading a set of bits from said coded video bitstream, (2) selecting a major table or a minor table from which to retrieve an entry, the entry including at least a VLC length, a run length, and a coefficient value, the step of selecting including determining which of the major table or the minor table contains an entry corresponding to the current VLC, (3) performing variable length decoding based upon the VLC length, (4) performing run length decoding based upon the run length, and (5) performing inverse quantization based upon the second value; and (C) continuing with step (B) if the current VLC does not correspond to the last coefficient. - View Dependent Claims (11)
-
-
12. A computer system comprising:
-
a storage device having stored therein a two-level data structure including a first level containing entries corresponding to statistically frequently occurring VLCs and a second level containing entries corresponding to statistically less frequently occurring VLC, and a decoding routine for retrieving entries from the two-level data structure and performing variable length decoding, run length decoding, and inverse quantization on a coded bitstream; and a processor coupled to the storage device for executing the decoding routine, where; an outer loop of the decoding routine processes a current block of a coded bitstream each iteration, and a single inner loop of the decoding routine performs variable length decoding, run length decoding, and inverse quantization for each VLC of the current block based upon entries retrieved from the first or second level of the two-level data structure.
-
Specification