IEEE SIGNAL PROCESSING LETTERS VOL XX NO XX XXXX 200X 1 Optimization of the Deblocking filter in H 264 codec for real time implementation Hitesh Yadav Student Member IEEE and K R Rao Member IEEE Abstract Blocking artifacts are visible in the decoded frames of most video coding standards at low bit rate coding Latest video coding standard H 264 AVC uses an in loop deblocking filter to remove the blocking artifacts The main drawback of this filter is its high implementation complexity In this paper we propose an in loop deblocking filter to remove the blocking artifacts In the proposed method the maximum and minimum values among the six pixels across an edge are computed to decide whether the pixels of the block should be filtered or not For intra frames again the block is classified as smooth or mildly textured region Depending on the classification of the block the appropriate filter is applied to that block The main advantage of the proposed method is its low complexity compared to JM 9 8 H 264 Software A performance comparison of the proposed method and the current method is presented Index Terms Deblocking filter Post filter Loop filter H 264 standard EDICS Category IMD CODE I INTRODUCTION Signal source compression methods and coding bit rates normally influence the perceptual quality of compressed images and video 1 In general the less the bit rates the severe the coding artifacts manifest in the reconstructed video Lower bit rates are desirable in many applications like video streaming because of the channel bandwidth constraints The block discrete cosine transform BDCT based coding scheme introduces blocking artifacts in flat regions and ringing artifacts along object edges at low bit rates 1 Deblocking filters are used to remove the blocking artifacts in the decoded video Although the deblocking filters improve the objective and subjective qualities of output video frames they are usually computationally intensive There are number of deblocking algorithms proposed for reducing the block artifacts in BDCT based compressed images with minimal smoothing of true edges They can be classified into three key categories Projection onto convex sets POCS weighted sum of pixels across block boundaries and adaptive filters POCS based algorithm 2 iteratively projects back and forth between two sets on the entire picture Its relative computation and implementation complexity is Manuscript received July xx 2006 revised Xxxxx xx 20xx Hitesh Yadav and Dr K R Rao are with the Electrical Engineering Department University of Texas at Arlington TX 76010 USA e mail hitesh y yahoo com rao uta edu high compared to other two algorithms It gives best quality visually with most of the video compared to other two methods The weighted sum based algorithms 3 computation complexity is high compared to the adaptive algorithms As adaptive algorithms 4 computational complexity is low they are preferred algorithms for real time implementation H 264 AVC uses an adaptive in loop deblocking filter to remove the blocking artifacts visible in decoded frames at low bit rate coding The main drawback of this deblocking filter is its implementation complexity Analysis of run time profiles of decoder sub functions indicates that the deblocking filter process in H 264 is the most computationally intensive part 5 Though recently efficient techniques to reduce the implementation complexity have been proposed 6 8 the complexity still cannot be reduced significantly because of the flow of algorithm itself The program code 9 includes extensive conditional branching This makes codes unsuitable for deeply pipelined processor and ASIC implementation In addition this program code exposes little parallelism Hence this code is unsuitable for VLIW processors which are otherwise well suited to video encoding decoding applications As we can see from the above H 264 AVC has high implementation complexity In this paper we present a simpler algorithm for the deblocking filter which reduces the implementation complexity while maintaining the perceptual quality of the existing deblocking algorithm In section 2 we present the algorithm for both inter and intra frames In section 3 the results obtained from the proposed algorithm and the one obtained from the JM reference software 9 are discussed II PROPOSED ALGORITHM The blocking artifacts are visible in both intra and inter frames The basic operation of the deblocking filter is as follows The deblocking filter is applied to all the edges of 4x4 pixels blocks in each macroblock except to the edges on the boundary of a frame or a slice For each block vertical edges are filtered from left to right first and then horizontal edges are filtered from top to bottom The decoded process is repeated for all macroblocks in a frame The one dimensional view of a 4x4 block edge is shown in Fig 1 Here q 0 q1 q2 q3 represent the values loaded from the current 4x4 block and the p0 p1 p2 p3 represent the 4x4 block adjacent to the current 4x4 block A INTRA FRAMES Intra frames are more susceptible to blocking artifacts compared to inter frames 10 The smooth blocks in an intra frame have more severe blocking artifacts compared to other IEEE SIGNAL PROCESSING LETTERS VOL XX NO XX XXXX 200X blocks 10 The proposed method as applied to intra frames is shown in Fig 2 The first three blocks in Fig 2 check for the conditions at the slice boundaries The user sets these conditions These three blocks are the same as used by the existing deblocking filter in H 264 The next step in Fig 2 is to compute the maximum and minimum values among the six pixels across an edge p2 p1 p0 q0 q1 q2 and then calculate the difference between the maximum and the minimum value If this difference is greater than the QP of current block then it is more likely to represent an edge and therefore should not be filtered On the other hand if the difference is less than the QP of the current block filtering should be applied to that block to remove the blocking artifacts The block in the above case most likely represents smoothly or mildly texture area The next step in Fig 2 is to find the difference between adjacent pixels of a 4x4 block edge For example the absolute difference between p3 and p2 is calculated and if that difference is less than a fixed threshold in this case the threshold is set to two then one is assigned to a variable diff The above process is repeated for all the adjacent pixels across an edge Fig 1 in a 4x4 block The
View Full Document