白玉婷 张刚
摘 要:本文从数字音视频编解码技术标准(AVS,Audio Video coding Standard)的熵编码原理出发,对算法模块进行分析,提出了一种使用较少存储空间来存储码表的方法,并结合算法特点给出了现场可编程门阵列(FPGA,Field-Programmable Gate Array)的实现方法。本设计中将码表查询、切换和指数哥伦布编码合并为一个流水线单元并行处理,节省了大量存储中间结果所需的空间;并将各任务并行执行,加快了处理速度。利用FPGA开发工具ISE10.1和仿真工具ModelSim SE 6.2b,完成了AVS熵编码的FPGA设计与实现。
关键词:FPGA;AVS;熵编码;指数哥伦布编码。
中图分类号:TN919.8文献标识码:aDoI: 10.3969/j.issn.1003-6970.2012.02.035
Implementation of AVS Entropy Encoding Based on FPGA
BaI Yuting, ZHaNG Gang(Taiyuan University of Technology (Taiyuan), College of Information Engineering, Taiyuan 030024 China)
【Abstract】a profound analysis of the entropy encoding algorithm for aVS (audio Video coding Standard) is performed based on the principle of entropy encoding method. this paper presents a method of using less rom to save data in coding table, and gives a realization method based on FPGA (Field-Programmable Gate Array) according to the algorithm characteristics. Coding table query, coding table switch and golomb coding are combined into a pipeline unit, saving a lot of intermediate memories. The parallel execution of entropy encoding task resultes in higher processing speed. Using the fPGa development tool ISe10.1 and ModelSim Se 6.2b, entropy encoding of aVS based on fPGa can be implemented.
【Key words】fPGa; aVS; entropy encoding; Golomb coding.
0 引 言
AVS标准是中国数字音视频编解码技术标准工作组制定的具有自主知识产权的视频编码标准,性能高于MPEG2标准与H.264标准相当[1]。
AVS视频压缩标准采用了一系列高运算量技术来达到高效率的视频编码。其中熵编码模块运算复杂,耗时较大。FPGA平台拥有强大的逻辑资源和寄存器资源,其并行执行的硬件实现方式可以应对设计中大量的高速电子线路设计需求。本文利用FPGA并行执行特点,合理规划熵编码各模块,完成了AVS熵编码FPGA平台设计与实现。
1 AVS熵编码原理
AVS DCT变换系数经量化后,能量集中在低频直流区域,高频区域数值较小,大部分为0。为进一步压缩码率AVS采用2D_VLC熵编码[2]。
熵编码之前,要进行zig-zag扫描和游程编码。AVS对level数组扫描一次,统计非零系数的个数;初始化选择子表 tablenum=0;编码时从最后一个level和run读入,每次读入一组,最后一组为EOB标志位。
symbol2D为run、level对应输出的二维变长编码值。当level的绝对值小于27,并且run的绝对值小于26时,在当前AVS_2DVLC_INTRA的子表内查询相应码字。……