Provided are a moving image encoding device and a moving image decoding device that improve the prediction efficiency of motion vectors and can improve differential motion vector encoding efficiency, even when blocks that serve as candidates for motion vector prediction do not have significant motion information. In a moving image encoding device (100), a motion vector predictor (114) selects one region from among the encoded regions stored in a frame memory (104). In situations such as when the selected region does not have a reference frame number, the motion vector predictor searches for a region of high correlation with a template region composed of reproduced pixel signals from reference images designated by reference frame numbers associated with the target region, and generates a predicted motion vector based on the spatial position relationship between the searched region and the target region. The predicted motion vector can be used to calculate a differential motion vector.
展开▼