2005/12/06 1 fast intermode decision in h.264/avc video coding d. wu, f. pan, k. p. lim, s. wu, z....
Post on 21-Dec-2015
223 views
TRANSCRIPT
2005/12/06 1
Fast Intermode Decision in H.264/AVC Video Coding
D. Wu , F. Pan , K. P. Lim , S. Wu , Z. G. Li ,
X. Lin , S. Rahardja , and C. C. Ko
老師 : 楊士萱 博士學生 : 陳柏源 碩二
22005/12/06
Outline (1/1) H.264 encoder configuration Macroblock Partition Intermode Decision in H.264/AVC Fast Intermode Decision method Fast Intermode Decision Algorithm Experimental Results Reference
ave. Timesaving : 30%ave. PSNR loss : 0.03 dB
32005/12/06
H.264 encoder configuration (1/1)
Figure 1. Encoder configuration
Fn(current)
F'n-1(reference)
ME
MC
Intraprediction
ChooseIntra
predition
F'n(reconstructed)
Filter
T Q ReorderEntropyencode
T -1 Q -1
Dn X
D'n
Inter
Intra
P
uF'n
NAL
(1 or 2 previouslyencoded frames)
42005/12/06
Macroblock Partition (2/1)
Figure 2. Frame partitions Figure 3. Macroblock partitions
16
16
8x16 16x8 8x8
8x8
16x16
4x8 8x4 4x4
52005/12/06
Macroblock Partition (2/2)-blocksize selection={16x16 , 8x16 , 16x8 , 8x8 , 4x8 , 8x4 , 4x4}
Figure 4. QCIF ( News)
Figure 5. CIF (Paris)
62005/12/06
Intermode Decision in H.264/AVC (3/1) -blocksize selection={16x16 , 8x16 , 16x8 , 8x8 , 4x8 , 8x4 , 4x4}
Fn(current)
F'n-1(reference)
ME
MC
Intraprediction
ChooseIntra
predition
F'n(reconstructed)
Filter
T Q ReorderEntropyencode
T -1 Q -1
Dn X
D'n
Inter
Intra
P
uF'n
NAL
(1 or 2 previouslyencoded frames)
Figure 6. Encoder configuration
72005/12/06
Intermode Decision in H.264/AVC (3/2)
MV : )(.))(,(),( pmRmcsSADmJMOTIONMOTION
reference fram
search area
current frame
current macroblockbest match
Figure 7. Motion Estimation
Table 1. MPEG4 Motion VectorDifference (MVD)
82005/12/06
Intermode Decision in H.264/AVC (3/3)
Lagrangian Function :
SSD :
Lunda :
R(s,c,MODE|QP) : Number of bits (MODE & QP)
)|,,(.)|,,(),|,,( QPMODEcsRQPMODEcsSSDQPMODEcsJMODEMODE
8,8
1,1
28,8
1,1
2
16,16
1,1
2
])|,,[],[(])|,,[],[(
])|,,[],[()|,,(
yxVV
yxUU
yxYY
QPMODEyxyxQPMODEyxyx
QPMODEyxyxQPMODEssSSD
cscs
cs
PMODE
QP
PMODEx
QP
x
,
3
,))
6,4min(,2max(
85.0 2 For P-fram
For B-fram
92005/12/06
Method (3/1)-Homogenity (Sobel edge detection)
Edge vector : Vertical :
Horizontal :
Amplitude :
Homogeneous decision :
ppppppdx jijijijijijijixx
1,11,1,11,11,1,1,22
ppppppdyjijijijijijiji
xx1,1,11,11,1,11,1,
22
-1 0 1
-2 0 2
-1 0 1
-1 -2 -1
0 0 0
1 2 1dydxD jijijiAmp
,,,)(
NxNjiHji
NxNjiHji
cr
THdD
THdDH
Ampif
Ampif
,,
,,
,
)(,0
)(,1
},{,,, dydxD jijiji
102005/12/06
Method (3/2)-Stationary
Sum of absolute diff. :
Stationary :
16,16
1,1
]),[],[(ji
jiNjiMabsDiff
TT
S
S
Diffif
DiffifStationary
....,0
....,1
112005/12/06
Method (3/3) -blocksize selection={16x16 , 8x16 , 16x8 , 8x8 , 4x8 , 8x4 , 4x4}
Figure 8. QCIF ( News)
Figure 9. CIF (Paris)
122005/12/06
Algorithm (1/1)16x16 : THdH=20,0008x8 : THdH=5000
Ts=200
8x16 16x8 8x8
8x8
16x16
4x8 8x4 4x4
Category Corresponding Modes
MD 1
MD 2
MD 3
16X 16 , 16X 8 , 8X 16
8x8 , 8x4 , 4x8 , 4x4
8x8
16X16
MD 4
Decompose into four 8-by-8 subblocks
All four subblocksare checked ?
END
Best(MD2,3,4) Best(MD2)
YES
NO
YES
YES
YESNO
NO
No
MB is homogeneous ?
MB zero motion ?
MB , Diff <Ts ?
8x8 is homogenous ?
No
YES
YES
Best(MD1)Best(MD3)Best(MD4)
Save(MD2)
Edge detection , histogram
Start
132005/12/06
Experimental Results (4/1)
SeuqenceTime(%
)
Psnr(%)
Bits(%)
Foreman(QCIF) -25.18 -0.062 1.28
News(QCIF) -42.62 -0.065 1.18
Container(QCIF) -36.25 -0.012 0.3
Silent(QCIF) -45.16 -0.022 0.47
Paris(CIF) -31.9 -0.04 0.87
Mobile(CIF) -9.97 -0.005 0.13
Stefan(CIF) -17.37 -0.015 0.33
SeuqenceTime(%
)Psnr(%) Bits(%)
Foreman(QCIF) -24.61 -0.05 1.15
News(QCIF) -40.52 -0.029 0.54
Container(QCIF) -39.05 -0.027 0.45
Silent(QCIF) -45.92 -0.055 1.21
Paris(CIF) -26.54 -0.04 0.91
Mobile(CIF) -9.21 -0.002 0.06
Stefan(CIF) -16.31 -0.015 0.35
TABLE IIResults For IBBP Sequences
TABLE IResults For IPPP Sequences
142005/12/06
Experimental Results (4/2)
QP TypeTime(%
)
Psnr(%)
Bits(%)
28 IPPP -10.96 -0.01 -0.01
32 IPPP -10.04 -0.01 -0.02
36 IPPP -9.26 0.01 0.17
40 IPPP -9.54 0.00 0.28
TABLE IIIResult For “Mobile” (IPPP)
TABLE IVResult For “Mobile” (IBBP)
QP TypeTime(%
)
Psnr(%)
Bits(%)
28 IBBP -10.19 -0.02 0.03
32 IBBP -9.07 -0.01 0.04
36 IBBP -8.85 -0.01 -0.72
40 IBBP -8.66 0.00 -0.08