Patent ID: 8340445

Claim:
An image encoding device that compresses and encodes pixel data of a prescribed image data format of pixels arranged in a scan order into a fixed length code, comprising: predicted value generation means for predicting target pixel data serving as pixel data of a target pixel to be encoded and generating predicted value data; a subtractor for calculating a differential value between the target pixel data and the predicted value data and generating differential value data; encoding mode decision means for deciding an encoding mode serving as information showing an encoding method based on the differential value data; a first buffer for temporarily holding the encoding mode; encoding target decision means for deciding which of the target pixel data and the differential value data is used as encoding target data serving as a target to which encoding processing is applied, based on the encoding mode; quantization means for applying re-quantization processing to the encoding target data, based on the encoding mode, and generating quantized data; and fixed length code generation means for adding the encoding mode to the quantized data, and generating a fixed length code, wherein the encoding mode decision means compares an absolute value of the differential value data, and a threshold value uniquely decided from a plurality of values by the encoding modes of one or more preceding pixels immediately before the target pixel, and generates the encoding mode with fixed length data, the encoding mode showing first information that indicates the differential value data is used as the encoding target data when the absolute value of the differential value data is the threshold value or less, and showing second information that indicates the target pixel data is used as the encoding target data when the absolute value of the differential value data exceeds the threshold value, and the quantization means decides a quantization step in accordance with the encoding mode of the target pixel and the threshold value, and applies re-quantization processing to the encoding target data with the quantization step to generate the quantized data with fixed length.