AN2121 Freescale Semiconductor / Motorola, AN2121 Datasheet - Page 24

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
For comparison, the arithmetic coder was tested on Motorola’s DSP56307 with the constant grey scale
image, where it was calculated that an equivalent 1M pixel color image with 12 bits/pixel would take 69ms
to execute, about five times slower than StarCore. The code used on the DSP56307 was C code with
optimized in-line assembler functions. In addition, it is assumed that the DSP56307 runs at 100 MHz rather
than StarCore’s 300 MHz.
3.2
This section explains how specific StarCore features improve the performance of the arithmetic encoder.
An optimized assembly version of the arithmetic coder is provided in Appendix B.
Although the arithmetic coder is primarily a sequential operator, several parallel features of StarCore can
be used to increase processing speed. In addition to the four MAC units to parallel process many
instructions, StarCore offers numerous and flexible address registers, delayed jump instructions, and
single-instruction if-then-else decisions.
3.2.1
StarCore’s address registers can be used to great advantage to access the arithmetic encoder look-up tables.
The assembly code in Appendix B shows two ways in which the look-up tables can be organized using
StarCore.
There are two main look-up tables associated with the arithmetic encoder, one for Q
the context data. The Q
values in one look-up table to highlight the use of address register arithmetic. The context table, on the
other hand, has been separated into two look-up tables to illustrate the use of StarCore’s multiple address
registers.
3.2.1.1
Address register arithmetic is used extensively to access the Q
offset arithmetic allow access to the other 'columns' in the table without incurring many extra cycles.
In Code Example 2, the Q
r3, from the NMPS index. (A comparison between two data registers is performed simultaneously.)
20
StarCore Implementation in Assembler
Address Registers
Address Register Arithmetic
move.w (r3+n0),d9
In order for this particular format of lookup table to be used, it was
necessary to multiply all the original indices in FDIS Table C-2 by 8. This
reflects the fact that there are four entries associated with each index and
each entry is a word, not a byte.
Typical image
Constant grey scale
Table 3.
e
JPEG2000 Arithmetic Encoding on the StarCore SC140
table in Appendix B, which is the same as Table C-2 in the FDIS, retains all
e
table entry for the SWITCH variable is accessed without moving the pointer,
Code Example 2. Address Register Arithmetic
Freescale Semiconductor, Inc.
Processing Time for C Version of Arithmetic Encoder
For More Information On This Product,
Go to: www.freescale.com
cmpgt d0,d7
Clock Cycles
(128
31,787
4.6 M
NOTE:
128)
e
table. Features such as post increment and
(1 Megapixel, Color)
Time (ms)
1960
14
e
values and one for

Related parts for AN2121