Patent ID: 7627181

Claim:
An image encoding apparatus that encodes image data for a pixel block, the apparatus comprising: a first encoder that lossily encodes input image data for the pixel block to generate encoded data; a second encoder that losslessly encodes the input image data for the pixel block to generate encoded data; and a computer that, letting Lx be a code length of encoded data of a pixel block of interest generated by said second encoder and Ly be a code length of encoded data of the pixel block generated by said first encoder, if Lx and Ly satisfy a predetermined non-linear boundary function f( ) such that Ly≧f ( Lx ), selects and outputs the encoded data generated by said second encoder as encoded data of the pixel block, and, if Lx and Ly do not satisfy the function f( ), selects and outputs the encoded data generated by said first encoder as the encoded data of the pixel block, wherein, when an X-Y coordinate space is defined in which the X axis represents the code length of a pixel block encoded by said second encoder and the Y axis represents the code length of the pixel block encoded by said first encoder, and in the X-Y coordinate space, an area in which encoded blocks of a predetermined text image are plotted is defined as the distribution area “T”, an area in which encoded blocks of a predetermined computer-graphic image whose gradation is changed smoothly are plotted is defined as the distribution area “G”, and an area in which encoded blocks of a predetermined natural image are plotted is defined as the distribution area “I”, the predetermined non-linear boundary function f( ) has, in the X-Y coordinate space, a curve portion which extends from the origin point and passes between the distribution areas “G” and “I”, and a linear portion which passes between the distribution areas “T” and “I”.