MC-12 (MPEG Video Compression)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

MPEG video Compression

Dr. Sania Bhatti


Introduction to Video Compression
• A video consists of a time-ordered
sequence of frames, i.e., images.
• An obvious solution to video compression
would be predictive coding based on
previous frames.
Compression proceeds by subtracting
images: subtract in time order and code
the residual error.
• It can be done even better by searching for
just the right parts of the image to subtract
from the previous frame.
2
MPEG Compression
 The term also refers to the family of digital video
compression standards and file formats.
 MPEG generally produces better-quality video than
competing formats, such as Video for Windows,
Indeo and QuickTime.
 MPEG algorithms compress data to form small bits
that can be easily transmitted and then
decompressed. MPEG achieves its high compression
rate by storing only the changes from one frame to
another, instead of each entire frame.
 MPEG uses a type of lossy compression, since some
data is removed. However the diminishment of data
is generally imperceptible to the human eye.
Introduction- MPEG Compression
Video compression is composed of several basic processes. The
first four are essentially preprocessing steps. Though they are
not considered compression, they can have a dramatic effect on
data reduction.
 Filtering
 Images which lack sharp edges are easier to compress than
images which have sharp edges. Thus a preprocessing step in
MPEG is to filter the image to reduce the sharp edges (i.e. high
frequencies) by filtering.
 The number of pixels used in the average is called the number
of taps. MPEG recommends using a seven tap filter.
 Color space conversion
 The second preprocessing step is a conversion from the RGB
color scheme of a computer to the YUV color scheme that
television uses. The Y value is termed the luminance and the U
& V values are the chrominance.
 The advantage to this approach is that the Y value can be
digitized at full resolution while the U and V can be digitized at
lower resolutions without causing the eye to notice any
reduction in information or detail.
 Digitizing
 There are various sampling schemes used
for different compression methods and
video formats.
 In studio quality video, the U and V
components are sampled twice for every
four Y samples (4:2:2 YUV).
 Scaling
 The largest reduction in data occurs by
scaling (subsampling) the image when it is
not displayed in a full 640 X 480 pixel
window or when a reduction in spatial
resolution is tolerable
The processes that directly result in compression are
 Data transforms
 A two-dimensional DCT is performed on small blocks (8
pixels by 8 lines) of each component of the picture to
produce blocks of DCT coefficients. The magnitude of each
DCT coefficient indicates the contribution of a particular
combination of horizontal and vertical spatial frequencies to
the original picture block. Most natural images contain very
little ‘high frequency’ information, most of the picture
information is concentrated in the low frequency
coefficients of the transformed data.
 Quantization
 In MPEG and JPEG, the low frequency DCT coefficients are
quantized using approximately four bits meaning they have
16 different levels. The higher frequency coefficients are
quantized with fewer bits, usually, 2,1, or zero bits. This
means that many of the high frequency coefficients are
converted to zero which causes them to be eliminated.
 Compaction encoding
 The final step in intraframe compression is a lossless process
of data compaction similar to that used to compress data
files. Interframe compression uses one or more earlier or
later frames in a sequence to compress the current frame,
while intraframe compression uses only the current frame,
which is effective in image compression.
 Interframe compression using motion compensation and
predictive coding.
 At 30 fps, very little changes from one frame to the next.
Interframe compression takes advantage of this fact to
achieve dramatic compression. Instead of storing complete
information about each frame only the difference of
information between frames is stored. MPEG stores three
types of frames. When storing differences MPEG actually
compares a block of pixels (macroblock) and if a difference is
found it searches for the block in nearby regions.
MPEG Encoder
frame quantizer entropy
DCT
memory encoder

inverse
quantizer
predictive frame

motion vectors
IDCT

motion frame
compensation memory

motion
estimation
MPEG Decoder
entropy inverse
decoder quantizer

IDCT

previous
picture store

1/2
M ux

future
picture store

motion compensation
Types of Frames
 I frames (intra coded pictures) are coded
without using information about other
frames (intraframe coding). An I frame is
treated as still image. Here MPEG falls
back on the result of JPEG.
 These are the code without any
reference to other images. In video
sequence I-Frame are present at
regular intervals.
P-Frame (Prediction Frame)
 They require information from previous I
and/or P-Frame for encoding and decoding.
 P-Frame can be indicted only after
referenced I or P Frame has been decoded.
 The Number of P Frame in group of picture
is generally limited as error in one frame
may propagated in others. The number of
frame b/w a P Frame and preceding I or P
frame is called Prediction Span which may
range from 1to 3.
 Its compression ratio is high as compared
