摘要 |
A motion vector generation apparatus which generates a motion vector utilized to execute motion-compensated encoding based on comparison between a block to be encoded in an image to be encoded and a reference block in a reference image. The apparatus sequentially selects a candidate from a plurality of motion vector candidates, sequentially calculates differences between pixel values of the block to be encoded and pixel values of the reference block corresponding to respective motion vector candidates, calculates, as an average difference, differences between an average pixel value obtained by averaging the pixel values of the block to be encoded and respective pixel values of the block to be encoded, decides a weighting coefficient based on a ratio between a minimum difference and the average difference, and calculates, for each selected motion vector candidate, an evaluation value for deciding a motion vector candidate having a minimum evaluation value. |