节点文献

H.264视频编码算法的研究及软件编/解码器的实现与优化

Research on H.264 Video Coding Standard and H.264 Software Codec Development and Optimization

【作者】 朱冬冬

【导师】 李芬;

【作者基本信息】 清华大学 , 计算机技术, 2004, 硕士

【摘要】 作为新一代的视频编码标准,H.264提出了许多新的思想和算法,大幅度提高了编码效率和图像质量。但H.264编码效率的提升是以计算复杂度的增加为代价的,与MPEG4简单配置相比,H.264主要配置下解码复杂度提高了3倍以上,而编码复杂度更是增加了10倍。本文的主要工作是对H.264软件编/解码器进行从算法级到程序级的全面优化。在算法方面,分别提出了用于提高速度的快速帧间编码预测模式选择算法和CAVLC码表查找算法,以及用于视频监控环境下提高编码效率的基于背景帧的运动估计和运动补偿算法。(1)本文中提出的快速帧间预测模式选择算法通过对原始图像的1/2低分辨率缩略图进行预编码,并将预编码过程中获得的预测模式映射为实际编码过程的一个预测模式子集,有效的减少了待测预测模式,从而较大幅度的提高了编码速度。(2)本文提出的CAVLC码表查找算法通过将二维码表转换成二叉树形式,避免了对整个码表的遍历查找过程,使查找速度提高。(3)针对视频监控的特定应用,本文中提出了一种基于背景帧的运动估计和运动补偿算法,通过对背景图像的提取,以及运动物体的检测,使待编码图像中的背景部分和运动物体部分分别在背景图像和普通的参考图像中进行运动补偿,减小了运动补偿后的残差,提高了编码效率。在程序级优化方面,通过对程序结构的调整以及使用MMX/SSE指令对较费时的4x4整数变换和亚像素插值部分进行改写,进一步提高了编/解码的速度。笔者使用C++重新编写了基于Baseline配置的H.264编/解码器,并提供了VFW/DIRECTSHOW接口,便于配合现有的多媒体转码和播放软件使用。同时编码器速度较相同配置的参考软件提高了10倍以上,解码器速度提高了3~4倍。

【Abstract】 As the newest generation of video coding standard, H.264 inherits merits from contemporary video coding standards as well as brings up many new ideas to achieve a better compression performance. But the performance improvement is at the expense of computational complexity increment. H.264 main profile decoder requires 3 times computing capability than MPEG4 simple profile, and an increase of more than one order of magnitude of the computational complexity is reported at encoder end.In this paper, our work is mainly focused on H.264 software codec optimization, which includes optimization on algorithm level and optimization on program level. On algorithm level we propose a novel fast inter prediction mode decision algorithm and a CAVLC lookup table search method for speeding up the codec and a background-frame based motion search and motion compensation algorithm for performance improvement in surveillance application. (1) Although prediction modes selection and R-D optimization process can brings up significant performance gain in H.264, during this process, all prediction modes need to be tested thus increase the computational load on encoder. In this paper, a novel fast inter prediction mode decision algorithm for H.264 is presented. A down sampled small image of original image is pre-encoded to get best inter prediction modes in the small image. Then the modes obtained from the pre-encoding process are mapped to a candidate modes subset used for original image encoding process. Our algorithm can reduce the prediction modes to a small subset thus can speed up the encoder.(2) A CAVLC lookup table search method is presented in this paper for H.264 decoder. By convert 2-D tables to a binary tree format, the speed for table lookup can be improved. <WP=5>(3) In surveillance application, video sequences usually have many regions containing static background. Based on this observation, we proposed a background-frame based motion search and motion compensation algorithm. By generating background-frame and detecting moving objects, the motion compensation for background parts and moving objects parts can be done in background-frame and typical reference frame separately. The errors during motion compensation process can be reduced and performance can be improved.On program level, we refine the program structures and use MMX/SSE instructions to rewrite the 4x4 transformation part and sub-pixel interpolation part to improve speed.We also use C++ to rewrite a baseline profile codec and provide the VFW interface to interact with some popular multimedia software such as VirtualDub and MS Media Player. When compared with the reference software under baseline profile, our encoder and decoder achieve speed improvement of more than 10 times and 3 times respectively. Our codec can encode CIF size video sequences on P4 2.6G PC at a speed of 15f/s and can decode CIF size video sequences on P3 800 PC in real time.

【关键词】 H.264MPEG优化CAVLCMMX/SSEPMVFASTVFW
【Key words】 H.264MPEGOPTIMIZATIONCAVLCMMX/SSEPMVFASTVFW
  • 【网络出版投稿人】 清华大学
  • 【网络出版年期】2005年 03期
  • 【分类号】TN919.81
  • 【被引频次】5
  • 【下载频次】1529
节点文献中: