摘要 |
Method and apparatus for variable length code (VLC) encoding is described. In an embodiment, a symbol of frequency transform values having a run and a level 402 is VLC encoded. An address is generated, at a processor, for a lookup table (LUT) 408 in a memory based on the run and the level, the LUT storing VLC entries for all possible combinations of run values ranging from minimum to maximum runs and level values ranging from minimum to maximum levels, each of the VLC entries including a flag 412 indicative of an escape mode. A VLC entry is read from the LUT using the address 410. A VLC code and bit length are obtained from the VLC entry if the flag in the VLC entry is a first value. A fixed length VLC code 406 is generated from an escape code, the run, and the level if the flag in the VLC entry is a second value. |