用户名: 密码: 验证码:
基于音频专用DSP核的MPEG-2 AAC解码器设计与验证
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
AAC是一种低码率、高保真的音频编码标准,它的特点是:压缩率高,最大可达20:1,音质好,支持多种采样率及48个声道。相比于MP3、AC3等编码标准,在相同音质下AAC的码率更低,能有效节约传输带宽。AAC在数字音频的存储、多媒体的网络传输和数字音频广播等领域得到日益广泛的应用。因此,研究和实现AAC解码器具有重要的现实意义。
     目前实现AAC解码器的方式主要有两种:基于通用DSP的实现方式和ASIC实现方式。本课题采用了基于音频专用DSP核的音频解码方式,这种方式是前两种实现方式的折衷。音频专用DSP核相比于通用DSP,具有更适合于音频编解码的专用架构和专用DSP指令,它能在较低的频率下满足音频编解码的实时性要求;相比于ASIC实现方式,具有更好的灵活性,开发周期较短,容易同时兼容多种音频编解码标准。
     本文首先分析了MPEG-2 AAC解码器的各个模块的算法原理。为达到解码实时性的要求,在算法上分别对Huffman解码和反量化算法进行了优化。基于Huffman码表的特点,提出了一种新的快速Huffman解码算法。该算法由Huffman码字的首零位置来快速确定Huffman码字的码长,由码字码长和该码长的初始码字来确定该码字在码表中的位置,从而快速完成Huffman解码。基于该算法的Huffman解码效率比C定点程序中的算法提高了30%;利用查表法和多项式逼近的方法实现反量化算法。算法优化完成后,基于音频专用DSP核的指令集并采用合理安排代码顺序、合理利用通用寄存器、减少函数调用等汇编程序设计技巧,设计了AAC解码器的解码程序,其中IMDCT的实现是通过DSP专用指令调用IMDCT硬件加速器来完成。最后,基于软硬件协同验证平台对AAC解码器进行了实验验证,并且在解码时间、存储资源消耗及解码质量上对AAC解码器进行了评估。利用Modelsim对采样率为44.1KHz的AAC音频文件中编码最复杂的一帧数据进行仿真,解码这帧所消耗的指令周期为233680个;存储资源消耗了52.35KB;解码器的信噪比与商用解码器的信噪比基本相当。通过AAC音频解码实验验证,解码器能够在33MHz的时钟频率下成功实时解码,主观听觉上音质较佳,无噪声。
AAC is a low rate, high-fidelity audio coding standard, which is characterized by high compression rate, good sound quality, supporting for multiple sampling rates and multiple channels. The maximal compression rate can be twenty to one. The maximum of channels are 48. Compared to MP3, AC-3 and other audio coding standards, AAC can effectively save bandwidth at a lower rate on the condition of the same sound quality. AAC is increasingly widely used in digital audio storage, multimedia network transmission, digital audio broadcasting and other fields. Therefore, the work of researching and implementing AAC decoder is of great significance.
     Now, the implementation of AAC decoder has two main methods, which are general-purpose DSP-based and ASIC implementation. In this paper, the AAC decoder is implemented based on audio-specific DSP core. This method is a tradeoff between above two methods. Compared to general-purpose DSP, the audio-specific DSP core has some special structures and special DSP instructions which are more suited to audio codecs. It can make the audio decoder meet the real-time requirement at a lower frequency. Compared to ASIC, the audio-specific DSP core is more flexible, it can be easily compatible with multiple audio standards and the design cycle based on it is shorter.
     This paper firstly analyzes the principle of each module in the MPEG-2 AAC decoder. To achieve the requirement of real-time decoding, Huffman decoding algorithm and inverse quantization algorithm are respectively optimized. Based on the characteristics of Huffman code table, a new fast Huffman decoding algorithm is proposed. The algorithm can fastly determine the code length of Huffman code word by using the first zero position of Huffman code word, and then acquires the position of the code word in the code table by using the code length and the initial code word of the code length. Then, the Huffman decoding can be completed fastly. The new Huffman decoding algorithm is faster than the algorithm of fixed-point C program by 30% increase; Anti-quantization algorithm is implemented by using the look-up table method and the polynomial approximation method. After algorithm optimization, the decoding program of AAC decoder is designed based on the instruction set of the audio-specific DSP core. Some techniques are applied in the process of designing the assembly program, such as arranging the code sequence reasonably, using the general-purpose register reasonably, reducing the function call and so on. Specially, IMDCT in the decoder is implemented by using DSP-specific instructions to call IMDCT hardware accelerator. Finally, AAC decoder is verified by hardware and software co-verification technology, and its performance is evaluated in three aspects which are decoding time, storage resource consumption and decoding quality. A piece of data, which is the most complicated in an AAC audio file and the sample rate of the audio file is 44.1KHz, is simulated by Modelsim. The decoding time of the piece of data is 233680 cycles. The storage resource consumption of the decoder is 52.35KB. The SNR of the AAC decoder is almost similar to business AAC decoder’s. Through the experimental verification of AAC decoding, the decoder can work successfully that the main frequence of the decoder in the experiment is 33MHz, and the sound quality of the AAC decoder is good and there is no noise.
