mpeg compression standards
TRANSCRIPT
PROJECT REPORT
MPEG COMPRESSION STANDARDS
by
AJAY KHATRI
Submitted: December 25th, 2014
1
Table of Contents
Table of Figures ............................................................................................................................ 2
Glossary of Terms ......................................................................................................................... 3
1 Compression ............................................................................................................................. 4
1.1 Introduction ........................................................................................................................... 4
1.2 History of MPEG .................................................................................................................. 4
2 MPEG-4 .................................................................................................................................... 7
2.1 Introduction ........................................................................................................................... 7
2.2 Parts....................................................................................................................................... 7
2.3 Working steps ....................................................................................................................... 7
2.3.1 Reduction of resolution. .................................................................................................. 7
2.3.2 Motion compensation...................................................................................................... 8
2.3.3 DCT............................................................................................................................... 10
2.3.4 Quantization. ................................................................................................................. 11
2.3.5 Entropy encoding. ......................................................................................................... 11
2.4 Applications. ......................................................................................................................... 12
3 MPEG-7 .................................................................................................................................. 14
3.1 Introduction ......................................................................................................................... 14
3.2 Applications ........................................................................................................................ 14
4 MPEG-21. ............................................................................................................................... 15
4.1 Introduction. ....................................................................................................................... 15
4.2 Applications.. ..................................................................................................................... 16
5 Summary ................................................................................................................................. 17
References .................................................................................................................................. 18
2
Table of figures
Figure 1: Codec and MPEG standards .......................................................................................... 4
Figure 2: Sub sampling of colors .................................................................................................. 6
Figure 3: VOP vs. frame based coding ......................................................................................... 7
Figure 4: Forward and backward frames ...................................................................................... 8
Figure 5: Arbitrary shape of VOP ................................................................................................. 9
Figure 6: Zigzag tracing of AC & DC components .................................................................... 10
Figure 7 4x4 block for coding ..................................................................................................... 10
Figure 8: Relation between tool and elaboration process ........................................................... 12
Figure 9: MPEG-21 timeline ...................................................................................................... 12
Figure 10: Interaction of users. ................................................................................................... 13
3
Glossary of terms
MPEG: Motion Pictures Expert Group
ISO: International Standardization Organization.
ITU: International Telecommunication Union.
IEC: International Electro-Technical Commission.
JTC: Joint Technical Committee.
VOP: Video Object Plane
VO: Video Objects
DCT: Discrete Cosine Transform.
IDCT: Inverse Discrete Cosine Transform.
AV: Audio-Video.
XML: Extensible Markup Language.
AVC: Advanced Video Coding.
AAC: Advanced Audio Coding.
4
1 Compression
1.1 Introduction
Compression means to store and transfer a given piece of information(audio, video or an image)
using fewer number of bits. Raw data is fed to an encoder, compressed data flows through the
network or medium, and is decompressed at receiver end using a decoder. Few of the advantages
that data compression offers can be:
Reduced bandwidth usage.
Less storage space required.
Lower communication cost(Infrastructure).
Data compression is either lossy or lossless in nature. In lossless compression technique there is
a variation of information received from actual data being sent. But these variations are not
easily detected by human eyes and ears. Lossless compression method is used for files, text
documents, etc. where the accuracy of content is given utmost importance. Out of these, lossy
compression has got wider range of applications. The two famous groups responsible for setting
audio-video standards are JPEG and MPEG. JPEG basically accounts for still images, and
MPEG is responsible mainly for moving frames i.e. videos. One can find a lot of similarities in
the workflow of standards set by these groups.
1.2 History of MPEG
MPEG stands for Motion Picture Experts Group. It is basically a group of authorities that was
established by a combined effort of ISO(International Standardization Organization) and
IEC(International Electro-technical Commission). The main role is to set standards for
compression of audio, video and related data. The first joint meeting was held in the year 1988 in
Ottawa, Canada. This group helps the industry to make better use of digital media. The
designation is denoted by ISO/IEC JTC1/SC29 WG11- Coding of moving pictures and audio.
The main sub groups can be named as:
Requirements.
System.
Video.
Audio.
3D Graphics.
Test.
5
Communication.
This sub groups often collaborates with other groups such as Joint Video Team (JVT) and Joint
Collaborative Team on Video Coding(JCT-VC). There is a dedicated standardization process
involving multiple stages like Preliminary Work Item(PWI), Working Draft(WD), Committee
Draft(CD), Draft International Standard(DIS), Proof of a new International Standard(PRF),
International Standard(IS).
Wide range of MPEG standards have already been approved and used in the industry. Some of
the worth mentioning compression standards are:
1) MPEG-1: This standard was established in the year 1992. It defines production of reasonable
quality images and low bit rate sounds. It achieved great success due to low space requirement,
but the acceptance went down with evolution of further standards. MPEG-1 Audio layer III
forms MP3 which is based on a lossy compression technique.
Figure 1: Codec and mpeg standards[1]
2) MPEG-2: Designated to produce higher quality images at higher bit rates. It was established in
the year 1994. Also known as ITU-T H.261.
3) MPEG- 3: This standard should not be confused with audio MP3. The sole purpose of this
standard was HDTV, providing sampling rates between 20-40 Mbits/Sec. Later on it was merged
to MPEG-2 only.
4) MPEG-4: This is still the most widely accepted MPEG standard, introduced in the year 1998.
It defines the compression of audio-video data for web, Compact discs, voice and broadcast
applications.
5) MPEG-7: It is basically a description standard for multimedia. In other words it can be called
as Multimedia Content Description Interface. For example: Lyrics synchronization, etc.
6) MPEG-21: The core term of importance in MPEG-21 to talk about is Digital Item. Its main
objective is to define a standard to manage restrictions on digital content usage. License
6
information can be considered as a good example of MPEG 21. Some researchers consider it as
an extension of MPEG-2.
There is a thin line of difference between mpg and MPEG-1. The above picture shows the type
of data containers, codec and MPEG compression standards. There is still a lot of research going
on in the field of video compression techniques. Each MPEG standard consists of different parts
which are further subdivided into Profiles and Levels. Profiles are meant to describe available
tools and levels are related to defining values for properties associated with them.
7
2. MPEG- 4
2.1 Introduction
MPEG-4 is formally known as ISO/IEC 14496. The traditional features of older compression
techniques like MPEG-1 and MPEG-2 have been carried along with addition of some new
features like object oriented composite files, 3D rendering and various interactive features. For
multimedia producers, MPEG4 offers a better reusability feature and copyright protection. It
uses object based coding method. MPEG-4 offers the following features:
Greater efficiency as compared with MPEG-2.
Encoding of mixed data(audio, video, speech).
Interaction of audio-visual scene at receiver.
MPEG-4 has got a large number of parts and is still considered as an evolving standard. Some of
the corporate tech giants promoting the capability of this standard never specify which part of
MPEG-4 the product actually supports. Uses of MPEG 4 includes TV broadcasting, mobile
entertainment, internet video, conferencing, etc.
2.2 MPEG4 Parts
MPEG-4 consists of several different closely related standards which are known as "parts".
Total of 30 parts are there, out of which the fundamentals of MPEG4 are described by:
Part 1: ISO/IEC 14496-1: Systems
Part 2: ISO/IEC 14496-2: Visual
Part 3: ISO/IEC 14496-3: Audio
Part 10: ISO-IEC 14496-10: Advanced video coding. This is technically similar to H.264.
2.3 Working steps
MPEG-4 is an inclusive superset of mpeg-1 and mpeg-2 standards. This means the core
compression algorithm remains the same except the fact that it has got so many additional
features like re-scalability and user interactivity. These features are defined with the help of
further sub parts of MPEG-4. MPEG-4 also offers improvements over audio video codec's with
introduction of AVC, AAC. Starting with reduction of resolution, it ends with quantization
using run length or Huffman encoding. The 5 basic steps can be described in detail below:
1) Reduction of resolution: For a human eye, it is not easy to differentiate between almost same
colors. Eyes are comparatively more sensitive to dark-bright contrasts. This serves as the base for
conversion of available RGB color space to YUV color components. The U and V components
8
are responsible for chrominance whereas Y is responsible for luminance. Here, U and V
components are sub sampled to nearly half of the total pixels horizontal direction(4:2:2). Also it
can be done in both horizontal and vertical directions(4:2:0) as shown in the picture below:
Figure 2: Sub sampling of colors[2]
Mathematically we have,
|Y |=|U |=|V |
Thus we can see that sub sampling reduces the total data volume by 50% when both horizontal
and vertical technique techniques are utilized. Coming down to audio compression, a similar
technique is observed. But at this point, only video compression is of importance to us.
2) Motion Compensation: Sometimes this process is also referred to as Motion Estimation. The
main aim of this algorithm is to get a motion vector that describes the transformation between
objects. MPEG-1 and MPEG-2 use block based or frame based compensation. MPEG-4 uses an
entirely new concept called as video object plane. The technique is known as VOP coding. The
9
basic difference between frame based and object based encoding techniques can be explained
with the help of a diagram shown below:
Figure 3: VOP Vs frame based coding[3]
I VOPs: Intra frame coded VOPs.
P VOPs: Inter frame coded VOPs for forward direction.
B VOPs: Inter frame coded VOPs for bidirectional direction.
Figure 4: Forward and backward frames[4]
10
While doing motion compensation technique for VOPs, the arbitrary shape of VOPs while
carrying out further process should be considered. For this process, there is shape coding. This
involves assigning values '0' and '1. This forms a type of binary map. Also the opacity and
transparency of the object plane is determined using this bitmap values.
Figure 5: Arbitrary shape of VOP[5]
3) Discrete Cosine Transform: This transform technique converts still VOP object blocks into
their equivalent frequency domains. Each 8x8 or 16x16 VOP block is represented in its
frequency domain with the given formula:
Here f(x,y) represents the position of pixel at coordinate (x,y). In order to reconstrcut the pixel
values at decoder end, inverse discrete transofrm is used. The equivalent equation can be given
as:
Here F(u,v) represents the transform value matrix at [u,v]. The reults obtained after carrying out
IDCT are exactly the same as before DCT.
11
4) Quantization: During this process, the DCT terms are divided by a quantization matrix. The
main logic behind quantization is to exploit human visual perception. Thus, this accounts for the
major loss as well. Higher frequencies end up with a zero after quantization.
FQ= F(u, v) DIV Q(u, v)
Here Q is the quantization matrix. Selection of Q determines the final compression and quality as
well. This process creates a separation between AC and DC terms. AC terms are stored in a
zigzag path in increasing order of frequencies.
Figure 6: Zigzag tracing of AC and DC components[6]
5) Entropy Encoding:
The entropy coding converts a vector X made up of integers into binary set Y. Its main role is to
exploit redundancies in the dataset in order to reduce the size of outcome set Y. There are variety
of techniques used for MPEG-4 which can be listed as:
Context adaptive binary arithmetic coding.
Context adaptive variable length coding.
Out of above three techniques, CAVLC is mostly preferred as it offers good compression rates. It
is used to transform zigzag order blocks of transformation coefficients. CAVLC[7]
is preferred
over CABAC as it offers comparatively easier decoding and can be explained as:
For example: 0,3,0,1,-1,-1,0,1,0…
12
Figure 7: 4X4 block for coding[8]
Total coefficients= 5( High to low frequency) Number of zero= 3 Total number of one=3
Element Value Code
coeff_token TotalCoeffs=5, T1s=3 0000100
T1 sign (4) + 0
T1 sign (3) - 1
T1 sign (2) - 1
Level (1) +1 (use Level_VLC0) 1
Level (0) +3 (use Level_VLC1) 0010
TotalZeros 3 111
run_before(4) ZerosLeft=3; run_before=1 10
run_before(3) ZerosLeft=2; run_before=0 1
run_before(2) ZerosLeft=2; run_before=0 1
run_before(1) ZerosLeft=2; run_before=1 01
The bit stream finally obtained for this block is 000010001110010111101101. This is finally the
last process to understand when it comes to MPEG-4 standard.
2.4 Applications
MPEg4 is the most widely used standard till date. It has got a very large range of applications,
few of them are described in points below.
IP based television distribution: Due to the easy availability of DSL and broadband
connections, IP based television is the replacement for satellite or cable television. It is
entirely based on MPEG-4 part 10 AVC as it offers highest efficiency.
Portable gaming: Gaming accessories manufacturer like SONY use MPEG-4 for viewing
videos stored in the device memory or on external memory cards. The play station
13
portable also uses this MPEG-4 for playing videos. For audio purposes, it uses Advanced
audio coding(MPEG4 part 7).
Mobile entertainment: The introduction of 3G mobile standards for mobile phones in the
year 2001 revolutionized the video access feature in mobiles. Nowadays the video calling
features over 3G network is based on MPEG-4 standard. Also the music download
services rely on MPEG 4 AAC.
Internet streaming: This is one of the most important applications of MPEG-4. Apple's
QuickTime platform uses MPEG-4 simple profile. The recent quicktime 7 is based on
recently developed MPEG-4 AVC.
Video conferencing: MPEG4 part 10 advanced video coding forms the base of video
conferencing. It offers comparatively better video than H261 and H263.
Surveillance cameras: Video security firms these days have started to use MPEG-4 at D1
resolution with 30 frames per second. This reduces the storage cost. Also the
interoperability feature allows the usage of equipments from different manufacturers with
their system.
14
3 MPEG-7
3.1 Introduction
Formally known as ISO/IEC 15938. It is basically a description standard, contains no algorithm
like MPEG-1, MPEG-2 and MPEG-4. The purpose of this standard is to allow easy searching of
content by the user over the internet. It has nothing to do with encoding and decoding of data. It
uses XML to store data and can be attached with a timestamp in stream of data. The main idea
was to standardize:
a set of description schemes(DS) and descriptors(D).
a description language for above descriptors(DDL).
a scheme for including the description into mainstream data(system tools).
Figure 8: Relation between tools and elaboration process[9]
A basic feature of MPEG-7 is that the audio visual content must be different from the
description. On the other hand, there must be a relation between description and content. So it
means both must be multiplexed. .
3.2 Applications
MPEG-7 standard is still under testing phase. But it will prove to be useful for multimedia
directory services such as yellow pages, etc. Another use is in library such as musical dictionary.
15
4 MPEG 21
4.1 Introduction
Formally known as ISO/IEC 21000. The main motive behind introduction of this standard is
related to multimedia applications. It is based on 2 concepts:
Definition of a digital item.
User interaction with those digital items.
A digital item is a structured object having a well defined representation and metadata located
inside a MPEG-21 framework. This digital item has an identification factor as well. In practical
usage, digital item has resources, metadata and structure. Structure represents relation between
resource and metadata. Movie compilation can be considered as an example of digital item
which includes movie, photos, interviews with actors, ratings, etc. The current progress of
MPEG-21 is shown below:
Figure 7: MPEG-21 Timeline[10]
A user basically interacts with digital items. Here user can be a organization, community or
software agents. In simple words, a user interacts with other user through Digital item. The
figure below shows two different users interacting with each other. MPEG-21 considers a
resource provider and a user equal to each other. But it is interesting to note that the users can
16
protect their rights and responsibilities while interacting with other user. This is shown in the
diagram below:
Figure 8: Interaction of users[11]
4.2 Applications
MPEG-21 is still under development phase. Researchers are looking to implement this standard
for information systems management sources like digital libraries. The concept of digital rights
management is a very wide topic for delivering quality of services using MPEG-21. One other
area of application research for MPEG-21 is digital TV broadcasting.
17
5 SUMMARY
Due to the wide scope of multimedia applications, need for up gradation of technology standards
is always there. This project mainly focused on MPEG4 video compression standard, which is
the most widely used standard till date. It involved discussion of basic steps in encoding process
followed by various applications. After this, a brief introduction to the most recent developments
in the form of MPEG-7 and MPEG-21 was observed. The upcoming standards don't define a
new encoding-decoding process, instead new functionalities are being added to the basic
algorithm.
Concluding, MPEG-4 is still the most efficient and effective standard for compression of moving
objects such as video files.
18
REFERENCES
General:
Explanation of video compression sequences.
http://www.axis.com/files/whitepaper/wp_videocompression_33085_en_0809_lo.pdf
MPEG-4 video compression.
http://www.cs.cf.ac.uk/Dave/Multimedia_CM0340/PDF/12_CM340_MPEG4_VIDEO.pdf
MPEG-4: An object-based multimedia coding standard supporting mobile applications. Atul Puri
and Alexandros Eleftheriadis. 2004.
Fundamentals of multimedia, Chapter 12. Li & Drew Prentice Hall 2003.
http://www.cs.rutgers.edu/~elgammal/classes/cs334/slide12_short.pdf
Understanding MPEG4, MPEG industry forum. Whitepaper.
https://www1.ethz.ch/replay/docs/whitepaper_mpegif.pdf
MPEG Video compression technique.
https://vsr.informatik.tu-chemnitz.de/~jan/MPEG/HTML/mpeg_tech.html
Citations:
[1] Djordje Mitrovic, "Video Compression", University of Edinburgh. Slide 1.
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/AV0506/s0561282.pdf
[2] Djordje Mitrovic, "Video Compression", University of Edinburgh. Slide 3.
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/AV0506/s0561282.pdf
[3] Prifysgol Caerdydd, "Multimedia CMOS 540", Cardiff University. Slide 515.
http://www.cs.cf.ac.uk/Dave/Multimedia_CM0340/PDF/12_CM340_MPEG4_VIDEO.pdf
[4] Per Trane and Joakim Welin, "A new method for Motion Compensation in MPEG using
Hierarchical Mean Calculation", December 1995.
[5] Graham R Martin, "Block matching motion compensation", The university of warwick.
http://www.dcs.warwick.ac.uk/research/mcg/bmmc/
[6] Djordje Mitrovic, "Video Compression", University of Edinburgh. Slide 6.
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/AV0506/s0561282.pdf
[7]Context adaptive variable length coding. http://en.wikipedia.org/wiki/Context-
adaptive_variable-length_coding
19
[8] 4x4 block for CAVLC. http://en.wikipedia.org/wiki/Context-adaptive_variable-
length_coding#mediaviewer/File:4x4CAVLC.svg
[9] MPEG-7.
http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Mpeg7image2.svg/350px-
Mpeg7image2.svg.png
[10] Information Technology- MPEG 21 multimedia framework. http://mpeg-21.itec.uni-
klu.ac.at/cocoon/mpeg21/
[11] Information technology- MPEG 21 multimedia framework. http://mpeg-21.itec.uni-
klu.ac.at/cocoon/mpeg21/