Performance Analysis and Comparison of H.264 based on JM and FFMPEG Softwares

Guided by – Dr. K. R. Rao

Kiran Jonnavittula

UTA ID: 1000679344

Objective: To carry out a performance analysis of the two H.264 codecs, JM software and H.264.

Motivation: H.264 is the most widely-accepted video standard in years and has spawned a huge amount of software that implements it viz., JM, Intel IPP, X264 and FFMpeg. Hence performance analysis projects helps in choosing a suitable codec specific to one’s application and needs [2],[7].

With AVC/H.264 the MPEG-4 part10 standard defines one of the newest and technically best available, state-of-the-art video coding formats. The AVC/H.264 Video Coding Standard was together finalized and identically specified in 2003 by two Groups, the MPEG (Moving Pictures Experts Group) from ISO and the VCEG (Video Coding Experts Group) from ITU (International Telecommunication Union), a sub-organization of the United Nations (UNO), which also standardized the H.263 format (mainly used in video conference software now) [1]. The block diagram of H.264 is as shown in figure1.

H.264/AVC has achieved a significant improvement in the rate-distortion efficiency providing, typically, a factor of two in bit-rate savings when compared with existing standards such as MPEG-2 Video.[2]

H.264 Block Diagram

Figure1: Encoder Block diagram of H.264 [1]

Profiles of H.264

The profiles of H.264 are as follows, and the coding schemes of these profiles are shown in figure2.

  1. Baseline profile
  2. Extended profile
  3. High profile
  4. High 10 profile
  5. High 4:2:2 profile

Figure2: Profiles of H.264 [1]

H.264 Profile Specifications:

The profile specification of H.264 is shown in table 1.

Table1: Profile Specifications. [11]

H.264 Encoding Block Diagram:

The encoding diagram of H.264 is as shown in figure3 below.

Figure3: Encoding block of H.264 [1]

H.264 Decoding Block Diagram:

The decoding block of H.264 is as shown in figure4 below.

Figure4. Decoding block of H.264 [1].

Focus of project:

Performance analysis and comparison of H.264 based on JM and FFMPEG softwares, of parameters such as:

  1. Encoding and decoding times.
  2. Encoded and decoded file size.
  3. PSNR(peak-peak Signal to Noise Ratio)
  4. MSE(mean squared error)
  5. SSIM (structural similarity Index matrix). [2]

Video sequences used:

The cif and qcif video sequences used for the performance analysis is shown in figure 4a and figure 4b.

Figure4a: Akiyo_qcif.yuvFigure4b: Bus_cif.yuv.

The differences in Y,Cb and Cr of cif and qcif is as shown in figure 4c.

Figure4c: 4:2:0 format of cif and qcif.[17]

FFMPEG Calculations for akiyo_qcif:

The FFMPEG performance analysis of akiyo_qcif.yuv is shown in table2.

Quantization parameter / Encoding Time(seconds) / PSNR(dB) / SSIM / Bit Rates (kbps) / Compression Ratio / Decoding Time(seconds)
2 / 2.4 / 44.67 / 0.9892 / 226.9 / 167.74 / 2.4
5 / 2.4 / 38.95 / 0.9686 / 95 / 400.64 / 2.4
10 / 2.4 / 34.7 / 0.9293 / 50.2 / 562.87 / 2.4
20 / 2.4 / 31.04 / 0.8659 / 27.7 / 671.67 / 2.4
25 / 2.4 / 29.91 / 0.8419 / 24 / 771.8 / 2.4
31 / 2.4 / 28.23 / 0.8122 / 22.7 / 893.87 / 2.4

Table2: FFMPEG calculations for akiyo_qcif.

JM Software calculations for akiyo_qcif:

The JM software performance analysis of akiyo_qcif.yuv is shown in table3.

Quantization parameter / Encoding Time(seconds) / PSNR(dB) / SSIM / Bit Rates (Kbps) / Compression Ratio / Decoding Time(seconds)
2 / 101.639 / 62.518 / 0.995 / 4710.57 / 3.071 / 4.88
6 / 93.793 / 55.275 / 0.993 / 3728.6 / 5.461 / 4.975
10 / 38.428 / 51.832 / 0.9975 / 1292.51 / 7.058 / 4.471
28 / 35.715 / 38.431 / 0.9722 / 204.14 / 44.202 / 2.727
40 / 34.04 / 29.836 / 0.8609 / 66.05 / 137.518 / 2.102
51 / 33.082 / 12.79 / 0.3909 / 12.76 / 618.833 / 1.204

Table3: JM software calculations for akiyo_qcif.

FFMPEG calculations for bus_cif:

The FFMPEG performance analysis of bus_cif.yuv is as shown in table4.

Quantization parameter / Encoding Time(seconds) / PSNR (Y) / SSIM / Bit Rates (kbps) / Compression Ratio / Decoding Time(seconds)
2 / 2.4 / 41.7 / 0.9861 / 5510.4 / 5.67 / 2.4
3 / 2.4 / 39.1 / 0.9755 / 3696 / 7.562 / 2.4
4 / 2.4 / 36.99 / 0.96422 / 2802.3 / 9.975 / 2.4
6 / 2.4 / 34.2 / 0.9392 / 1807 / 15.452 / 2.4
10 / 2.4 / 30.97 / 0.8889 / 1010.7 / 27.575 / 2.4
20 / 2.4 / 27.01 / 0.7853 / 434.8 / 63.984 / 2.4
30 / 2.4 / 24.99 / 0.7075 / 268.1 / 103.67 / 2.4
31 / 2.4 / 24.84 / 0.7033 / 258.4 / 107.763 / 2.4

