Patent ID: 7599437

Claim:
A video decoding method for application to a to-be-decoded block of a to-be-decoded image, comprising: a first step of decoding encoded data of a to-be-decoded image to obtain a quantized orthogonal transform coefficient, motion vector information and index information; a second step of calculating a first distance between a first reference image indicated by the index information and the to-be-decoded image and a second distance between the first reference image and a second reference image indicated by the index information; a third step of calculating a first weighting factor for the first reference image and a second weighting factor for the second reference image based on a rate of the first distance to the second distance; a fourth step of generating a prediction image by calculating a linear sum of an image of a region specified by the motion vector information in the first reference image and 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; a fifth step of calculating a prediction error by subjecting the quantized orthogonal transform coefficient information to dequantization and inverse orthogonal transform; and a sixth step performed by a playback unit of generating a playback video image signal by adding the prediction error and the prediction image, wherein the third step includes setting values of both of the first weighting factor and the second weighting factor to a value for average prediction when the second weighting factor is larger than an upper limit or when the second weighting factor is smaller than a lower limit.