Patent ID: 7876831

Claim:
A prediction image generating method for generating a prediction image from encoded data obtained by subjecting a video image to prediction encoding, the video image having a luminance component and first and second color difference components, the method comprising: receiving an input of encoded data obtained, for one or more to-be-decoded blocks, a combination selected from a plurality of combinations, each combination comprising (1) (a) a first weighting factor for the luminance component, (b) a second weighting factor for the first color difference component, (c) a third weighting factor for the second color difference component, (d) a first offset for the luminance component, (e) a second offset for the first color difference component, and (f) a third offset for the second color difference component and (2) a flag indicating presence or non-presence of the weighting factors and the offsets concerning the luminance component, and encoding, for the to-be-decoded block, (A) information of a motion vector and (B) an index indicating (a) one combination of the plurality of combinations and (b) a reference image; deriving the weighting factors and the offsets from the plurality of combinations and the index; and generating a prediction image by multiplying the luminance and the first and second color difference components of the reference image by the weighting factors, respectively, and adding the offsets, respectively, to the results of the multiplying, based on the motion vector, wherein the weighting factors and the offsets which are derived from two of the indexes corresponding to the different reference images respectively are identical.