Patent ID: 7199733

Claim:
A variable length decoding apparatus for the image format of a digital video camera, comprising: a first register, for saving a bit stream which is being decoded; a second register, for saving a bit stream which is being decoded; a third register, for saving a combined bit stream; a fourth register, for saving a residual bit stream; a first multiplexer, for switching the bit streams, connected to the first register and the third register, the input of the first multiplexer includes the bit stream which is being decoded and the combined bit stream; a barrel shifter connected to the first register and the second register, for producing output data with a length of sixteen bits according to the bit streams of the first register and the second register; a bit stream generator connecting to the barrel shifter and the third register, for generating the combined bit stream by combining the residual bit streams of all blocks in which there is an EOB; a bit stream combining generator connected to the fourth register and the barrel shifter, for combining the residual bit stream of the fourth register and the part output of the barrel shifter; a second multiplexer connected to the bit stream combining generator and the barrel shifter, for switching the bit stream combining generator and the barrel shifter; a programmable logic array connected to the output of the second multiplexer, for decoding the image by looking up the table according to the data from the output of the second muliplexer; a controller for controlling the decoding process and fixed length decode; a third multiplexer connected to the programmable logic array and the controller, the input of the third multiplexer includes the bit number which comes from the look-up table through the programmable logic array and the bit number of fixed length decode from the controller; and an accumulator connected to the third multiplexer and the barrel shifter, for accumulating the bit number of the bit stream that is being decoded, the result of the accumulator will be provided to the barrel shifter in order to do a shift operation.