为提高视频编码器码率控制的性能,根据视频内容将视频帧划分成包含主要运动物体的前景区域和相对静止背景的背景区域,分析各区域的率失真特性,提出一种适用于H.264/AVC编码器的基于区域的宏块层码率控制方法.比特分配中,根据宏块的区域信息确定加权因子,自适应地为重要宏块分配较大的目标比特预算.不同区域使用对应参数的二次模型确定宏块量化参数(quantization parameter,QP),并以已编码宏块的QP为参考调整计算所得QP,以降低前景与背景区域间、相邻宏块间的编码质量波动.宏块编码结束后,根据实际编码信息更新各区域的码率控制参数.实验测试表明,提出方法能够有效降低实际码率与目标码率之间的相对偏差,提高编码效率和解码恢复视频的主观质量。
In order to improve the rate control performance of video encoder,video frames are segmented into two regions according to the video content,i.e.the foreground region containing the main moving objects and the background region containing the relatively static scene.The rate-distortion properties of the two regions are analyzed.Based on the analyses,a novel region-based macroblock layer rate control method for H.264/AVC is proposed.For the bit allocation process,more target bits can be assigned to the important macroblocks by employing an adaptive factor determined by the region information.Then,the quantization parameter(QP) is computed by using the quadratic model with different parameters related to the two regions.The computed QP is further adjusted to suppress the coding quality fluctuation between the two regions,as well as the quality fluctuation among the consecutive macroblocks.Finally,the rate control parameters are updated after coding the current macroblock.Experimental results demonstrate the mismatches between the actual coding bit-rates and the target bit-rates are reduced,while the coding performance of the encoder and the subjective visual quality of the reconstructed video are improved.