Professional Documents
Culture Documents
Vinay Kumar
Presentation Overview
Introduction Data Compression Image Compression Video Compression Audio Compression Summary Q&A
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
1. Data Compression
Huffman Coding
Symbol Frequency a 19 b 10 c 8 d 8 e 5
Huffman Coding II
50
0 0
13
1
31
Symbol a
1
18
=
1
b c d e
LZ77 - PKZIP
Replaces a repeated stream with a symbol Search is finite windowed look ahead window
text window
anbfcatkdfjs lcatjfl
Symbols cat code 01
dictionary
Need to store and transmit codebook inefficient LZW needs no codebook generated by Tx / Rx
2. Image Compression
Can break free from stream compression associated with data compression Intra-frame coding
Run-length Encoding
Data compression method Replaces repetitive stream data with tuple in format (symbol, count) aaaaazz encoded as (a,5) (z,2)
Vector Quantization
2D based
source block
codebook
= =
average intensity
Loads of enhancements
Quadtree Encoding
(a)
(b)
-1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1
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
Pyramidal Techniques
pyramid
i=3
pel[i]
i=0
original image
reconstructed image
Surface Approximation
2 1 0
1 0. 75 0. 5 0. 25 0 - 2 - 1 0 1 2 - 2 - 1
2 1 0
Directional Filtering
(c)
(d)
(a)
(t)
JPEG II in practice
DC Component AC Components
Source Image
DCT IDCT
Usually 0
Fractals
If so, its called a Range block Only store Range blocks plus affine transformations Expensive!
MPEG Process
luminance
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
DCT
No compression achieved
Output Buffer
VLC
RLE
Quantize
MPEG-1
Designed for video playback at 150KB/s - single speed CD-ROM Used in VCD technology
MPEG-2
MPEG-4
Very different from previous generations Aimed at low-bandwidth applications at upper end, good enough for digital TV Digital Camcorders
MPEG-4 II - Meshes
Textures mapped onto meshes Store vertices of mesh and movement parameters
4. Audio Compression
2. Masking Effect
Uses psychoacoustic model of the ear Dont store quiet and loud noises simultaneously
MP3 II
Ear unable to locate some frequencies bass Store signal in mono + minimum for spatialization Used if left and right speakers are similar Store middle (L+R) plus a side speaker (L or R) e.g.
R 5 5 5
Fewer bits
Summary
Technique Huffman RLE Compression Ratio 1.5-2:1 4-10:1 1952 1966 When?
LZW
Quadtree VQ Directional Filtering Fractals MPEG-1 Surface Methods MPEG-2
2-10:1
2:1 10:1 10-40:1 10-1000:1 10-100:1 10-50:1 10-200:1
1977&84
1980 1984 1985 1988 1993 1995 1995
time
MPEG-4
10-500:1
1999
Q&A
The End!
Contact Me!