video compression standards : a comparative analysis of h.264, dirac and avs p2 by sudeep gangavati...

42
Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Upload: sydney-nathan-hawkins

Post on 26-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2

By Sudeep GangavatiID 1000717165

EE5359 Spring 2012, UT Arlington

Page 2: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Objective and motivation

• The goal – to compare H.264/AVC, AVS P2 and Dirac• Video quality assessment – MSE, PSNR, SSIM• Ever increasing demand for video compression• Several different video coding standards have

been developed to address the needs efficient video coding for multitude of applications like video streaming, TV broadcasting, 3D TV, Free-viewpoint TV etc. [24].

Page 3: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

H.264/AVC Features

• The most widely used video coding standard

Fig. 1 Video coding standards evolution [12]

Page 4: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Features

• Motion compensated coding structure • Picture slices MBs subMBs blocks

pixels. This is shown in Figure 3.• Only 4:2:0 chroma format was supported

earlier and 4:2:2 , 4:4:4 were added later. This is shown in Figure 2.

• I , P and B slices • Derived slices SI and SP

Page 5: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Fig 2. 4:4:4, 4:2:2, 4:2:0 sampling patterns

Page 6: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Fig 3. H.264 syntax

Page 7: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Profiles and levels

• Main Profile• Baseline Profile• Extended Profile• High Profile

Page 8: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

H.264 Profiles

Fig.4 H.264 profiles [1]

Page 9: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

H.264 Encoder

Fig. 5 Encoder structure for H.264 [2]

Page 10: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

H.264 Decoder

Fig.6 Decoder structure of H.264 [2]

Page 11: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Intra and Inter Predictions

Intra Prediction :

• Uses spatial prediction to reduce spatial redundancy. • 4 X 4 luma – 9 modes • 16 X 16 luma – 4 modes • 8 X 8 luma- 9 modes

Page 12: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Intra prediction modes for 4X4 luma

Fig.7(a) Intra prediction modes [6]

The samples above and to the left, labelled A-M in Figure 7 have previously been encoded and reconstructed and are therefore available in the encoder and decoder to form a prediction reference.

Page 13: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Intra Prediction Modes for 16x16 luma

• Again the previously encoded samples directly above and to the left of the macroblock have been reconstructed and are used for the prediction

Fig 7 (b) Intra prediction modes for 16x16 luma [6]

Page 14: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Inter prediction

Uses motion estimation and motion compensation (MC).

0

Sub-macroblock partitions

0

1 0 1

0 1

2 3

0 0

1 0 1

0

2

1

3

1 macroblock partition of 16*16 luma samples and

associated chroma samples

Macroblock partitions

2 macroblock partitions of 16*8 luma samples and

associated chroma samples

4 sub-macroblocks of 8*8 luma samples and

associated chroma samples

2 macroblock partitions of 8*16 luma samples and

associated chroma samples

1 sub-macroblock partition of 8*8 luma samples and

associated chroma samples

2 sub-macroblock partitions of 8*4 luma samples and

associated chroma samples

4 sub-macroblock partitions of 4*4 luma samples and

associated chroma samples

2 sub-macroblock partitions of 4*8 luma samples and

associated chroma samples

Fig.8 H.264 Inter prediction [5]

Page 15: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

De-blocking filter[5]

• Is used to reduce the blocking artifacts.• Since the filter is present in the loop , it prevents the propagation of the

blocking artifacts.

Fig. 9 Boundaries in a macroblock to be filtered (luma boundaries shown with solid lines and chroma boundaries shown with dotted lines) [1]

Page 16: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

AVS China[7]

• AVS-Audio Video Standard• Standardization includes system, audio, video

and digital copyright management. • Goal – to achieve coding efficiency with

reduced complexity.

Page 17: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

AVS Parts [3]

Fig. 10 AVS China parts [3]

Page 18: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

AVS P2 Encoder [7]

Fig. 11 AVS part 2 encoder [7]

Page 19: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

AVS P2 decoder

Fig 11 (a) AVS P2 decoder block diagram [7]

Page 20: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Intra Prediction in AVS[7]

• Spatial prediction is used in intra coding in AVS part 2.

