Docsity

Predictive & Differential Coding in Data Compression: Linear Prediction & Differential PCM, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
Spring 2004 ECE-8873 B. H. Juang Copyright 2004 Lecture #8, Slide #1
ECE 8873
Data Compression and Modeling
Lecture 8:
Predictive & Differential Coding
School of Electrical and Computer Engineering
Georgia Institute of Technology
Spring, 2004
Spring 2004 ECE-8833 B. H. Juang Copyright 2004 Lecture #8, Slide #2
Difference Quantization
Quantizer
n
xn
∆n
x
ˆ
n
∆
ˆ
n
un
u
nnn ux −=∆ nnnnnn uxux +∆=−=∆ ˆ
ˆˆ
ˆ or
])
ˆ
[(])
ˆ
[( 22
nnnn EXXE ∆−∆=−
n
u
n
x
n
∆
Recall the structural and random components of information.
It is beneficial to treat them separately.
Spring 2004 ECE-8833 B. H. Juang Copyright 2004 Lecture #8, Slide #3
General Block Diagram
n
xEncoder
(& Decoder)
Predictor
n
x
~
n
∆n
x
ˆ
+
+
+-
n
∆
ˆ
)(),
ˆ
,
ˆ
(
~
21 nnnnnnnn Hfxxxfxxx −=−=−=∆ −− L
))((
ˆnn ∆=∆
αβ
nnn xx
~
ˆ
ˆ+∆=
But, the notion of prediction can also be applied to probability
measures – foresee change in distribution based on what is
or are already observed.
Spring 2004 ECE-8833 B. H. Juang Copyright 2004 Lecture #8, Slide #4
Type of Predictors
• Linear
• Non-linear
1
ˆ−
−=∆ nnn xx
121 ˆ
),
ˆ
,
ˆ
(
~
−−− == nnnn xxxfx L
∑
=
−−− =
p
i
ininn xaxxf
1
21 ˆ
),
ˆ
,
ˆ
(L
),
ˆ
,
ˆ
(21 L
−− nn xxf
The simplest linear case:
Intuition:
Assume 11
ˆ−− ≈nn xx )(zA
1−
−=∆ nnn xx
n
∆
n
x
1
1)( −
−= zzA
freq
|)(|
ω
j
eA
)(zA is high-pass.
Since most signals are low-pass type, the
differentiator tends to “flatten” the original
spectrum.
pf3
pf4
pf5

Partial preview of the text

Download Predictive & Differential Coding in Data Compression: Linear Prediction & Differential PCM and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Spring 2004

ECE-8873 B. H. Juang

Copyright 2004

Lecture #8, Slide #

ECE 8873

Data Compression and Modeling

Lecture 8:

Predictive & Differential Coding^ School of Electrical and Computer Engineering

Georgia Institute of Technology

Spring, 2004

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Difference Quantization Quantizer

n x

n ∆

xˆn

n ˆ∆

u^ n

n

u

n

n

n^

u

x

n

n

n

n

n

n^

u

x

u

x

or

]

[(

]

[(

2

2

n

n

n

n^

E

X

X

E

∆ − ∆ = − n

n u

x

n ∆

Recall the structural and random components of information.It is beneficial to treat them separately.

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

General Block Diagram

x^ n

Encoder(& Decoder)

Predictor

n ~x

n ∆

xˆn

n ˆ∆

2

1

n n n n n n n

n^

H f x x x f x x x

−

−^

L

ˆ^

n

n^

n

n

n^

x

x

ˆ^

But, the notion of prediction can also be applied to probabilitymeasures – foresee change in distribution based on what isor are already observed.

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Type of Predictors

-^

Linear

-^

Non-linear

1

ˆ^

−

n

n

n^

x

x

1

2

1

−

−

−^

n

n

n

n^

x

x

x

f

x

L

−

−

−^

p i

i n i

n

n^

x

a

x

x

f^

1

2

1

(^

L

(^

2

1

L

−

−^

n

n^

x

x

f

The simplest linear case:Intuition:

Assume

1

1

ˆ^

−

−

n

n^

x

x

z

A

(^1) −

n

n

n^

x

x

n

n

x

1

(^

−

z

z

A

freq

ωj e A

z

A

is high-pass.

Since most signals are low-pass type, thedifferentiator tends to “flatten” the originalspectrum.

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Spectral Flatness Measure

p

n X

=

π π

ω

ω

π

σ

d

X

X^

) (

(^12)

2

Consider a 0-mean process

with power spectral density

) (^ ω X

2 2

2

) (

(^12)

) (

log

(^12)

exp

X^ X

X

d

X

d

X

η σ

ω

ω

π

ω

ω

π

γ

π π π π

= 



=

1

0

measure;

flatness

spectral

the

called is

≤

<

2

2

X

X

γ

γ If^

is a white noise process, n X

1

) (^

2 2

2

2

=

=

=

X X

X

X

X

σ σ

γ

σ

ω

and

z

A

n

n X

−

p i

i n i

n^

x a

x^

1

p i

i n i n n n

n^

x

a

x

x

x

1

z

H

n Z

n X

 



=

=

=

∆

∞ →

π π

ω ω π η σ σ d X X Z A p ) (

log

(^12)

exp

min lim

2

2

2

psd.

input

the

whiten to is

Prediction

psd.

flattened

most" "

the

has n ∆

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Prediction Gain

-^

Prediction thus reduces the signal variance.

2 2 ∆

X

P

G

Prediction gain

2 2

10

log

∆

X

P

G

(dB)

or

2

2 2

max

X

X Z

P

G

0

5

10

12 8 4 0

Predictor order

(dB)^ PG

Low-pass speech

0

5

10

12

8 4 0

Predictor order

(dB)^ PG

Band-pass speech

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Differential PCM

n

n

n^

q − ∆ = ˆ∆

n n n n n n n

n^

x

x

x

x

x

x^

n

n

n^

x

x^

x^ n

Quantizer Predictor

n ~x

n ∆

n xˆ^

n ˆ∆

Predictor

n ~x

xˆ^ n

n ˆ∆

n

n

n^

x

x

ˆ^

The Predictor can be fixed or adaptive.In image coding, interframe prediction has beenattempted early on.

−

p i

i n i

n^

x

a

x

1

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Linear Prediction

 





^ 

−

=

−

=

−

2

1

2 ]) ~

[(

p i

i n i

n

n

n^

X a X E X X E Ε

measure e

performanc the as

error

squared

mean

Choose

  



−

−

−

− − −

=



p a a a a

r p r p r p r p r

r

r

r

p r

r

r

r

p r r r r p

r r r r

M

L

L

L

LLL

M

1 2 3

) 0 (

) 3

( ) 2

( ) 1

(

) 3

(

) 0 (

) 1 (

) 2 (

) 2

(

) 1 (

) 0 (

) 1 (

) 1

(

) 2 (

) 1 (

) 0 (

) (

) 3 (

) 2 (

) 1 (

error.

prediction

the is

−

p i

i n i n n n

n^

x a x x x e

1

0 ] ~ [ ) ~ (

]

[(

2

n i

n

n

n

n

i

i^

X a

X X E X X E a a

]

[(

−in

n

n^

X

X

X

E

The set of normalequations, Yule-Walkerequations, or Wiener-Hopf equations

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Adaptive Prediction – Forward (APF)

•^

Original signal is subject to buffering and analysis to producethe “optimal” predictor to reduce the variance of

•^

Buffering causes delay.

-^

Require transmission of the predictor specification (manypossible representations) as side information so that thereceiver can reproduce the signal.

x^ n

Quantizer Predictor

~x^ n

n ∆

n ˆ^ x

n ˆ∆

Predictor

n ~x

ˆx^ n

n ˆ∆

AdaptiveAnalysis

Side information

n ∆

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Near and Distant Sample Prediction

-^

Speech contains at times periodic structure due tovocal cord vibration – pitch.

-^

Repetition means the existence of structuralinformation that can be extracted first to enhance theefficiency of coding.

-^

Try to make clear the concept of fundamentalfrequency, pitch, pitch prediction, discrete timeimplementation, pitch resolution, fundamentalfrequency resolution.

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Pitch Prediction

−

− −

p

p i

i

n i

n^

x

a

x

τ

predictor

pitch

tap

p

−

p i

i n i

n^

x

a

x

1

estimate

pitch

τ

period

pitch

a

cover

enough to

large

is

where

p

  • Cannot afford to transmit large number of parameters• Use backward prediction (original form anyway): G.728 at

16 kbps

Or

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Speech Production Models

-^

Dudley’s

-^

Alternative

z

H

Pulse train (voiced)Noise (unvoiced)

n

v

Long-delayPredictor

Short-delay

Predictor

excitation

vocal tract (formants)

Innovationsequence

excitation (pitch)

vocal tract (formants)

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Coding with the Alternative Model

Long-delayPredictor

Short-delayPredictor

codebook

index

Decoder/synthesizer

gain Decoder/Synthesizer

Original speech Error calculation

Index iteration

& search

Encoder

PerceptualWeighting

Filter

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Perceptual Weighting & Post-Filtering

-^

Perceptual weighting – to make excitation codewordsearch perceptually meaningful

-^

Post-filtering – to make remnant coding noise lessperceptible

-^

Both are related to noise shaping to take advantageof the auditory masking effect.

(^60) Power (dB)-

0 Hz

16 kHz

Frequency

JND

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Issue of Noise Feedback

∑

∑

∑

=

−

=

−

=

−^

  • − = − = ∆

p i

i n i

p i

i n i

n

p i

i n i

n

n^

q a x a x x a

x^

1

1

1

ˆ

) ( / 1

) (^

z A

z B

⇔

n

n

n^

q − ∆ = ˆ∆

n n n n n n n n

n^

q x x x x x

x^

= ∆ − ∆ = − − − = − ˆ

) ~

ˆ ( ) ~

(

ˆ

n

n

n^

x

x

~ − = ∆ n n

n^

x

x^

ˆ^

∑=

−

p i

i n i

n^

x a

x^

1

Quantization noise isthe same asreconstruction error

x^ n

Quantizer Predictor P

~x^ n

∆^ n

xˆ^ n

ˆ∆^ n

~x^ n

xˆ^ n

+^ + ˆ∆n

Predictor P

x^ n

Q

P

n ∆

n q

+^

n ~^ ∆

xˆn

n ˆ∆

P

P

q^ n

xn

+^ A n ~^ ∆

n ˆx

n ˆ∆

A

B ) ( 1 ) ( )

(^

1

z P z A z a z P

p i

i i^

−

=

∑

=

−

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Noise Shaping in DPCM

(^2) | )

(

(^1) |

1

)

(

ω

ω

j

j

e P

e N

−

∝

P

Q

Without noise shaping:

encoder

speech

P

decoder

decodedspeech

With noise shaping:

ω ω

ω

j j

j

e P

e F

e N

P

Q

F

P

decoder

decodedspeech

encoder

Same as open-

loop DPCM

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Motion Compensated Prediction

t ∆ ) , , ( ) , ,

ˆ^ (

t t v y v x U t y x U

y

x^

∆ −

−

−

=

κ

]

[^

y x

t^

v v = v

Movingobject

Stationarybackground

currentposition

previousposition

displacement

vector

v

Prediction for luminance signalwithin the object:

time

t

Previous frame

Current frame

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

MCP - Example

from Bernd Girod

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

Motion-Compensated Prediction

intraframe

sourceencoder

intraframe

sourcedecoder

intraframe

sourcedecoder

motion compensated

predictor

Displacement

estimator

motion compensated

predictor

transmitter

receiver

Displacement vector

]

[^

y x

t^

v v = v

Spring 2004

ECE-8833 B. H. Juang

Copyright 2004

Lecture #8, Slide #

MPEG Video Coding