Patent ID: 8144784

Claim:
A method of operating an encoding apparatus to compress an image, the method comprising: accepting an ordered sequence of quantized transform coefficients of a block of image data of the image into the encoding apparatus, the sequence having a most likely-to-occur amplitude, and at least one other amplitude including a next-to-most likely-to-occur amplitude, forming a joint event defined by a first parameter indicative of the number of coefficients having other than the most likely-to-occur amplitude and a second parameter indicative of the number of trailing coefficients having the next-to-most likely-to-occur amplitude; encoding, by the encoding apparatus, the joint event using a first coding method; encoding, by the encoding apparatus, the signs of the trailing coefficients having the next-to-most likely-to-occur amplitude; encoding, by the encoding apparatus, the values of the coefficients having other than the most likely-to-occur amplitude using at least one level-coding coding method, the choice of level-coding method depending on at least the amplitude of the coefficient; encoding, by the encoding apparatus, a value indicative of the total number of coefficients having the most likely-to-occur amplitude using a second coding method; encoding, by the encoding apparatus, the positions of the coefficients having a value other than the most likely-to-occur amplitude using at least one position coding method; and concatenating, by the encoding apparatus, the results of the encodings to form a set of codewords, at least one position encoding method being 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.