Patent ID: 7720298

Claim:
A method of analysing a JPEG-compressed digital image, the JPEG-compressed digital image being represented as a bitstream, wherein said bitstream represents sequential image blocks, each block comprising one or more components, each component comprising one or more data units and each data unit being represented as a Huffman-coded stream of coefficients of basis functions, wherein a zeroth order coefficient is represented as a difference to the previous zeroth order coefficient of the corresponding component, said method comprising: sequentially stepping through the bitstream and, while stepping through the bitstream: storing an indicator in a block information table to one zeroth order or first order coefficient of each image block; decoding the zeroth order coefficients and storing in the block information table the zeroth order coefficient of at least one data unit of each component, said zeroth order coefficient being represented in a non-differential form; and storing in the block information table information indicating the number of bits in the bitstream between coefficients of zeroth or first order in adjacent data units of the image block; wherein stepping through non-zeroth order coefficients of a data unit in the bitstream, said non-zeroth order coefficients being represented by a sequence of bitstream entries, comprises: looking at a bit sequence of a predetermined number of the following bits in the bitstream; making a table lookup to determine the category and zero run length of at least the first bitstream entry in the bit sequence and to determine the bit length of the first bitstream entry; skipping the number of bits in the bitstream corresponding to the determined bit length; summing the number of skipped bits for gathering information regarding the number of bits in the bitstream between coefficients of zeroth or first order in adjacent data units; and summing the number of coefficients having been stepped through until all coefficients of the data unit have been stepped through or an end of block symbol is encountered.