Table4: FFMPEG calculations for bus_cif.

JM calculations for bus_cif:

The JM software performance analysis of bus_cif.yuv is as shown in table 5.

Quantization parameter / Encoding Time(seconds) / PSNR (Y) / SSIM / Bit Rates (Kbps) / Compression Ratio / Decoding Time(seconds)
2 / 1313.604 / 64.735 / 0.995 / 16857.59 / 1.987 / 30.77
6 / 1211.569 / 55.792 / 0.993 / 12825.1 / 2.614 / 25.088
20 / 1141.293 / 42.57 / 0.965 / 3626.32 / 9.246 / 15.59
40 / 1163.053 / 26.759 / 0.867 / 193.94 / 170.625 / 3.754
50 / 1055.155 / 20.722 / 0.386 / 48.48 / 682.5 / 4.141

Table5: JM calculations for bus_cif.

Graphs plotted for the results:

Figure5: Plot of quantization parameter versus PSNR for bus_cif sequence.

Figure6: Plot of quantization parameter versus SSIM for bus_cif sequence.

Figure7: Plot of quantization parameter versus bit rate for bus_cif sequence.

Figure8: Plot of quantization parameter versus encoding time for bus_cif sequence

Figure9: Plot of quantization parameter versus compression ratio for bus_cif sequence.

Figure10: Plot of quantization parameter versus decoding time for bus_cif sequence.

Figure11: Plot of quantization parameter versus PSNR for Akiyo_qcif sequence.

Figure12: Plot of quantization parameter versus SSIM for Akiyo_qcif sequence.

Figure13: Plot of quantization parameter versus bit rates for Akiyo_qcif sequence.

Figure14 : Plot of quantization parameter versus compression ratio for Akiyo_qcif sequence.

Figure15: Plot of quantization parameter versus encoding time for Akiyo_qcif sequence.

Figure16: Plot of quantization parameter versus decoding time for Akiyo_qcif sequence.

Conclusions

The conclusion of the performance analysis is summarized in table6.

Parameter Analyzed / Qcif / Cif
Encoding time. / FFMPEG offers faster encoding time than JM software, because FFMPEG code is highly optimized where it uses SIMD (single instruction multiple data) optimization techniques. The JM software is not an optimized code. / FFMPEG offers faster encoding time than JM software because FFMPEG code is highly optimized where it uses SIMD (single instruction multiple data) optimization techniques. The JM software is not an optimized code.
Bit rates. / FFMPEG offers lower bit rates than JM software. / FFMPEG offers lower bit rates than JM software.
Compression ratio. / FFMPEG offers higher compression ratio. / FFMPEG offers higher compression ratio at lower QP.
PSNR. / JM offers better PSNR than FFMPEG / JM offers better PSNR than FFMPEG.
SSIM. / FFMPEG offers better SSIM that JM, because FFMPEF offers least drop in SSIM for high quantization parameter values. / FFMPEG offers better SSIM that JM because FFMPEF offers least drop in SSIM for high quantization parameter values.
Decoding Time. / FFMPEG offers faster decoding time than JM software. / FFMPEG offers faster decoding time than JM software.

Table6: Conclusions.

References:

  1. - FFMPEG source code.
  2. - FFMPEG commands documentation.
  3. - JM software source code
  4. – developers guide.
  5. D. Marpe, T. Wiegand and G. J. Sullivan, “The H.264/MPEG-4 AVC standard and its applications”, IEEE Communications Magazine, vol. 44, pp. 134-143, Aug. 2006
  6. Joint Video Team (JVT) of ISO/IEC MPEG & ITU-T VCEG (ISO/IEC JTC1/SC29/WG11 and ITU-T SG16 Q.6), 16th Meeting: Poznan, Poland, 24-29 July, 2005.
  7. Soon-kak Kwon, A. Tamhankar and K.R. Rao “Overview of H.264 / MPEG-4 Part 10, J. Visual Communication and Image Representation”, vol. 17, pp.186-216, April 2006.
  8. I. E. Richardson, “The H.264 advance video compression standard”, 2nd Edition, Wiley, 2010.
  9. T. Wiegand, et al “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.
  10. P. N. Tudor, “MPEG-2 video compression”, Electronics \& communication engineering journal, vol. 7, pp. 257-264, 2005.
  11. K. V. S. Swaroop, and K. R Rao, “Performance Analysis and Comparison of JM 15.1 and Intel IPP H.264 Encoder and Decoder”, IEEE 2010 42nd Southeastern Symposium on System Theory (SSST), pp. 371-375, 2010.
  12. G. Sullivan, et al “The H.264/AVC Advanced Video Coding Standard: Overview and Introduction to the Fidelity Range Extensions”. Proceedings of SPIE - The International Society for Optical Engineering, vol. 5558, pp. 454-474, Applications of Digital Image Processing XXVII , 2004.
  13. Video Sequences : http://trace.eas.asu.edu/yuv/
  14. http://personals.ac.upc.edu/alvarez/hdvideobench/node3.html - H.264 benchmarks summarization and their applications.
  15. - SSIM reference.
  16. Zhou Wang, "Image Quality Assessment: From Error Visibility to Structural Similarity", IEEE Transactions on Image Processing, vol 13, no. 4, April 2004.
  17. S.Kwon, A. Tamhankar and K.R. Rao, “Overview of H.264 / MPEG-4 Part 10”, J. Visual Communication and Image Representation, vol. 17, pp.186-216, April 2006.