To enable calculation amount reduction by setting a detection range according to a size and encoding type of a storage motion vector for each unit area, so that the range is small when a storage motion vector value is small and large, when the value is large.
A motion detection range setting part 12 decides the range of a motion vector in a horizontal/vertical direction from the size of a storage motion vector of a motion vector memory 12 and a macroblock type. A setting part 12 sets, according to the size and an encoding type of the stored motion vector for each unit area, a detection range to be small when a motion vector value is small and at be large, when the value is large. A motion vector detection part 11 detects the motion vector within the range set by the setting part 12, and sends it out to a motion compensation part 14 and the motion vector memory 13. The compensation part 14 prepares a reference image from the motion vector transmitted by the detection part 11 and a stored image of a frame memory 17. The memory 13 stores the size and the macroblock type of the motion vector of a P picture for the first two frames.
Next Patent: MOTION VECTOR CODING METHOD OF MPEG-4