该文针对H.264帧内编码码率控制(RC)效果不佳的问题,提出了一种新颖的图像复杂度自适应I帧RC算法。首先用Sobel算子检测I帧亮度像素的梯度,建立4×4块的边缘方向直方图,得到每个4×4块最可能的帧内预测模式和相应重构块,最终获得与实际编码相近的残差图像。用残差的平均绝对值表达I帧编码复杂度,并提出了一种经验型码率-量化(R-Q)模型,同时考虑缓冲区状态和序列特性为I帧分配合适的目标比特,最后为每一个图像组(GOP)得到了合适的I帧量化参数(QP)。实验结果表明,该文算法能更准确地控制I帧输出码率,有效阻止缓冲区溢出和跳帧,得到更加平稳的视频质量,序列PSNR波动减少了60%以上。
To address the bad effect of intra-coding Rate Control(RC) of H.264,a novel image complexity adaptive I-frame RC algorithm is proposed.First,the gradient of luma pixel is detected in I-frame with Sobel operator and the edge direction histogram is established for each 4×4 block,hereby the most probable intra prediction mode and corresponding reconstructed block are got.Finally,the residual picture which is close to the actual coding residual is obtained.The mean absolute value of residual is used to represent I-frame coding complexity,then an empirical Rate-Quantization(R-Q) model is proposed,and the optimal intra-QP is accurately determined for each GOP according to allocated target bits by considering simultaneously buffer status and sequence characteristic.Experimental results show that the proposed scheme obtains more accurate I-frame output bit-rate and more steady video quality.Buffer overflow and frame skip are effectively prevented,and sequence PSNR fluctuation has reduced by 60%.