1. Field of the Invention
The present invention relates to image processing apparatuses, and more particularly, to encoding processing for image signals.
2. Description of the Related Art
Moving picture expert group (MPEG) techniques are known as encoding techniques for image signals and are described, for example, in Japanese Patent Laid-Open No. 2002-199408 and Japanese Patent Laid-Open No. 9-163379.
In MPEG encoding techniques, an image signal is categorized into an I-frame, a P-frame, and a B-frame to be encoded. For I-frames, encoding is performed using an image signal only within the same frame. For P-frames, motion compensation predictive encoding is performed using an image signal of a previous I-frame or P-frame. For B-frames, motion compensation predictive encoding is performed using an image signal of a previous I-frame or P-frame and a subsequent I-frame or P-frame.
For transmitting an MPEG-encoded image signal using a transmission path of a limited transmission rate or for recording an MPEG-encoded image signal in a recording medium, it is preferable that the amount of data (data rate) per unit of time be kept constant. A mode for keeping the data rate constant is called a constant bit rate (CBR) mode.
In MPEG techniques, P-frames and B-frames use image signals of other frames to perform motion compensation predictive encoding. Thus, if there is a large change in a screen, for example, if a new object suddenly appears in a screen of a P-frame, a prediction error is increased.
Also, since the data rate must be kept constant in the CBR mode, if a prediction error is increased due to such a large movement, the width of a quantization step must be increased in order to reduce the amount of data.
Thus, the quality of an image in a portion including a large change is reduced, compared with other frames.