AN2121 Freescale Semiconductor / Motorola, AN2121 Datasheet - Page 39

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
Appendix B
Arithmetic Encoder: Assembly Code
;*********************************************************************************
;
;*********************************************************************************
; FILENAME
; PREPARED BY
; AUTHOR
;*********************************************************************************
; ALGORITHM
;
;*********************************************************************************;
; Constants Used:
;
;
;
;
;
;
;
; Input/Output location:
;
;
;
;
; registers used:
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
; assumptions:
;
;
;
;
;
;*********************************************************************************
RENORM_THRESH
OUTPUT
CARRYOVER
; Input data
; Table C-2, FDIS - Qe values, NMPS,NLPS, switch
qe:
org p:$100
Arithmetic Encoder - Assembly Code
org p:$0
jmp $1000
RENORM_THRESH:
OUTPUT:
CARRYOVER:
Input initial address is at $2d0
Output initial address is at $950
r0 through to r7 and n0
r0 is the base address of the Qe, table C-2, FDIS
r1 is the base address of the input context/data pairs
r2 is the base address of the context table for the indices
r3 is the offset into the Qe table, i.e. it starts with I(CX)
r4 is the base address of the context table for the MPS values
r5 is the offset into the context table for the MPS values, i.e. it is CX
r6 is the offset into the context table for the Indices, i.e. it is CX
r7 is BP, i.e. the output bitstream pointer from the arithmetic coder
n0 is used as an offset into the Qe table to access the SWITCH entries.
Only 1 block of input data is dealt with by this code. In this case, this
means that the output CX/D pairs from the coefficient bit modeller when
1 tile of 128x128 has been processed.
dcw
dcw
dcw
dcw
:
:
:
:
equ $8000
equ $950
equ $8000000
to start with
to start with
$5601,$0008,$0008,$0001,$3401,$0010,$0030,$0000
$1801,$0018,$0048,$0000,$0ac1,$0020,$0060,$0000
$0521,$0028,$00e8,$0000,$0221,$0130,$0108,$0000
$5601,$0038,$0030,$0001,$5401,$0040,$0070,$0000
JPEG2000 Arithmetic Encoder
Appendix B. Arithmetic Encoder: Assembly Code
arith_enc.asm
MOTOROLA Australia Research Centre, 8 January 2001
Freescale Semiconductor, Inc.
For More Information On This Product,
Sue Twelves
Go to: www.freescale.com
When the interval, A, drops below the threshold of
$8000,renormalisation occurs
Output to the bitstream is initally to location $950
If the C register spills into location $8000000, then
a carry has occurred requiring bitstuffing to take
place
35

Related parts for AN2121