摘要 |
An image memory outputs a target encoding pixel and a plurality of reference pixels in the vicinity thereof. A boundary mode determining unit determines a maximum value and a minimum value of the reference pixels, determines an average value of the maximum value and the minimum value, compares the respective reference pixel values with the average value, detects a boundary in the target encoding pixel and the reference pixels based on comparison results, and detects a pixel distribution state of the reference pixels based on the detected boundary. An adaptive predictor calculates a prediction value by performing a calculation based on a function corresponding to the pixel distribution state and the reference pixels. A prediction difference calculating unit determines a difference value between the prediction value and a value of the target encoding pixel. A prediction coincidence determining unit compares the prediction value and the target encoding pixel value, and outputs a comparison result as a binary signal. A context generator generates a context based on the pixel distribution state and the difference value of the prediction difference calculating unit. An arithmetic encoder encodes the binary signal based on the context thus generated. |