- Open Access
- Total Downloads : 231
- Authors : Mrs. Mrunalini Chavaan, Prof. Mrs. P. M. Jadhav
- Paper ID : IJERTV2IS70785
- Volume & Issue : Volume 02, Issue 07 (July 2013)
- Published (First Online): 24-07-2013
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Modified Macroblock Mode Decision Method for H.264/AVC
Mrs. Mrunalini Chavaan 1
Prof. Mrs. P. M. Jadhav 2
1.Department of Electronics & Telecommunication Engineering M.E. Electronics (MIT Pune)
2 Department of Electronics & Telecommunication Engineering Associate Professor, MIT Pune
Abstract
In video transmission compression, data rate, and bandwidth availability are the major constraints. To overcome them new standard is developed after H.262,
H.263 named as H.264.The MPEG-4 Part- 10,AVC/H.264 standard is developed jointly by ITU-T Video Coding Expert Group(VCEG) and ISO/IEC Moving Picture Expert Group (MPEG) is widely used for video data transmission.H.264 standard achieves much higher compression efficiency compared to contemporary video coding standards. This is at the expense of higher computational complexity at encoder. Our work focuses on reducing the complexity while improving the performance in coding. For optimum mode decision encoder computes RD costs of all possible coding modes which need lots of computation. The proposed method focuses on the increase of skip mode per macroblock as well as per frame to reduce the bit rate.
Keywords: H.264, mode decision, skip mode, macroblock, RD cost.
-
Introduction
Coding performance of H.264/MPEG-4 Part- 10 is much more in comparison with the previous video standards. H.264 is jointly developed by ITU-T Video Coding Expert Group (VCEG) and ISO/IEC Moving Picture Expert Group (MPEG). H.264 shows improved performance because of motion estimation and mode decision methods, but it increases the complexity of encoder. RD optimization requires high computation as it evaluates all modes to find the optimum mode having
least RD cost among all. RD optimization process is heavy burden on the encoder. There are number of methods which are proposed to reduce the RD optimization and for fast mode decision and most of them required RD cost calculation before taking decision of Skip mode intra as well as inter slice . In[3] algorithm for fast intra decision was proposed, It uses the method for using edge information for small number of intra prediction modes in RD optimization process which saves encoding time in intra coding. The algorithm proposed in [4][5] reduces the encoding time through determination of homogeneous region and stationary region, however it is inefficient for sequence with large motions in all regions. In [6][8] the fast mode decision algorithm consists of an early skip mode decision and selective intra mode decision, which uses fast encoding by deciding skip mode at an early stage and selectively computing RD cost of intra modes based on probability that intra modes are selected in inter frames, but this is inefficient for sequence having frequent scene changes. In [2] the algorithms uses two methods- homogeneous region detection and early skip mode decision which consists of candidate mode selection to optimize the RD cost of encoder and also uses selective intra coding to perform intra mode skip operation when and only when it is necessary after process of inter mode skip decision . In this paper we introduce improved fast mode decision method for intra frame of H.264/AVC encoder.
-
The Proposed Algorithm
Where thresholdTH is defined as
= ×
-
Detection of Homogeneous Regions
Video sequence consists of spatial and temporal sampled data. For video frames spatial and temporal similarity helps to detect homogeneous regions. To decide the best coding mode of a macroblock, the encoder often uses the optimization of rate as well as distortion.
To find the best coding parameters for each macroblock, H.264/AVC reference software encodes all possible combination of parameters and calculates the rate and distortion of a given macroblock for each combination. This means that the encoder computes the R-D costs of all possible coding options and chooses the coding mode of a given macroblock which has the minimum R-D cost. However, such mode decision method has critical problem from practical point of view. When a macroblock is given, encoder must have information about required bits and the resulting distortion of the current coding mode to choose its best
Where
is scaling factor
is a constant
QP is Quantization Parameter
thresholdTH is dependent on value of QP as QP is going to increase distortion between current and reference macroblock becomes larger . We found the optimum thresholdTH at all the possible QPs and approximated the values by a linear function as given in above equation as a result, and were set to 3600 and 140 for our experiment, respectively.
Since spatially and temporally homogeneous regions are encoded with large block size in the process of mode decision and so P8x8 and Intra 4×4 modes are skipped.Here we propose to use the average rate (AR), i.e., the average number of bits consumed to encode the motion-compensated residual data under the best inter mode as an indicative of degree of temporal correlation Where AR is defined as follows
coding mode. However, the information is available only after finishing the encoding process. Therefore, the current H.264/AVC reference software does the complex process for only finding the best coding
=
384
Where
x (number of texture data bits)
[2]mode[2].
The goal of video coding in constant bit rate (CBR) is to minimize the distortion of coded video sequences at a given bit budget. To find spatially homogeneous region variance is used which is defined as
is lagrangian multiplier
= 0.85 × 2 3 [3][4]
384 = (16×16) LUMA + (8×8) CHROMA x 2[2]
The average rate presents the average number of bits for texture data per pixel in a macroblock.
1
Variance = ×
Where
15
=0
15
=0
( , )2
-
Early Skip Mode Decision In P And B Slices
-
, is a luminance component at a coordinate (p, q), which indicates horizontal and vertical locations on a 16 × 16 macroblock, respectively.
-
is a mean of the luminance values in the macroblock.
If the variance is less than thresholdSH the macroblock is classified into a spatially homogeneous region. [1] thresholdSH was experimentally determined in advance and set to 250 in the experiment. Spatial homogeneity represents the similarity of intensities of adjacent pixels and temporal homogeneity is similarity of neighbouring blocks..Since, temporal homogeneity depends on movement of the motion vectors of adjacent block around the current macroblock we can define region as a a temporally homogeneous region when motion cost of SKIP mode is less than thresholdTH
The RD optimization process that is implemented on the current reference software compares all the possible coding modes to decide the optimum macroblock mode. To determine which mode generates satisfactory distortion and bits, it performs all the encoding processes lots of times for all the modes. This repetitive operation increases the computational complexity of the H.264/AVC encoder. While if we are able to make decision of skip mode at an early step then time taken for RD cost calculation will be saved. It will reduce lots of burden of encoder. Proposed method uses the temporally homogeneous and spatial homogeneous property and Average rate to decide skip mode for an Intra mode.
-
-
-
EXPERIMENTAL RESULTS
Our proposed algorithm was implemented within the JVT reference software, JM 18. [8]. We adopted an improved fast motion estimation scheme based on an unsymmetrical multi-hexagon search algorithm in the reference software and its modified software based on the proposed method. We used various test sequences of QCIF, CIF sizes. The simulation conditions are given in Table I. delta bit rates (BR) and delta time (T) and delta motion estimation time (MET) were used for performance comparison. BR, T and MET in the experimental results mean the bit rate, time and motion estimation time changes in percentage respectively. T indicate the total encoding time reduction in the RD cost optimization process in percentage, respectively, which are defined as follows:
=
× 100
=
× 100
Table I
Parameters Used in the Experiments
TEST CONDITION
Flowchart 1(a): Flowchart of the proposed method
Reference software
JM18.4
Number of frames
50
Number of references
5
Entropy coding method
CABAC
QP
28
Hadmard transform
Enabled
RD optimization
Enabled
Motion vector search range
±32
Reference software
JM18.4
Number of frames
50
Number of references
5
Entropy coding method
CABAC
QP
28
Hadmard transform
Enabled
RD optimization
Enabled
Motion vector search range
±32
Flowchart 1(b): Flowchart of the proposed method
As shown in flowcharts if current macroblock is able to satisfy all conditions i.e. if macroblock is temporally homogeneous or spatially homogeneous or Average Rate is equal to zero then best mode is decided as SKIP mode otherwise Mode decision is done by RD optimization process.
Table 2 Performance of Proposed Method
Sequence QP
Time
BitRate
ME Time
28
3.62
-8.82
4.35
32
0.57
-9.54
1.18
Foreman 36
(QCIF)
-1.34
-16.20
-0.89
40
-3.23
-20.53
-2.81
Avg
-0.09
-13.77
0.46
28
-8.64
-28.20
-8.05
32
-3.72
-27.14
-2.67
Silent 36
(QCIF)
-1.38
-29.26
-0.29
40
-2.37
-33.85
-1.32
Avg
-4.03
-29.61
-3.08
28
-18.67
-35.70
-20.91
32
-9.96
-35.28
-10.28
Grandma 36
(QCIF)
-7.94
-39.61
-8.14
40
-10.00
-45.15
-9.99
Sequence QP
Time
BitRate
ME Time
28
3.62
-8.82
4.35
32
0.57
-9.54
1.18
Foreman 36
(QCIF)
-1.34
-16.20
-0.89
40
-3.23
-20.53
-2.81
Avg
-0.09
-13.77
0.46
28
-8.64
-28.20
-8.05
32
-3.72
-27.14
-2.67
Silent 36
(QCIF)
-1.38
-29.26
-0.29
40
-2.37
-33.85
-1.32
Avg
-4.03
-29.61
-3.08
28
-18.67
-35.70
-20.91
32
-9.96
-35.28
-10.28
Grandma 36
(QCIF)
-7.94
-39.61
-8.14
40
-10.00
-45.15
-9.99
(Size)
(CIF)
32
-0.04
-0.28
-0.03
36
-0.03
-0.29
-0.01
40
-0.03
-0.32
-0.02
Avg
-0.03
-0.29
-0.02
28
-0.09
-0.19
-0.08
32
-0.14
-0.16
-0.14
36
-0.04
-0.15
-0.03
40
-0.04
-0.16
-0.03
Avg
-0.07
-0.17
-0.07
28
-0.01
-0.11
0.00
32
0.01
-0.10
0.02
36
-0.03
-0.06
-0.02
40
0.01
-0.06
0.01
Avg
0.00
-0.08
0.00
28
-0.04
-0.08
-0.03
32
0.01
-0.09
-0.90
36
-0.01
-0.13
-0.01
40
-0.01
-0.24
0.00
Avg
-0.01
-0.13
-0.24
32
-0.04
-0.28
-0.03
36
-0.03
-0.29
-0.01
40
-0.03
-0.32
-0.02
Avg
-0.03
-0.29
-0.02
28
-0.09
-0.19
-0.08
32
-0.14
-0.16
-0.14
36
-0.04
-0.15
-0.03
40
-0.04
-0.16
-0.03
Avg
-0.07
-0.17
-0.07
28
-0.01
-0.11
0.00
32
0.01
-0.10
0.02
36
-0.03
-0.06
-0.02
40
0.01
-0.06
0.01
Avg
0.00
-0.08
0.00
28
-0.04
-0.08
-0.03
32
0.01
-0.09
-0.90
36
-0.01
-0.13
-0.01
40
-0.01
-0.24
0.00
Avg
-0.01
-0.13
-0.24
Paris (CIF)
Bus (CIF)
Tempete (CIF)
Avg
-11.64
-38.93
-12.33
28
-18.06
-37.77
-23.47
32
-14.70
-27.06
-16.22
Container 36
-7.37
-40.22
-8.42
40
-6.13
-53.10
-8.25
100
Avg -11.56 -39.54 -14.09
28 -7.21 -26.18 -9.84
32 -8.86 -23.17 -10.71
Claire 36 -9.79 -28.32 -11.34
40 -11.43 -34.96 -12.94
Avg -9.32 -28.16 -11.21
80
60
40
20
0
Avg
-11.64
-38.93
-12.33
28
-18.06
-37.77
-23.47
32
-14.70
-27.06
-16.22
Container 36
-7.37
-40.22
-8.42
40
-6.13
-53.10
-8.25
100
Avg -11.56 -39.54 -14.09
28 -7.21 -26.18 -9.84
32 -8.86 -23.17 -10.71
Claire 36 -9.79 -28.32 -11.34
40 -11.43 -34.96 -12.94
Avg -9.32 -28.16 -11.21
80
60
40
20
0
(QCIF)
(QCIF)
Intra Skip Count-foreman_qcif
1 4 7 10 13 16 19 22 25 28 31 34 37 40
Proposed JM 18.4
28
-12.03
-19.91
-12.31
32
-10.97
-18.46
-11.33
News 36
-4.79
-19.56
-4.00
40
-2.05
-20.51
-1.45
28
-12.03
-19.91
-12.31
32
-10.97
-18.46
-11.33
News 36
-4.79
-19.56
-4.00
40
-2.05
-20.51
-1.45
Figure 1 Intra Skip Count Foreman_qcif
(QCIF)
Avg -7.46 -19.61 -7.27
Foreman 28 -0.03 -0.28 -0.01
Intra Skip Count-News_qcif
40
30
20
10
0
1 4 7 10 13 16 19 22 25 28 31 34 37 40
Proposed JM 18.4
60000
50000
40000
30000
20000
10000
0
Bit Requirement for paris_cif
1 3 5 7 9 11 13 15 17 19 21 23
Proposed JM 18.4
Figure 2 Intra Skip Count News_qcif
Figure 6 Bit Requirement for paris_cif
300
250
200
150
100
50
0
Intra Skip count-Paris_cif
1 3 5 7 9 11 13 15 17 19 21 23
Figure 3 Intra Skip Count Paris_cif
Bit Requirement for Foreman_qcif
Proposed JM 18.4
-
CONCLUSION
Since we are able to decide Skip mode at an early stage without calculation of RD cost it save the bit required to represent the video frame and which further helps in reducing the bit rate. And also this method reduces the total time required for calculation.
-
REFERENCES 6.
-
Jin Young Lee and HyunWook Park,A Fast Mode
14000
12000
10000
8000
6000
4000
2000
0
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43
Proposed JM 18.4
Decision Method Based on MotionCost and Intra Prediction Cost for H.264/AVC IEEE Transactions On Circuits And Systems For Video Technology,
Vol. 22, No. 3, March 2012
-
I. Choi, J. Lee, and B. Jeon, Fast coding mode selection with ratedistortion optimization for MPEG-4 part-10 AVC/H.246, IEEE Trans. Circuit Syst. Video Technol., vol. 16, no. 12, pp. 1557 1561, Dec. 2006.
-
Ortega and K. Ranchandra, Rate-distortion
Figure 4 Bit Requirement for foreman_qcif
Bit Requirement for news_qcif
8000
7000
6000
5000
methods for image and video compression, IEEE Signal Process. Mag., vol. 15, no. 6, pp. 2350,
Nov. 1998.
-
J. Ostermann, J. Bormans, P. List, D. Marpe, M. Narroschke, F. Pereira, T. Stockhammer, and T. Wedi, Video coding with H.264/AVC: Tools, performance, and complexity, IEEE Circuits Syst. Mag., vol. 4, no. 1, pp. 728, Apr. 2004.
4000
3000
2000
1000
0
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43
Proposed JM 18.4
-
I.E. Richardson, The H.264 advanced video compression standard, 2nd Edition, Wiley 2010,
Wiltshire
-
Draft ITU-T Recommendation and Final Draft International Standard of Joint Video Specification (ITU-T Rec. H.264-ISO/IEC 14496-10 AVC),
Figure 5 Bit Requirement for news_qcif
document JVT-G050, Joint Video Team (JVT) of ISO/IEC MPEG and ITU-T VCEG, May 2003.
-
H. Zeng, C. Cai, and K.-K. Ma, Fast mode decision for H.264/AVC based on macroblock
motion activity, IEEE Trans. Circuit Syst. Video Technol., vol. 19, no. 4, pp. 491499, Apr. 2009.
-
K. Suehring. JVT Reference Software Coordination Available:http://iphome.hhi.de.suehring/tml (Online)
-
G. Bjontegaard, Calculation of Average PSNR Differences Between RD-Curves, document VCEG-M33, Apr. 2001.