Fast Intra Mode Decision Algorithm Based on Texture Direction Detection for H.264/AVC

Автор: Jingyan Shang, Wenpeng Ding, Yunhui Shi, Yanfeng Sun

Журнал: International Journal of Education and Management Engineering(IJEME) @ijeme

Статья в выпуске: 5 vol.1, 2011 года.

Бесплатный доступ

The latest video coding standard H.264/AVC outperforms previous standards in terms of coding efficiency at cost of higher runtime complexity. When RDO is used, the most time-consuming process in a H.264/AVC encoder is mode decision, where all the intra/inter modes are tested to find the optimal coding mode. In this paper, we present a fast intra mode decision scheme, which first detects the texture direction and only tests a subset of intra modes consistent with detected direction. Experimental results demonstrate that the proposed scheme significantly reduces the overall encoding time with negligible coding performance loss.

Еще

H.264/AVC, intra prediction, fast mode decision

Короткий адрес: https://sciup.org/15013624

IDR: 15013624

Текст научной статьи Fast Intra Mode Decision Algorithm Based on Texture Direction Detection for H.264/AVC

The latest video coding standard H.264/AVC[1] offers higher compression ratios as compared with previous standards. In H.264/AVC, many new techniques are introduced such as intra prediction, adaptive block size motion compensation, 4×4 integer transformation, multiple reference pictures, content adaptive binary arithmetic coding (CABAC), rate distortion optimization (RDO) and so on. The encoder uses RDO technique to test all the coding modes to find the best optimal coding parameters to achieve best coding performance. However this also brings very high run-time complexity in the encoder. To determine a best mode of a luma macro-block , the encoder needs to perform test 148 intra modes, where the entire encoding process need to be perform for each candidates mode. Therefore, it is difficult to implement H.264/AVC in real time applications and hardware designing.

In order to solve this problem, many algorithms have been proposed in recent years. For instance, Reference [2] develop a fast computation algorithm which uses linear transform and the fixed spatial relationship of predicted pixels in intra modes. Jongho Kim[3] proposed a fast intra-mode decision based on directional masks and adjacent mode information. This method only tests 4×4 modes at most for luma 4×4 block. Reference [4]

* Corresponding author.

proposed a fast intra prediction mode decision algorithm for luma 4×4 block, which is based on partially sampling prediction and symmetry of the adjacent angle modes. And using edge direction to estimate intra prediction mode is adopted in fast intra mode decision frequently[5][6]. Another method to reduce computational complexity is by optimizing cost function[7]. However some algorithms can reduces about 50% of the full search time, the bit-rate or PSNR is not improved obviously.

We propose a fast intra mode decision algorithm base on texture direction detection for H.264/AVC. Our algorithm only calculates a part of possible intra modes’ RD cost. I n this paper, we propose a fast intra mode decision scheme, which first detects the texture direction and only tests a subset of intra modes consistent with the detected direction.

The rest of the paper is organized as follows. Section II briefly introduces the intra mode decision in H.264/AVC. Then we propose the fast algorithm for intra mode decision in section III. The experimental results are given in section IV. And section V concludes this paper.

  • 2.    Overview of intra prediction

  • 3.    Fast intra prediction mode decision algorithm

The H.264/AVC video coding standard introduces intra prediction for both luma blocks and chroma blocks. As shown in Fig. 1(a), the pixels a-p are predicted using neighboring pixels A-Q which were encoded and reconstructed already. For luma 4×4 block, there are nine prediction modes which are vertical, horizontal, digonal_down_left, digonal_down_right, vertical_right, horizontal_down, vertical_left, horizontal_up and a DC mode to be selected to calculate RDO cost. The vertical, horizontal, digonal_down_left, digonal_down_right, vertical_right, horizontal_down, vertical_left and horizontal_up are represented by 0.1.3,…,8 as shown in Fig. 1(b).In addition, DC mode is represented by 2.

Fig. 1.(a) use pixels A-Q to predict a-p’s values in luma 4×4 block. (b) eight directions of luma 4×4 block.

Luma 16×16 block has four prediction modes in which three directional modes and a DC mode are included as shown in Fig. 2. Comparing with luma 4×4 block, luma 16×16 block is well suited for smooth image areas while luma 4×4 block is adapted to complicated areas. The prediction modes of chroma 8×8 block are similar to luma 16×16 block, only the order of modes is different. As follows, they are 0(DC), 1(horizontal), 2(vertical) ,3(plane).

