Patent ID: 7508328

Claim:
A method for processing a variable length code, the method comprising: determining a first address; executing a plurality of opcodes from at least one table starting at the first address; in response to each of the plurality of opcodes: receiving a portion of a sequence of bits, the sequence of bits comprising a first variable length code; receiving a first parameter from the at least one table at a current address, where the first parameter represents an integer; flushing a number of bits specified by the first parameter in the sequence of bits; receiving a second parameter corresponding to one of a plurality of stages, where the second parameter represents an integer; determining a value of a number of bits specified by the second parameter in the sequence of bits; receiving a third parameter from the at least one table at the current address; computing a next address, the next address being a sum of the current address, the third parameter, and the value of the number of bits specified by the second parameter; and retrieving a next opcode of the plurality of opcodes, the next opcode being retrieved from the next address; and determining a decoded syntax element corresponding to the first variable length code.