CH - 13 - 1 Transform Coding - Intro & Bit Allocation Optimization
CH - 13 - 1 Transform Coding - Intro & Bit Allocation Optimization
13 Transform Coding
My Coverage is Different from the Book
Overview
Transform the signal (e.g., via the DFT, etc.) into a new domain where compression can be done: (i) better and/or (ii) easier Often (but not always!) done on a block-by-block basis: Non-Overlapped Blocks (most common) Overlapped Blocks
Optional
Blocker
A x y y = Ax
A = Operator an NN Matrix
Because at the decoder we need to undo the effect of this operator we need matrix A to be invertible:
Binary Stream
2.
3.
Efficient Implementation
Transform Coding framework provides simple way to achieve #1 & #2 Extra cost of transform is usually not prohibitively large
1 d ( y, y ) = N
( yn yn )
n =0
N 1
d ( x, x ) = d ( y , y )
Simplifies understanding of impact of quantization choices in the transform domain Recall: The matrix A for an ON transform has:
Columns that are ON vectors: aT a = i j 1, i = j 0, i j
x = AT y
x = AT y
5
D = E (x x)
( x x )}
= E ( y y ) AA T ( y y )
T
=I
= E (y y)
( y y )}
N 1 2 = E ( yn yn ) n =0
= Dn
n =0
N 1
R
i =0 i
N 1
D (R )
i
N 1 N 1 i =0 N 1 i =0
D = Di ( Ri )
constrained by R =
RB
Models used here determine if we strive for Average R-D Solution Operational R-D Solution
(Based on some appropriate signal & quantizer models) Constrained Opt Lagrange Mult.
Solve the constrained optimization problem for the optimal allocation vector r = [R0 R1 RN-1] Interpret the result to understand general characteristics
Unconstrained Minimum
Ex. The grad vector has slope of b/a orthogonal to constraint line
x1 , x2 , f ( x1 , x2 ) + ( g ( x1 , x2 ) C ) = 0
10
min H ( B ) subject to R ( B ) Rc
BS
min {H ( B ) + R ( B )}
BS
min H ( B ) subj. to R ( B ) R ( B* ( ) )
BS
= R* ( )
So for each 0 we find the -dependent solution to a -dependent unconstrained problem this solution solves a particular version of the constrained problem, where the constraint is -dependent
11
H ( B * ( ) ) + R ( B * ( ) ) H ( B ) + R ( B ) B S
Re-arranging this gives:
H ( B * ( ) ) H ( B ) R ( B ) R ( B * ( ) )
Since this is true for BS it is true for BS* S such that R(B) R(B*())
S * = {B | R( B ) R( B* )}
Set of all allocations B that satisfy -dependent constraint R(B*()) Note: R(B) R(B*()) is negative for all BS*. Since is positive we have that H B* ( ) H ( B ) 0 H(B*()) is minimum over all B s.t. R(B) R(B*()) B*() solves the constrained problem with constraint R(B*())
<End of Proof>
12
H ( B * ( ) ) H ( B ) B S *
the unconstrained problem min{H(B)+R(B)} also has the same solution Soif we can find closed-forms for B*() & R*() as functions of then we can adjust = c so that R*(c) = Rc So we get that B*(c) solves the constrained problem w/ our desired constraint
Our Actual Constraint
13
D (R )
i =0 i i
N 1
constrained by R =
R
i =0
N 1
RB
J = Di ( Ri ) + Ri
i =0
N 1
J D j ( R j ) = + R j R j set = 0
D j ( R j ) R j
Aha!! Insight!!
All the quantizers must operate at an R-D point that has the same slope
Consider N = 2 case
D2
* D2
* 1
R1*
R1
* R2
R2
Intuitive Proof by Contradiction 1. Assume an optimal operating pt. (R1*, D1*) & (R2*, D2*) w/ non-equal slopes
Di S = Ri
* i
* with S1* S2
* Ri = Ri
2. 3. 4.
Now imagine small increase in R1 for quantizer #1: R1* R1* + , > 0 To keep the bit budget, must decrease rate R2 by same small amount:
* * R2 R2 , > 0 (same )
15
5.
Find new distortions due to these rate changes (Use Taylor series approximations valid because rate changes were small)
* D1* decreases to D1* + S1* = D1* + ( S2 ) * * * D2 increases to D2 S2
6.
Contradiction!!! We assumed we were optimal (but with non-equal slopes) Yet, we were able to reduce the distortion while meeting bit budget So that non-equal slope operating pt. wasnt optimal after all!!! So, equal slopes must occur at the optimal operating point!!!!
16
Note: Slope #1 gives a lower total rate than does Slope #2 Choose Slope that causes Total Rate = Budget Rate Recall: All slopes = Choose to make Total Rate = Budget Rate
Budget, Rc
Set so that the solution to the unconstrained solution also solves our constrained problem with our constraint
17