• The Intra prediction is based on 8x8 block

• The intra prediction method is derived from the neighboring pixels in left and top blocks

Page 21: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Intra Prediction contd.

Fig.12 (a) Five different modes for intra luminance prediction[16]

Page 22: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Inter prediction [16]

• Inter prediction in AVS is by motion compensation and motion estimation [16].

• As shown in the Figure 12 (b), the macroblock can have 16 x 16, 8 x 16, 16 x 8 or 8 x 8 [16].

Fig 12 (b) Macroblock sizes [16]

Page 23: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Dirac

• Dirac is a video codec originally developed by BBC

• This technique is used from web streaming of videos to HD TV applications to storage of content.

• Dirac can compress any resolution picture• The encoder and decoder diagrams are shown

in Figure 13 (a) and (b) respectively.

Page 24: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Figure 13 (a) Dirac encoder[8]

Figure 13 (b) Dirac decoder[8]

Dirac encoder and decoder :

Page 25: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Dirac pro Features

Dirac pro supports the following technical aspects [9]:

• Intra-frame coding only • 10 bit 4:2:2• No subsampling• Lossless or visually lossless compression• Low latency on encode/decode• Support for multiple HD image formats and frame rates• Low complexity for decoding

Page 26: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Experimental ResultsImplementation of DIRAC Software 1.02:

Video sequence: news_qcif.yuv. Width: 176, Height: 144. Total number of frames: 300Number of frames used for encoding: 100.

Frame rate: 25 FPS. File Size: 3713kB.

Table 1: Parametric values for Dirac video codec

Quality Factor

Compressed File Size

Bit rate (kBps)

Y-PSNR(dB) Y-MSE Y-SSIM Comrpession Ratio

0 38 9.573 25.773 187.13 0.79 98:1

5 61 15.571 32.134 39.588 0.95 60:1

10 369 96.301 46.699 1.41 0.98 10:1

15 1278 130.12 51.799 0.743 0.99 2.9:1

Page 27: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Experimental Results contd.

Fig.14 Output of Dirac video codec at different Quality Factors

Quality Factor = 0

Quality Factor = 5

Quality Factor = 10

Page 28: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Video sequence: foreman_qcif.yuv Width: 176; Height: 144. Total number of frames: 300Number of frames used for encoding: 100. Frame rate: 25 FPS; File Size: 3713kB

Quality Factor (QF)

Compressed File Size (kB)

Bitrate (kBps)

Y-PSNR (dB) Y-MSE Y-SSIM Compression Ratio

0 27 8.991 21.5 301.56 0.6875 138:1

5 58 12.675 28.91 110.12 0.8613 64:1

10 581 140.673 43.675 0.827 0.979 6:1

15 1340 170.342 49.556 0.667 0.99 2.7:1

Table 2. Parametric values of Dirac video codec for foreman_qcif video

Page 29: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

QF=0 QF=05

QF=10 QF=15 Fig.15 Output of Dirac video codec at different Quality Factors for foreman_qcif video

Page 30: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Implementation of AVS softwareVideo sequence used: news_qcif.yuvWidth: 176;Height: 144 Total number of frames: 300; Number of frames used: 100Frame rate: 25 FPS; File Size: 3713kB

QP=0 QP=10 QP=50

Fig.16 Output of AVS video codec at different Quality Factors for news_qcif video

Fig.17 Output of AVS video codec at different Quality Factors for foreman _qcif video

Page 31: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Implementation of AVS software

Quantization Parameter (QP)

Compressed File Size

Bit rate (kBps)

Y-PSNR(dB) Y-MSE Y-SSIM Comrpession Ratio

0 980 554.19 54.773 0.2587 0.9997 3:1

10 442 219.12 49.72 0.5525 0.9945 9:1

30 64.0 156.49 38.49 9.23 0.9760 58:1

50 12.0 29.26 27.96 104.13 0.8506 309.7

Table 3. Parametric values of AVS video codec for news_qcif video

QP Compressed file size

Bitrate Y-PSNR Y-MSE Y-SSIM Compression Ratio

0 1123 478.88 52.658 0.2823 0.998 3:1

