| H.264 is the latest video coding standard, and it adopts many new technologies such as intra prediction, integer cosine transform, multiple reference pictures for motion estimation, context adaptive entropy coding and so on, these methods largely improves the coding efficiency. Since the bandwidth is limited in video communications, we must control the bit rate in a certain range to improve the quality of decoded pictures under the predefined target bit rate. So rate control is a pivotal part in a coder, and it's also an important index of a coder.The paper conducted a deep research and analysis about the rate control algorithm of H.264, and the main tasks including:1. We introduce the H.264 coding standard and analyze its rate control method.2. Give a detailed analysis about the problem that the G012 algorithm achieved insecure rate and PSNR for different preliminary quantization parameters, and make some improvement about the QPst expression.3. Introduce the complexity of P-frame to the frame layer rate control, and allocate different bits to all P-frames according to their complexity.4. G012 algorithm adopts linear model for MAD prediction, which costs too many operations and exits deviation. In this paper, we utilize the spatial and temporal correlation of actual MAD and present a new weighted mode for prediction. This method doesn't need to update parameters in prediction model and reduces the complexity and prediction error.5. Introduce macroblock layer rate control to G012 algorithm and adjust the QP of different macroblocks in the same basic unit. This method effectively elevates PSNR of the decoded pictures.6. We present an adaptive rate control algorithm with a fast scene change detection scheme to improve the coding efficiency. When a scene change was detected, the current GOP was terminated, and the bits allocated to the next GOP were modified. In this way, the algorithm substantially mitigates the negative influence of scene change on the following frames.7. We study the impact of low delay constraint in H.264 rate control and its improvements. The drawback of the H.264 rate control is it cannot handle the frame-skipping mechanism well. To modify this, we control the quantization parameter of each I-frame to avoid the buffer overflow and frame-skipping. Since encoding the I-frame by different quantization parameter will generate different rate and distortion for a GOP, we use Lagrangian optimization to find the tradeoff between rate and distortion for a GOP. By the estimation models of rate and distortion for a GOP, calculate the Lagrangian cost for each possible quantization parameter of I-frame, the quantization parameter with minimum Lagrangian cost will be our choice for I-frame. |