电子学报 ›› 2009, Vol. 37 ›› Issue (2): 357-361.

• 论文 • 上一篇    下一篇

高效的H.264并行编码算法

孙书为, 陈书明   

  1. 国防科技大学计算机学院,湖南长沙 410073
  • 收稿日期:2008-01-22 修回日期:2008-08-04 出版日期:2009-02-25 发布日期:2009-02-25

An Efficient Parallel Algorithm for H.264/AVC Encoder

SUN Shu-wei, CHEN Shu-ming   

  1. Computer School,National University of Defense Technology,Changsha,Hunan 410073,China
  • Received:2008-01-22 Revised:2008-08-04 Online:2009-02-25 Published:2009-02-25

摘要: CABAC是H.264/AVC视频压缩标准主要档次中采用的熵编码机制,结合RDO模式选择技术,可以降低20%的编码码率,但是编码器计算复杂度却同时大大增加.对算法进行并行化是有效加快编码速度的方法,但是,由于CABAC具有自适应编码的特点和RDO模式选择对熵编码的使用,使得顺序编码的宏块之间存在着严格的数据相关性,限制了并行编码算法的开发.本文结合基于宏块区域划分的数据级并行编码机制MBRP和码率估计技术,为采用CABAC熵编码机制的H.264编码算法提供了一种高效的并行编码方案:将H.264编码算法划分为模式选择和码流生成两个部分,使之构成典型的生产者-消费者关系;将RDO模式选择中的CABAC替换为码率估计,去除模式选择过程中因CABAC导致的严格数据相关性;对模式选择部分采用MBRP并行机制;码流生成部分由单独的处理器完成,并和模式选择部分实现流水化并行处理.通过4处理器系统模拟器进行实验,发现在保持视频压缩性能几乎不变的情况下,该并行算法的加速比可以达到4.7.

关键词: H.264, CABAC, 码率估计, RDO模式选择, 多处理器, 并行算法, 宏块区域划分

Abstract: CABAC is the entropy coding method adopted in H.264/AVC main profile,and the combination of RDO and CABAC can represent an improvement in bit rate of around 20%.However,the computational complexity increases drastically as well.Parallel algorithms are efficient ways to speed up the encoder.However,because of the adaptive characteristic of CABAC,there are strict data-dependencies between macro-blocks encoding,which makes it hard to exploit the parallelism of encoder.In this paper,an efficient parallel algorithm for H.264/AVC encoder with CABAC entropy coding is proposed based on the Macro-Block Region Partition(MBRP)parallel method and CABAC bit-rate estimation technique:the H.264 encoder is partitioned into the mode decision part and the bit-stream producing part with relationship of producer and consumer;CABAC in the RDO mode decision is replaced with bit-rate estimation,which removes the data-dependencies brought by CABAC;in the mode decision part,the MBRP parallel algorithm is adopted;the bit-stream producing part is performed in a single processor,and forms task pipelining with mode decision part.Simulation results on 4-processor simulator show that the proposed parallel algorithm can achieve speedups above 4.7 while maintaining the similar R-D performance.

Key words: H.264, CABAC, bit-rate estimation, RDO(rate-distortion optimization)mode decision, multi-processor, parallel algorithm, MBRP(macro-block region partition)

中图分类号: