Patent ID: 7783119

Claim:
An image encoding apparatus that encodes image data based on a dynamic probability distribution model, comprising: an input unit that inputs image data in pixel units; a symbol generating unit that generates, from pixel data of a pixel of interest input by said input unit, a symbol to be entropy encoded; an encoding unit that entropy encodes, according to Golomb coding, the symbol generated by the symbol generating unit using a given encoding parameter “K” defined in Golomb coding and outputs an encoded symbol as a codeword of the symbol; a storage unit that stores, for the symbol, information representing a target range of the encoding parameter “K” to generate a codeword having a length within a target length; a judging unit that judges, referring the storage unit, whether the encoding parameter “K” used when the symbol is encoded by the encoding means is within a target range for the symbol, exceeds an upper limit of the target range, or falls below a lower limit of the target range; and an updating unit that updates, based on a result of the judgment by the judging unit, the encoding parameter “K”to prepare for entropy encoding a subsequent pixel.