FAST MACROBLOCK INTRA AND INTER MODES SELECTION FOR H.264/AVC
E. Arsura, L. Del Vecchio, R. Lancini, L. Nisti
CEFRIEL – Politecnico di Milano Via Fucini 2, 20133 Milano, Italy arsura,delvecch, rosa,[email protected]
ABSTRACT Recently fast inter mode selection algorithms were proposed in [3], [4] and [5] to alleviate the encoder The major complexity source in H.264 is the rate complexity due to the motion estimation and inter mode distortion (R-D) optimization. This work proposes a decisions. These algorithms reduce the set of inter modes method to reduce the complexity of R-D analysis, paying that the encoder needs to check depending on parameters a little video degradation, by estimating the encoding like the complexity of the content, temporal similarity and modes that are more likely used by the encoder. Since the AZCB (All-zero Coefficient Block) detection. In [6] a fast encoding modes depend mainly on the typology of the inter prediction mode decision based on pre-encoding video and on the quantization parameter used to encode process is presented. Other works [7] propose a fast mode each block, the work proposes to group the modes into decision algorithm to speed up intra coding prediction subsets that depend on the quantizer level and the modes for both 4x4 and 16x16 sizes, based on edge characteristics of the video. In particular, the motion direction histogram and directional fields. compensability of each frame modulates the intra modes, This paper describes a new approach for both the inter while texture difficulty addresses the inter modes. The R- and intra mode size selections, that takes into account the D algorithm evaluates only the modes included into the image content type (complexity and predictability of each resulting subset. frame) and also the quantization parameter used to encode The usage of subset modes reduces the complexity of each macroblock. In fact the mode selection also depends the encoding process (40-70%) with respect to the original on the quantization parameter, since the video quality due R-D optimized encoder, with a slight PSNR reduction (0- to different quantization levels influences the choices on 0,30dB). the different encoding tools. 1. INTRODUCTION In Section 2 a description of the proposed algorithms for inter and intra size mode selection is presented; Section 3 The latest video coding standard H.264/AVC [1] achieves describes the obtained results. Conclusions are given in an improved coding efficiency over all existing standards Section 4. through added features and functionalities, at the expense of an increased implementation cost. In particular, motion estimation at different block sizes and an improved 2. PROPOSED ALGORITHMS number of mode decisions contribute to a better video quality increasing a lot the complexity. The available MB A series of simulations [8] proved that the inter mode modes [2] in H.264/AVC include two sizes for intra decision depends on the typology of the video which coding mode that are 4x4 and 16x16, and various inter includes the complexity of the texture to be encoded and coding modes such as skip, inter-16x16, inter-16x8, etc.. the motion content. Smaller block modes (i.e. 4x4, 4x8, up to 4x4. The classical encoder has to examine all these etc..) are used only if the image is rich in details and the modes to achieve the best prediction. This process is very movement of macroblocks is very complex so that small computational demanding especially when R-D parts have different moving directions. optimization is used, because the coder performs a The number of macroblocks intra coded depends complete encoding process including motion estimation mainly on the motion uncompensability of one frame from (only for inter modes), transformation, quantization and another; the uncompensability measures the amount of entropy coding. Anyway if it is possible to predict a new contents in a video segment. Another factor that subset which includes the most probable modes that the influences the mode decision is the quantization encoder is going to use to encode a macroblock, the parameter: for example, if the video presents computational complexity could be strongly reduced.
0-7803-9332-5/05/$20.00 ©2005 IEEE homogeneous regions and the quantizer is high, the skip 1 frameBs
mode is the most frequent choice of the encoder. Muc = ∑M i Based on these observations, this work proposes two frameBs i=1 methods which define subsets of the encoding block where: frameBs is the number of blocks that constitutes modes for both intra and inter cases. For each the frame. macroblock, the encoder will search the best encoding mode with R-D optimization technique, evaluating only Muc < TM1 TM1
2 where: R is the estimated rate for a certain frame, σi is the (150 frames), Mobile&calendar (300 frames), Claire (168 variance of the original block i and a,b,c are model frames) and Paris (282 frames); SEQ2 is the parameters. The constant parameters a,b,c were obtained concatenation of All monitor (300 frames), Container empirically by fitting data derived by encoding some test (300 frames), Mother&daughter (300 frames) and News sequences. (300 frames). The simulations were performed using concatenated sequences because the intra modes are more The inter modes are modulated by D and by the spurred in presence of scene changes. The tests were quantization step size. In general, for higher values of the performed using a baseline H.264 configuration (with R- quantizer (low resolution) the evaluation of the smallest D lagrangian optimization). The PSNR_Y average values modes (i.e smaller than 8x8) is discharged. Together with and the obtained bitrate are reported in Table 3 for SEQ1 the QP, the subset is addressed comparing D with a and in Table 4 for SEQ2. The PSNR reductions are very threshold TD: at low values of D (D
5. REFERENCES
[1] ITU-T Rec.H.264, ISO/IEC 14496-10 AVC, Advanced Video Coding, Final Draft International Standard, JVT-G050r1, Geneva, Switzerland, May 2003.
[2] M. Yang, W. Wang, “Fast Macroblock Mode Selection Based on Motion Content Classification in H.264/AVC,” ICIP 2004, Singapore, 2004.
[3] H. Kim, Y. Altunbasak, “Fast Mode Decision for Inter Figure 1: Encoding time saving for the SEQ1 sequence Prediction in H.264,” ICIP 2004, Singapore, 2004. using the proposed methods. [4] Y.H. Kim, J.W. Yoo, S.W. Lee, J. Shin, “Adaptive mode decision for H.264 encoder,” in Electronic Letters, Vol.40 No.19, September, 2004.
[5] A. C. Yu, G. Martin, “Advanced block size selection algorithm for inter frame coding in H.264/MPEG-4 AVC,” in ICIP 2004, Singapore, 2004.
[6] Q. Dai, D. Zhu, R. Ding, “Fast mode decision for inter prediction in H.264,” in ICIP 2004, Singapore, 2004.
[7] F. Pang, X. Lin, R. Susanto, K.P. Lim, Z. Li, G. Feng, D. Wu, S. Wu, “Fast mode decision for intra prediction,” document JVT-G013, 7th meeting, Pattaya, Thailand, 7-14 March 2003.
[8] D. Alfonso, D. Bagni, L. Celetto, L. Pezzoni, “Detailed rate- distortion analysis of H.264 video coding standard and comparison to MPEG-2/4,” in Proceedings of SPIE 2003, vol. 5150, p.891-902, 2003.
[9] P.M. Kuhn, T. Suzuki, A. Vetro, “MPEG-7 Transcoding Figure 2: Encoding time saving for the SEQ2 sequence Hints for Reduced Complexity and Improved Quality,” Proc. in using the proposed methods. International Packet Video Workshop, April, 2001.
[10] “http://iphome.hhi.de/suehring/tml/download/” 4. CONCLUSIONS AND FURTHER RESEARCH
This paper presented two algorithms for reducing the encoding complexity related to intra and inter modes