基于AC3的虚拟环绕声实现
摘要:Dolby AC3提供的5.1声道音频模式是当前应用得最广泛、声音质量较高、编码效率最高的一种音频编码模式。基于AC3的虚拟环绕声系统能够满足人们在不允许布置多个扬声器的情况对环绕声音质的要求,而且简化了系统,降低了消费;它特别适用于耳机这类只有两个扬声器的设备。本文论述了用软件实现虚拟环绕声的两种途径,即用Matlab和C语言编程来仿真5.1声道虚拟环绕声重放。用Matlab进行虚拟环绕声的仿真是通过对AC3音频文件解码后得到的六个声道信号进行虚拟环绕声滤波处理。C程序设计将多通道虚拟环绕声处理技术与AC3解码程序相结合,实现基于AC3的5.1声道虚拟环绕声重放系统。Matlab和C语言的实现结果通过标准布置的左、右两个扬声器播放,在正确的听音位置进行试听,能够感觉到声音有明显的空间感和立体感,实现结果良好。
关键词:虚拟环绕声;Dolby AC3;HRTF;AC3解码器
Virtual Reproduction of Surround Sound Based on AC3
Abstract : The model of 5.1 channel audio supplied by Dolby AC3 is widely used. The quality of 5.1 channel audio is good, and the coding efficiency of the coding model is the highest at present. The System of the Virtual Reproduction of Surround Sound based on AC3 will be able to meet people’s requirement of the higher quality of surround sound, while it is not allowed to place more speakers due to the limited conditions, and it could simplify the system and reduce the consumption. It is especially fit to the equipments that have only two speakers, such as headphones. This paper discussed the two methods of making virtual surround sound come true, i.e., use Matlab and C language to simulate the virtual reproduction of AC3 5.1 channel surround sound. Because of processing the six channels signal of AC3 by using the virtual surround sound filtering technology, the simulation of the virtual reproduction of surround sound under Matlab comes true. While programming by C language, The System of the Virtual Reproduction of Surround Sound based on AC3 comes true by combining the virtual surround sound filtering technology and AC3 decoder. While the results of Matlab program and C language program be played by two speakers that placed at the standard position, you could feel the feeling of spaciousness and third dimension obviously. So, the result of the implementation is well.
Keywords: Virtual Surround Sound, Dolby AC3, HRTF, AC3 decoder
第1章 绪 论.......................................................................................................... 1
1.1 课题背景、目的及意义............................................................................. 1
1.1.1 课题背景.............................................................................................. 1
1.1.2 课题的目的及意义.............................................................................. 4
1.2 论文的主要内容和框架............................................................................. 4
第2章 系统总体设计.............................................................................................. 6
2.1 系统实现原理............................................................................................. 6
2.2 Matlab仿真实现虚拟环绕声的设计.................................................... 9
2.3 C语言编程实现基于AC3的虚拟环绕声系统........................................ 9
2.4 本章小结................................................................................................... 10
第3章 主要技术简介............................................................................................ 11
3.1 Dolby AC3.................................................................................................. 11
3.1.1 Dolby AC3的特点、配置和应用...................................................... 11
3.1.2 Dolby AC3的编码原理...................................................................... 12
3.1.3 Dolby AC3的解码原理...................................................................... 13
3.2 头相关传输函数....................................................................................... 13
3.2.1 HRTF的定义...................................................................................... 14
3.2.2 HRTF数据的获取.............................................................................. 15
3.3 本章小结................................................................................................... 17
第4章 Matlab编程实现虚拟环绕声的设计........................................................ 18
4.1 Matlab的特点........................................................................................... 18
4.2 系统设计................................................................................................... 18
4.2.1 从AC3文件中分离出5.1独立声道数据........................................ 19
4.2.2 程序设计............................................................................................ 22
4.3 结论分析................................................................................................... 23
4.4 本章小结................................................................................................... 24
第5章 C语言编程实现基于AC3的虚拟环绕声系统....................................... 25
5.1 VC++6.0软件介绍................................................................................... 25
5.2 程序设计背景........................................................................................... 25
5.2.1 解码原理............................................................................................ 25
5.2.2 MDCT和IMDCT.............................................................................. 28
5.3 程序设计................................................................................................... 30
5.3.1 子函数IMDCT................................................................................... 30
5.3.2 子函数Downmix................................................................................. 35
5.4 结论分析..................................................................................................... 36
5.5 本章小结..................................................................................................... 37
结 论........................................................................................................................ 38
致 谢........................................................................................................................ 40
参考文献.................................................................................................................... 41
附录1 Matlab实现虚拟环绕声重放的程序......................................................... 42
附录2 基于AC3的虚拟环绕声实现的C程序................................................... 46
⑴ 子函数程序IMDCT................................................................................. 46
⑵ 子函数程序Downmix............................................................................... 53
⑶ 主程序decode.......................................................................................... 55