Patent ID: 8576915

Claim:
A method of operating a decoding apparatus comprising: accepting in the decoding apparatus a bitstream, wherein the bitstream comprises a concatenation of codewords determined by a coding method that encodes an ordered sequence of quantized transform coefficients of a block of image data of an image into codewords; recognizing codewords by the decoding apparatus; and decoding recognized codewords, using the decoding apparatus, wherein the coding method comprises: accepting the ordered sequence, wherein the quantized coefficients in the sequence have a most likely-to-occur amplitude, and at least one other amplitude including a next-to-most likely-to-occur amplitude; encoding the ordered sequence using a context-based adaptive variable length coding method, the context-based adaptive variable length coding method including encoding the positions of the coefficients having a value other than the most likely-to-occur amplitude using at least one position coding method selected from the set of position coding methods consisting of: a first position coding method including repeatedly alternating encoding of (a) a run-length of a run of most likely-to-occur amplitude coefficients preceding a coefficient having other than the most likely-to-occur amplitude, and (b) a run length of a run of coefficients having amplitudes other than the most likely-to-occur amplitude and determining if alternating produces shorter codewords than no alternating, the alternating occurring according to whether alternating or not alternating is determined to produce shorter codewords; and a second position coding method including determining a first parameter and a second parameter that are indicative of the number of most likely-to-occur amplitude coefficients and the number of coefficients having other than the most likely-to-occur amplitude whose positions remain to be coded; and jointly encoding the positions of the coefficients according to the first and second parameters using a variable length coding mapping that provides for any pair of parameter values all possible position patterns that have those parameter values, such that relatively more likely-to-occur sequences of quantized coefficients are represented by relatively short sets of codewords and relatively less likely-to-occur sequences of quantized coefficients are represented by relatively long sets of codewords.