10 450 278.9 48.775 0.781 0.9903 8.25:1

30 70 79.66 35.231 13.56 0.867 53:1

50 14 24.5 29.780 146.32 0.776 265:1

Table 4. Parametric values of AVS video codec for foreman_qcif video

Page 32: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Implementation of H.264 software (JM 18.0)

Table 5. Parametric values of H.264 video codec for news_qcif video

Table 6. Parametric values of H.264 video codec for foreman_qcif video

Quantization Parameter (QP)

Compressed File Size

Bit rate (kBps)

Y-PSNR(dB) Y-MSE Y-SSIM Comrpession Ratio

0 279 685.19 60.773 0.21619 0.999 13:1

10 208 410.21 48.545 0.9653 0.9947 17.8:1

30 123 155.62 35.721 17.4211 0.8626 30:1

50 35 29.49 28.736 224.23 0.7644 27.5:1

Quantization Parameter (QP)

Compressed File Size

Bit rate (kBps)

Y-PSNR(dB) Y-MSE Y-SSIM Comrpession Ratio

0 379 485.19 62.773 0.21619 0.999 9:1

10 210 340.21 54.67 0.7769 0.9947 18:1

30 98 155.62 34.721 14.4211 0.8626 39:1

50 25 39.49 27.736 236.23 0.6944 27.5:1

Page 33: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Plots of PSNR (dB) vs. Bitrate (kBps)

0 50 100 150 200 250 300 350 400 450 500 550 600 650 700 7500

5

10

15

20

25

30

35

40

45

50

55

60

65

PSNR vs Bitrate

H.264AVSDirac

Bitrate (kBps)

P S

N R

(dB)

Fig18. Plot of PSNR vs. Bitrate for different codecs for news_qcif video

Page 34: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Plots of PSNR (dB) vs. Bitrate (kBps) contd..

0 50 100 150 200 250 300 350 400 450 500 5500

5

10

15

20

25

30

35

40

45

50

55

60

H.264AVSDirac

Bitrate (kBps)

P S

N R

(dB)

Fig 19. Plot of PSNR vs. Bitrate for different codecs for foreman_qcif video

Page 35: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Plots of MSE vs. Bitrate

0 50 100 150 200 250 300 350 400 450 500 550 600 650 700 7500

50

100

150

200

250 MSE vs Bitrate

H.264

AVS

Dirac

Bitrate (kBps)

MSE

Fig 20. Plot of MSE vs. Bitrate for different codecs for news_qcif video

Page 36: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Plots of MSE vs. Bitrate contd..

0 100 200 300 400 500 6000

25

50

75

100

125

150

175

200

225

250

275

300

325

MSE vs Bitrate

Dirac

AVS

H.264

Bitrate (kBps)

MSE

Fig 21. Plot of MSE vs. Bitrate for different codecs for foreman_qcif video

Page 37: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Plot of SSIM vs. Bitrate

0 100 200 300 400 500 600 700 8000

0.2

0.4

0.6

0.8

1

1.2

SSIM vs. Bitrate

H.264AVSDirac

Bitrate (kBps)

S S

I M

Fig 22. Plot of SSIM vs. Bitrate for different codecs for news_qcif video

Page 38: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Plot of SSIM vs. Bitrate

0 100 200 300 400 500 6000

0.2

0.4

0.6

0.8

1

1.2

SSIM vs. Bitrate

H.264AVSDirac

Bitrate

S S

I M

Fig 23. Plot of SSIM vs. Bitrate for different codecs for foreman_qcif video

Page 39: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Computational complexity

0

200

400

600

800

1000

1200

Computational complexity

H.264AVSDirac

Codecs

Tim

e in

seco

nds

Fig 24. Plot of time taken by each codec at QP=30 and QF=10

Page 40: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

Conclusions

• The plots and tabulations show that with the increase in bitrate, there is an increase in PSNR and SSIM and reduction in the MSE.

• Therefor from the plots and the tables, it can be concluded that H.264 provides optimum performance with respect to PSNR, MSE and SSIM over AVS part 2 and Dirac.

