Академический Документы
Профессиональный Документы
Культура Документы
Mathematically:
Transform is data-dependent
j 1 j j
2
j
2
j 1 j
j
3
j
2
j 1
Mozilla
8
The Discrete Cosine Transform
Y = GXG
T
Basis functions:
16 mults/pixel
Mozilla
10
Fast DCT
i =0
N1
c
y
i
2
h
i
2
)
1
N
Variance of the input
Variance of the i th
transform coefficient
Magnitude of corresponding
inverse basis function
Mozilla
13
Coding Gain (cotd.)
i =0
N1
(GR
xx
G
T
)
ii
(H
T
H)
ii
)
1
N
4-point 8-point 16-point
KLT 7.5825 dB 8.8462 dB 9.4781 dB
DCT 7.5701 dB 8.8259 dB 9.4555 dB
Mozilla
14
Quantization
Example matrix:
HEVC plans to
add in-loop filters
for this, too
Mozilla
20
Low-pass Artifacts
Better retention of HF
(from Thusnelda
encoder)
Mozilla
22
Transform Size
Computation is N log N
Better compression
TF constant
Mozilla
24
Leakage
Better compression
Charles Bloom:
http://cbloomrants.blogspot.com/2009/07/07-06-09-small-image-compression-notes.html
Potential benefits
Cost
VP8: TM mode: P = T + L TL
HEVC proposals:
Multi-stage:
T.D. Tran: Lapped Transform via Time-Domain Pre- and Post-Filtering. IEEE
Transactions on Signal Processing 51(6):15571571, Jun. 2003.
W. Dai and T.D. Tran: Regularity-Constrained Pre- and Post-Filtering for Block
DCT-based Systems. IEEE Transactions on Signal Processing 51(10):2568
2581, Oct. 2003.
J. Hu and J.D. Gibson: New Rate Distortion Bounds for Natural Videos Based
on a Texture Dependent Correlation Model. In Proc. 46
th
Allerton Conference on
Communication, Control, and Computing, pp. 9961003, Sep. 2008.
i =1
n
p( x
i
)log
2
( p( x
i
))
Mozilla
55
Two Questions
Also known as
Variable-Length Codes
Prefix-free Codes
Basic idea
Called cross-entropy
i=1
n
p( x
i
) length( x
i
)
Mozilla
59
Huffman Code Problems
Theora
Variations
Partition functions...
Mozilla
86
Partition Functions
k=0
i1
f
k
total =c
N
f
i
=frequency of i th symbol
R -Rc
i
/ total
f
0
f
1
f
2
f
3
total = 12
R = 32
0 21 26 29 32
Mozilla
87
Partition Functions (cotd.)
No multiplies or divides
All added to the MPS, can waste 0.32 bits for LPS
R -
0, c
i
=0
rangeTabLPS| indexOf (c
i
)| R/ 64 mod 4 , 0c
i
total
R c
i
=total
Mozilla
90
Arithmetic Coding References
I.H. Witten, R.M. Neal, and J.G. Cleary: Arithmetic Coding for Data
Compression. Communications of the ACM, 30(6): 520540, Jun. 1987.
http://people.xiph.org/~tterribe/notes/range.html
Mozilla
91
Questions?
Mozilla
Introduction to Video Coding
Part 3: Probability Modeling
Mozilla
93
Review: Huffman Coding
Let c = 2skip
above
+ skip
left
be the context index
Rescaling
= p
-1
, = (3/80)
1/63
0.949217
Transitions:
p
new
=
Quantize (o p
old
) , Coded MPS
Quantize (1o(1p
old
)) , Coded LPS
Mozilla
101
CABAC Transitions
Mozilla
102
QM Coder (JPEG) Transitions
Baum-Welch (1970)
Baldi-Chauvin (1994)
Mozilla
104
Binarization
4 contexts reduced to 3
7 contexts reduced to 3
0 1
0 1 0 1
0 1 0 1 0 1 0 1
0 1
0 1
0 1
Mozilla
111
Parallelism
BUT
Drawbacks:
Small speed-up
Mozilla
115
Parallelism: Non-Binary Coder
3 DOF instead of 7
0 1
0 1
0 1
Mozilla
120
Beyond Binary Models
Context model
coded_block_flag
significant_coeff_flag, last_significant_coeff_flag
just use position in the list for most categories
coeff_abs_level_minus1
First bit
Major examples
However...
Mozilla
135
Non-Embedded SPIHT
Single-pass, no lists
Mozilla
136
Non-Embedded SPIHT:
Reducing Symbols/Block
R.E. Krichevsky and V.K. Trofimov: The Performance of Universal Encoding. IEEE
Transactions on Information Theory, IT-27(2):199207, Mar. 1981.
A. Said and W. A. Pearlman: A New, Fast, and Efficient Image Codec Based on Set
Partitioning in Hierarchical Trees. IEEE Transactions on Circuits and Systems for
Video Technology, 6(3):243250, Jun. 1996.
Y. Cho, W.A. Pearlman, and A. Said: Low Complexity Resolution Progressive Image
Coding Algorithm: PROGRES (Progressive Resolution Decompression). In Proc.
12
th
International Conference on Image Processing (ICIP05), vol. 3, pp. 4952, Sep.
2005.
J. Guo, S. Mitra, B. Nutter, and T. Karp: A Fast and Low Complexity Image Codec
Based on Backwards Coding of Wavelet Trees. In Proc. 16
th
Data Compression
Conference (DCC06), pp. 292301, Mar. 2006
Mozilla
138
Questions?
Mozilla
Introduction to Video Coding
Part 4: Motion Compensation
Mozilla
140
Main Idea
x=0
N1
y=0
M1
I
k
( x , y)I
k1
( x+MV
x
, y+MV
y
)
Mozilla
142
Aperture Problem
Its fast
Aliasing:
Image from http://en.wikipedia.org/wiki/Aliasing
Mozilla
147
Subpel Interpolation (cotd.)
Alternative: backwards-adaptive
Usually ignored
Median of 3
(MPEG codecs)
Median of 4 (VC1) Median of 3 (Dirac)
Mozilla
152
Variable Block Size
88 (called 4MV)
Types of frames:
No motion compensation
B-Frames (Bi-Predicted)
HEVC proposal
Also a form of
multihypothesis
prediction
From H. Watanabe and
S. Singhal: Windowed
Motion Compensation. In
Proc. SPIE Visual
Communications and
Image Processing 91,
vol. 1605, pp. 582589,
Nov. 1991.
Mozilla
162
OBMC (cotd.)
Used by Dirac
Issues
Low-pass behavior
Prorposed simplification
Alternate approach
VVVV
BVVV
BVBV
VVBB
BBBB
I (w
0
m
0
+w
1
m
1
+w
2
m
2
+w
3
m
3
)
I ((w
0
+w
1
)m
0
+w
2
m
2
+w
3
m
3
)s
0
+
I((w
0
+w
1
) m
1
+w
2
m
2
+w
3
m
3
)s
1
+
I(w
0
m
0
+w
1
m
1
+w
2
m
2
+w
3
m
3
)( s
2
+s
3
)
I ((w
0
+w
1
)m
0
+(w
2
+w
3
)m
3
)(s
0
+s
3
)+
I((w
0
+w
1
) m
1
+(w
2
+w
3
)m
2
)( s
1
+s
2
)
I ((1w
1
)m
0
+w
1
m
1
)s
0
+I (w
1
m
1
+(1w
1
)m
2
)s
2
+
I(w
0
m
0
+w
1
m
1
+w
2
m
2
+w
3
m
3
)s
1
+I (m
3
)s
3
I ((1w
1
)m
0
+w
1
m
1
)s
0
+I (m
2
)s
2
+
I(w
0
m
0
+(1w
0
)m
1
)s
1
+I (m
3
)s
3
I (m
0
)s
0
+I (m
1
)s
1
+I (m
2
)s
2
+I (m
3
)s
3
w
i
s
j
Mozilla
167
Variable Block Size
F. Dufaux and F. Moscheni: Motion Estimation Techniques for Digital TV: A Review and a New
Contribution. Proceedings of the IEEE, 83(6):858876, Jun. 1995.
A.M. Tourapis: Enhanced Predictive Zonal Search for Single and Multiple Frame Motion Estimation. Proc.
SPIE Visual Communications and Image Processing, vol. 4671, pp. 10691079, Jan. 2002.
A.M. Tourapis, O.C. Au, M.L. Liou: Highly Efficient Predictive Zonal Algorithms for Fast Block-Matching
Motion Estimation. IEEE Transactions on Circuits and Systems for Video Technology, 12(10):934947, Oct.
2002.
M.C. Chen and A.N. Willson, Jr.: Motion-Vector Optimization of Control Grid Interpolation and Overlapped
Block Motion Compensation Using Iterated Dynamic Programming. IEEE Transactions on Image
Processing, 9(7):11451157, Jul. 2000.
K.-C. Hui and W.-C. Siu: Extended Analysis of Motion-Compensation Frame Difference for Block-Based
Motion Prediction Error. IEEE Transactions on Image Processing, 16(5):12321245, May 2007.
P.J. Burt and E.H. Adelson: A Multiresolution Spline with Application to Image Mosaics. ACM Transactions
on Graphics, 2(4):217236, Oct. 1983.
L. Balmelli: Rate-Distortion Optimal Mesh Simplification for Communications. Ph.D. Thesis, cole
Polytechnique Fdrale de Lausanne, 2000.
Mozilla
171
Questions?