Title: Quantization
1Quantization
- Trac D. Tran
- ECE Department
- The Johns Hopkins University
- Baltimore, MD 21218
2Outline
- Review
- Quantization
- Nonlinear mapping
- Forward and inverse quantization
- Quantization errors
- Clipping error
- Approximation error
- Error model
- Optimal scalar quantization
- Examples
3Reminder
original signal
reconstructed signal
Information theory VLC Huffman Arithmetic Run-leng
th
Quantization
4Quantization
- Entropy coding techniques
- Perform lossless coding
- No flexibility or trade-off in bit-rate versus
distortion - Quantization
- Lossy non-linear mapping operation a range of
amplitude is mapped to a unique level or codeword - Approximation of a signal source using a finite
collection of discrete amplitudes - Controls the rate-distortion trade-off
- Applications
- A/D conversion
- Compression
5Typical Quantizer
Forward Quantizer
x
y
Q
input
output
y
6Typical Inverse Quantizer
- Typical reconstruction
- Quantization error
y
111
110
101
100
011
010
001
x
000
clipping, overflow
decision boundaries
7Mid-rise versus Mid-tread
y
y
x
x
Uniform Midrise Quantizer
Uniform Midtread Quantizer
- Popular in ADC
- For a b-bit midrise
- Popular in compression
- For a b-bit midtread
8Quantization Errors
- Approximation error
- Lack of quantization resolution, too few
quantization levels, too large quantization
step-size - Causes staircase effect
- Solution increases the number of quantization
levels, and hence, increase the bit-rate - Clipping error
- Inadequate quantizer range limits, also known as
overflow - Solution
- Requires knowledge of the input signal
- Typical practical range for a zero-mean signal
9Quantization Error Model
10Quantization Error Variance
11Uniform Quantization Bounded Input
y
x
b-bit Quantizer
12Uniform Quantization Bounded Input
b-bit quantizer
13Signal-to-Noise Ratio
- Definition of SNR in decibel (dB)
power of the signal
power of the noise
Suppose that we now add 1 more bit to our Q
resolution
14Example
Design a 3-bit uniform quantizer for a signal
with range 0,128
- Maximum possible number of levels
- Maximum quantization error
15Example of Popular Quantization
y
x
Uniform midtread quantizer from Round and Floor
16Quantization from Rounding
x
6
10
14
14
6
10
2
2
Uniform Quantizer, step-size4
17Dead-zone Scalar Quantization
- The bin size around zero is doubled
- Other bins are still uniform
- Create more zeros
- Useful for image/video
2?
?
-?
-2?
0
x
18Non-Uniform Quantization
- Uniform quantizer is not optimal if source is not
uniformly distributed - For given M, to reduce MSE, we want narrow bin
when f(x) is high and wide bin when f(x) is low
f(x)
x
0
19Optimal Scalar Quantization
- Notes
- Non-uniform quantizer under consideration
- Reconstruction can be anywhere, not necessarily
the center of the interval
20Optimal Scalar Quantization
21Optimal Scalar Quantization
- Optimal Decoder for a Given Encoder
22Lloyd-Max Quantizer
-
- Main idea Lloyd 1957 Max 1960
- solving these 2 equation iteratively until D
converges - Assumptions
- Input PDF is known and stationary
- Entropy has not been taken into account
23Example
y
0
x
a
b
a
b
x
24Example
y
0
x
a
b
a
b
x
25Embedded Quantization
x
x
y
-1
Q
Q
x
- Also called bit-plane quantization, progressive
quantization - Most significant information is transmitted first
- JPEG2000 quantization strategy
26Embedded Quantization
R 1
R 2
R 3
27Embedded Forward Quantization
x
Embedded Quantizer, N2
28Embedded Inverse Quantization
Original symbol x 22
Range16, 32)
Range16, 24)
Range20, 24)
x 24
x 20 24 4
x 22 20 2
29Vector Quantization
- n-dimensional generalization of scalar quantizer
-
- Nearest neighbor and centroid rule still apply
codebook, containing code-vectors or codewords
n-dimensional input vectors
Separable Scalar Q