用户名: 密码: 验证码:
基于TMS320C6416 DSP的MPEG-4视频编码器的实现与优化
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
MPEG-4是国际运动图像专家组(MPEG)于1999年制定的新一代面向对象的多媒体压缩国际标准。它将应用在数字电视、可视电话、实时多媒体监控、移动多媒体通信等。
     TMS320C6416 DSP是TI公司推出的一款高性能可编程数字信号处理器。本课题研究目的就是要利用TMS320C6416 DSP硬件平台,实现MPEG-4标准的视频编码器并对其进行优化,达到实时性要求。
     首先,文章介绍了图像压缩的基本原理和图像技术的发展,对比了各种视频标准的主要内容、应用范围和发展现状。结合的实际情况,确定了MPEG-4 Simple Profile作为此文的视频编码器的框架。
     然后,对MPEG-4视频编码的核心算法进行了研究,本文主要分析了运动编码和纹理编码,并确立编码方案。运动估计算法在视频压缩算法中占有重要的地位,一般占整个系统60~80%左右的编码资源。文章分析了基于免疫系统的块匹配运动估计算法和经典算法的优缺点,借鉴MVFAST,介绍了这两种算法结合使用的混合算法,也通过减少SAD计算改进块匹配免疫算法的运算量,通过MATLAB实验,证实了这两种方式都能在不降低搜索精度的条件下大大减少了运算量。接着,讨论了MPEG-4采用的两种量化技术,通过研究和实验,确立了H.263量化方案。同时对码率控制技术进行了研究,可以实现不同应用要求下,视频质量的调节。
     随后,研究了C6416 DSP特有的硬件结构特点、指令系统、存储器结构、流水线结构、CCS软件环境和C64x系列DSP的软件开发优化过程等。结合MPEG-4的算法特点,并充分利用DSP的并行处理能力,最终提出了编码流程的优化方案。
     文章参考了XVID开放源码,在分析源代码的基础上,提出了编码器的整体实现、帧内编码和帧间编码实现方案。通过DSP的测试工具分析出了消耗时间最多的关键代码段,利用了DSP特有的线性汇编和汇编语言进行了改写。通过实验测试取得了很好的效果。比较了各种编译选项,测试了各种选项的性能。合理的配置了各代码部分在DSP存储器上的分配,提高缓存命中率。
     最后对于编码器的整体性能进行了测试。利用标准序列进行实验,从主观性能和客观性能进行了比较。并对码率控制,优化效果也进行了测试。从实验结果可以得出结论:基本上实现了MPEG-4视频的简单框架的功能。对于CIF格式,可以达到每秒25帧以上的实时性要求,对实际的应用有一定的参考和商用价值。
The international Moving Picture Experts Group (MPEG) formally brought forward the new MPEG-4 Standard in 1999. It will play an important role in interactive multimedia application such as digital television, real-time video monitoring, mobile multimedia communication, video stream and visual game in internet.
     TMS320C6416 is a programmable high performance multimedia processing DSP that is the product of the TI. The aim of my thesis is to implement and optimize of MPEG-4 video encoder based on TMS320c6416 DSP for real time video communication.
     Firstly, this paper studies video compressing principles and basic algorithms. Then it simply introduces various international development and actuality of video compressing standards. The paper considers for practical application and selected the simple profile as for the coding scheme.
     Secondly, the paper emphatically studies the motion coding and texture coding in the MPEG-4 standard. Motion estimation and compensation plays an important role in video coding and it takes 60~80 percent of total encoding time. Motion searching algorithm is the key part of the motion estimation, which would affect the feature of video compression result. It analyzes block-matching motion estimation algorithm based on artificial immune system and MVFAST (motion vector field adaptive search technique), combined their strongpoint, and advances a kind of mix algorithm. It also reduces summation count of SAD in motion estimation algorithm based on artificial immune system. By testing in MATLAB, the paper approves that this way can improve searching quality but no computation is increased. The paper studies deeply two kinds of quantization algorithms. By contrasting, it presents the H.263 quantization as for our video coding. Rate controlling algorithm has been studied and realized.
     Thirdly, the paper introduces implementation of MPEG-4 video encoder and some optimization methods based on the hardware feature of C6416. At first, it studied the hardware architecture of C6416, instruction system, memory architecture of C6416, pipeline and software development optimization flow. Combining characteristic of MPEG-4 arithmetic with parallel capability of DSP, the paper bring forward an optimized scheme for encoding flow.
     Based on XVID open source, this paper puts forward a solution scheme of MPEG-4 and transforms the source to the DSP. By profiling tools, rewrite the key cost module with linear assembly language and assembly language. The paper compares some complier options and tests their performances. Code is collocated reasonably on memorizer of DSP, by this way the cache efficiency is improved.
     Finally, this paper uses the standard testing sequences to evaluate the performance of the video encoder. Results can be used to real-time video monitor requiring for more than 25 frames per second. It will have value in reference and commercial applications.
