摘要 |
A motion vector number limit setting unit (35) sets the upper limit value of the number of motion vectors in accordance with macroblock size. A motion prediction/compensation unit (32) detects an optimum prediction mode having a smaller number of motion vectors than the upper limit value. Using the motion vectors of the detected optimum prediction mode, the motion prediction/compensation unit (32) performs motion compensation on a reference image, to generate a predicted image. As the upper limit value of the number of motion vectors is set in accordance with macroblock size, the number of motion vectors is not restricted to a smaller number than necessary, and image degradation and the like can be prevented when extended macroblocks are used. |