to I frame. Compression ratio 20:1 to 30:1
.
Types of Individual images in MPEG:
I,B and P Frames

B
B
P

B
B
P
Time Axis I
B Frames
 B frames (bi-directionally predictive coded
pictures) that fill in the jumped frames.
 It requires information from the previous
and following I and/or P Frame for
encoding and decoding.
 The highest compression ratio is attainable
by using these frames.
 B Frames are never used as a reference for
other frames. Reference frames must be
transmitted first.
Details
 If a P-picture is completely different from the
preceding I-picture (so that it's unpredictable),
it becomes an entirely new I-picture. Normally,
P-pictures are used to predict other P-pictures
several times before MPEG encodes another I-
picture.
 The MPEG standard allows as many as three B-
pictures in a row, the number of I-pictures is
typically two per second which means that P-
pictures are used to forward predict two-to-five
following P-pictures before another I picture is
coded.
MPEG-1
 Designed for up to 1.5 Mbit/sec
Standard for the compression of moving pictures and
audio. Allow easy editing
 MPEG-1 standard provide a video resolution of 352-
by-240 at 30 frames per second (fps).
 This was based on CD-ROM video applications, and is
a popular standard for video on the Internet,
transmitted as .mpg files. In addition, level 3 of
MPEG-1 is the most popular standard for digital
compression of audio--known as MP3.
 MPEG-1 is the standard of compression for Video CD,
the most popular video distribution format though out
much of Asia.
 This produces video quality slightly below the quality
of conventional VCR videos.
MPEG-2
 Offers resolutions of 720x480 and 1280x720
at 60 fps, with full CD-quality audio. This is
sufficient for all the major TV standards,
including NTSC, and even HDTV.
 MPEG-2 can compress a 2 hour video into a
few gigabytes. While decompressing an
MPEG-2 data stream requires only modest
computing power, encoding video in MPEG-2
format requires significantly more processing
power.
MPEG-2
 Designed for between 1.5 and 15 Mbit/sec.
 Standard on which Digital Television set top
boxes and DVD compression is based. It is
based on MPEG-1, but designed for the
compression and transmission of digital
broadcast television.
 The most significant enhancement from MPEG-
1 is its ability to efficiently compress interlaced
video.
MPEG-4 Coding of audio-visual objects
 A graphics and video compression algorithm
standard that is based on MPEG-1 and MPEG-2
and Apple QuickTime technology.
 Standard for multimedia and Web
compression.
 MPEG-4 is based on object-based
compression, similar in nature to the Virtual
Reality Modeling Language.
 Individual objects within a scene are tracked
separately and compressed together to create
an MPEG4 file.
 This results in very efficient compression that
is very scalable, from low bit rates to very
high.
MPEG-4 (Contd)
 It also allows developers to control objects
independently in a scene, and therefore
introduce interactivity.
 Place media objects anywhere in a given
coordinate system;
 Apply transforms to change the geometrical or
acoustical appearance of a media object;
 Group primitive media objects in order to form
compound media objects;
 Apply streamed data to media objects, in
order to modify their attributes (e.g. a sound,
a moving texture belonging to an object;
animation parameters driving a synthetic
face);
 Change, interactively, the user’s viewing and
listening points anywhere in the scene.
MPEG-7 Multimedia content description interface
 MPEG-7, the Multimedia Content Description
Interface Standard, is the standard for rich
descriptions of multimedia content, enabling
highly sophisticated management, search, and
filtering of that content.
 MPEG-7 is designed to be generic and not
targeted to a specific application.
 The main tools used to implement MPEG-7
descriptions are the Description Definition
Language (DDL), Description Schemes (DSs),
and Descriptors (Ds).
 MPEG-7 will address both retrieval from digital
archives (pull applications) as well as filtering of
streamed audiovisual broadcasts on the
Internet.
MPEG-21 Multimedia framework
 MPEG-21 will attempt to describe the elements
needed to build an infrastructure for the delivery
and consumption of multimedia content, and how
they will relate to each other.
 The Digital Items can be considered the “what” of
the Multimedia Framework (e.g., a video
collection, a music album) and the Users can be
considered the “who” of the Multimedia
Framework.
 MPEG-21 identifies and defines the mechanisms
and elements needed to support the multimedia
delivery chain.
MPEG-21
 Includes a Rights Expression Language
(REL) and a Rights Data Dictionary.
 Unlike other MPEG standards that describe
compression coding methods, MPEG-21
describes a standard that defines the
description of content and also processes
for accessing, searching, storing and
protecting the copyrights of content.

You might also like