Fig. 2. prediction modes of luma 16×16 block

In order to reduce the computational complexity of intra mode decision, we propose a new method based on texture direction. Take luma 4×4 block as an example to illustrate the fast mode decision algorithm as shown in Fig. 3.

Firstly, we define five texture directions which include four directions and a non-direction in. The four directions are vertical, horizontal, diagonal_down_left and diagonal_down_right. Then test texture directions to select several possible intra prediction modes according to the direction with the smallest value. The texture direction detection algorithm will be given in following parts. Finally, only a part of intra prediction modes will be used to calculate RDO cost.

Fig. 3.the process of luma 4×4 block fast intra mode decision(assume horizontalM[1] is the smallest one)

1)Texture direction estimation for luma 4×4 block

By analyzing intra prediction modes of H.264/AVC is not difficult to find that classification of all intra prediction modes and texture of image or macro-block is closely related. Because of strong corresponding among neighboring pixels, we can use the value of texture direction to select several possible modes.

We use (1)-(4) to estimate the values of the four basal texture directions for the corresponding prediction modes, and use (5) to compute the value of non-direction. The four defined basal directions are shown in Fig. 4.

This paper is supported by the National Natural Science Foundation of China (No. 60973056, 60825203, U0935004, 60973057).

(1) vertical                        (2) horizontal

Fig. 4.the four defined texture directions of luma 4×4 block

i) vertical(mode 0) direction 44

M (0)=EE (pm- p., i=1 j=1

i i ) h o ri zo n t a l (mode 1) direction

M (1)=EE (p. j- pm^ =1 j=1

iii) diagonal_down_left(mode 3) direction

M (3) = E (P1, j - P 0, j+1)- + E (Pi, 4 - P 0, i+4^ + j=1                            i=-

EE ( p-- p^ - + 1 ) 2 i = - j = 1

iv) diagonal_down_right(mode 4) direction 44

M(4) = E (p1, j - P 0, j-1)- +E (pi ,1 - pi-1,0)- + j=1                            i=-

EE ( p - ,- p,-. ,■ - 1 ) 2

i = - j = -

v) no direction(mode 2:DC) 44            44

M(2)=EE(pij-p)- • p=r.EEpu i=1 j=1                               16 i=1 j=1

In (1)-(5), P i, j (1≤i, j≤4) are pixels of current luma 4×4 block. The pixels throw out with white color in Fig. 4 are reconstructed pixels. The possible modes are thus chosen by ETD(estimation texture direction) which is with the smallest value among M(0)-M(4). Therefore, only a few modes are used to compute RDO cost as shown in Table1.

vi) ETD= min{M(0), M(1), M(2), M(3), M(4)}

Fig. 5.selected modes of luma 4×4 block

Table 1. selection of the decision mode for luma 4×4 block

EDT

Selected modes

M(0)

7,0,5,DC

M(1)

8,1,6,DC

M(2)

all 9 modes

M(3)

3,7,8,DC

M(4)

5,4,6,DC

2) Texture direction estimation for luma 16×16 block

In this part, we divided a luma 16×16 block into six-teen luma 4×4 blocks firstly. And its size will become 4×4 as shown in Fig. 6. Therefore, the same method in luma 4×4 block mode decision will be applied to luma 16×16 block mode decision. Y i, j (1≤i, j≤4) are the average values of sub-blocks, for instance Y 1, 1 . We use (7) to calculate it. P i, j (1≤i, j≤4) are the values of pixel in luma 16×16 block.

Fig. 6.sub-blocks of luma 16×16 block

i) r u = г. ZZ P i , j 16 i = 1 j = 1

With the explanations above, we can use the similar method to estimate the values of texture direction for the three prediction modes of luma 16×16 block as shown in Fig. 7. We use (8)-(10) to estimate the values of the

Yn.o

YLi

Yo

2

Y

Y

Yi,o

v

Y

,3

Y20

Y

2,1

V:

,2

¥:

,3

Y

A

Ya,о

Y

¥з

2

Y

.3

Y

.4

¥4,0

Y

Y4

.2

Y-

,3

Y.

4

(10) plane

three texture directions

(8) vertical

(9) horizontal

Fig. 7. the three defined texture directions of luma 16×16 block

  • ii)    vertical(mode 0) direction 44

