隨著數位訊號處理的進步,及時視訊傳輸已成為生活必需的一部分。本論文利用DSP平台- TMS320C6416 DSP,來進行H.264/MPEG-4 encoder實現與最佳化。 在程式執行方面,針對H.264編碼器是以公開軟體JM為基礎來移植於DSP平台上。在H.264的編碼架構下,我們選取Baseline Profile這個架構提供了框內預測(Intra prediction)、框間預測(Inter prediction),而熵編碼部分採用情境適應性可變長度碼(CAVLC)。 硬體平台使用了TI TMS320C6416 DSK,其主要功能為數位訊號的處理,所以在DSP 的硬體設計上有較特殊的設計,可以加強其數位訊號處理能力。其DSP運算速度高達1GHz,CPU本身有8個運算單元,最高可達到8000MIPS。 接著透過程式移植,利用TI CCS介面將演算法最佳化,利用TI本身提供的最佳化設定、撰寫線性組合語言等方式,來增進整個系統的效能。並且針對DSP的架構使用了一些程式技巧,包括記憶體規畫和TI DSP所支援的特殊指令群等,可以減少4-11%的運算量。
With the advancement of the digital signal processing, real-time video transmission becomes an essential element in our daily life. In this paper, a implementation and optimization scheme of H.264/MPEG-4 encoder based on TMS320C6416 DSP is presented. For the H.264 encoder, the open source code JM is used as the basis to build a DSP-executable program. We choose the Baseline Profile as our main research from the H.264 encoder architecture, and this profile offer the intra prediction, inter prediction, and the entropy coding adopts CAVLC. The hardware platform used is TI TMS320C6416 DSK, the main function is the digital signal processing depending on its special hardware module designed. The TMS320C6416 DSP operating at 1GHz, eight functional units, operating highest may reach 8000MIPS. The procedure of code immigration, how to optimize the algorithm by using TI CCS, using TI intrinsic setting functions, and writing the linear assembly code to optimize the system are discussed as follows. Furthermore, we use several DSP codes acceleration techniques including memory management, TI DSP intrinsic functions and others. Through the code modifications, we can reduce the computation by 4-11%.