引文
[1] Fred Halsall,蔡安妮,孙景鳌等译.多媒体通信[M].北京:人民邮电出社,2004.
    [2]朱秀昌,刘峰,胡栋.数字图像处理与图像通信[M].北京:北京邮电大学出版社,2002.
    [3] Rafael C.Gonzalez Richard E.Woods(美).阮秋琦,阮宇智(译).数字图像处理[M].北京:电子工业出版社,2003.
    [4]阮秋琦.数字图像处理学[M].北京:电子工业出版,2001.
    [5]陈传波,陈先级.数字图像处理[M].北京:机械工业出版社,2004.
    [6]胡国荣.数字视频压缩及其标准[M].北京:北京广播学院出版社,1999.
    [7] (美)吉布森(G ibson,J,D),李煌等译.多媒体数字压缩原理与标准[M].北京:电子工业出版社,2000.
    [8]余兆明,李晓飞等.MPEG标准及其应用[M].北京:北京邮电大学出版社,2002.
    [9]钟玉琢,乔秉新,祁卫.运动图像及其伴音通用国际标准—MPEG-2[M].北京:清华大学出版社,1997.
    [10] Olivier.Avaro . ITU-T Recommendation Video coding for low bitrate communication[J].Signal Processing:Image Communication,2000,15(1):281-298.
    [11]陈功,黄祥林,卓力.MPEG-4——基于对象的多媒体压缩新标准[J].测控技术,2002,21(5):26-30.
    [12]田毅坷,卢朝阳,高西全.MPEG4视频标准及其关键算法[J].现代电子技术,2002,(1):38-42.
    [13]谭仕勇,戴琼海,陈慧蓉.MPEG-4标准中的视频编码[J].广播与电视技术,2001,28(6):51-57.
    [14]夏天,陈磊,余兆明.MPEG-4的基于内容的视频编码技术[J].电子工程师,1999,(10):9-10.
    [15]钟玉琢,王琪,贺玉文.基于对象的多媒体数据压缩编码国际标准-MPEG及其校验模型[M].北京:科学出版社,2000.10.
    [16]蔡安妮,孙景鳌.多媒体通信技术基础[M].北京:电子工业出版社,2000.
    [17]王汇源.数字图像原理与技术[M].北京:国防工业出版社,2000.
    [18]蒲学东.基于TMS320DM642 DSP的Xvid视频编码器的实现和优化[D].成都:电子科技大学,2007.
    [19] Texas Instruments,Inc.,TMS320C6414,TMS320C6415,TMS320C6416 Fixd-point digital signal processors[EB/01].http://www.ti.com ,2005-09/2007-09.
    [20] P.Pirsch.H.-J.Stolberg. VLSI implementations of image and video multimedia processingsystems[J].IEEE Trans:Circuits SystemsVideo Techno,1999,8(7):878-891.
    [21]汤家骏,杨晓萍,陈健.用TMS320C6201实现H.263编解码器[J].电子技术,2000, (6):14-18.
    [22]栗强,崔慧娟,唐昆等.H.263的高效算法研究及单片DSP实现[J].集成电路与应用,2002,(1):53-56.
    [23]李军华.视频编码中运动估计技术研究[D].北京:中国科学院自动化研究所,2005.
    [24]丁贵广.面向通信的视频编码技术研究[D].西安:西安电子科技大学,2004:83-84.
    [25] J.R.Jain and A. K. Jain.Displacement measurement and its application in interframe image coding[J]. IEEE transactions on Communications,1981,COM-29(12):1799-1808.
    [26] T.Koga, K,Iinuma,A.Hirano,Y.Iijima and T. Ishiguro.Motion compensated interframe coding for video conferencing[C].Proceeding of the national telecommunication conference. 1981,G5.3.1-g5.3.5.
    [27] R.Li,B.Zeng,and M.L.Liou.A new three-step search algorithm for block motion estimation[J].IEEE transactions on Circuits and Systems for Video Technology,1994,4(4):438-442.
    [28] L.K.Liu and E.Feig.A block-based gradient descent search algorithm for block motion estimation in video coding[J].IEEE transactions on Circuits and Systems for Video Technology,1996,6(4):419-422.
    [29] S.Zhu and K.K.Ma.A new diamond search algorithm for fast block-matching motion estimation[C].Processing of 1997 International Conference on Information,Communication and Signal Processing (ICICS’97).Singappore:1997,292-296.
    [30] J.Y.Tham,S.Ranganath,M.et al.A novel unrestricted center-biased diamond search algorithm for block motion estimation[J].IEEE transactions on Circuits and Systems for Video Technology,1998,8(4):369-377.
    [31] P.I.Hosur and K. K. Ma.Motion vector field adaptive fast motion estimation[C].Processing of 2nd International Conference on Information , Communication and Signal Processing(ICICS’99).Singapore.1999.
    [32] F.M.Burnet.The clonal selection theory of acquired immunity[M].Cambridge:Cambridge University Press,1959.
    [33]焦李成,杜海峰,刘芳,公茂果.免疫优化—计算、学习与识别[M].北京:科学出版社,2006.
    [34]莫宏伟.人工免疫系统原理及应用[M].哈尔滨:哈尔滨工业大学出版社,2002.
    [35] Jerne N K.Towards a network theory of the immune system[M].Annual Immunology,1974,125C :373-389 .
    [36] Z.Jun,B.L.Zhu.A novel fast block-matching motion estimation algorithm based on artificial immune system[C].IEEE International Conference on Integration Technology:Shenzhen,China.2007,579-583.
    [37] W.Li,E.Salari.Successive elimination algorithm for motion estimation[J].IEEE transactions on image processing,1995,4(1):105-107
    [38] Texas Instruments , Inc . TMS320C6000 optimizing c compiler tutorial[EB/01]. http://www.ti.com,2002-09/2007-09-25.
    [39] Texas Instruments , Inc . TMS320C64x Image/Video Processing Library Programmer Reference[EB/01].http://www.ti.com,2003.10.
    [40] Texas Instruments,Inc.TMS320C6000 Peripherals[EB/01].http://www.ti.com,2001/2008-01-06.
    [41] Texas Instruments,Inc.External Programming of the TMS320C64x EDMA for Low Overhead Data Transfers[EB/01].http//www.ti.com,2004-07/2008-03-01.
    [42]李朝晖,李冬梅等.基于TMS320C6201的MPEG-4运动补偿快速算法[J].华北航天工业学院学报,2002,12(2):7-10.
    [43] Texas Instruments , Inc . TMS320C6x Peripherals Support Library User’s Guide[EB/01].http://www.ti.com,2000/2008-02-05.
    [44] Texas Instruments, Inc . TMS320C6000 Assembly Language Tools[EB/01].http://www.ti.com,1999/2008-02-10.
    [45]李晶,国澄明,国狄非,陈强.基于TMS320X64xDSP的HDTV视频解码软件关键模块的优化[J].信号处理,2004,20(3):303-307.
    [46]王钢.基于TMS320DM642 DSP的MPEG-4视频编码器实现与优化[D].吉林:吉林大学,2005.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700