M (0)=EE (Yu- Yj

= 1 j = 1

  • iii)    horizontal(mode 1) direction

M (1) = EE (j Y. j-1)2

i = 1 j = 1

  • iv)    plane(mode 3)

M(3) = E(Y,j - Y • )2 + EY  - Y.j+1 )2 +

  • j = 1                           j = 1

E (Y .1 - Y„.o)2 +E (Y, .2 - Y ,u)2 +

= 1                                i = 1

  • (Y3,1 - Y1,2)2 + (Y1.3 - Y1,2)2

v) EDT= min{M(0), M(1), M(3) }

Table 2. selection of the decision mode for luma16×16 block

EDT

Selected modes

M(0)

0,DC

M(1)

1,DC

M(3)

3,DC

3) Texture direction estimation for chroma 8×8 block

Fig. 8. sub-blocks of chroma 8×8 block

For chroma 8×8 block , t he processes of calculation and mode decision are completely like luma 16×16 block.

  • 4.    Experimental results

  • 5.    Conclusion

The proposed algorithm is tested in JM10.1[8]. All the frames are encoded using I-frame coding. Each video sequence contains 100 frames. RDO is enabled .The test sequences include Container, News, Coastguard, Akiyo, Carphone , Salesman in format of QCIF(4:2:0) and Football, Bus, Foreman, Mobile, News, Tempete in format of CIF(4:2:0).

Table3 and Table 4 list the results of the proposed algorithm compared with full search in terms of coding time, Bit-rate and PSNR. For all sequences with different QP, the proposed algorithm can reduces more than 60% of the full search time with little change of PSNR and Bit-rate. The A Time(%) and Д Б/К(%) are the percentage values of difference between original JM values and the proposed algorithm, and A PSNR(dB) is the difference value between original JM value and the proposed algorithm.

In this paper, an efficient fast mode decision algorithm of intra prediction for both luma block and chroma block is proposed based on texture direction detection. Five directions are defined and tested to be considered to select several possible intra prediction modes for calculating RDO cost.

Comparing with conventional full search approach, the proposed method can reduce prediction mode decision time by about 60% during intra frame coding of H.264/AVC while on average maintaining similar PSNR and increasing the Bit-rate only slightly.

Список литературы Fast Intra Mode Decision Algorithm Based on Texture Direction Detection for H.264/AVC

  • ISO/IEC 14496-10 and ITU-T Rec.H.264, Advanced Video Coding(ACV),2003 G.
  • Chao-Hsuing Tseng, Hung-Ming Wang,and Jar-Ferr Yang, "Enhanced Intra 4×4 Mode Decision for H.264/AVC Coders," IEEE Transactions on Circuits and Systems for Video Technology, vol.16, pp.1027-1032, Aug. 2006
  • Jongho Kim and Jechang Jeong, "Fast intra-mode decision in H.264 video coding using simple directional masks," Visual Communications and Image Processing 2005 , v5960, 596036-1-9, 1 July 2005
  • Chih-Hsien Hsia, Jen-Shiun Chiang,Ying-Hong Wang,and Tsai-Yuan Teng, "Fast Intra Prediction Mode Decision Algorithm for H.264/AVC Video Coding Standard," Intelligent Information Hiding and Multimedia Signal Processing, 2007. vol. 2, pp. 535-538, 26-28 Nov. 2007.
  • Seong Soo Chun, Ja-Cheon Yoon, and Sanghoon Sull, "Efficient Intra Prediction Mode Decision for H.264 Video," Advances in Multimedia Information Processing-PCM 2005. 6th Pacific-Rim Conference on Multimedia. Vol. 3767. pp. 168-178, 2005.
  • An-Chao Tsai, Jhing-Fa Wang, Jar-Ferr Yang, and Wei-Guang Lin, "Effective Subblock-Based and Pixel-Based Fast Direction Detections for H.264 Intra Prediction," IEEE Transactions on Circuits and Systems for Video Technology, vol.18, pp.975-982, July 2008
  • Mohammed Golam Sarwer,Lai-Man Po,and Jonathan Wu, "Complexity Reduced Mode selection of H.264/AVC Intra Coding," Audio, Language and Image Processing, 2008, pp.1492-1496, 7-9 July 2008.
  • JVT Reference Software Version JM10.1, http://iphome.hhi.de/suehring/tml/do.
Еще
Статья научная