AN2121 Freescale Semiconductor / Motorola, AN2121 Datasheet - Page 32

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
} /* ByteOut */
/* ======================================================================== */
/*
*/
static inline void Renorme(void)
{
} /* Renorme */
/* ======================================================================== */
/*
*/
void ArithEncEncode(uint8 D, uint16 CX)
{
28
Renormalize the lower bound and size of the probability range.
See Section C.2.6 and Figure C-8.
is at least 0.75
Encode a bit using the given context.
Output bits will be written to the file given to ArithEncInit().
See Section C.2.2 and B.2.3
param: D
param: CX -
}
-
}
else
do
{
}
while (A <= 0x8000);
ArithEncContext* pCX;
uint32 I;
uint32 QeI;
uint32 MPS;
pCX = &(contexts[CX]);
/* Put the current context into globals, and write them back later */
I = pCX->I;
MPS = pCX->MPS;
QeI = Qe[I];
if (pCX->MPS == D)
{
The bit to encode, either 0 or 1.
The number of the context to use.
JPEG2000 Arithmetic Encoding on the StarCore SC140
}
ByteOutRight();
/* Check that there will be no overflow with these shifts */
A <<= 1;
C <<= 1;
CT -= 1;
if (CT == 0)
/* CodeMPS */
A -= QeI;
/* Doing this test first might speed up process */
if (A >= 0x8000u)
/*if ((A & 0x8000) != 0)*/
{
}
else
{
Freescale Semiconductor, Inc.
For More Information On This Product,
ByteOutRight();
ByteOut();
C += QeI;
/* Doing this test first might speed up process */
Go to: www.freescale.com
This function ensures that the range (A)

Related parts for AN2121