Patent ID: 7903740

Claim:
A video decoding method for subjecting a to-be-decoded block of a to-be-decoded image to motion compensated prediction decoding, comprising: decoding encoded data of a to-be-decoded image to obtain quantized orthogonal transform coefficient information, motion vector information and index information; calculating a first distance between a first reference image designated by the index information and the to-be-decoded image, and a second distance between the first reference image and a second reference image designated by the index information; calculating a first weighting factor for the first reference image and a second weighting factor for the second reference image based on a ratio of the first distance to the second distance; and obtaining a pixel value of a prediction image by calculating a linear sum of a pixel value of an image of a region specified by the motion vector information in the first reference image and a pixel value of an image of a region specified by the motion vector information in the second reference image according to the first weighting factor and the second weighting factor; wherein obtaining a prediction error by subjecting quantized orthogonal transform coefficient information to the inverse quantization and inverse orthogonal transform; and generating a reproduction image signal by adding the prediction error and the prediction image; wherein the calculating the first and second weighting factors third step sets values of both of the first weighting factor and the second weighting factor to a value for an average prediction if (1) the second weighting factor is larger than an upper limit, or (2) the second weighting factor is smaller than a lower limit, or (3) at least one of the first image and the second image is a long term reference image.