Patent ID: 7616691

Claim:
A video encoding method for subjecting a to-be-encoded block of an input image to motion compensated predictive encoding referring to a first reference image and a second reference image to transform the input image to encoded image data, comprising: a first step of calculating (A) a first distance between the first reference image and the input image and (B) a second distance between the first reference image and the second reference image; a second 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 third step of generating a prediction image by calculating a linear sum of the first reference image and the second reference image according to the first weighting factor and the second weighting factor; a fourth step of calculating a prediction error of the prediction image to the to-be-encoded block; and a fifth step of encoding quantized orthogonal transform coefficient information obtained by subjecting the prediction error to orthogonal transform and quantization and generating said encoded image data, and wherein the second step includes setting values of both of the first weighting factor and the second weighting factor to a value for average prediction (1) when the second weighting factor is larger than an upper limit or (2) when the second weighting factor is smaller than a lower limit.