AN2121 Freescale Semiconductor / Motorola, AN2121 Datasheet - Page 22

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
Implementation
3.1.1
The encoder initialization is illustrated in Figure C-10 on page 47. The coder is initialized to the following
conditions:
The shift counter is set to a larger number than 8 or 7 to accommodate the 3 spacer bits in the C register
(refer to Figure 6), which initially do not contain valid data. The first byte usually requires 12
normalizations to shift the values updated by the addition of Q
byte has been output, the spacer bits contain valid data, so only 7 or 8 renormalization shift lefts are
required before outputting the next byte. The first byte requires 13 left-shifts if the previous byte was $FF
because this causes an extra bit to be spuriously stuffed into the register when BYTEOUT is called for the
first time. Thus, an extra renormalization (shift left) must occur to ensure that the leading bit is not lost
during the BYTEOUT procedure, that is, when the next value of B becomes equal to C>>20.
3.1.2
When the encoding is complete, the bits in the C register must be moved to the B register and then to the
output code stream before a terminating marker is generated. This task is performed by the FLUSH
procedure shown in Figure C-11 on page 48.
18
The interval length is set to A = $8000, equivalent to 0.75 in decimal.
The code word points to the lower bound of the given interval, C = 0.
The shift counter is set to CT = 12 (if B
Encoder Initialization
Flushing the Encoder
JPEG2000 Arithmetic Encoding on the StarCore SC140
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
$FF) or CT = 13 (if B = $FF).
e
through to the b and c bits. After the first

Related parts for AN2121