Beginner Guide For MPEG-2 Standard
Beginner Guide For MPEG-2 Standard
• Introduction
o MPEG Standards
• Overview of MPEG 2
o What is MPEG-2?
• MPEG-2 Video
o Video Stream Data Hierarchy
o Picture Types
o Scalable Modes
• MPEG-2 Audio
Introduction
MPEG Standards
MPEG is an acronym for Moving Picture Expets Group, a committee formed by the
ISO(International Organization for Standardization) to develop this standard. MPEG
was formed in 1988 to establish an international standard for the coded
representation of moving pictures and association audio on digital storage media.
Currently there are three MPEG stardards.
o MPEG-1
Medium Bandwidth (up to 1.5Mbits/sec)
1.25Mbits/sec video 352 x 240 x 30Hz
250Kbits/sec audio (two channels)
Non-interlaced video
Optimized for CDrom
o MPEG-2
Higher Bandwidth (up to 40Mbits/sec)
Up to 5 audio channels (i.e. surround sound)
Wider range of frame sizes (including HDTV)
Can deal with interlaced video
o MPEG-3
MPEG-3 was for HDTV application with dimensions up to 1920 x 1080
x 30Hz, however, it was discovered that the MPEG-2 and MPEG-2
syntax worked very well for HDTV rate video. Now HDTV is a part of
MPEG-2 High-1440 Level and High Level toolkit.
o MPEG-4
Very Low Bandwidth (64Kbits/sec)
176 x 144 x 10Hz
Optimized for videophones
Overview of MPEG-2
What is MPEG-2?
The MPEG-2 Standard is published in four parts. Part 1: Systems specifies the
system coding layer of the MPEG-2. It defines a multiplexed structure for combining
audio and video data and means of representation the timing information needed to
replay synchronized sequences in real time. Part 2: Video specifies the coded
representation of video data and the decoding process required to reconstruct
pictures. Part 3: Audio specifies the coded representation of audio data. Part 4:
Conformance test
MPEG-2 Video
Video Stream Data Hierarchy
From the above video bitstream, we can see that it is consisted by 4 layers : GOP,
Pictures, Slice, Macroblock, Block.
Video Sequence
Begins with a sequence header (may contain additional sequence header), includes
one or more groups of pictures, and ends with an end-of-sequence code.
A Header and a series of one of more pictures intended to allow random access into
the sequence.
Picture
The primary coding unit of a video sequence. A picture consists of three rectangular
matrices representing luminance (Y) and two chrominance (Cb and Cr) values. The
Y matrix has an even number of rows and columns. The Cb and Cr matrices are one-
half the size of the Y matrix in each direction (horizontal and vertical).
Slice
One or more "contiguous" macroblocks. The order of the macroblocks within a slice
is from left-to-right and top-to-bottom. Slices are important in the handling of erros.
If the bitstream contains an error, the decoder can skip to the start of the next slice.
Having more slices in the bitstream allows better error concealment, but uses bits that
could otherwise be used to improve picture quality.
Macroblock
The basic coding unit in the MPEG algorithm. It is a 16x 16 pixel segment in a
frame. Since each chrominance component has one-half the vertical and horizontal
resolution of the luminance component, a macroblock consists of four Y, one Cr, and
one Cb block.
Block
The smallest coding unit in the MPEG algorithm. It consists of 8x8 pixels and can be
one of three types: luminance(Y), red chrominance(Cr), or blue chrominance(Cb).
The block is the basic unit in intra frame coding.
Picture Types
The MPEG standard specifically defines three types of pictures:
Intra Pictures
Intra pictures, or I-Picture, are coded using only information present in the picture
itself, and provides potential random access points into the compressed video data. It
uses only transform coding and provide moderate compression. Typically it uses
about two bits per coded pixel.
Predicted Pictures
Predicted pictures, or P-pictures, are coded with respect to the nearest previous I- or
P-pictures. This technique is called forward prediction and is illustrated in above
figure.
Like I-pictures, P-pictures also can serve as a prediction reference for B-pictures and
future P-pictures. Moreover, P-pictures use motion compensation to provide more
compression than is possible with I-pictures.
Bidirectional Pictures
Bidirectional pictures, or B-pictures, are pictures that use both a past and future
picture as a reference. This technique is called bidirectional prediction. B-pictures
provide the most compression since it use the past and future picture as a reference,
however, the computation time is the largest.
Method of Encoding Pictures
Intra Pictures
Both image blocks and prediction-error blocks have high spatial redundancy. To
reduce this redundancy, the MPEG algorithm transforms 8x8 blocks of pixels or 8x8
blocks of error terms from the spatial domain to the frequency domain with the
discrete Cosine Transform (DCT).
Predicted Pictures
Bidirectional Pictures
example:
From the above pictures, there are some information which is not in the reference
frame. Hence B picture is coded like P-pictures except the motion vectors can
reference either the previous reference picture, the next picture, or both. The
following is the mechanism of B-picture coding.
MPEG-2 Levels
Max. Sampling
Level Pixels/sec Max. bitrate Significance
dimensions fps
Low 352 x 240 x 30 3.05 M 4 Mb/s CIF, consumer tape equiv.
Main 720 x 480 x 30 10.40 M 15 Mb/s CCIR 601, studio TV
High 1440 1440 x 1152 x 30 47.00 M 60 Mb/s 4x 601, consumer HDTV
High 1920 x 1080 x 30 62.70 M 80 Mb/s production SMPTE 240 std
MPEG-2 Profiles
Profile Comments
Same as Main, only without B-pictures. Intended for software applications, perhaps
Simple
CATV.
Main Most decoder chips, CATV satellite. 95% of users.
Main+ Main with Spatial and SNR scalability.
Next Main+ with 4:2:2 macroblocks.
Scalable Modes
Scalable video is only available on Main+ and Next profile. Currently there are four
scalable modes in the MPEG-2 toolkit. These modes break MPEG-2 video into
different layers.
Spatial Scalability
Useful in simulcasting, and for feasible software decoding of the lower resolution,
base layer. This spatial domain method codes a base layer at lower sampling
dimensions (i.e. resolution) than the upper layers. The upsampled reconstructed
lower (base) layers are then used as prediction for the higher layers.
Data Partitioning
Similar to JPEG's frequency progressive mode, only the slice layer indicates the
maximum number of block transform coefficients contained in the particular
bitstream (known as the priority break point). Data partitioning is a frequency
domain method that breaks the block of 64 quantized transform coefficients into two
bitstreams. The first, higher priority bitstream contains the more critical lower
frequency coefficients and side information (such as DC values, motion vectors). The
second, lower priority bitstream carries higher frequency AC data.
SNR Scalability
Similar to the point transform in JPEG, SNR scalability is a spatial domain method
where channels are coded at identical sample rates, but with differing picture quality
(through quantization step sizes). The higher priority bitstream contains base layer
data that can be added to a lower priority refinement layer to construct a higher
quality picture.
Temporal Scalability
A temporal domain method useful in, e.g., stereoscopic video. The first, higher
priority bitstreams codes video at a lower frame rate, and the intermediate frames can
be coded in a second bitstream using the first bitstream reconstruction as prediction.
In stereoscopic vision, for example, the left video channel can be predicted from the
right channel.
The interlaced video sequence can switch between frame structures and field
structures on a picture-by-pictures basics. On the other hand, each picture in a
progressive video sequence is a frame picture.
MPEG-2 Audio
MPEG-2 provides a low bitrate coding for multichannel audio. Totally there are five
full bandwidth channels (left, right, center, and two surround channels), plus a
additional low frequency enhancement channel, and/or up to seven
commentary/multilingual multilingual channel. The MPEG-2 Audio Standard will
also extend the stereo and mono coding of MPEG-1 Audio Standard (ISO/IEC IS
11172-3) to half sampling rates (16 kHz, 22.05 kHz and 24 kHz), for improved
quality for bitrate at or below 64 Kbits/s, per channel