H.264/MPEG-4 AVCVideo Compression TutorialCopyright © 2003 by LSI Logic CorporationAll rights reserved.Order Number XXXXXXXXJanuary 2003IntroductionHistory of Video StandardsITU-TStandardJointITU-T/MPEGStandards1988 1990 1992 1994 1996 1998 2000 2002 2004MPEGStandardsH.261(Version 1)H.261(Version 1)H.263H.262/MPEG-2MPEG-1MPEG-4(Version 1)MPEG-4(Version 2)H.264/MPEG-4 AVCH.263+ H.263++The upcoming H.264/MPEG-4 AVC video compression standard promises a significant improvement over all previous video compression standards. In terms of coding efficiency, the new standard is expected to provide at least 2x compression improvement over the best previous standards and substantial perceptual quality improvements over both MPEG-2 and MPEG-4.The standard, being jointly developed by ITU-T and ISO/IEC, will address the full range of video applications including low bit-rate wireless applications, standard-definition and high-definition broadcast television, video streaming over the Internet, delivery of high-definition DVD content, and the highest quality video for digital cinema applications. The ITU-T name for the standard is H.264 (previously called H.26L), while the ISO/IEC name is MPEG-4 Advanced Video Coding (AVC) which will become Part 10 of the MPEG-4 standard. Since AVC is an extension to the current MPEG-4 standard, it will benefit from MPEG-4’s well-developed infrastructure tools (e.g. system layer and audio). It is expected that MPEG-4 AVC will be selected over the current MPEG-4 video compression standard, known as MPEG-4 Advanced Simple Profile (ASP), for the majority of applications that demand the highest compression and quality levels.As can be seen in the diagram “History of Video Standards”, the ITU-T and ISO/IEC are responsible for all previous international video compression standards. To date, the most successful of these standards has been MPEG-2, which has gone on to achieve mass-market acceptance in areas such as DVD, digital television broadcast (over cable and satellite), and digital set-top box. The new H.264/MPEG-4 AVC standard represents the single largest improvement in coding efficiency and quality since the introduction of MPEG-2. Consequently, over time, it is expected that H.264/MPEG-4 AVC will displace MPEG-2 and MPEG-4 ASP in many existing applications, in addition to opening up several new markets (e.g. video over ADSL).H.264/MPEG-4 AVCVideo Compression TutorialAs can be seen in the “H.264/MPEG-4 AVC – Overview Block Diagram”, the new standard is composed of several processing stages:• Motion Estimation and Intra Estimation• Transform (and Inverse Transform)• Quantization (and Inverse Quantization)• Loop Filter• Entropy CodingVideo is composed of a stream of individual pictures that can be broken down into individual blocks of 16 pixels by 16 lines called “macroblocks”. This practice simplifies the processing which needs to be done at each stage in the compression algorithm. For example, a picture from a video stream at standard definition resolution (720x480) is divided into 1,350 (45x30) macroblocks. It is at the macroblock level that further processing takes place. We will explore the purpose and function of each of these processing elements in the next few sections.Technical OverviewH.264/MPEG-4 AVC – Overview Block DiagramMotion estimation is used to identify and eliminate the temporal redundancies that exist between individual pictures. When searching for motion relative to a previous picture, the picture to be encoded is called a “P-picture”. When searching both within a previous picture and a future picture, the picture to be encoded is called a “B-picture”.To improve coding efficiency, the macroblock is broken down into smaller blocks that attempt to contain and isolate the motion as shown in the diagram “H.264 Motion Estimation – Superior Motion Estimation”. Then, motion vectors to previous and/or future pictures are used to predict a given block. H.264/MPEG-4 AVC introduces smaller block sizes, greater flexibility in block shapes, and greater precision in motion vectors.Technical OverviewEstimationComputes the difference between actual incomingvideo and estimated/transformed/quantized videoSo, only the estimated and the differenceappear in the compressed video streamEither "motion estimation" or"intra estimation"Transform QuantizationEntropyCodingUncompressedVideoCompressedVideoLoop FilterInverseTransformInverseQuantizationH.264/MPEG-4 AVCVideo Compression TutorialIn addition, H.264 introduces the concept of multiple reference frames. This feature is useful for dealing with:1) Motion that is periodic in nature2) Translating motion and occlusions3) Alternating camera angles that switch back and forth between two different scenesAn example of periodic motion is shown in “H.264 Motion Estimation – Multiple Reference Frames”.The difference between the predicted block and the actual block is then coded, which results in far fewer bits than if only the original block was coded.H.264 Motion Estimation – Superior Motion EstimationH.264 Motion Estimation – Multiple Reference FramesMacroblockPartitioningVideoStandardH.264Characteristics· Arbitrary block shapes· Small block sizes (4x4)· 1/4, 1/8 pel motion vector Strong motion isolationMPEG-4· Square block shapes· Medium block sizes (8x8)· 1/8 pel motion vector Moderate motion isolationMPEG-2· Square block shapes· Large block sizes (16x16)· 1/2 pel motion vector Weak motion isolationH.264MPEG-2 orMPEG-4ReferenceFrame 1MaximumCompressionCannot RecognizePeriodic MotionReferenceFrame 2H.264/MPEG-4 AVCVideo Compression TutorialIn instances where motion estimation cannot be exploited, intra estimation is used to eliminate spatial redundancies. Intra estimation attempts to predict the current block by extrapolating the neighboring pixels from adjacent blocks in a defined set of different directions. The difference between the predicted block and the actual block is then coded. This approach, unique to H.264/MPEG-4 AVC, is particularly useful in flat backgrounds where spatial redundancies often exist. An example of this is shown in “H.264 Intra Estimation”.Intra EstimationH.264 – Intra EstimationResults from the motion estimation or intra estimation stages are transformed from the spatial domain into the frequency domain. H.264/MPEG-4 AVC uses a DCT-like 4x4 integer transform. In contrast, MPEG-2 and MPEG-4 ASP employ a true DCT 8x8
View Full Document