• Regarding the computational complexity, H.264 is more complex than the other two standards viz., AVS part 2 and Dirac. This is due to the fact that H.264 supports several prediction modes and has varied macroblock sizes when compared to AVS and Dirac.

Page 41: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

References[1] Soon-kak Kwon, A. Tamhankar and K.R. Rao, “Overview of H.264 / MPEG-4 Part 10 (pp.186-216)”, Special issue on “ Emerging H.264/AVC video coding standard”, J. Visual Communication and Image Representation, vol. 17, pp.186-216, April 2006.[2] T. Wiegand, G. Sullivan, G. Bjontegaard and A. Luthra, “Overview of the H.264/AVC video coding standard,” IEEE Trans. on Circuits and Systems for Video Technology, vol. 13, pp.560-576, July 2003.[3] T. Sikora, “Digital video coding standards and their role in video communications”, Signal Processing for Multimedia, J.S. Byrnes (Ed.), IOS press, pp. 225-251, 1999. [4] K. R. Rao, and D. N. Kim, “Current video coding standards: H.264/AVC, Dirac, AVS China and VC-1,” IEEE 42nd Southeastern symposium on system theory (SSST), March 7-9 2010, pp. 1-8, March 2010.[5]Z. Wang and A.C. Bovik, “A universal image quality index”, IEEE Signal Processing Letters,Vol.9, pp. 81-84, March 2002.[6] Iain Richardson, “ The H.264 advanced video coding standard”, Second Edition,Wiley, 2010[7] L. Yu et al, “An Overview of AVS-Video: tools, performance and complexity”, Visual Communications and Image Processing, Proc. of SPIE, vol. 5960, pp. 679-690, July 2005.[8] “ The Dirac web page” :http://www.bbc.co.uk/rd/projects/dirac/intro.shtml[9] “Dirac Codec Wiki Page ” at http://en.wikipedia.org/wiki/Dirac(codec)[10]“Dirac Pro web page” at http://www.bbc.co.uk/rd/projects/dirac/diracpro.shtml [11] “Video on the web “ a http://etill.net/projects/dirac_theora_evaluation/[12] J.Lou “Advanced video codec optimization techniques”, Doctoral Dissertation, Electrical Engineering Department, University of Washington, August 2009

Page 42: Video Compression Standards : A Comparative Analysis of H.264, Dirac and AVS P2 By Sudeep Gangavati ID 1000717165 EE5359 Spring 2012, UT Arlington

References [13] H.264 AVC JM Software : http://iphome.hhi.de/suehring/tml/ [14] H.264 decoder: http://www.adalta.it/Pages/407/266881_266881.jpg [15] W. Gao et al, “AVS - The Chinese next-generation video coding Standard” NAB, Las Vegas, 2004. [16] X. Wang et al., “Performance comparison of AVS and H.264/AVC video coding standards” J. Comput. Sci. & Technol., vol.21, No.3, pp.310-314, May 2006. [17] AVS China part 2 video software, password protected : ftp://124.207.250.92/ [18] S. Swaminathan and K.R. Rao, “Multiplexing and demultiplexing of AVS CHINA video with AAC audio,” TELSIKS 2011, Nis, Serbia, 5-8 Oct. 2011. [19] Dirac Pro Software : http://diracvideo.org/download/ [20] M. Tun, K.K. Loo and J. Cosmas, “Semi-hierarchical motion estimation for the Dirac video codec,” 2008 IEEE International Symposium on Broadband Multimedia Systems and Broadcasting, pp.1–6, March 31-April 2, 2008. [21] T. Davies, “The Dirac Algorithm”: http://dirac.sourceforge.net/documentation/algorithm/, 2008. [22] Dirac video codec – A programmer's guide: http://dirac.sourceforge.net/documentation/code/programmers_guide/toc.htm [23] A. Ravi and K.R. Rao, “Performance analysis and comparison of the Dirac video codec with H.264 / MPEG-4 Part 10 AVC,”IJWMIP, vol.4, pp.635-654, No.4, 2011.[24] Proceedings of the IEEE Special issue on Frontiers of Audiovisual Communications, vol. 100, No.4, April 2012