Patent ID: 8363725

Claim:
A method of variable length code (VLC) encoding a symbol of frequency transform values having a run and a level in a video encoding system, comprising: generating, at a processor, an address for a lookup table stored in a memory based on the run and the level by generating an offset with respect to a base address by computing the product of: (i) the run; and (ii) the maximum level plus one; and summing the product with the level, the lookup table storing VLC entries for all possible combinations of run values ranging from a minimum run to a maximum run and level values ranging from a minimum level to a maximum level, each of the VLC entries including a flag indicative of an escape mode; reading a VLC entry from the lookup table using the address; obtaining a VLC code and bit length from the VLC entry if the flag in the VLC entry is a first value; and generating a fixed length VLC code from an escape code, the run, and the level if the flag in the VLC entry is a second value, wherein the minimum run is 0, the maximum run is 31, the minimum level is 1, and the maximum level is 40, and wherein the lookup table stores 1312 VLC entries.