The implementation of real-time video coding systems with limited resources such as memory volume and CPU speed is a challenging task. In this paper, an efficient embedded multi-modal MPEG-4 video encoder (EMVC) is proposed and implemented to meet the requirement of encoding different modals (colors, resolutions, and bandwidths) video in size and power-restricted scenario. The hardware framework of EMVC is based on FPGA and DSP, which takes full advantage of the strongpoint of DSP and FPGA—powerful digital signal processing ability of DSP is utilized to complete most of the complex video coding, and flexible configuration, the parallelism and high speed of FPGA cooperates to accomplish logical control and auxiliary functions in video coding. The hardware framework is designed with strong processing ability, flexible configuration, and extensive coverage. In software design, we first improve some key algorithms in MPEG-4 standard that have great impact on coding efficiency, a fast motion estimation algorithm—smooth motion vector field adaptive search technique (SMVFAST) and a DSP-based efficient quantization computation method—EQ4DSP are put forward respectively; second, according to the characters of DSP's hardware resource, the encoder software is optimized at system and code levels. At the system level, EDMA (Enhanced Direct Memory Access) channels in DSP are used to parallel the data transfer, and the software structure of the video encoders is changed from frame-based to GMB-based (Group of Macro-Block) to make use of the parallel processing capacity of DSP. At code level, the codes of the frequently called modules in the encoder are the critical optimized part, and the main code optimization methods used in EMVC include: using an intrinsic function to replace the complicated C/C++ code, using packed data processing to maximize the data throughput, unrolling the loop to increase software pipelines, translating C code to Linear Assembly, and so on. By making use of the reserved user-data field in the MPEG-4 standard syntax, a multi-modal function of EMVC is realized, namely, the system can switch among 720 × 576 and 352 × 288 resolutions, grey and color video, 2 M and 256 K bandwidth. Moreover, the mode switch can be achieved in real time according to the input control command. Experimental results show that EMVC not only runs efficiently but also has good flexibility and generality. Furthermore, by realizing diverse video or image coding algorithms, it can also satisfy the requirements of various embedded video applications, especially those with strict restriction in size, power consumption, and control flexibility.
Read full abstract