performance analysis and comparison 1
TRANSCRIPT
Performance Analysis and Comparison of H.264 based on JM and FFMPEG Softwares
Guided by
Dr K.R.Rao
By
Kiran Jonnavittula
What Exactly Is 'Codec'?
• "Codec" is a technical name for "coder/decoder". It also stands for "compressor/decompressor“.
• It is a computer program(realized on a hardware and software) that both shrinks large movie files, and makes them playable on computer/ devices.
• Codec programs are required for the media player to play audio/video files.
Why codecs?
• Because video and music files are large, they become difficult to transfer across the Internet quickly. To help speed up downloads, mathematical "codecs" were built to encode ("shrink") a signal for transmission and then decode it for viewing or editing, and also for storage purposes.
• A video codec is a device or software that enables video compression and/or decompression for digital video.
Complexity of a codec is decided by factors such as
• the quantity of the data needed to represent it (also known as the bit rate).
• the complexity of the encoding and decoding algorithms.
• robustness to data losses and errors, ease of editing.
• the state of the art of compression algorithm design and end-to-end delay
Introduction of H.264 [8]
• H.264/MPEG-4 Part 10 or AVC (Advanced Video Coding) is a standard for video compression[4].
• Purpose of H.264:– Higher coding efficiency than previous standards, MPEG-
1,2,4 part 2, H.261, H.263[4].– Simple syntax specifications.– Various applications like video broadcasting, video
streaming, video conferencing, D-Cinema, HDTV– Balance between coding efficiency, implementation
complexity and cost - based on state-of the-art in VLSI design technology.
H.264 block coding structure
•Encoder
Fig1: H.264 macro block coding [4]
•Decoder
• Motion• Compensation
• Entropy• Decoding
• Intra• Prediction
• Intra/Inter Mode• Selection
• Inverse Quantization• & Inverse Transform
• Deblocking• Filter• +
• +• Bitstream • Input • Video
• Output
• Picture• Buffering
Fig2: H.264 decoder block [4]
Profiles of H.264
Fig3: H.264 profiles [4]
Specific coding schemes of profiles
Fig4: H.264 coding profile schemes [4]
Cif and Qcif sequences• CIF (Common International
Format), also known as FCIF (Full Common Intermediate Format), is a format used to standardize the horizontal and vertical resolutions in pixels of YCbCr sequences in video signals, commonly used in video teleconferencing systems.
• QCIF means "Quarter CIF". To have one fourth of the area as "quarter" implies the height and width of the frame are halved.
• The differences in Y, Cb and Cr of cif and qcif are as shown below in figure 4a.[16]
Figure 4a: 4:2:0 format of cif and qcif.
H.264/MPEG-4 AVC codecs
• x264: A GPL-licensed implementation of the H.264 video standard. x264 is only an encoder[6]
• Nero Digital: Commercial MPEG-4 ASP and AVC codecs developed by Nero AG.[3]
• QuickTime H.264: H.264 implementation released by Apple.[3]
• DivX Pro Codec: An H.264 decoder and encoder was added in version 7.[3]
• JM software• FFMpeg
FFMPEG
• Fast Forwarding Mpeg.• Ffmpeg 0.6.1.• FFmpeg is a free software / open source project that produces
libraries and programs for handling multimedia data. • The most notable parts of FFmpeg are libavcodec, an
audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line program for transcoding multimedia files
• Download the source code, link the files, build and get the required excecutable. [1]
FFMPEG syntax
• ffmpeg [[infile options][`-i' infile]]... {[outfile options] outfile}
• Default Profile: Main Profile
Figure 5 : Command prompt of FFMPEG.
JM Software
• Current software version 17.2• Modify .config file based on each Profile:
encoder_baseline.cfgencoder.cfg encoder_main.cfg encoder_extended.cfg [3]
JM commands
• Access “lencode.exe” and appropriate config file. Change the config file parameters such as quantization parameter, number of frames to be encoded etc.
Figure 6 : Command prompt of JM software.
FFMPEG Calculations For Akiyo_Qcif
Table1: Akiyo_Qcif calculations using ffmpeg.
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
JM Software Calculations for Akiyo_Qcif
Table2: Akiyo_Qcif calculations using JM software.
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
FFMPEG Calculations for Bus_Cif
Table3: Bus_cif calculations using ffmpeg.
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
JM Calculations for Bus_Cif
Table4: Bus_cif calculations using JM software.
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
File Name : Bus_cif.yuvNumber of Frames : 60
Figure7 : Plot of quantization parameter versus PSNR for bus_cif sequence.
0 10 20 30 40 50 600
10
20
30
40
50
60
70
QP vs PSNR for bus_cif
FFMPEG JM
Quantization Parameter
PSN
R in
DB
File Name : Bus_cif.yuvNumber of Frames : 60
Figure8 : Plot of quantization parameter versus SSIM for bus_cif sequence.
0 10 20 30 40 50 600
0.2
0.4
0.6
0.8
1
1.2
QPvs SSIM for bus_cif
FFMPEG JM
Quantization Parameter
SSIM
File Name : Bus_cif.yuvNumber of Frames : 60
Figure9 : Plot of quantization parameter versus bit rate for bus_cif sequence.
0 10 20 30 40 50 600
2000
4000
6000
8000
10000
12000
14000
16000
18000
Bitrate vs QP for bus_cif
FFMPEGJM
Quantization Parameter
Bit R
ates
in K
bps
File Name : Bus_cif.yuvNumber of Frames : 60
Figure10 : Plot of quantization parameter versus encoding time for bus_cif sequence.
0 10 20 30 40 50 601
10
100
1000
10000
Encoding Time Bus_cif
FFMPEG JM
Quantization Parameter
Enco
ding
TIm
e in
Sec
onds
Log1
0 Sc
ale
File Name : Bus_cif.yuvNumber of Frames : 60
Figure11 : Plot of quantization parameter versus compression ratio for bus_cif sequence.
0 10 20 30 40 50 600
100
200
300
400
500
600
700
800
Compression Ratio vs QP for Bus_cif
FFMPEG JM
Quantization Parameter
Com
pres
sion
Ratio
File Name : Bus_cif.yuvNumber of Frames : 60
Figure12 : Plot of quantization parameter versus decoding time for bus_cif sequence.
0 10 20 30 40 50 601
10
100
Decoding Time vs QP for bus_cif
FFMPEG JM
Quantization Parameter
Deco
ding
Tim
e in
Sec
onds
Log1
0 sc
ale
File Name : Akiyo_qcif.yuvNumber of Frames : 60
Figure13 : Plot of quantization parameter versus PSNR for Akiyo_qcif sequence.
0 10 20 30 40 50 600
10
20
30
40
50
60
70
PSNR vs QP for Akiyo_qcif
FFMPEG JM
Quantization Parameter
PSN
R in
Db
File Name : Akiyo_qcif.yuvNumber of Frames : 60
Figure14 : Plot of quantization parameter versus SSIM for Akiyo_qcif sequence.
0 10 20 30 40 50 600
0.2
0.4
0.6
0.8
1
1.2
SSIM vs QP for Akiyo_qcif
FFMPEG JM
Quantization Parameter
SSIM
File Name : Akiyo_qcif.yuvNumber of Frames : 60
Figure15 : Plot of quantization parameter versus bit rates for Akiyo_qcif sequence.
0 10 20 30 40 50 6010
100
1000
10000
Bit Rate vs Qp for Akiyo_qcif
FFMPEG JM
Quantization Parameter
Bit R
ates
in k
bps
log1
0 Sc
ale
File Name : Akiyo_qcif.yuvNumber of Frames : 60
Figure16 : Plot of quantization parameter versus compression ratio for Akiyo_qcif sequence.
0 10 20 30 40 50 600
100
200
300
400
500
600
700
800
900
1000
Comression Ratio vs Q for Akiyo_qcif
FFMPEG JM
Quantization Parameter
Com
pres
sion
Ratio
File Name : Akiyo_qcif.yuvNumber of Frames : 60
Figure17 : Plot of quantization parameter versus encoding time for Akiyo_qcif sequence.
0 10 20 30 40 50 601
10
100
1000
Encoding Time vs QP for Akiyo_qcif
FFMPEG JM
Quaization Parameter
Enco
ding
Tim
e in
Sec
onds
log1
0 sc
ale
File Name : Akiyo_qcif.yuvNumber of Frames : 60
Figure18 : Plot of quantization parameter versus decoding time for Akiyo_qcif sequence.
0 10 20 30 40 50 600
1
2
3
4
5
6
Decoding Time vs QP for Akiyo_qcif
FFMPEGJM
Quantization Parameter
Deco
ding
Tim
e in
Sec
onds
Focus and progress of Project
• Performance Analysis and Comparison of H.264 on JM and FFMPEG Softwares. Encoding time Bit Rates.Compression ratio.PSNR(peak-peak Signal to Noise Ratio).SSIM(structural similarity Index metric)-for
ffmpeg.Decoding time.
ConclusionParameter Analyzed Qcif Cif
Encoding time. FFMPEG offers faster encoding time than JM software.
FFMPEG offers faster encoding time than JM software.
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.
FFMPEG offers better SSIM that JM.
Decoding Time. FFMPEG offers faster decoding time than JM software.
FFMPEG offers faster decoding time than JM software.
Table5: Conclusion and analysis.
Conclusion of H.264 benchmarks
JM Reference Codec• Is the official reference encoder and decoder of
the H.264/AVC standardization bodies.• It implements all the features of the standard
(all profiles and levels), but it is designed for describing and verifying the standard, and it exhibits very low performance.
• It is not recommended for computer architecture or compiler evaluations. [14]
Conclusion of H.264 benchmarks
FFmpeg H.264 decoder• Includes a H.264/AVC encoder-decoder that
implements most of the features of the main and high profiles of the standard.
• The code is very optimized and include MMX/SSE and Altivec SIMD instructions for the most time consuming kernels.
• It is widely used in free multimedia players like MPlayer, VideoLAN, Xine and others. [14]
References
1. http://ffmpeg.org/ - FFMPEG source code.2. http://www.ffmpeg.org/ffmpeg-doc.html - FFMPEG commands documentation. 3. http://iphome.hhi.de/suehring/tml/ - JM software source code4. https://helixcommunity.org – 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. 20066. 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. The H.264 Advanced Video Compression Standard, Iain E. Richardson, Wiley publications, Second Edition, Copyright ©
2010 John Wiley & Sons, Ltd.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. http://www.ece.uwaterloo.ca/~z70wang/research/ssim/ - SSIM reference. 16. 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.