Professional Documents
Culture Documents
A New Unit Layer Linear Rate Control Algorithm For H.264 Based On PID Controller
A New Unit Layer Linear Rate Control Algorithm For H.264 Based On PID Controller
2007
A New Unit Layer Linear Rate Control Algorithm for H.264 Based on PID
Controller
PING XU, YING-LE FAN, YI LI, QUAN PANG
34
Proceedings of the 2007 International Conference on Wavelet Analysis and Pattern Recognition, Beijing, China, 2-4 Nov. 2007
B. The Computation of ρ frame and to avoid the dilemma between rate control and
In H.264, the coefficients, computed by 4×4 RDO. Before RDO, the INTER_16×16 mode with the
integer-to-integer transform, are nonlinear scalarly mean quantization parameter of all basic units of previous
quantized. The range of quantization parameter QP is frame is adopted to code all macroblocks of current frame
from 0 to 51. The chroma quantization parameter to obtain the transform coefficient distribution D( x) of
QPchroma can be deduced by luma quantization parameter ρl ,i ( j + 1) l th basic
current frame, then initial from the
QPluma . Once QP is added by 6, the Qstep doubles. unit to the end of the current frame is got according to (15)
For transform coefficient xij , 0 ≤ i , j < 4 , its and the number of basic unit head bits, motion bits and
quantization can be computed by
texture bits are all saved temporally.
x M (i, j ) + λ 2 qbits
position position
from the basic unit l to the end, Tr ,i ( j + 1) denotes the
QP (0, 0), (0, 2), (2, 0), (2, 2) (1, 1), (1, 3), (3, 1), (3, 3)
Other position
available number of bits of the remainder unencoded basic
0 13107 5243 8066
1 11916 4660 7490 units and its initial value is i T ( j + 1) ,the sum of basic
2 10082 4194 6554
3 9362 3647 5825 units is N , bl ,i ( j + 1) and ml ,i ( j + 1) denotes the total
4 8192 3355 5243
bits and header bits from the basic unit l to the end in
ρ can be computed by pre-analysis process, respectively.
1
ρ (QP) = ∑
L xij ≤(1−λ )2qbits / M (i , j )
D( x) (15) E. The Computation of the Quantization Parameter
The quantization parameter of macroblock row can be
where D( x) denotes the distribution of transform computed by the following cases:
Case 1: If the current macroblock row is the first one in the
coefficients in a macroblock row and L the number of current P frame, the quantization parameter is given by
the transform coefficients in the macroblock row.
From the (1), QP0,i ( j + 1) = QPi ( j ) (18)
R0 − R1 (1 − ρ 0 ) Case 2: Tr ,i ( j + 1) < 0 . The quantization parameter can
ρ1 = (16)
R0 be given by the following steps: the quantization parameter
is given by
Where R0 and R1 are the initial and target bit count,
QPl ,i ( j + 1) = QPl −1,i ( j + 1) + 1 (19)
ρ0 and ρ1 are intial and target value, respectively. To keep the visual quality, the quantization parameter is
further bounded by
C. ThePre-analysis Process
QPl ,i ( j + 1) = max{QPi ( j ) − 2,
Here we only consider the P frame case. The aim of the (20)
min{QPi ( j ) + 2, QPl ,i ( j + 1)}}
pre-analysis process is to impose small computation to get
Case 3: the rest case, the quantization parameter can be
the distribution of transform coefficients of current coded given by the following steps:
35
Proceedings of the 2007 International Conference on Wavelet Analysis and Pattern Recognition, Beijing, China, 2-4 Nov. 2007
Step 1: The available texture bits bl ,i ( j + 1) of uncoded Ⅲ shows that the proposed method can obtain smallest
part according to the section D. PSNR variation over frame while obtaining the same
Step 2: The target ρ of uncoded part can be computed reconstructed quality as that of LRC and JM8.4.
by (16): For the non-typical sequence, the testing condition is as
ρl,i ( j +1) =(bl,i ( j +1)−ml,i ( j +1) −bl,i ( j +1)(1−ρl,i ( j +1))) follows: the length of GOP is set as 150, the number of
(21)
/(bl,i ( j +1)−ml,i ( j +1)) reference frames is 5, the UVLC entropy coding is used,
frame rate is 15f/s. Table Ⅳ shows that LRC and the
The target QPl ,i ( j + 1) of current basic unit can be
proposed method can both be closer to the target bit rate
computed by the transform coefficient distribution and (4).
Step 3: To reduce the blocking artifacts, the quantization and obtain significantly smaller MBEE than JM8.4 for
parameter is bounded by suize_trevor sequence at different target bit rate. Table Ⅴ
QPl ,i ( j + 1) = max{QPl −1,i ( j + 1) − 1, shows, compared with JM8.4 and LRC, that the proposed
(22)
min{QPl ,i ( j + 1), QPl −1,i ( j + 1) + 1}} method can not only improve the average PSNR values, but
Step 4: QPl ,i ( j + 1) is used to perform the RDO to code also reduce the standard deviations of PSNRs significantly
all the macroblocks of the current frame. for non-typical sequence suize_trevor. Fig.2 shows,
Step 5: Compute the coding bit count of the current basic compared with JM8.4 and LRC, that the proposed method
unit and update Tr ,i ( j + 1) and return to step 1 to code can significantly improve the quality of reconstructed
the following basic unit. pictures at the scene change.
36
Proceedings of the 2007 International Conference on Wavelet Analysis and Pattern Recognition, Beijing, China, 2-4 Nov. 2007
38
vol.11,pp.1221-1236, December 2001.
[7] Y.Sun and I. Ahmad, A robust and adaptive rate
36 proposed method
control algorithm for object-based video coding,
LRC
34
JM8.4
IEEE Transaction on Circuits and Systems for Video
Technology, 2004,14(10): 1167-1182.
32
1 10 19 28 37 46 55 64 73 82 91 100 109 118 127 136 145 [8] C.W.Wong, O.C.Au and H.K.Lam, PID-based
Frame Number real-time rate control, IEEE International
Conference on Multimedia and Expo, 2004,1: 221 –
Fig.2 Frame by frame PSNR comparison for sequence “suize_trevor” at 224.
the target bit rate of 128kbps. [9] I.H.Shin, Y.L.Lee and H.W.Park, Rate control using
linear rate- ρ model for H.264, Signal Process.:
6. Conclusions Image Communication 19(2004) 341-352.
[10] Z.He and T.Chen,Linear rate control for JVT video
We have proposed a new unit layer rate control method coding , Information Technology: Research and
based on linear rate model and PID controller. A Education, 2003. Proceedings. pp. 65 – 68, 11-13,
scene-change handling method is used in the PID controller Aug 2003.
to deal with scene changes. The frame layer bit allocation is [11] H. S. Malvar, A. Hallapuro, M. Karczexicz and L.
realized by the PID controller, the unit bit allocation is Kerofsky, Low-complexity transform and
obtained from distribution of transform coefficients from quantization in H.264/AVC, IEEE Trans. Circuits
the pre-analysis process based on INTER_16×16 mode, System. Video Technology, vol.13, pp.598-603, July,
then the target quantization parameter can be calculated by 2003.
linear rate control model to code all macroblocks in current
unit.
Experimental results show that the proposed method
can not only, same as the LRC, attain the target bit ratemore
accurate and obtain significantly smaller PSNR variation
than that of JM8.4, but also improve temporal picture
quality while keeping high spatial picture quality and the
quality of reconstructed picture for scene change.
References
37