Professional Documents
Culture Documents
Goals:
to understand how image/audio/video signals are
compressed to save storage and increase
transmission efficiency
to understand in detail common formats like GIF,
JPEG and MPEG
C o m p r e s s io n M e t h o d s
M o d e l- B a s e d
L in e a r P r e d ic t iv e
A u t o R e g r e s s iv e
W a v e fo r m - B a s e d
P o ly n o m ia l F it t in g
S t a t is t ic a l
H u ffm a n
L o s s le s s
Lossy
U n iv e r s a l
A r it h m e t ic
S p a t ia l/ T im e - D o m a in
L e m p e l- Z iv
F r e q u e n c y - D o m a in
F ilt e r - B a s e d
S ubband
W a v e le t
T ra n s fo rm -B a s e d
F o u r ie r
D CT
Compression Issues
Lossless compression
Coding Efficiency
Compression ratio
Coder Complexity
Memory needs
Power needs
Operations per second
Coding Delay
Compression Issues
Additional Issues for Lossy Compression
Signal quality
Bit error probability
Signal/Noise ratio
Mean opinion score
Fundamental Ideas
Run-length encoding
Average Information Entropy
For source S generating symbols S1through SN
Self entropy: I(si) =
1
log log pi
pi
Differential Encoding
To improve the probability distribution of symbols
Huffman Encoding
Let an alphabet have N symbols S1 SN
Let pi be the probability of occurrence of Si
Order the symbols by their probabilities
p 1 p2 p3 pN
Probability
Codeword
0.05
10101
0.2
01
0.1
100
0.05
10100
0.3
11
0.2
00
0.1
1011
Symbols picked up as
K+W
{K,W}+?
{K,W,?}+U
{R,L}
{K,W,?,U}+E
{{K,W,?,U,E},{R,L}}
Codewords are
Huffman Decoding
Look-up table-based decoding
Create a look-up table
Let L be the longest codeword
Let ci be the codeword corresponding to symbol si
If ci has li bits, make an L-bit address such that the first li bits
are ci and the rest can be any combination of 0s and 1s.
Decoding
Read L bits in a buffer
Get symbol sk, that has a length of lk
Discard lk bits and fill up the L-bit buffer
i t
Golomb-Rice Compression
Take a source having symbols occurring with a geometric
probability distribution
P(n)=(1-p0) pn0
n0, 0<p0<1
Here is P(n) the probability of run-length of n for any symbol
Optimal if
log(1 p 0)
m=
log( p 0)
Golomb-Rice Compression
Now if m=2k
Get q by k-bit right shift and r by last r bits of n
Example:
If m=4 and n=22 the code is 00000110
(a-c)/2
The scan header records the choice of y
Residual r is computed modulo 216
The number of bits needed for r is called its
category, the binary value of r is its
magnitude
The category is Huffman encoded