The Universal Variable Length Coding (UVLC) scheme in ... decoder use the same re-association table, so the encoder ... scheme is used for symbol coding.
UNIVERSAL VARIABLE LENGTH CODING WITH ADAPTIVE CODEWORD MAPPING USING FIXED RE-ASSOCIATION TABLE Woong-il Choi and Byeungwoo Jeon School of ECE, Sungkyunkwan University Suwon, Korea ABSTRACT The Universal Variable Length Coding (UVLC) scheme in H.26L has nice features such as error resiliency and twoway decodability, however, it has coding efficiency inferior to the conventional Huffman coding. To improve the coding efficiency of UVLC, we propose to use dynamic codeword mapping that changes association between symbols and codewords in order to utilize the statistical characteristics of symbols as much as possible but without losing any features of the UVLC. Encoder and decoder use the same re-association table, so the encoder need not send additional overhead on re-mapping relationship to the decoder. Simulation results show that without significant change of the current H.26L coding scheme, the proposed method additionally attains up to about 6% and about 9% bit reductions respectively in inter and in intra frames over the very efficient low bit-rate H.26L encoding method.
1. INTRODUCTION In many video applications, variable-length coding (VLC) scheme is used for symbol coding. The VLC table in MPEG-1/2/4 and H.263 are not Huffman table in the true sense of Huffman coding, but are pre-fixed and optimized for the application target bit-rates. If applications require to cover wide range of bit-rates, a type of configurable VLC is desirable. Mobile or internet application needs the code that has error resilience and reduces complexity. The universal variable-length code (UVLC) is proposed as a new scheme to offer such advantage [1]. UVLC was applied to motion vector [1] and transform coefficients [2]. For this reason, the current ITU-T H.26L intends to use the UVLC which has following features: - No look-up table necessary at encoder and decoder - Simplified encoding and decoding process - Error resilience by bi-directional decoding - Easy extensibility of the VLC table using a straightforward construction rule
The UVLC constructs a codeword by interleaving symmetric VLC code into fixed-length code whose length is regulated properly with respect to the symmetric code. Current H.26L uses UVLC to code all syntax elements [3]. In spite of these outstanding features, its performance in terms of entropy coding efficiency has some space for further improvement since the codewords are not designed according to the symbol probabilities, but simply assigned according to the fixed construction rule. Although the UVLC can be adapted to handle a variety of coding condition, the configurable feature has not been well explored [4]. In [4], they presented a unified, parametric VLC scheme based on UVLC to handle all syntax elements in H.26L. The proposed scheme has a single, regular codeword structure, and can accommodate different probability distributions with different configurations as parameter. This approach has to change construction rule but the Dynamic Symbol Reordering (DSR) method need not change but only to re-map the relation between symbols and codewords [5]. DSR method is proposed only for a few coding elements, e.g., the macroblock type in H.26L that takes only small portion of total bit stream. In this paper, we propose a UVLC scheme with adaptive codeword mapping using fixed re-association table (i.e. FRAT). The FRAT indicates the re-mapping relation between symbols and codewords under some coding condition. This approach extends to coding various symbols with different coding condition than DSR method. 2. STATISTICAL CHARACTERISTIC OF SYMBOLS IN H.26L In [6], we have experiments that find the target symbol which consumes main portion of total bitstream and potentially has large coding gain with the FRAT. In these experiments, the macroblock type (MB_type), the coded block pattern (CBP) and the zigzag scanned transform coefficients (Tcoeff_SLuma) symbols are decided as the target symbols. The motion vector takes significant bit portion in low bit-rate but has very limited performance gain because probability distribution of UVLC deals very well with that of motion vector. Figure 1 shows the actual
probability distribution of the symbols “MB_type” that indicates mode information of the macroblock and transform coefficients denoted by “Tcoeff_SLuma.” It also shows the probabilities represented by the given UVLC table. UVLC represents the geometric probabilities modeled as,
probability
Mobile (inter, CIF, QP=1, 300frames) P(UVLC) P(MB_ty pe) P(Sluma)
probablity
− le n g th ( u v lc )
where P ( u v l c ) is the probability of a symbol corresponding to a codeword specified by u v l c . As seen in Figure 1, the actual probabilities are not necessarily same to those of the UVLC codewords. However, there may be some factor which gives indication of the actual probabilities. To find out the factor, we have carried out extensive statistical investigation of the H.26L syntax elements by varying many coding conditions, and have found that the quantization parameter (i.e. QP) was a main factor that mostly governs the probability distribution. Therefore in previous method [6], we have applied the FRAT method to the symbol coding with QP as a controlling parameter. But the probability of actual symbol can be dependent to other factors as well. We have investigated the variability of probabilities with 3 factors; the QP value, the image sequence, and the macroblock type.
ͧ͟͡ ͦ͟͡ ͥ͟͡ ͤ͟͡ ͣ͟͡ ͟͢͡ ͟͡͡
Prob{MB_type} vs. QP
ͦ͟͡
ͮͥ ͮͧ͢ ͮͣͩ
ͥ͟͡ ͤ͟͡ ͣ͟͡ ͟͢͡ ͡
͢
ͣ
ͤ
ͥ
ͦ
ͧ
ͨ
ͩ
ͪ
͢͡
codeword
(a)
Prob{MB_type} vs. image sequences
probablity
P (u v lc ) = 2
MB_type of ‘Skip’. However the MB_type of ‘Skip’ exceeds 70% in images with slow motion.
ͨ͟͡ ͧ͟͡ ͦ͟͡ ͥ͟͡ ͤ͟͡ ͣ͟͡ ͟͢͡ ͡
ͿΖΨΤ ;ΠΓΚΝΖ ʹΠΟΥΒΚΟΖΣ
͢
ͣ
ͤ
ͥ
ͦ ͧ ͨ codeword
ͩ
ͪ
͢͡
(b) Figure 2. Probability distribution of symbol “MB_type” according to each factor; (a) with respect to QP’s (b) with respect to different image sequences
͢ ͣ ͤ ͥ ͦ ͧ ͨ ͩ ͪ ͢͡ ͢͢ ͣ͢ codeword
Figure 1. Comparison of probability distribution between UVLC and actual symbols
Figure 2 shows what kind of coding factors determines the actual probabilities of “MB_type”. Figure 2(a) shows the probability of MB_type with respect to various QP’s, while Figure 2(b) demonstrates probability distributions with respect to different image sequences. Figure 2 suggests us that the actual probability can be somewhat expected by checking MB_type since MB_type indicates the motion block size determined by whether image contained fast or slow motion [7]. If the image has fast motion like in image ‘Mobile’, the probability of the MB_type of ‘16x16’ exceeds the probability of the
In a similar way, Figure 3 shows actual probabilities of symbol “run/level” of transformed luminance coefficients with respect to QP, MB_type, and different image sequences. Figure 3 shows the probability distribution of symbol “run/level” at the three different conditions. In Figure 3(a), the probability of symbol “run/level” is flatter at a high bit-rate than at a low bit-rate. The probability of the first codeword indicates that the End of Block (i.e. EOB) is over 50% at low bit-rate because of high QP, therefore UVLC table that assigns the EOB to one bit is sufficiently efficient. However the probability at a high bit-rate is quite different from the UVLC distribution. In Figure 3(c), the symbol “run/level” is independent of image sequences, but it seems to have some dependency on the symbol “MB_type” that indicates the motion block size as seen in Figure 3(b). Finally, the Coded Block Pattern (CBP) highly depends on QP because the higher QP is applied to the macroblock, the more not-coded
ͩ͟͡ probablity
blocks occur. As seen in Figure 4 the probability of CBP is also quite different with respect to different MB_type. It shows that the Coded Block Pattern depends on the motion block size. As the motion block size becomes smaller, there occurs more coded blocks. However, the probability variability of CBP is negligible with respect to different image sequences.
ͥ͟͡ ͣ͟͡
Prob{run/level} vs. QP Mobile (CIF, inter, 300frames)
͢
ͤ
ͦ
ͨ
ͪ
͢͢
codeword
ͤ͢
ͦ͢
ͨ͢
(a)
ͧ͟͡ ͦ͟͡ ͥ͟͡ ͤ͟͡ ͣ͟͡ ͟͢͡ ͟͡͡
Prob{run/level} vs. MB_type Mobile (CIF, inter, 300frames)
ͥ͟͡ probablity
probablity
ͣ͟͡
ͣ͟͡ ͟͢͡
ͩ͟͡ ͢
ͤ
ͦ
ͨ
ͪ
͢͢
ͤ͢
ͦ͢
ͨ͢
codeword
(b) Prob{run/level} vs. image sequences Foreman Mobile Container
͢
ͤ
ͦ
ͨ
ͪ
͢͢
codeword
ͤ͢
ͦ͢
ͨ͢
(c) Figure 3. Probability distribution of symbol “run/level” according to each factor; with Respect to (a) QP (b) MB_type (c) different image sequence
ͨ
ͪ
͢͢
codeword
ͤ͢
ͦ͢
ͨ͢
Prob{CBP} vs. MB_type Container (QCIF, inter, QP=13) MB_type=1 MB_type=3 MB_type=7
͢
ͤ
ͦ
ͨ
ͪ
͢͢
codeword
ͤ͢
ͦ͢
ͨ͢
Prob{CBP} vs. QP Container (QCIF, inter, 100frames)
ͷΠΣΖΞΒΟ ;ΠΓΚΝΖ ʹΠΟΥΒΚΟΖΣ
ͧ͟͡ ͥ͟͡ ͣ͟͡ ͡
probablity
ͦ
(b)
MB_type=1 MB_type=3 MB_type=7
ͤ͟͡
ͧ͟͡ ͦ͟͡ ͥ͟͡ ͤ͟͡ ͣ͟͡ ͟͢͡ ͟͡͡
ͤ
(a)
probablity
probablity
ͥ͟͡
͟͡͡
͢
QP=4 QP=16 QP=28
ͧ͟͡
͡
ͮͥ ͮͧ͢ ͮͣͩ
ͧ͟͡
͡ ͩ͟͡
Prob{CBP} vs. QP Container (QCIF, inter, 100frames)
͢
ͤ
ͦ
ͨ
ͪ
͢͢
codeword
ͤ͢
ͦ͢
ͨ͢
(c) Figure 4. Probability distribution of symbol “run/level” according to each factor; with Respect to (a) QP (b) MB_type (c) different image sequence 3. DYNAMIC UVLC In the previous section, it is shown that the actual symbols in H.26L depend on such factors as QP and/or MB_type. This analysis on the actual symbol probabilities suggests us one method to improve the coding performance of UVLC by re-associating the UVLC codeword based on the coding conditions such as QP and/or MB_type. But we consider a simple fixed re-association table (FRAT) between a symbol and its codeword in order to increase
the coding efficiency of UVLC while still maintaining the structure of UVLC. FRAT is a re-mapping table that accounts for the statistics of symbols. In encoder and decoder, the same FRAT is used, therefore encoder does not send additional information about the re-mapping table. Since it is a very simple process, its hardware design is also very easy. The proposed FRAT scheme is shown in Figure 5. G
GGhG GGhG GG GG
lujvklyG lujvklyG
GGiG GGiG
thwwlyG thwwlyG Omyh{PG
nlulyh{punG jvkl~vykG
GG GG
jGG G G
Figure 5. Dynamic UVLC with fixed Re-Association table
As shown in Figure 5, the mapper is mapping from code number A to code number B using FRAT based on coding conditions. When the coding element information contains target symbols, QP and MB_type, the mapping relation at i-th frame is expressed as, code number B = FRATi[MB_type][QP][code number A] where the index QP is divided into three regions; 1~10, 11~20, 21~30 and the index MB_type is applied to seven different block size for motion compensation (i.e. 16x16, 8x8, 16x8, 8x16, 8x4, 4x8, 4x4) at inter macroblock. The fixed re-association table, FRAT[MB_type][QP] for CBP and Tcoeff_SLuma can be estimated using the statistics of training data. FRATi
= pre-fixed FRAT = function of {Training Data}
However, since the MB_type highly depends on image sequence, we estimate the FRAT using the statistics of MB_type in previous frame to reflect the characteristic of image sequence. FRATi
= function of {MB_types at (i-1)th frame} 4. EXPERIMENT
In the simulation, we used H.26L TML-4 coder at various bit-rates with test sequences, ‘silent’ (QCIF, 10fps), ‘foreman’ (QCIF, 10fps), and ‘mobile’ (CIF, 30fps). Figure 6 shows the bit-reduction ratio of proposed FRAT scheme in inter and intra frames. The bit-reduction ratio R is defined as,
S1 − S 2 × 1 0 0 [% ] S1 where S1 is the number of bits generated by the TML-4 encoder [3], and S2 refers to the number of bits generated by FRAT as described above. We obtain the coding gain up to 6% in inter frame, and 9% in intra frame over the TML-4. As shown in Figure 6, the proposed FRAT method has a marginal improvement at middle QP range, which suggests the UVLC is optimized at this bit-rate in TML-4. Figure 7 shows the coding efficiency of each target symbol. As shown in Figure 7(a), FRAT applied to the symbol MB_type obtains up to 50% gain. Especially, images that have fast motion like in ‘Mobile’ or ‘Foreman’ obtain greater coding gain than those having slow motion. That’s because the distribution of MB_type as manifested in UVLC table well reflects images with slow motion. Figure 7(b) shows FRAT for CBP obtains the gain 80% at high bit-rate. In the case of Tcoeff_SLuma, the coding efficiency is up to 7% at only small QP as shown in Figure 7(c). The actual distribution of CBP and Tcoeff_SLuma matches well with that of UVLC at low bit-rate. Finally, Figure 8 shows comparison of the bits used for total symbol coding between the previous 3-QP FRAT method [6] and the proposed scheme. As shown in Figure 8, the proposed FRAT method has improvement about up to 1.2%. The coding gain of the proposed scheme at each symbol is up to 6% in MB_type, 10% in CBP, 1.5% in Tcoeff_SLuma. R ≡
FRAT[QP][MB_type] (inter frame)
͖ͩ ͖ͧ R ͖ͥ ͖ͣ ͖͡
΄ΚΝΖΟΥ ͷΠΣΖΞΒΟ ;ΠΓΚΝΖ
͢
ͦ
ͪ
ͤ͢
ͨ͢
ͣ͢
ͣͦ
ͣͪ
QP
(a) inter frame ͖͢͡ ͖ͩ ͖ͧ R ͖ͥ ͖ͣ ͖͡
FRAT[QP][MB_type] (intra frame)
΄ΚΝΖΟΥ ͷΠΣΖΞΒΟ ;ΠΓΚΝΖ
͢
ͦ
ͪ
ͤ͢
ͨ͢
QP
ͣ͢
ͣͦ
ͣͪ
(b) intra frame Figure 6. The bit-reduction ratio of FRAT method over the H.26L TML-4
5. CONCLUSIONS
MB_type
͖ͧ͡ ͖ͦ͡ ͖ͥ͡ R ͖ͤ͡ ͖ͣ͡ ͖͢͡ ͖͡
΄ΚΝΖΟΥ ͷΠΣΖΞΒΟ ;ΠΓΚΝΖ
͢
ͦ
ͪ
ͤ͢
ͨ͢
ͣ͢
ͣͦ
ͣͪ
QP
In this paper, we proposed a very simple modified UVLC method for variable bit rate coding. It is based on fixed reassociation tables which are used to change the mapping between codewords and symbols according to such factors as QP and MB_type. The proposed method can accommodate different probability distribution characteristics of symbols according to various coding conditions while retaining the nice features of the UVLC.
(a) MB_type 6. REFERENCES ͖͢͡͡ ͖ͩ͡ ͖ͧ͡ R ͖ͥ͡ ͖ͣ͡ ͖͡
CBP
΄ΚΝΖΟΥ ͷΠΣΖΞΒΟ ;ΠΓΚΝΖ
͢
ͦ
ͪ
ͤ͢
ͨ͢ QP
ͣ͢
ͣͦ
ͣͪ
Tcoeff_SLum a
΄ΚΝΖΟΥ ͷΠΣΖΞΒΟ ;ΠΓΚΝΖ
͖ͧ R ͖ͥ
͖ͣ ͖͡
͢
ͦ
ͪ
ͤ͢
ͨ͢
[2] Yuji Itoh and N.-M. Cheung, “Universal variable length code for DCT coding,” in Proc. IEEE Int. Conf. Image Processing(ICIP), Vancouver, Canada, pp.940-943, Sept. 10-13, 2000. [3] Gisle Bjontegaard, “H.26L Test Model Long Term Number 4 (TML-4),” ITU-T Q15/16, Doc. #Q15-J72, June 2000.
(b) CBP
͖ͩ
[1] Yuji Itoh, “Bi-directional motion vector coding using universal vlc,” Signal processing: Image communication 14, pp. 541-557, 1999.
ͣ͢
ͣͦ
ͣͪ
QP
(c) Tcoeff_SLuma Figure 7. The coding efficiency improvement of each symbol
[4] N.-M Cheung and Yuji Itoh, “Configurable variable length code for video coding,” IEEE International Conference on Acoustics, Speech, and Signal Processing(ICASSP) Volume: 3, pp.1805-1808, May 7-11, 2001. [5] K.-Y. Yoo, B.-S. Choi and Y.-Y Lee, “Improvements to the Telenor proposal for H.26L: Preliminary results on Dynamic Symbol Reordering (DSR) method for Universal VLC encoding/decoding,” ITU-T Q.15/16, Doc. #Q15-H19, August, 1999 [6] W.-I Choi and B.-W. Jeon, “Dynamic UVLC codeword remapping with fixed re-association table for H.26L,” Picture Coding Symposium(PCS), Seoul, Korea, pp.167-170, April 25-27, 2001. [7] Louis Kerofsky, “Adaptive syntax for MBtype,” ITU-T Q6/16, Doc. #Q15-M14, March 2001.
FRAT[QP] vs FRAT[QP][MB_type]
͖ͦ͢͟
΄ΚΝΖΟΥ ͷΠΣΖΞΒΟ ;ΠΓΚΝΖ
͖͢͟͡ R
͖ͦ͟͡ ͖͟͡͡
͢
ͦ
ͪ
ͤ͢
ͨ͢
ͣ͢
ͣͦ
ͣͪ
QP
Figure 8. The performance comparison between the 3-QP FRAT and the proposed FRAT scheme.