1
15-853
Page 1
15-853:Algorithms in the Real World
Data Compression 4
15-853
Page 2
Compression Outline
Introduction
: Lossy vs. Lossless, Benchmarks, …
Information Theory
: Entropy, etc.
Probability Coding
: Huffman + Arithmetic Coding
Applications of Probability Coding
: PPM + others
Lempel-Ziv Algorithms
: LZ77, gzip, compress, …
Other Lossless Algorithms:
Burrows-Wheeler
Lossy algorithms for images:
JPEG, MPEG, ...
–
Scalar and vector quantization
–
JPEG and MPEG
Compressing graphs and meshes:
BBK
15-853
Page 3
Scalar Quantization
Quantize regions of values into a single value:
input
output
uniform
input
output
non uniform
Can be used to reduce # of bits for a pixel
15-853
Page 4
Generate Output
Vector Quantization
Generate Vector
Find
closest
code
vector
Codebook
Index
Index Codebook
Out
In
Encode
Decode

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
2
15-853
Page 5
Vector Quantization
What do we use as vectors?
•
Color (Red, Green, Blue)
–
Can be used, for example to reduce 24bits/
pixel to 8bits/pixel
–
Used in some terminals to reduce data rate
from the CPU (colormaps)
•
K consecutive samples in audio
•
Block of K pixels in an image
How do we decide on a codebook
•
Typically done with
clustering
15-853
Page 6
Vector Quantization: Example
15-853
Page 7
Linear Transform Coding
Want to encode values over a region of time or space
–
Typically used for images or audio
Select a set of linear basis functions
that span
the space
–
sin, cos, spherical harmonics, wavelets, …
–
Defined at discrete points
±
i
15-853
Page 8
Linear Transform Coding
Coefficients:
±
i
=
i
th
resulting coefficient
x
j
=
j
th
input value
a
ij
=
ij
th
transform coefficient
=
²
i
(
j
)
In matrix notation:
Where A is an n x n matrix, and each row
defines a basis function