H.264/AVC is the latest international video coding standard,which was proposed by ITU-T and ISO/IEC,it consist of many advanced video compression algorithms,and has obvious progress compared to the previous others.Due to the advanced compression performance and the"network-friendly"nature,H.264/AVC will be adopted over a broad variety of applications such as video telephone,broadcast,mobile streaming,and storage, etc.However the high-complexity of H.264/AVC has always been a factor of restriction of application mostly.At the same time,the Xscale PXA255 has been used broadly in mobile terminals such as 3G mobile telephones,PDA and so on.3G services mainly include mobile television(M-TV) and mobile video phone.Therefore,it is of important significance to reduce the complexity of H.264/AVC and study the realization and optimization of the standard based on the Xscale PXA255 platform.Through in-depth study on embedded system and digital image techniques,the design and optimization scheme of H.264 video encoding system,which based on the embedded Linux system,is presented.In terms of hardware,discuss the characteristics and superiority of Xscale PXA255 architecture processor,and construct development environment based on it,including:building cross compile developing environment of embedded system,analyzing the booting process of Bootloader,implementing the transplantation of Bootloader,and aiming at PXA255 target board,completing the kernel configuration and transplantation of Linux system.In terms of software,choose X264 as encoder source codec,which is one of the open H.264 codec software.Compared with the official JM software,X264,which gets rid of some new characteristics that have little contribution to coding performance and high computational complexity,is easy to be ported and optimized.In order to promote the implementation of the video coding algorithm on PXA255,the efficient way is to "tap" the narallelism and memory resource of the processor.Two aspects of job have been done on the X264 source program:the first is to ensure the core algorithm of X264 in PXA255 platform,which mainly optimizes the Prediction of Intra Macroblocks,Prediction of Inter Macroblocks and Sub-pixel motion,after analyzing the main module of the H.264 and the computational complexity of the core algorithm.The second is to optimize the encoder in project,memory access,and C-level languages,in order to improve the kernel algorithm and the encoder.Manily optimize the time-consuming moudule-DCT transform and SAD arithmetic in assemble language by WMMX technology.At last a video capturing application program based on V4L2 is designed,which is incorporated into a project "X264".The incorporated program realizes the function of capturing video from USB camera and compressing original video data to H.264 video format data.The test results of the opitmized encoding algorithm's codec indicates that the H.264 video test file could be encode in real time under cooperative work of software and hardware,which can basicly reach 25 fames per second(fps) for QCIF resolution viedo.The decoded video provides good subjective and objective quality. |