AN2121 Freescale Semiconductor / Motorola, AN2121 Datasheet - Page 14

no-image

AN2121

Manufacturer Part Number
AN2121
Description
JPEG2000 Arithmetic Encoding on StarCore SC140
Manufacturer
Freescale Semiconductor / Motorola
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN2121SC
Manufacturer:
TERIDIAN
Quantity:
40
Background Theory
Encoding the first symbol
Subinterval [C, C+A) = [0.01, 1.0) becomes the new interval.
Encoding the second symbol
Subinterval [0.01, 0.0111) becomes the new interval.
Encoding the third symbol
Subinterval [0.010011, 0.0111) becomes the new interval.
Encoding the fourth symbol continues …
Note that at any given stage, C is constrained within all preceding intervals. For example, when the third
symbol is encoded, the preceding intervals are [0.01, 1), [0.01, 0.0111) and [0.010011, 0.0111). After
encoding, the new value of C is 0.010011, which falls within all three intervals. Further, the next C code
word will still be constrained within [0.010011, 0.0111) regardless of which symbol is encoded next. In
other words, as the encoding continues, the dynamic range of C becomes progressively smaller while its
precision gets progressively higher. Any value of C within the range [0.010011, 0.0111) will decode the
symbol stream beginning with ‘T F T.’
2.3.2
When the decoder receives a code word C, it simply reverses the encoding operation by keeping the same
interval (i.e., A) as the encoder and using the same probability distribution.
The decoder also starts with the initial interval [0, 1.0), A = 1.0, Q
Decoding the first symbol
Subinterval [0.01, 1) becomes the new interval.
Decoding the second symbol
10
Given: A = [0, 1) with subintervals
‘T’ occurs
Q
C = C + (Q
A = A – (Q
Given: A = [0.01, 1) with subintervals [0.01, 0.0111) and [0.0111, 1)
‘F’ occurs
Q
C = 0.01 (unchanged)
A = Q
Given: A = [0.01, 0.0111) with subintervals [0.01, 0.010011) and [0.010011, 0.0111)
‘T’ occurs
Q
C = C + (Q
A = A – (Q
Given: interval [0, 1) with subintervals [0, 0.01) and [0.01, 1)
Since C = 0.010011 lies within [0.01, 1), the first symbol must be ‘T’.
Given: interval [0.01, 1) with subintervals [0.01, 0.0111) and [0.0111, 1)
Since C = 0.010011 lies within [0.01, 0.0111), the second symbol must be ‘F’.
e
e
e
BAC Decoding
[C, C+(A Q
A = 0.01
A = 0.01
A = 0.01
e
A = 0.0011
e
e
e
e
A) = 0 + 0.01 = 0.01
A) = 0.01 + 0.000011 = 0.010011
A) = 1.0 – 0.01 = 0.11
A) = 0.0011 – 0.000011 = 0.001001
JPEG2000 Arithmetic Encoding on the StarCore SC140
1.0 = 0.01
0.11 = 0.0011
0.0011 = 0.000011
e
)) = [0, 0.01)
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
and
[C+(A Q
e
), C+A) = [0.01, 1):
e
= 0.01 and P
e
= 0.11.

Related parts for AN2121