AN2121 Freescale Semiconductor / Motorola, AN2121 Datasheet - Page 16

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
2.4.1
The JPEG 2000 BAC maintains the interval A in the range [0.75, 1.5) by a process of renormalization (see
Section 2.4.4). This means that the interval is always approximately equal to 1, if rounding to one
significant figure. Therefore, (Q
encoding operations outlined in the BAC steps in Section 2.3:
Thus, all the multiplication operations have been removed, simplifying implementation.
2.4.2
If continuous MPS symbols are received, the interval length A is repeatedly updated as A = A – Q
(Section 2.4.1); eventually, A will be diminished to the point where A – Q
associated with the probability of an LPS exceed that of an MPS, so the sense of the MPS must be inverted.
Similar circumstances arise when continuous LPS symbols are received.
The following discussion describes how the JPEG2000 arithmetic encoder ensures that the interval for an
LPS is always less than that of an MPS. For convenience, the discussion assumes that ‘0’ is the MPS and
‘1’ the LPS for a particular context CX. In this context, the coder expects ‘0’ to happen more often than
‘1’.
2.4.2.1
For an input of (CX, ‘1’), the ENCODER procedure (see Figure C-3 on page 42) selects the CODE1
procedure. Because ‘1’ is the LPS, the CODE1 procedure (see Figure C-4 on page 42) interprets the value
of MPS(CX) to be ‘0’, so it selects the CODELPS procedure. In the CODELPS procedure (see Figure C-6
on page 43) it can be seen that when an LPS symbol occurs, the length of the interval (A) is updated to the
value Q
context CX many times, Q
eventually (A – Q
represents the LPS, (‘1’ in the case of context CX) would become greater than the portion allocated to the
LPS, symbol ‘0’. However, this does not happen because the CODELPS procedure initially tests for this
condition, and swaps the intervals associated with ‘1’ and ‘0’ if the condition is detected, so that ‘1’ is still
associated with the smaller portion of interval A. In addition, A is updated to (A – Q
(C + Q
If LPS ‘1’s continue to be received by the encoder with context CX, the NLPS field in Table C-2 causes
the system to converge to one of two possible indices (6 or 14) which inverts the sense of the MPS. The
MPS(CX) is now ‘1’ instead of ‘0’ and thus the encoder expects a ‘1’ to occur more often than a ‘0’ with
context CX, so the next time a ‘1’ is received with CX the procedure CODEMPS is called. This
arrangement allows the decoder to detect the change and decode the symbol correctly. Note that the switch
is controlled by the CODELPS loop only.
12
e
e
), pointing to the lower bound of the subinterval now associated with the LPS, ‘1’.
If MPS:True:T
a) Update the code word to point to the lower bound of the interval
b) Update the interval width
If MPS:False:F
a) Leave the code word as is (it is already pointing to the lower bound)
b) Update the interval width
, while the code word (C) remains unchanged. It appears that if symbol ‘1’ were to occur with the
Removing Multiplication
C = C + Q
A = A – Q
A = Q
Conditional Exchange of MPS Sense
LPS Case
e
e
) would become less than Q
e
e
JPEG2000 Arithmetic Encoding on the StarCore SC140
e
Freescale Semiconductor, Inc.
would become progressively larger (see Table C-2 on page 50) so that
For More Information On This Product,
e
A) Q
Go to: www.freescale.com
e
, and the following approximations can be made to the
e
, i.e., the portion of the probability interval A which
e
Q
e
. At this point, the interval
e
), and C is updated to
e

Related parts for AN2121