Patent ID: 8520727

Claim:
An image encoding method for encoding a pixel value of an encoding target by using a predicted value generated by means of spatial or temporal prediction using a previously-decoded image, the method comprising: a step that performs prediction of the pixel value of the encoding target and obtains the predicted value; a step that computes data of a probability distribution which indicates what value an original pixel value has for the obtained predicted value, by shifting, in accordance with the predicted value, difference distribution data of a difference between the original pixel value and the predicted value in predictive encoding, where the difference distribution data is stored in advance; a step that clips the obtained data of the probability distribution so as to contain the data in a range from a lower limit to an upper limit for possible values of the original pixel value; a step that encodes the pixel value of the encoding target by using the clipped data of the probability distribution of the original pixel value from the lower limit to the upper limit.