DPCM - Overview

28
Bernd Girod: EE398B: Image Communication II DPCM no. 1 DPCM - Overview Principle of Differential Pulse Code Modulation (DPCM) Characteristics of DPCM quantization errors Predictive coding gain Adaptive intra-interframe DPCM Conditional Replenishment

Transcript of DPCM - Overview

Page 1: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 1

DPCM - Overview

Principle of Differential Pulse Code Modulation (DPCM)Characteristics of DPCM quantization errorsPredictive coding gainAdaptive intra-interframe DPCMConditional Replenishment

Page 2: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 2

Principle of DPCM

quantizer entropy coder

predictor

+

+

-

+ e'

s'

einput channel

s

+

+predictor

entropy decoder

s' e'output

s

channel

s

decoder

coder

Prediction error Reconstruction Reconstruction error =quantization error

e = s − ˆ s ′ s = ′ e + ˆ s ′ s − s = ′ e − e = q

Page 3: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 3

Quantization error feedback in the DPCM coder

Assuming a linear predictor, the DPCM coder is equivalent to the following structure:

Transfer function of the prefilter:

Transfer function of quantization error feedback:

quantizers e+

- -

s (s) s (q)

q (e)

-

+

e e'~

predictor predictor

transfer function of the predictor

˜ E (Ω) = 1− P(Ω)[ ]S(Ω)

′ E (Ω) = ˜ E (Ω) + 1− P(Ω)[ ]Q(Ω)

Ω - abbreviation for frequency vector,e.g., ω x,ωy( )

Page 4: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 4

Power spectrum of the DPCM quantization error

Power spectral density of the quantization error q measured for intraframe DPCM with a 16 level quantizer

ωx

ωy

π

π

−π

−π

00

Page 5: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 5

Signal distortions due to intraframe DPCM coding

Granular noise: random noise in flat areas of the pictureEdge busyness: jittery appearance of edges (for video)Slope overload: blur of high-contrast edges, Moire patterns in periodic structures.

Page 6: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 6

Example of intraframe DPCM coding

original

granular noise Linear predictor:

Lloyd-Max quantizersFixed-length coding

1/2

0 1/4 1/4

2 bit/pixel 3 bit/pixelprediction error coding

1 bit/pixeledge busyness

slope overload

4 bit/pixel

Page 7: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 7

Recall from EE398A: High-rate performance of scalar quantizersHigh-rate distortion-rate function

Scaling factor ε

( ) 2 2 22 RXd R ε σ −≅

2

2

Shannon LowBd Lloyd-Max Entropy-coded

6Uniform 0.703 1 1e

9Laplacian 0.865 4.5 1.2322 6

3Gaussian 1 2.721 1.4232 6

e e

e

π

ππ π

≅ = ≅

≅ ≅

Page 8: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 8

Predictive coding gain

Distortion-rate function with DPCM

Prediction gain

Smallest achievable prediction error variance for N-dimensional signal determined by spectral flatness

( ) 2 2 22 RDPCM e ed R ε σ −≅

Variance of prediction error

2 2

2 2s s

DPCMe e

G ε σε σ

=

( )( )( )2 1exp ln

2e xxN dσ

π Ω

= Φ Ω Ω

Page 9: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 9

Predictive coding gain (cont.)

Consider 1-D Gaussian Markov-1 process with correlation coefficient ρAutocorrelation function

Prediction gain2

11DPCMG

ρ=

[ ] 2 kn n k sE S S σ ρ− =

Page 10: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 10

R-D curves for Gauss-Markov-1 source

D

2

1010log

[dB] SNRσ

=

0 1 2 3 4 5 6 70

5

10

15

20

25

30

35

Panter & Dite App Entropy-Constrained Opt.

R(D*), ρ=0.9 DPCM & ECSQ

• Linear predictor order N=1, a=0.9

• Entropy-Constrained Scalar Quantizer with Huffman VLC

• Iterative design algorithm applied

R [bits]

Page 11: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 11

Prediction example: test pattern

0

0 0.95 0

original

0.95

0 0 0

0.5

0 0.5 0

Page 12: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 12

Prediction example: Cameraman

original

0.95

0 0 0

0

0 0.95 0

0.5

0 0.5 0

Page 13: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 13

Histograms: Cameraman

1000

1500

2000

2500

3000

Image signal Prediction error

0

0.5

1

1.5

2x 104

0.5

0 0.5 0

500

00 50 100 150 200 250 -50 0 50

Page 14: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 14

DPCM with entropy-constrained quantization

K=511, H=4.79 bpp K=15, H=1.98 bpp K=3, H=0.88 bppK...number of reconstruction levels, H...entropy

[J. R. Ohm]

Page 15: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 15

