在H.264/AVC视频编码标准中,基于上下文的自适应二进制算术编码(CABAC)主要应用于主要档次中,并且具有较高的压缩效率。首先分析了CABAC编码原理和运动矢量差(MVD)各分量的上下文模型选择原理,而后提出了在帧间编码分割块尺寸下,充分地利用当前块MVD与当前块MV的相关性、当前块MVD与已编码相邻块MVD的相关性以及当前块MVD中各分量之间相关性的CABAC优化算法(CABAC_1算法)。通过实验表明:较基准CABAC算法,CABAC_1算法一方面能有效地降低2%左右的编码时间及确保了编码序列的视觉质量;另一方面能够有效地节约在编码中帧间编码帧的码流(比特流),其中P帧平均节约了10%左右的比特流,B帧节约了5%左右的比特流。因此,CABAC_1算法是一种有效的优化算法。
In H.264/AVC video compression standard,context-based adaptive binary arithmetic coding(CABAC) is mainly used in main profile and has high compression efficiency.At the beginning,this paper introduced and analyzed the theory of CABAC algorithm,the context model selection theory of each component which belonged to MVD,then it proposed an optimization CABAC algorithm(CABAC_1 algorithm) based on motion vector difference(MVD) which were full use of the relevance between the current block MV and the current block MVD,the relevance between the current block MVD and the adjacent encoded block MVD and the relevance between the vertical and horizontal component of MVD.Compared with the standard CABAC algorithm,the CABAC_1 algorithm not only can effectively decrease the encoding time and rate and ensure the visual quality of coding sequence,but also can effectively save the code stream(bit streams) of the inter coding frames.The experiments show that it can save about an average of 10% bit streams of P frames and about an average of 5% bit streams of B frames by using CABAC_1.Therefore,CABAC_1 algorithm is an effective optimization algorithm.