Patent ID: 8369403

Claim:
An image processing device comprising: a difference image data generation section that generates, for each of a plurality of predetermined intra image prediction modes, a difference image data item containing a difference value from pixels surrounding a process-target pixel to be processed; a ranking section that ranks the intra image prediction modes in ascending order of the sum of differences that is based on a generated codes amount of the difference image data item; a back search section that detects, from the difference image data item ranked highest by the ranking section, a quantization factor on which a quantization step used in the previous encoding process is based; a residue value calculation section that calculates a residue value at the time of dividing a target number of difference image data items in descending order of rank by the ranking section by using a scaling factor that is calculated based on the quantization factor detected by the back search section; and an intra image prediction mode decision section that determines the intra image prediction mode in which the difference image data item having the smallest residue value was generated as the intra image prediction mode for the image data item.