Transmission errors in a DPCM system

• For a linear DPCM decoder, the transmission error response is superimposed to the reconstructed signal S'

• For a stable DPCM decoder, the transmission error response decays

• For variable length coding, loss of synchronization can lead to errors in many prediction error samples after a single bit-error

Page 16: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 16

Transmission errors in a DPCM system (cont.)

Example: Lena, 3 bpp (fixed code word length)Error rate: p=10-3

0.5

0 0.5 0

0.95

0 0 0

0

0 0.95 0

[J. R. Ohm]

Page 17: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 17

Interframe coding of video signals

Interframe coding exploits similarity of temporally successive picturesImportant interframe coding methods:

Adaptive intra-interframe codingConditional replenishmentMotion-compensated prediction

Page 18: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 18

“It has been customary in the past to transmit successive complete images of the transmitted picture.” [...]“In accordance with this invention, this difficulty is avoided by transmitting only the difference between successive images of the object.”

Page 19: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 19

Principle of adaptive intra-interframe DPCM

Predictor is switched between two states:A: Intraframe prediction for

moving or changed areas.B: Interframe prediction (previous frame

prediction) for still areas of the picture.

S22 S23 S24

S21 S20 S25

FRAME N - 1

S2 S3 S4

S1 S0

FRAME N

40 ms

ˆ S inter = S20

frameinterval τ

S22 S23 S24

S21 S20 S25

FRAME N - 1

S2 S3 S4

S1 S0

FRAME N

ˆ S intra = a1S1 + a2S2 + a3S3 + a4 S4

Page 20: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 20

Intra-interframe DPCM: feedback adaptation

Quantizer

Interframe predictor

es +

-s

sinter

e'

Predictor adaptation

Intraframe predictor

sintra

Interframe predictor

Entropy decoder

s

sinter

Entropycoder

Intraframe predictor

sintraPredictor

adaptation

s'e'

s'

Coder Decoder

Page 21: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 21

Intra-interframe DPCM: feedforward adaptation

Interframe predictor

Intraframe predictor

Entropy decoderEntropy coderQuantizer

Interframe predictor

Intraframe predictor

Predictor adaptation

es +

-s

sinter

sintra

e'

s

sinter

sintra

s'e'

s'

intra-/interframeswitching information

Coder Decoder

Page 22: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 22

Conditional replenishment

SIGNAL INPUT

SEGMENTER (MOVEMENT DETECTOR)

CODING, ADDRESSING, BUFFERING

BUFFERING, DECODING, ADDRESSING

FRAME DELAY

TRANSMISSION CHANNEL

SIGNAL OUTPUT

Changedetector

Frame store Frame store

DECODERCODER

Still areas: repeat from frame storeMoving areas: encode and transmit address and waveform

Page 23: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 23

Change detection

Example of a pixel-wise change detector

Example of a block-wise change detector

ABSAverage of 3x3 window

Eliminate isolated points or pairs of points

+

-

Current frame

Previous frame

Decision changed/ unchanged

Threshold

ABSAccumulate over NxN blocks

+

-

Current frame

Previous frame

Decision changed/ unchanged

Threshold

Page 24: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 24

Rate-distortion optimized mode selection

How to choose the decision threshold, if distortion D shall be minimized for a given rate R?Assumptions

Blockwise mode selection, block index iAdditive overall distortion and rate

Lagrangian cost function

Strategy: minimize Ji for each block i separately, using a common Lagrange multiplier λ

ii

D D= ∑ ii

R R= ∑

i i ii i

J D R D R Jλ λ= + = + =∑ ∑

Page 25: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 25

Rate-distortion optimized mode selection (cont.)

DD1(R1)

D2(R2)

Consider 2 blocks with D(R) = D1(R1) +D2(R2)

R

Page 26: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 26

The “Dirty Window” effect

Conditional replenishment scheme with change detection threshold set too high leads to the subjective impression of looking through a dirty window.

BackgroundMoving area picked up by change detector

Moving areasmissed bychange detector

Page 27: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 27

Crawford noise reduction filter

+-

++

δ f(δ)NL

frame store clean video

signal

noisy video signal

δ

f(δ)

Non-linearity

Page 28: DPCM - Overview

Bernd Girod: EE398B: Image Communication II DPCM no. 28

DPCM - Summary

DPCM: Prediction from previously coded/transmitted samples (known at transmitter and receiver)Typical signal distortions for intraframe DPCM: granular noise, edge busyness, slope overloadPrediction gain depends on spectral flatnessAdaptive Intra-Interframe-DPCM: forward adaptation vs. backward adaptationConditional replenishment: only transmit frame-to-frame changesTemporal noise reduction by nonlinear, recursive frame differencing