Low Delay MPEG2 Video Encoding N\ P
Total Page:16
File Type:pdf, Size:1020Kb
Low Delay MPEG2 Video Encoding by Tri D. Tran Submitted to the Department of Electrical Engineering and Computer Science in Partial Fulfillment of the Requirements for the Degrees of Bachelor of Science in Electrical Science and Engineering and Master of Engineering in Electrical Engineering and Computer Science at the Massachusetts Institute of Technology February 3, 1997 © Copyright 1997 Tri D. Tran. All Rights Reserved. The author hereby grants to M.I.T. permission to reproduce and distribute publicly paper and electronic copies of this thesis and to grant others the right to do so. A uthor ............................. ............................... ............... Departmlene f E-., , Enginring and Computer Science 1 0- February 3, 1997 Certified by .. ...J Andrew B. Lippman Lec rer,4Associate Director, MIT Media Laboratory 0'l Thesis Supervisor Accepted by .... N\ P .........n D F. R. Morgenthaler Chairman, Depar ent Committee on Graduate Theses Low Delay MPEG2 Video Encoding by Tri D. Tran Submitted to the Department of Electrical Engineering and Computer Science February 3, 1997 In Partial Fulfillment of the Requirements for the Degrees of Bachelor of Science in Electrical Science and Engineering and Master of Engineering in Electrical Engineering and Computer Science ABSTRACT High-quality and low-delay MPEG2 video coding can be achieved by avoiding the use of intra (I) and bidirectional prediction (B) pictures. Such coding requires intra macroblocks refreshing techniques for channel error propagation resilience and for compliance with the accuracy requirements of the MPEG2 standard. This project gives an overview of the MPEG technology, describes some of these low delay coding techniques and presents software simulation results of their performance in terms of image quality and their robustness to transmission channel errors. Trade-offs and comparisons among various coding strategies are analyzed. Based on the test sequence "Susie," it is shown that the simple low delay coding algorithm gives an overall visual quality acceptable to general viewers even at relatively low bit rate, desirable delay, and under severe transmission error environments. Thesis Supervisor: Andrew B. Lippman Title: Lecturer, Associate Director, MIT Media Laboratory To my parents and to Maria Acknowledgments This thesis project is carried out at the IBM Thomas J. Watson Research Center located in Yorktown Heights, New York. It lasts from the beginning of June 1996 to the end of Janu- ary 1997. I started writing the thesis document itself during early November and I owe many people, in and outside of work, for the completion of it. Please forgive me if I forget to list anyone. Firstly, I would like to thank Cesar Gonzales at IBM Research for giving me the opportunity to work with his group on this particular project and guiding me through it. Without his help, I would not have a thesis to work on in the first place. I also would like to thank my MIT thesis advisor Andy Lippman for accepting me as his advisee, giving me advice and proofreading my thesis. I cannot forget to thank my two mentors at IBM Research--Lurng-Kuo Liu and Peter Westerink. Lurng-Kuo has helped me through with many concepts about the MPEG tech- nology in general and he also guided me through my low delay coding project. I normally meet with him on Monday mornings to discuss my progress and what to expect next. On the other hand, Peter has helped me tremendously with the MPEG software codec. Ques- tions about coding techniques, data interpretation, and many other topics are answered. I often just run to either Lurng-Kuo's or Peter's office whenever I have a new question. In short, I owe much of the thesis completion to these two persons. Other people in the group who have helped me through with my project are Rajesh Rajagopalan and Lascoe Allman. Rajesh has helped me proofread my technical paper and also pointed out helpful hints about my project. Lascoe readily mounts and dismounts any CDs and directories for me whenever asked. Other members of the department are always interested in knowing my progress. Outside of work, I would like to thank Barbara Lynds for giving me the greatest hospi- tality throughout the fall and winter months. She has always been the person I can come up and talk to about my daily events, or about anything at all. She even fixes me food and medicine whenever I don't feel well. Maria Su has been the love of my life, way before the project even started. She has always been loving and giving me support through whatever I decide to do. Please forgive me for those times when my work seems to take over our lives. You know better than any- one else that it does not. :-) I love you with all my heart! My parents and my brother have always been supporting me throughout. My brother Trac has always given me advice about my work in general. My parents, being so far away in Vietnam, have given me all the emotional support and unsurpassed love any par- ents can give to a child they haven't seen for more than a decade. Hopefully, the day of our family reunion isn't so far away... Table of Contents Chapter 1 Introduction -------------------------------- 7 Chapter 2 Overview of the MPEG Technology- --------- --- - 10 The MPEG1 Standard................................... ............... 10 Overview of MPEG 1 Compression Algorithm......................... 11 Reducing Spatial Redundancy ............................................... 11 Reducing Temporal Redundancy .................................... 13 BidirectionalTemporal Prediction................... 14 The MPEG1 Bitstream Structures............................. ....... 16 Video Sequence Header....................................................... 18 Group of Pictures (GOP)Header.................... 19 Picture Header........................ ............... 21 Slice Header............................................... 22 Macroblock Header ...................................... ......... 22 Block ........................................................ 23 A Typical MPEG 1 Encoder ...................................... ...... 23 A Typical MPEG 1 Decoder ..................................... ....... 25 Overall Performance of MPEG 1 ........................................ 26 The MPEG2 Standard .............................. ................................. 26 The MPEG2 Bit-Stream Syntax............................... ....... 28 Exploiting Spatial Redundancy ...................................... ..... 29 Exploiting Temporal Redundancy............................. ....... 29 Frame Predictionfor Frame Pictures................................. 30 Field Predictionfor Field Pictures..................................... 30 Field Predictionfor Frame Pictures................................... 30 Dual Primefor P Pictures........................................... 31 16x8 MC for Field Pictures............................. ........ 31 Typical Codec Architecture......................... ..... ............ 31 MPEG2 Scalability Extensions ........................................... 32 SNR Scalability..................................... .. ............. 32 Data Partitioning........................................ ........... 33 Spatial Scalability....................................... ........... 33 Temporal Scalability ............................................... 33 Regarding MPEG and Low Delay Coding ................................. 33 Chapter 3 Low Delay Coding Design and Implementation - - - - 36 The H.261 and H.263 Videoconferencing Standards............. 36 Design of the Low Delay Coding Algorithm.......................... 37 Refreshing Strategy Using Intra Slices and Columns ................ 37 Reducing Error Propagation............................ ............ 42 Compliance With MPEG2 Standard .................................... 44 Implementation of the Low Delay Coding Algorithm .............. 44 Relevant Files of the MPEG2 Encoder ..................................... 46 Implementation of Intra Slices and Columns............................ 49 Implementation of Constrained Motion Estimation.................. 55 An Exam ple......................................................................... 55 Chapter 4 Simulation Results ---------------------------- 57 Buffer Fullness Behavior ............................. .............................. 58 Video Quality Without Errors.................... ........ 64 Transmission Error Robustness .......... ........................ 67 The Error Injector.............................................. 67 Experimental Results ....................................... ............ 69 Chapter 5 Further Discussion of Simulations - --- ----- ---- - - 75 Buffer Fullness Occupancy .......................................................... 75 Video Quality ............................................. 75 Error Resilience ......................................... ................................... 76 Further Discussions ..................................... ..... ............. 80 Chapter 6 Conclusions --------------------------------- 82 Appendix A Modifications of the MPEG2 Software Encoder - -- - 84 Appendix B The Random Bit Error Injector- - -- --- --- - -- - 115 References ----------------------------------------- 118 1 Introduction Started in 1988, the Moving Picture Experts Group (MPEG) committee set a goal to stan- dardize a video coding strategy for video storage and retrieval for multimedia applications. Not only did the committee succeed with the standardization of MPEG