摘要 |
An encoding apparatus for encoding a target pixel, comprising a prediction value generator for generating a prediction value by predicting a target pixel value representing the target pixel on the basis of pixels around the target pixel, a difference generator for generating a difference between the prediction value generated by the prediction value generator and the target pixel value, and a quantizer for generating a quantized value by quantizing the difference generated by the difference generator. An entropy encoder generates encoded data by entropy-encoding the quantized value generated by the quantizer, and a quantization controller selects one of k quantization methods, for use by the quantizer, in accordance with a code amount of the encoded data generated by the entropy encoder. Each of the k quantization methods is a quantization method which makes an error between the difference generated by the difference generation means and a quantized value obtained by quantizing the difference using the quantizer fall within a range of -Nm to +Nm (m=1 to k).
|