mpeg compression 3
TRANSCRIPT
-
7/31/2019 Mpeg Compression 3
1/34
Overview of MultimediaCompression Technologies
Vinay Kumar
-
7/31/2019 Mpeg Compression 3
2/34
Presentation Overview
Introduction
Data Compression Image Compression
Video Compression
Audio Compression Summary
Q&A
-
7/31/2019 Mpeg Compression 3
3/34
What is Compression and Why?
Compression ratio:
Number of bytes in the original imageNumber of bytes in the compressed image
e.g. input image = 10 MB
output image = 5 MB
compression ratio = 2:1
Whytransmission and storage
Compression
Algorithm
x bytes y bytes
y
-
7/31/2019 Mpeg Compression 3
4/34
Common Terminology
Lossless Compression perfect reconstruction
Lossy Compression data is lost Spatial Compression 2D or single image
Temporal Compression 3D or video
Codec Compression / Decompression Colour / intensity same thing
-
7/31/2019 Mpeg Compression 3
5/34
1. Data Compression
Oldest form of compression 1940s
Still important used to encode output frommodern codecs
Lossless
-
7/31/2019 Mpeg Compression 3
6/34
Huffman Coding
1. Show symbols as leaf nodes
Symbol a b c d e
Frequency 19 10 8 8 5
a b c
2. Combine nodes with lowest frequencies
d e8 5
13
d e
Decreasing frequency
-
7/31/2019 Mpeg Compression 3
7/34
Huffman Coding II
dea bc
13 18
31
50
0 1
0
0
1
11 0
Symbol HuffmanCode
a 0
b 111
c 110
d 101
e 100
=
Fewer bits per symbol compression achieved
-
7/31/2019 Mpeg Compression 3
8/34
LZ77 - PKZIP
Replaces a repeated stream with a symbol
Search is finitewindowed
Need to store and transmit codebook inefficient
LZW needs no codebook generated by Tx / Rx
anbfcatkdfjs lcatjfl
look ahead windowtext window
Symbols code
cat 01
dictionary
-
7/31/2019 Mpeg Compression 3
9/34
2. Image Compression
Can break free from stream compression
associated with data compression
Intra-frame coding
-
7/31/2019 Mpeg Compression 3
10/34
Run-length Encoding
Data compression method
Replaces repetitive stream data with tuple in format
(symbol, count) aaaaazz encoded as (a,5) (z,2)
Good at horizontal runs
Still 1D
-
7/31/2019 Mpeg Compression 3
11/34
Vector Quantization
2D based
Loads of enhancements
n[i]
n
- =
=
=
=
+
source block codebook
matched entry
average intensity
-
7/31/2019 Mpeg Compression 3
12/34
Quadtree Encoding
Look for blocks of similar colour - recursive
Leaf node
Pixel intensity 1
Pixel intensity 0
(a) (b)
-1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1
Good for few colours
-
7/31/2019 Mpeg Compression 3
13/34
GIF - PNG
Uses LZW compression patent problems
A little knowledge useful for web designers
PNG replaces GIF no patent problems
Uses older (but free) LZ77 algorithm
-
7/31/2019 Mpeg Compression 3
14/34
Pyramidal Techniques
Based on averaging pixels
Image reconstructed by summing beta pyramid
pel[i]
i=3
i=0
4
original image reconstructed image
pyramid pyramid
-
7/31/2019 Mpeg Compression 3
15/34
Surface Approximation
View single image as 3D
Uses parametric equations
Recursive for complex images
- 2
- 1
0
1- 2
- 1
0
1
2
0
0 . 2 5
0 . 5
0 . 7 5
1
- 2
- 1
0
1
- 2
- 1
0
1- 2
- 1
0
1
2
0
0 . 2 5
0 . 5
0 . 7 5
1
- 2
- 1
0
1
-
7/31/2019 Mpeg Compression 3
16/34
Directional Filtering
2nd generation technique HVS
Reconstruct image by adding all components
(a) (b)
(c) (d)
-
7/31/2019 Mpeg Compression 3
17/34
JPEG - the theory
Uses Discrete Cosine Transform (DCT)
More waves can be added for more accuracy
(a)
(t)
-
7/31/2019 Mpeg Compression 3
18/34
JPEG II in practice
DC Component AC Components
DC component represents average Usually 0
DCTSource
Image
IDCT
-
7/31/2019 Mpeg Compression 3
19/34
Fractals
Can a block be found similar to Domain block?
If so, its called a Range block
Only store Range blocks plus affine transformations
Expensive!
Range
Blocks
Original
Domain Blocks
-
7/31/2019 Mpeg Compression 3
20/34
3. Image Sequence Compression
Uses Inter-frame encoding
Also known an image sequence or temporalcoding
-
7/31/2019 Mpeg Compression 3
21/34
MPEG Process
Hows does it work?
1. Subsample
Reduces data by around 50%
R G B Y U V
luminance
-
7/31/2019 Mpeg Compression 3
22/34
MPEG Process II
2. Motion Detection on luminance block only
3 types of frame I Frames intra-coded
P Frames prediction from previous frame
B frames use bi-directional prediction
1
I
2
B
3
B
4
P
5
B
6
P
7
B
8
I
-
7/31/2019 Mpeg Compression 3
23/34
MPEG Process III - Schematic
Image
Sequences
RGB
ToYUV
Motion
Estimation DCT
QuantizeRLEVLCOutputBuffer
No compression
achieved
-
7/31/2019 Mpeg Compression 3
24/34
MPEG-1 & MPEG-2
MPEG-1
Designed for video playback at 150KB/s - singlespeed CD-ROM
Used in VCD technology
MPEG-2 Much higher bandwidth 3MB/s
DVD technology
-
7/31/2019 Mpeg Compression 3
25/34
MPEG-4
Very different from previous generations
Aimed at low-bandwidth applications at upper end,good enough for digital TV
Digital Camcorders
How does it work then
-
7/31/2019 Mpeg Compression 3
26/34
MPEG-4 II - Meshes
2-D animated meshes
Textures mapped onto meshes
Store vertices of mesh and movement parameters
-
7/31/2019 Mpeg Compression 3
27/34
MPEG-4 III - Sprites
MPEG-4 is object based state of the art
Panoramic images massive compression ratios
1000:1
-
7/31/2019 Mpeg Compression 3
28/34
4. Audio Compression
Techniques from image compression can be used
Huffman encodes output
DCT
MP3 huge!!!!
How does it work
-
7/31/2019 Mpeg Compression 3
29/34
MP3 MPEG-1 Layer 3
1. Minimal Audition Threshold
Dont store anything under 5Khz
2. Masking Effect
Uses psychoacoustic model of the ear
Dont store quiet and loud noises simultaneously
-
7/31/2019 Mpeg Compression 3
30/34
MP3 II
3. Joint Stereo (JS) coding
1. Intensity Stereo (IS) Ear unable to locate some frequencies bass
Store signal in mono + minimum for spatialization
2. Mid/Side (MS) Stereo
Used if left and right speakers are similar
Store middle (L+R) plus a side speaker (L or R) e.g.
L R10 5
7 5Store:Raw:
Fewer bits
Decompress: 10 5
-
7/31/2019 Mpeg Compression 3
31/34
MP3 III - schematic
-
7/31/2019 Mpeg Compression 3
32/34
Summary
Technique CompressionRatio
When?
Huffman 1.5-2:1 1952
RLE 4-10:1 1966
LZW 2-10:1 1977&84
Quadtree 2:1 1980
VQ 10:1 1984
Directional
Filtering
10-40:1 1985
Fractals 10-1000:1 1988
MPEG-1 10-100:1 1993
Surface Methods 10-50:1 1995
MPEG-2 10-200:1 1995
MPEG-4 10-500:1 1999
time
-
7/31/2019 Mpeg Compression 3
33/34
Q&A
Anyone still awake?
Did that make sense?
Questions
-
7/31/2019 Mpeg Compression 3
34/34
The End!
Contact Me!
Vinay Kumar -NIC, DIT, MOCIT, GOI