You are on page 1of 7

Quantization

Input-output characteristic of a scalar quantizer

u
Q v Sometimes, this
Output v convention is used:
vi+2
N represen-
tative levels
u
Q i
vi+1

vi -1

ui ui+1 ui+2 i
Q vi

input signal u

N-1 decision
thresholds

Bernd Girod: EE368b Image and Video Compression Quantization no. 1

Example of a quantized waveform

Bernd Girod: EE368b Image and Video Compression Quantization no. 2

1
Lloyd-Max quantization

n Problem : For a signal u with given pdf pu (u) find a


quantizer with N representative levels such that
variance of quantization error 
→ min

1
n Solution : Lloyd-Max quantizer ui = (v + vi −1 )
(Lloyd, 1957; Max, 1960) 2 i
l N-1 decision thresholds exactly u i +1

half-way between representative ∫ upU (u)du


levels.
vi =
ui
u i +1
l N representative levels in the
centroid of the pdf between two ∫ pU (u)du
ui
successive decision thresholds.

Bernd Girod: EE368b Image and Video Compression Quantization no. 3

Lloyd-Max quantizer vs. best uniform


quantizer
Gaussian pdf
error variance of best uniform quantizer
error variance of Max quantizer

1.0

0.8

0.6

2 22 36
number of representative levels

Bernd Girod: EE368b Image and Video Compression Quantization no. 4

2
Panter and Dite approximation

n Approximate solution of the "Max quantization problem" by


Panter & Dite (1949) assuming smooth pdf:
1
∆u(u) = const
3 pu (u)

Distance between two


Probability density
successive quantizer
function of u
representative levels

n Approximation for the quantization error variance:


3
1  3 
σ ≈ 2 ∫ pU (u)du
2
e
12N  u 
Number of representative levels

Bernd Girod: EE368b Image and Video Compression Quantization no. 5

Entropy-constrained quantization

n If entropy coding is used after n Example: maximum gain in SNR over


Max-quantization for entropy-
quantization:
constraint quantization of a signal with
Gamma pdf (from Granzow & Noll,
minimize distortion 1983).

for given entropy!


Gain by solving entropy -constrained
quantization problem [dB]

n For sufficiently fine


quantization, uniform quantizer
yields minimum entropy.

R [bits/sample]

Bernd Girod: EE368b Image and Video Compression Quantization no. 6

3
Vector quantization

representative
vector
cell

• pdf

Amplitude 2


• •
• •
• •

Amplitude 1

Bernd Girod: EE368b Image and Video Compression Quantization no. 7

LBG algorithm

n Linde, Buzo, Gray, 1980: Lloyd algorithm generalized for VQ

Best representative Best subdivision


vectors of training set
for given subdivision for given
of training set representative
vectors

n Assumption: fixed code word length


n Code book unstructured: full search

Bernd Girod: EE368b Image and Video Compression Quantization no. 8

4
Design of vector quantizers for
variable length code words
n Chou, Lookabaugh, Gray, 1989: extended LBG algorithm
for entropy-coded VQ
n Lagrangian cost function: solve unconstrained problem
rather than constrained problem

min{D + λR}

n Unstructured code book: full search for min{D + λR}

The most general coder structure:

Any source coder can be interpreted as VQ with VLC!

Bernd Girod: EE368b Image and Video Compression Quantization no. 9

Lattice vector quantization

• • • • • pdf
• • •
• • • • • •
• • •
• • • •
• • • •
Amplitude 2

• • •
• • • • • •
• • • • • •
• •
• • • • • • • • •

• • • • • •
cell • representative
vector
Amplitude 1

Bernd Girod: EE368b Image and Video Compression Quantization no. 10

5
8D VQ of a Gauss-Markov source

LBG fixed
18 CWL
ound
er B
on Low
nn
Sha

12
SNR [dB]

E8-lattice
LBG variable
CWL

scalar

0
r = 0.95
0 0.5 1.0
Rate [bit/sample]

Bernd Girod: EE368b Image and Video Compression Quantization no. 11

8D VQ of memoryless Laplacian source

9
E8-lattice
LBG variable
CWL

6 scalar
SNR [dB]

d
un
Bo
wer
n Lo
no
3 an
Sh
LBG fixed
CWL

0
0 0.5 1.0

Rate [bit/sample]

Bernd Girod: EE368b Image and Video Compression Quantization no. 12

6
Summary: quantization

n Lloyd-Max quantizer: minimum MSE distortion for given


number of representative levels
n For variable length coding, additional gains by entropy-
constrained quantization
n Minimum mean squared error for given entropy: uniform
quantizer (for fine quantization!)
n Vector quantization: quantize and encode several signal
samples jointly
n Design optimum unconstrained VQ with LGB algorithm
n Entropy-constrained VQ minimizes Lagrangian cost
function D + λR
n Lattice VQ: uniform quantizer in multiple dimensions

Bernd Girod: EE368b Image and Video Compression Quantization no. 13

You might also like