Binary Arithmetic Coding System with Adaptive Probability

Download Report

Transcript Binary Arithmetic Coding System with Adaptive Probability

Binary Arithmetic Coding System
with Adaptive Probability
Estimation by “Virtual Sliding
Window”
Eugeniy Belyaev
Marat Gilmutdinov
Andrey Turlikov
Arithmetic Coding with
Context Modeling
Encoder
x
t
Decoder
Context x
Modeler
Context
x
Modeler
t 1
t 1
D
Probability
Probability
estimation
estimation
x
Arithmetic
Encoder
t 1
Bitstream
Arithmetic
Decoder
x
t
Sliding Window (Main
Properties)



W last processed symbols are used for probability
estimation
Buffer with W cells is used for keeping W last
processed symbols. W is window length
Frequencies of symbols are calculated basing on
buffer content
Work of Encoder with Sliding
Window Adaptation (Binary Case)
Step 1: Probability estimation for xt encoding
W
x
t
x xx x
t-1
t-2
t
t-3
…
x
x 0,1 i  t,..., t  W
i
x
t-W+1
S
t

t-W
t W
x
i t 1
Estimation by Krichevsky-Trofimov formula:
1
S
t
2
Pr xt 1  pˆ t 
W 1
 
Prxt 01 pˆ
t
i
Work of Encoder with Sliding
Window Adaptation (Binary Case)
Step 2: Current symbol xt encoding by
arithmetic encoder
Step 3: Modification of sliding window content
x
t
xx x
t-2
t
Sˆ
t 1
t-3
…
x
t-W+2
 Sˆ t  xt W  xt
Finite State Machine with 2W states
x
t-W+1
x
t-W
Main Disadvantage of Sliding
Window Method

Using large size additional memory
required for buffer of sliding window



Necessity to store individual buffers with W
cells for each context model
Frequent context model changing is critical
for memory cache
Critical for DSP application
Chronology of Sliding Window
Analysis
1986 – F.T.Leighton, R.L.Rivest
Proposal of Probabilistic n-state finite-state estimation procedure
1996 – A.Zandi, G.G.Langdon
Randomization procedure;
Binary case
1996 – B.Y.Ryabko
Randomization procedure;
Imaginary Sliding Window (ISW)
Non-binary case
2004 – E.Meron, M.Feder
Avoiding randomization procedure in
Imaginary Sliding Window (ISW)
Imaginary Sliding Window
(Main Properties)



Using Randomized Finite State Machine
with (W+1) states
Method does not require to store buffer
for previously processed data
Random variable is used to estimate
value of symbol xt-w removed from the
sliding window
ISW (Main Algorithm)


Step 1 and Step 2 are similar to classical
sliding window algorithm (exception: ISW uses
evaluation of St for probability estimation)
Step 3: Modification of St evaluation.
x
Pr
t W

y
y  1 Sˆ W
t
t
Sˆ
t 1
t
yt – random binary value
Pr
y  0 1  Sˆ W
 Sˆ t 
t
t
y x
t
t
Randomized Finite State Machine with W+1 states
Features of ISW

Advantage


Avoiding buffer usage
Disadvantage

Using generator of random values,
synchronized on the encoder and decoder
sizes
Avoiding Random Variable
Usage
E.Meron, M.Feder (2004)
E
y   WS
t
t
– average number of ones in the single cell (removed from
sliding window)
~
~ ~ S 
S S W x
1 ~


1


 S t  xt
t
 W
t
t 1
t
~ 
S
t
Disadvantage – float point operation with St
Integer Implementation of
Virtual Sliding Window (VSW)

 cW  ˆ  W 
St
2 , if x  1
ˆ 
t
S
t
W






ˆ

S t 1
 ˆ W 

St
2 , if x  0


ˆ
t
 St
W





c – parameter of algorithm
W 2 ;
n
Prxt 1 pˆ  S
cW
Prxt 01 pˆ
t
t
t
c W; n
Advantages of VSW

Virtual Sliding window method avoids



buffer storage in memory;
generation of random values;
float-point operations with St calculation
Using VSW in H.264 Standard
CABAC – Context-based Adaptive Binary Arithmetic Coding
Non-binary
Binarization
data
Context
Modeling
Arithmetic
Coding
bitstream
Binarization of value Q (simplified scheme):
Q
0
1
2
3
…
Binary Sequence
0
1 0
1 1 0
1 1 1 0
…
Ctx. Num 0 1 2 3 …
Q  111
...
1 | 0
Q
Bitrate Savings for some Testing
Video Sequences (in percent)
Regular Initialization of P-frames
QP
10
20
30
40
50
foreman
0.76
0.73
0.61
0.79
2.35
mobile
0.12
0.28
0.19
0.30
0.64
tempete
0.16
0.40
0.30
0.35
2.06
Non-Regular Initialization of P-frames
QP
10
20
30
40
50
foreman
0.81
0.82
1.03
1.74
6.00
mobile
0.19
0.34
0.54
1.17
3.61
tempete
0.20
0.41
0.46
0.85
5.57