引文
[1] Jing Chen,Heng-Ming Tai.MPEG-2 AAC Decoder on a Fixed-point DSP.IEEE Transactions on Consumer Electronics, 1999,Vol.45,No.4
    [2]李丽华.基于DSPTMS320C6416平台上的MPEG-4AAC解码器的实现与优化:[硕士学位论文].西安:西安电子科技大学,2007
    [3]杨永祥.MPEG-4 AAC音频解码器的DSP程序优化设计与实现研究:[硕士学位论文].武汉:华中科技大学,2004
    [4]梅优良.基于RSIC的MPEG-4 AAC编解码研究:[硕士学位论文].杭州:浙江大学,2006
    [5] Ken-Sup Lee, Young Cheol Park and Dae Hee Youn. Software Optimization of MPEG-audio Decoder Using a 32-bit MCU Processor. IEEE Transactions on Consumer Electronics, 2002 Vol.48, No.3
    [6]周建,刘鹏,梅优良等.基于微处理器核的AAC解码软硬件协同优化.浙江大学学报(工学版),2007,41(8)
    [7] Tsung-Han Tsai. Low-Power System Design for MPEG-2-4 AAC Audio Decoder Using Pure ASIC Approach. IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS—I: REGULAR PAPERS, 2009,Vol.56, NO. 1
    [8] Keun-Sup Lee,Nam-Hun Jeong,Kyoung-Ho Bang,et al. A VLSI implementation of MPEG-2 AAC decoder system. APASIC.1999,Vol10,NO.1109
    [9]曹晓晖,林争辉.一种MP3/AAC解码器ASIC的设计与实现.微电子学,2004,34(3)
    [10]陈健. AAC:21世纪音频编码的主流.电声技术,2002,2007(9)
    [11] ISO/IEC 13818-7: Information technology: generic coding of moving pictures and associated audio information, Part 7, Advanced audio coding (AAC).International Standards Organization, Geneva, 2006
    [12]李辉,李平.一个嵌入式DSP核的设计及FPGA验证.微电子学,2008,2
    [13]汤岐.基于音频专用DSP核的AC-3解码设计与实现:[硕士学位论文].成都:电子科技大学,2008
    [14]李嘉昕.基于软硬件协同设计的AAC解码器开发与实现:[硕士学位论文].成都:电子科技大学,2008
    [15] Suk Hyun Yoon,Jong Ha Moon,and Myung Hoon Sunwoo. EFFICIENT DSPARCHITECTURE FOR HIGH-QUALITY AUDIO ALGORITHMS. IEEE International Symposium on Circuits and Systems, 2005, Vol. 3:2947-2950
    [16] Helix AAC Decoder optimized for ARM. http://download.csdn.net/source/225198
    [17] P. Duhamel, Y. Mahieux, J. P. Petit. A fast algorithm for the implementation of filter banks based on time domaio aliasing cancellation. Proc. IEEE ICASSP,Toronto, Canada, 1991: 2209-2212
    [18] Fuhui Du,Gaoming Du,Yukun Song,Duoli Zhang,et al. An Implementation of Filterbank for MPEG-2 AAC on FPGA. Anti-counterfeiting,Security and Identification,2008.ASID 2nd International Conference, 2008:391– 394
    [19]邵峰.基于DSP的AC-3音频编解码技术的研究及实现:[硕士学位论文].苏州:苏州学,2007
    [20]李章林,吴岳,卢桂章.TMS320C54X DSP汇编程序的几种优化方法.电子器件,2006,29(4):1235-1238
    [21]赵丹培,王延杰,李桂菊.基于汇编语言的DSP源代码优化技术的研究.电子器件,2004,27(3):459-463
    [22] PLX Technology Inc.PCI9054 Data Book V2.0. August 1999
    [23] ISO/IEC 13818-4: Information technology—Generic coding of moving pictures and associated audio information—part 4:Conformance testing. International Standards Organization, 1998(E)
    [24] AT&T的MPEG-2 AAC音频文件.ftp://ftp.research.att.com/dist/mpegaudio/mpeg2
    [25]钟尔杰,黄廷祝.数值分析.北京:高等教育出版社,2004,105-106
    [26] Jae-Sik Lee, Jong-Hoon Jeong, and Tae-Gyu Chang.An efficient method of Huffman decoding for mpeg-2 aac and its performance analysis.IEEE Transactions, 2005,vol. 13
    [27] Tsung-Han Tsai, Chuh-Chu Yen. A High Quality Requantization/Quantization Method for MP3 and MPEG-4 Audio coding. IEEE International Symposium on Circuits and Systems, Scottsdale, USA, 2002, 851-854
    [28]孔祥岚.MPEG-2 AAC解码算法研究及其在DSP平台上的实现:[硕士学位论文].天津:天津大学,2008
    [29]魏斌,林涛.预测技术在AAC暂态噪声整形模块中的应用.现代电子技术,2006,236(21)
    [30]侯欢,窦维蓓.32位定点音频解码器的DSP优化和实现.2007年声频工程学术交流年会及三省一市声学会议

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

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

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