mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
lib/DtHelp/il: remove register keyword
This commit is contained in:
parent
7125b437f1
commit
e9d0d91cad
62 changed files with 778 additions and 778 deletions
|
@ -124,7 +124,7 @@ typedef ilError (*executeFunctionType)();
|
||||||
IL_FREE_XCOLORS/XGRAYS, or ~0 for everything.
|
IL_FREE_XCOLORS/XGRAYS, or ~0 for everything.
|
||||||
*/
|
*/
|
||||||
static void ilFreeColorData (
|
static void ilFreeColorData (
|
||||||
register ilXWCPtr pXWC,
|
ilXWCPtr pXWC,
|
||||||
unsigned long freeMask
|
unsigned long freeMask
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -184,7 +184,7 @@ static void ilDestroyXWC (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilObject object = (ilObject)pPrivate;
|
ilObject object = (ilObject)pPrivate;
|
||||||
register ilXWCPtr pXWC;
|
ilXWCPtr pXWC;
|
||||||
|
|
||||||
pXWC = (ilXWCPtr)object;
|
pXWC = (ilXWCPtr)object;
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ static int ilGammaCorrect (
|
||||||
int maxValue
|
int maxValue
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int allocValue;
|
int allocValue;
|
||||||
|
|
||||||
if (value == 0)
|
if (value == 0)
|
||||||
allocValue = 0;
|
allocValue = 0;
|
||||||
|
@ -233,7 +233,7 @@ register int allocValue;
|
||||||
*/
|
*/
|
||||||
static ilBool ilAllocateXDitherColors (
|
static ilBool ilAllocateXDitherColors (
|
||||||
ilContext context,
|
ilContext context,
|
||||||
register ilXWCPtr pXWC
|
ilXWCPtr pXWC
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ ilImageInfo imageInfo, *pImageInfo;
|
||||||
*/
|
*/
|
||||||
static ilBool ilAllocateXGrays (
|
static ilBool ilAllocateXGrays (
|
||||||
ilContext context,
|
ilContext context,
|
||||||
register ilXWCPtr pXWC,
|
ilXWCPtr pXWC,
|
||||||
int nGrays
|
int nGrays
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -392,7 +392,7 @@ double spreadFactor;
|
||||||
levels not alloc'd.
|
levels not alloc'd.
|
||||||
*/
|
*/
|
||||||
static ilBool ilAllocateXDirectColors (
|
static ilBool ilAllocateXDirectColors (
|
||||||
register ilXWCPtr pXWC,
|
ilXWCPtr pXWC,
|
||||||
int nLevels
|
int nLevels
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -476,8 +476,8 @@ ilBool ilChangeXWC (
|
||||||
void *pData
|
void *pData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilXWCPtr pXWC;
|
ilXWCPtr pXWC;
|
||||||
register ilContext context;
|
ilContext context;
|
||||||
|
|
||||||
pXWC = (ilXWCPtr)XWC;
|
pXWC = (ilXWCPtr)XWC;
|
||||||
context = pXWC->o.p.context;
|
context = pXWC->o.p.context;
|
||||||
|
@ -576,7 +576,7 @@ ilBool ilQueryXWC (
|
||||||
ilXWCInfo *pInfo
|
ilXWCInfo *pInfo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilXWCPtr pXWC;
|
ilXWCPtr pXWC;
|
||||||
|
|
||||||
pXWC = (ilXWCPtr)XWC;
|
pXWC = (ilXWCPtr)XWC;
|
||||||
if (pXWC->o.p.objectType != IL_XWC) {
|
if (pXWC->o.p.objectType != IL_XWC) {
|
||||||
|
@ -605,7 +605,7 @@ ilXWC ilCreateXWC (
|
||||||
unsigned long mustBeZero2
|
unsigned long mustBeZero2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilXWCPtr pXWC;
|
ilXWCPtr pXWC;
|
||||||
XVisualInfo template, *pVisualInfo;
|
XVisualInfo template, *pVisualInfo;
|
||||||
int notUsed;
|
int notUsed;
|
||||||
|
|
||||||
|
@ -772,9 +772,9 @@ static ilError ilWriteXInit (
|
||||||
ilImageInfo *pDstImage /* ignored */
|
ilImageInfo *pDstImage /* ignored */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilXPrivPtr pPriv = (ilXPrivPtr)pPrivate;
|
ilXPrivPtr pPriv = (ilXPrivPtr)pPrivate;
|
||||||
register ilXWCPtr pXWC;
|
ilXWCPtr pXWC;
|
||||||
register XImage *pXImage;
|
XImage *pXImage;
|
||||||
|
|
||||||
/* Create a temp buffer for image pixels if requested. */
|
/* Create a temp buffer for image pixels if requested. */
|
||||||
if (pPriv->bufferSize > 0) {
|
if (pPriv->bufferSize > 0) {
|
||||||
|
@ -826,7 +826,7 @@ static ilError ilWriteXCleanup (
|
||||||
XDestroyImage() will try to free the pixels; destroy the image,
|
XDestroyImage() will try to free the pixels; destroy the image,
|
||||||
created by Init().
|
created by Init().
|
||||||
*/
|
*/
|
||||||
register ilXPrivPtr pPriv = (ilXPrivPtr)pPrivate;
|
ilXPrivPtr pPriv = (ilXPrivPtr)pPrivate;
|
||||||
if (!aborting)
|
if (!aborting)
|
||||||
XFlush (pPriv->pXWC->i.display);
|
XFlush (pPriv->pXWC->i.display);
|
||||||
if (pPriv->pBuffer)
|
if (pPriv->pBuffer)
|
||||||
|
@ -844,14 +844,14 @@ static ilError ilWriteXCleanup (
|
||||||
written *pNLines below this one in the drawable.
|
written *pNLines below this one in the drawable.
|
||||||
*/
|
*/
|
||||||
static ilError ilWriteXExecute (
|
static ilError ilWriteXExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine,
|
long dstLine,
|
||||||
long *pNLines,
|
long *pNLines,
|
||||||
float ratio
|
float ratio
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilXPrivPtr pPriv;
|
ilXPrivPtr pPriv;
|
||||||
register XImage *pXImage;
|
XImage *pXImage;
|
||||||
ilXWCPtr pXWC;
|
ilXWCPtr pXWC;
|
||||||
unsigned int nSrcLines;
|
unsigned int nSrcLines;
|
||||||
unsigned int scaledWidth,scaledHeight;
|
unsigned int scaledWidth,scaledHeight;
|
||||||
|
@ -894,7 +894,7 @@ int scaledX, scaledY;
|
||||||
XPutImage(), then bump linesDone.
|
XPutImage(), then bump linesDone.
|
||||||
*/
|
*/
|
||||||
static ilError ilWriteXOptLongExecute (
|
static ilError ilWriteXOptLongExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine,
|
long dstLine,
|
||||||
long *pNLines,
|
long *pNLines,
|
||||||
float ratio
|
float ratio
|
||||||
|
@ -906,9 +906,9 @@ XImage *pXImage;
|
||||||
ilXWCPtr pXWC;
|
ilXWCPtr pXWC;
|
||||||
ilPtr pSrcLine;
|
ilPtr pSrcLine;
|
||||||
long srcRowBytes, width, nSrcLines, nLinesM1;
|
long srcRowBytes, width, nSrcLines, nLinesM1;
|
||||||
register long nLongsM1;
|
long nLongsM1;
|
||||||
register ilPtr pSrc;
|
ilPtr pSrc;
|
||||||
register CARD32 *pDst, temp;
|
CARD32 *pDst, temp;
|
||||||
unsigned int scaledWidth,scaledHeight;
|
unsigned int scaledWidth,scaledHeight;
|
||||||
int scaledX, scaledY ;
|
int scaledX, scaledY ;
|
||||||
|
|
||||||
|
@ -983,7 +983,7 @@ ilPipeInfo info;
|
||||||
ilImageDes des;
|
ilImageDes des;
|
||||||
ilImageFormat format;
|
ilImageFormat format;
|
||||||
unsigned int writeType;
|
unsigned int writeType;
|
||||||
register ilXWCPtr pXWC;
|
ilXWCPtr pXWC;
|
||||||
|
|
||||||
/* Table indexed by [dst visual type], yielding writeType when in raw
|
/* Table indexed by [dst visual type], yielding writeType when in raw
|
||||||
mode */
|
mode */
|
||||||
|
@ -1218,14 +1218,14 @@ ilBool ilWriteXDrawable (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilPipeInfo info;
|
ilPipeInfo info;
|
||||||
register ilXWCPtr pXWC;
|
ilXWCPtr pXWC;
|
||||||
register ilXPrivPtr pPriv;
|
ilXPrivPtr pPriv;
|
||||||
ilSrcElementData *pSrcData, srcData;
|
ilSrcElementData *pSrcData, srcData;
|
||||||
unsigned long bufferSize;
|
unsigned long bufferSize;
|
||||||
/*
|
/*
|
||||||
** We need to use the execute fucntion with the ratio parameter.
|
** We need to use the execute fucntion with the ratio parameter.
|
||||||
*/
|
*/
|
||||||
ilError (*executeFunction)( register ilExecuteData *,
|
ilError (*executeFunction)( ilExecuteData *,
|
||||||
long,
|
long,
|
||||||
long *,
|
long *,
|
||||||
float);
|
float);
|
||||||
|
|
|
@ -74,9 +74,9 @@ ilImagePlaneInfo *pPlane;
|
||||||
long nLinesDiv2, halfWidth;
|
long nLinesDiv2, halfWidth;
|
||||||
long CbRowBytes, CrRowBytes;
|
long CbRowBytes, CrRowBytes;
|
||||||
ilPtr pYLine, pCbLine, pCrLine, pDstLine;
|
ilPtr pYLine, pCbLine, pCrLine, pDstLine;
|
||||||
register unsigned long *pTable;
|
unsigned long *pTable;
|
||||||
register long YRowBytes, dstRowBytes, nPixelsDiv2, CbCr, temp0, temp1;
|
long YRowBytes, dstRowBytes, nPixelsDiv2, CbCr, temp0, temp1;
|
||||||
register ilPtr pY, pCb, pCr, pDst;
|
ilPtr pY, pCb, pCr, pDst;
|
||||||
|
|
||||||
/* This filter handles a pipe image of YCbCr subsampled by 2 in Cb/Cr only.
|
/* This filter handles a pipe image of YCbCr subsampled by 2 in Cb/Cr only.
|
||||||
The # of lines of Cb/Cr is therefore 1/2 the # of lines of Y.
|
The # of lines of Cb/Cr is therefore 1/2 the # of lines of Y.
|
||||||
|
@ -161,11 +161,11 @@ ilImagePlaneInfo *pPlane;
|
||||||
long nLinesDiv2, halfWidth;
|
long nLinesDiv2, halfWidth;
|
||||||
long CbRowBytes, CrRowBytes, dstRowBytes;
|
long CbRowBytes, CrRowBytes, dstRowBytes;
|
||||||
ilPtr pYLine, pCbLine, pCrLine;
|
ilPtr pYLine, pCbLine, pCrLine;
|
||||||
register unsigned long *pTable;
|
unsigned long *pTable;
|
||||||
register long YRowBytes, nPixelsDiv2, CbCr, temp0, temp1;
|
long YRowBytes, nPixelsDiv2, CbCr, temp0, temp1;
|
||||||
register long dstRowShorts, dstRowShortsTimes2, dstRowShortsTimes3;
|
long dstRowShorts, dstRowShortsTimes2, dstRowShortsTimes3;
|
||||||
register ilPtr pY, pCb, pCr;
|
ilPtr pY, pCb, pCr;
|
||||||
register unsigned short *pDst;
|
unsigned short *pDst;
|
||||||
unsigned short *pDstLine;
|
unsigned short *pDstLine;
|
||||||
|
|
||||||
/* This filter handles a pipe image of YCbCr subsampled by 2 in Cb/Cr only.
|
/* This filter handles a pipe image of YCbCr subsampled by 2 in Cb/Cr only.
|
||||||
|
@ -257,7 +257,7 @@ unsigned short *pDstLine;
|
||||||
/* Setup *pTable as necessary for the YCbCr to RGB (dither) conversion.
|
/* Setup *pTable as necessary for the YCbCr to RGB (dither) conversion.
|
||||||
*/
|
*/
|
||||||
static void ilSetupYCbCrDitherTables (
|
static void ilSetupYCbCrDitherTables (
|
||||||
register ilYCbCrInfo *pYCbCr,
|
ilYCbCrInfo *pYCbCr,
|
||||||
int nBitsR,
|
int nBitsR,
|
||||||
int nBitsG,
|
int nBitsG,
|
||||||
int nBitsB,
|
int nBitsB,
|
||||||
|
@ -267,7 +267,7 @@ static void ilSetupYCbCrDitherTables (
|
||||||
{
|
{
|
||||||
int nTableEntries, nLevelsY, nLevelsCbCr;
|
int nTableEntries, nLevelsY, nLevelsCbCr;
|
||||||
int Y, Cb, Cr, refY, refCb, refCr;
|
int Y, Cb, Cr, refY, refCb, refCr;
|
||||||
register int R, G, B, pixel, i, temp, kernel;
|
int R, G, B, pixel, i, temp, kernel;
|
||||||
double Lr, Lg, Lb;
|
double Lr, Lg, Lb;
|
||||||
double ditherR, ditherG, ditherB, ditherY, ditherCbCr;
|
double ditherR, ditherG, ditherB, ditherY, ditherCbCr;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
#include "ilerrors.h"
|
#include "ilerrors.h"
|
||||||
|
|
||||||
#ifdef LSB_BIT_ORDER
|
#ifdef LSB_BIT_ORDER
|
||||||
extern void flip_bits(register ilPtr start, register unsigned n);
|
extern void flip_bits(ilPtr start, unsigned n);
|
||||||
#else
|
#else
|
||||||
# define flip_bits(s,n) /*EMPTY*/
|
# define flip_bits(s,n) /*EMPTY*/
|
||||||
#endif
|
#endif
|
||||||
|
@ -227,10 +227,10 @@ static ilError ilBiGrayExecute (
|
||||||
long nLines, nLinesWritten;
|
long nLines, nLinesWritten;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
long colAcc, nDstBits, dstWidth, bottomLine, line;
|
long colAcc, nDstBits, dstWidth, bottomLine, line;
|
||||||
register long srcBytesAbove, srcBytesBelow;
|
long srcBytesAbove, srcBytesBelow;
|
||||||
register ilBiGrayPrivPtr pPriv;
|
ilBiGrayPrivPtr pPriv;
|
||||||
register CARD32 index, *pSrc;
|
CARD32 index, *pSrc;
|
||||||
register int shift, bitNumber;
|
int shift, bitNumber;
|
||||||
|
|
||||||
/* Point pSrcLine to srcLine: = middle line of 3x3 matrix.
|
/* Point pSrcLine to srcLine: = middle line of 3x3 matrix.
|
||||||
Set bottomLine to last available line in the buffer.
|
Set bottomLine to last available line in the buffer.
|
||||||
|
@ -434,7 +434,7 @@ IL_PRIVATE void _ilScaleBitonalToGray (
|
||||||
ilPipeInfo *pInfo
|
ilPipeInfo *pInfo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilBiGrayPrivPtr pPriv;
|
ilBiGrayPrivPtr pPriv;
|
||||||
ilDstElementData dstData;
|
ilDstElementData dstData;
|
||||||
ilImageDes des;
|
ilImageDes des;
|
||||||
|
|
||||||
|
@ -511,7 +511,7 @@ IL_PRIVATE void _ilAreaScaleBitonal (
|
||||||
ilPipeInfo *pInfo
|
ilPipeInfo *pInfo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilBiGrayPrivPtr pPriv;
|
ilBiGrayPrivPtr pPriv;
|
||||||
ilDstElementData dstData;
|
ilDstElementData dstData;
|
||||||
#define DEFAULT_GRAY_THRESHOLD 128 /* assumes 256 levels */
|
#define DEFAULT_GRAY_THRESHOLD 128 /* assumes 256 levels */
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ IL_PRIVATE ilBool _ilReallocCompressedBuffer (
|
||||||
unsigned long minNewSize
|
unsigned long minNewSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePlaneInfo *pPlane;
|
ilImagePlaneInfo *pPlane;
|
||||||
|
|
||||||
pPlane = &pImage->plane[plane];
|
pPlane = &pImage->plane[plane];
|
||||||
pPlane->bufferSize = minNewSize + 10000; /* A GUESS - DO SOMETHING SMARTER !!!!! */
|
pPlane->bufferSize = minNewSize + 10000; /* A GUESS - DO SOMETHING SMARTER !!!!! */
|
||||||
|
@ -77,12 +77,12 @@ register ilImagePlaneInfo *pPlane;
|
||||||
Copies one strip of compressed data.
|
Copies one strip of compressed data.
|
||||||
*/
|
*/
|
||||||
static ilError ilCopyCompressedExecute (
|
static ilError ilCopyCompressedExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine,
|
long dstLine,
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePlaneInfo *pSrcPlane, *pDstPlane;
|
ilImagePlaneInfo *pSrcPlane, *pDstPlane;
|
||||||
long nBytes, dstOffset, requiredBufferSize;
|
long nBytes, dstOffset, requiredBufferSize;
|
||||||
|
|
||||||
nBytes = pData->compressed.nBytesToRead; /* # of bytes to write */
|
nBytes = pData->compressed.nBytesToRead; /* # of bytes to write */
|
||||||
|
|
|
@ -390,10 +390,10 @@ int nTimes)
|
||||||
{
|
{
|
||||||
int rel_diff, abs_diff;
|
int rel_diff, abs_diff;
|
||||||
|
|
||||||
register unsigned char *bp;
|
unsigned char *bp;
|
||||||
register int ini_diff;
|
int ini_diff;
|
||||||
register int n, fin_diff;
|
int n, fin_diff;
|
||||||
register unsigned char *table ;
|
unsigned char *table ;
|
||||||
|
|
||||||
bp = sByte;
|
bp = sByte;
|
||||||
|
|
||||||
|
@ -471,10 +471,10 @@ done:
|
||||||
======================================================================== */
|
======================================================================== */
|
||||||
|
|
||||||
static ilBool _ilCompressG3G4ReallocBuffer (
|
static ilBool _ilCompressG3G4ReallocBuffer (
|
||||||
register ilCompressG3G4PrivPtr pPriv
|
ilCompressG3G4PrivPtr pPriv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register unsigned long offset;
|
unsigned long offset;
|
||||||
|
|
||||||
offset = pPriv->pDstByte - pPriv->pDstImage->plane[0].pPixels;
|
offset = pPriv->pDstByte - pPriv->pDstImage->plane[0].pPixels;
|
||||||
if (!_ilReallocCompressedBuffer (pPriv->pDstImage, 0, offset + G3_G4_MAX_BUFFER_WRITE))
|
if (!_ilReallocCompressedBuffer (pPriv->pDstImage, 0, offset + G3_G4_MAX_BUFFER_WRITE))
|
||||||
|
@ -502,18 +502,18 @@ register ilCompressG3G4PrivPtr pPriv
|
||||||
======================================================================== */
|
======================================================================== */
|
||||||
static ilError
|
static ilError
|
||||||
_ilPutData (
|
_ilPutData (
|
||||||
register ilCompressG3G4PrivPtr pPriv)
|
ilCompressG3G4PrivPtr pPriv)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/* use local variables here, copy the values from pPriv to local & copy them
|
/* use local variables here, copy the values from pPriv to local & copy them
|
||||||
back at the end of the function; this is expected to be faster */
|
back at the end of the function; this is expected to be faster */
|
||||||
|
|
||||||
register unsigned int bitCount; /* # of bits waiting to be output */
|
unsigned int bitCount; /* # of bits waiting to be output */
|
||||||
/* compatibility problem with long and unsigned long data fields */
|
/* compatibility problem with long and unsigned long data fields */
|
||||||
register CARD32 bits; /* bits waiting to be output */
|
CARD32 bits; /* bits waiting to be output */
|
||||||
register ilPtr pDstByte; /* ptr to spot for next byte in output buffer */
|
ilPtr pDstByte; /* ptr to spot for next byte in output buffer */
|
||||||
register ilBool Is_Lsb_First;
|
ilBool Is_Lsb_First;
|
||||||
|
|
||||||
/* Output 3 bytes; check for room in buffer; realloc if not room.
|
/* Output 3 bytes; check for room in buffer; realloc if not room.
|
||||||
*/
|
*/
|
||||||
|
@ -624,7 +624,7 @@ register ilCompressG3G4PrivPtr pPriv)
|
||||||
======================================================================== */
|
======================================================================== */
|
||||||
static ilError
|
static ilError
|
||||||
_ilGetNdPutNewBits(
|
_ilGetNdPutNewBits(
|
||||||
register ilCompressG3G4PrivPtr pPriv,
|
ilCompressG3G4PrivPtr pPriv,
|
||||||
int count,
|
int count,
|
||||||
ilBool pixelValue
|
ilBool pixelValue
|
||||||
)
|
)
|
||||||
|
@ -762,23 +762,23 @@ ilImageInfo *pDstImage
|
||||||
======================================================================== */
|
======================================================================== */
|
||||||
static ilError
|
static ilError
|
||||||
_ilCompressG3Line(
|
_ilCompressG3Line(
|
||||||
register ilCompressG3G4PrivPtr pPriv,
|
ilCompressG3G4PrivPtr pPriv,
|
||||||
register ilPtr pSrc
|
ilPtr pSrc
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int a0, b2; /* changing elements pertaining to the pSrcLine */
|
int a0, b2; /* changing elements pertaining to the pSrcLine */
|
||||||
register ilBool pixelValue; /* value of the pixel 0 or 1 */
|
ilBool pixelValue; /* value of the pixel 0 or 1 */
|
||||||
ilError error;
|
ilError error;
|
||||||
register long width; /* width of the image */
|
long width; /* width of the image */
|
||||||
register ilBool white; /* value of the white pixel */
|
ilBool white; /* value of the white pixel */
|
||||||
#ifndef NOINLINEG3
|
#ifndef NOINLINEG3
|
||||||
register int ini_diff;
|
int ini_diff;
|
||||||
register int n, fin_diff;
|
int n, fin_diff;
|
||||||
register unsigned char *table ;
|
unsigned char *table ;
|
||||||
register ilBool termFlag ;
|
ilBool termFlag ;
|
||||||
register int index;
|
int index;
|
||||||
register int tnumBits ;
|
int tnumBits ;
|
||||||
register int count;
|
int count;
|
||||||
CARD32 tnewBits;
|
CARD32 tnewBits;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1345,7 +1345,7 @@ ilImageInfo *pDstImage
|
||||||
======================================================================== */
|
======================================================================== */
|
||||||
ilError
|
ilError
|
||||||
_ilCompressG4Line(
|
_ilCompressG4Line(
|
||||||
register ilCompressG3G4PrivPtr pPriv,
|
ilCompressG3G4PrivPtr pPriv,
|
||||||
ilPtr pSrcLine,
|
ilPtr pSrcLine,
|
||||||
ilPtr pRefLine
|
ilPtr pRefLine
|
||||||
)
|
)
|
||||||
|
|
|
@ -113,10 +113,10 @@ static ilError ilCompLZWCleanup (
|
||||||
/* Reallocate the output (compressed) buffer and reset pPriv->pDst(BufferEnd).
|
/* Reallocate the output (compressed) buffer and reset pPriv->pDst(BufferEnd).
|
||||||
*/
|
*/
|
||||||
static ilBool ilLZWReallocBuffer (
|
static ilBool ilLZWReallocBuffer (
|
||||||
register ilCompLZWPrivPtr pPriv
|
ilCompLZWPrivPtr pPriv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register unsigned long offset;
|
unsigned long offset;
|
||||||
|
|
||||||
offset = pPriv->pDst - pPriv->pDstImage->plane[0].pPixels;
|
offset = pPriv->pDst - pPriv->pDstImage->plane[0].pPixels;
|
||||||
if (!_ilReallocCompressedBuffer (pPriv->pDstImage, 0, offset + LZW_MAX_BUFFER_WRITE))
|
if (!_ilReallocCompressedBuffer (pPriv->pDstImage, 0, offset + LZW_MAX_BUFFER_WRITE))
|
||||||
|
@ -149,10 +149,10 @@ static void NewEnnode (
|
||||||
Initializes the encode table with the first 256 strings (i.e. 0-ff).
|
Initializes the encode table with the first 256 strings (i.e. 0-ff).
|
||||||
*/
|
*/
|
||||||
static void ilInitEncodeTable (
|
static void ilInitEncodeTable (
|
||||||
register ilCompLZWPrivPtr pPriv
|
ilCompLZWPrivPtr pPriv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
pPriv->ennodes[i].value = i;
|
pPriv->ennodes[i].value = i;
|
||||||
|
@ -185,11 +185,11 @@ static ilBool ilStringInTable (
|
||||||
ilCompLZWPrivPtr pPriv,
|
ilCompLZWPrivPtr pPriv,
|
||||||
ilPtr string,
|
ilPtr string,
|
||||||
unsigned int count,
|
unsigned int count,
|
||||||
register unsigned int *pCurrentNode
|
unsigned int *pCurrentNode
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register unsigned int byte; /* current character in string */
|
unsigned int byte; /* current character in string */
|
||||||
register ilEnnodePtr ennodes;
|
ilEnnodePtr ennodes;
|
||||||
|
|
||||||
ennodes = pPriv->ennodes;
|
ennodes = pPriv->ennodes;
|
||||||
byte = string[count-1];
|
byte = string[count-1];
|
||||||
|
@ -243,7 +243,7 @@ static ilBool ilStringInTable (
|
||||||
If the bit stream is longer than 16 bits, two bytes will be written.
|
If the bit stream is longer than 16 bits, two bytes will be written.
|
||||||
*/
|
*/
|
||||||
static ilError ilWriteCode (
|
static ilError ilWriteCode (
|
||||||
register ilCompLZWPrivPtr pPriv,
|
ilCompLZWPrivPtr pPriv,
|
||||||
unsigned int code
|
unsigned int code
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -283,7 +283,7 @@ static ilError ilCompLZWExecute (
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilCompLZWPrivPtr pPriv;
|
ilCompLZWPrivPtr pPriv;
|
||||||
ilPtr pSrcLine, pSrc;
|
ilPtr pSrcLine, pSrc;
|
||||||
ilByte srcByte;
|
ilByte srcByte;
|
||||||
long nLines, srcRowBytes, nSrcBytes;
|
long nLines, srcRowBytes, nSrcBytes;
|
||||||
|
|
|
@ -95,9 +95,9 @@ static ilError ilComppackbitsExecute(
|
||||||
|
|
||||||
unsigned long nBytes = 0; /* Number of source image bytes to unpack for current strip */
|
unsigned long nBytes = 0; /* Number of source image bytes to unpack for current strip */
|
||||||
unsigned long nLines; /* Number of lines per source image strip */
|
unsigned long nLines; /* Number of lines per source image strip */
|
||||||
register ilPtr pSrcByte; /* Pointer to source image data first byte */
|
ilPtr pSrcByte; /* Pointer to source image data first byte */
|
||||||
ilPtr pSrcLine; /* Pointer to source image data first byte of line */
|
ilPtr pSrcLine; /* Pointer to source image data first byte of line */
|
||||||
register ilPtr pDstByte; /* Pointer to destination image data */
|
ilPtr pDstByte; /* Pointer to destination image data */
|
||||||
ilPtr pDstBufferEnd; /* Ptr to byte "PB_MAX_BUFFER_WRITE" from end of compressed buffer */
|
ilPtr pDstBufferEnd; /* Ptr to byte "PB_MAX_BUFFER_WRITE" from end of compressed buffer */
|
||||||
unsigned long srcNBytes; /* Number of source image bytes per row */
|
unsigned long srcNBytes; /* Number of source image bytes per row */
|
||||||
ilCompPBPrivPtr pPriv; /* Pointer to private image data */
|
ilCompPBPrivPtr pPriv; /* Pointer to private image data */
|
||||||
|
@ -106,9 +106,9 @@ static ilError ilComppackbitsExecute(
|
||||||
long offset; /* difference between current dst image address pointer and the
|
long offset; /* difference between current dst image address pointer and the
|
||||||
start address of the dst image buffer */
|
start address of the dst image buffer */
|
||||||
long length; /* number of bytes written to dst image */
|
long length; /* number of bytes written to dst image */
|
||||||
register int count; /* run count value */
|
int count; /* run count value */
|
||||||
register int start, j; /* indices into source data */
|
int start, j; /* indices into source data */
|
||||||
register int nBytesM1; /* bytes per row of data minus one */
|
int nBytesM1; /* bytes per row of data minus one */
|
||||||
|
|
||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
Set up for execution of compression algorithm code
|
Set up for execution of compression algorithm code
|
||||||
|
|
|
@ -412,9 +412,9 @@ static ilError ilCompressJPEGDestroy (
|
||||||
ilCompressJPEGPrivPtr pPriv
|
ilCompressJPEGPrivPtr pPriv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
ilPtr pTable;
|
ilPtr pTable;
|
||||||
register ilJPEGData *pCompData;
|
ilJPEGData *pCompData;
|
||||||
|
|
||||||
/* Free pCompData and any non-default Q tables */
|
/* Free pCompData and any non-default Q tables */
|
||||||
if (pCompData = pPriv->pCompData) {
|
if (pCompData = pPriv->pCompData) {
|
||||||
|
@ -439,7 +439,7 @@ static ilError ilCompressJPEGExecute (
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilCompressJPEGPrivPtr pPriv;
|
ilCompressJPEGPrivPtr pPriv;
|
||||||
ilJPEGEncodeStream streamRec;
|
ilJPEGEncodeStream streamRec;
|
||||||
ilImageInfo *pImage;
|
ilImageInfo *pImage;
|
||||||
ilImagePlaneInfo *pSrcPlane;
|
ilImagePlaneInfo *pSrcPlane;
|
||||||
|
@ -489,13 +489,13 @@ static ilError ilCompressJPEGExecute (
|
||||||
and return ptr to new table, or null if error.
|
and return ptr to new table, or null if error.
|
||||||
*/
|
*/
|
||||||
static ilPtr _ilScaleQTable (
|
static ilPtr _ilScaleQTable (
|
||||||
register ilPtr pSrc, /* ptr to 64 byte Q table to scale */
|
ilPtr pSrc, /* ptr to 64 byte Q table to scale */
|
||||||
int Q /* IL Q factor: != 0, or no scale needed */
|
int Q /* IL Q factor: != 0, or no scale needed */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilPtr pTable;
|
ilPtr pTable;
|
||||||
register ilPtr pDst;
|
ilPtr pDst;
|
||||||
register int i, value;
|
int i, value;
|
||||||
|
|
||||||
if (!(pTable = (ilPtr)IL_MALLOC (64)))
|
if (!(pTable = (ilPtr)IL_MALLOC (64)))
|
||||||
return (ilPtr)NULL;
|
return (ilPtr)NULL;
|
||||||
|
|
|
@ -75,7 +75,7 @@ ilError ilInternalCreateContext (
|
||||||
unsigned long mustBeZero
|
unsigned long mustBeZero
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilContextPtr pContext;
|
ilContextPtr pContext;
|
||||||
|
|
||||||
/* If internal version # > the version # the library was built with, then
|
/* If internal version # > the version # the library was built with, then
|
||||||
error; if <, old IL program using new library: supported.
|
error; if <, old IL program using new library: supported.
|
||||||
|
@ -116,7 +116,7 @@ IL_PRIVATE void *_ilMallocAndInitWithGarbage (
|
||||||
unsigned long nBytes
|
unsigned long nBytes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPtr p, pMalloc;
|
ilPtr p, pMalloc;
|
||||||
|
|
||||||
pMalloc = (ilPtr)malloc (nBytes);
|
pMalloc = (ilPtr)malloc (nBytes);
|
||||||
if (p = pMalloc) {
|
if (p = pMalloc) {
|
||||||
|
@ -136,7 +136,7 @@ unsigned int ilGetPrivateType (
|
||||||
ilContext context
|
ilContext context
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilContextPtr pContext;
|
ilContextPtr pContext;
|
||||||
|
|
||||||
/* Increment code (but not if it has wrapped to zero! and return it.
|
/* Increment code (but not if it has wrapped to zero! and return it.
|
||||||
*/
|
*/
|
||||||
|
@ -155,7 +155,7 @@ ilBool ilDestroyContext (
|
||||||
ilContext context
|
ilContext context
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilContextPtr pContext;
|
ilContextPtr pContext;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Destroy all objects associated with this context, then free
|
/* Destroy all objects associated with this context, then free
|
||||||
|
@ -179,8 +179,8 @@ int i;
|
||||||
Not in this file for any particular reason; no other logical place for it.
|
Not in this file for any particular reason; no other logical place for it.
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE void _ilIntersectRect (
|
IL_PRIVATE void _ilIntersectRect (
|
||||||
register ilRect *pSrcRect,
|
ilRect *pSrcRect,
|
||||||
register ilRect *pDstRect
|
ilRect *pDstRect
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
long left, top, right, bottom, i;
|
long left, top, right, bottom, i;
|
||||||
|
|
|
@ -58,7 +58,7 @@ static ilBool ilAddConversionFilter (
|
||||||
ilImageDes *pSrcDes,
|
ilImageDes *pSrcDes,
|
||||||
ilImageFormat *pSrcFormat,
|
ilImageFormat *pSrcFormat,
|
||||||
void *pOptionData,
|
void *pOptionData,
|
||||||
register ilConvertPtr pCvtData
|
ilConvertPtr pCvtData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilPtr pPriv;
|
ilPtr pPriv;
|
||||||
|
@ -146,7 +146,7 @@ static ilBool ilAddFormatFilter (
|
||||||
ilPipe pipe,
|
ilPipe pipe,
|
||||||
ilPipeInfo *pInfo,
|
ilPipeInfo *pInfo,
|
||||||
const ilImageFormat *pNewFormat,
|
const ilImageFormat *pNewFormat,
|
||||||
register ilFormatPtr pData
|
ilFormatPtr pData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilPtr pPriv;
|
ilPtr pPriv;
|
||||||
|
@ -620,10 +620,10 @@ CantConvert:
|
||||||
*/
|
*/
|
||||||
unsigned int ilCheckPipeFormat (
|
unsigned int ilCheckPipeFormat (
|
||||||
ilPipe pipe,
|
ilPipe pipe,
|
||||||
register unsigned long formatMask,
|
unsigned long formatMask,
|
||||||
ilPipeInfo *pInfo, /* RETURNED */
|
ilPipeInfo *pInfo, /* RETURNED */
|
||||||
register ilImageDes *pDes, /* RETURNED */
|
ilImageDes *pDes, /* RETURNED */
|
||||||
register ilImageFormat *pFormat /* RETURNED */
|
ilImageFormat *pFormat /* RETURNED */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilPipeInfo localInfo;
|
ilPipeInfo localInfo;
|
||||||
|
|
|
@ -123,7 +123,7 @@ IL_EXTERN const unsigned short _ilMul4[];
|
||||||
IL_EXTERN ilBool _ilConvertRGBToPalette (
|
IL_EXTERN ilBool _ilConvertRGBToPalette (
|
||||||
ilPipe pipe,
|
ilPipe pipe,
|
||||||
ilPipeInfo *pInfo,
|
ilPipeInfo *pInfo,
|
||||||
register ilImageDes *pDes,
|
ilImageDes *pDes,
|
||||||
ilImageFormat *pFormat,
|
ilImageFormat *pFormat,
|
||||||
int option,
|
int option,
|
||||||
ilConvertToPaletteInfo *pData
|
ilConvertToPaletteInfo *pData
|
||||||
|
@ -273,7 +273,7 @@ IL_EXTERN ilBool _ilConvertRGBToYCbCr (
|
||||||
ilPipe pipe,
|
ilPipe pipe,
|
||||||
ilPipeInfo *pInfo,
|
ilPipeInfo *pInfo,
|
||||||
ilImageDes *pDes,
|
ilImageDes *pDes,
|
||||||
register const ilImageDes *pNewDes,
|
const ilImageDes *pNewDes,
|
||||||
ilImageFormat *pFormat
|
ilImageFormat *pFormat
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ static ilError ilCropCompExecute (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilCropCompPrivPtr pPriv;
|
ilCropCompPrivPtr pPriv;
|
||||||
|
|
||||||
/* If this strip is out of range of strips to be written, return 0 for
|
/* If this strip is out of range of strips to be written, return 0 for
|
||||||
# lines written (crops the strip); otherwise pass strip on to next filter.
|
# lines written (crops the strip); otherwise pass strip on to next filter.
|
||||||
|
@ -117,7 +117,7 @@ static ilBool ilCropCompressed (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilRect rect;
|
ilRect rect;
|
||||||
register long stripHeight, bottom;
|
long stripHeight, bottom;
|
||||||
long topStrip, bottomStrip, topLine;
|
long topStrip, bottomStrip, topLine;
|
||||||
ilDstElementData dstData;
|
ilDstElementData dstData;
|
||||||
ilCropCompPrivPtr pPriv;
|
ilCropCompPrivPtr pPriv;
|
||||||
|
@ -212,19 +212,19 @@ static ilError ilCropInit(
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilCropBitonalExecute (
|
static ilError ilCropBitonalExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register CARD32 *psrc, *pdst, *psrcline, *pdstline, srca, srcb;
|
CARD32 *psrc, *pdst, *psrcline, *pdstline, srca, srcb;
|
||||||
register long srcnwords, dstnwords, nlines;
|
long srcnwords, dstnwords, nlines;
|
||||||
register unsigned long dstwidth;
|
unsigned long dstwidth;
|
||||||
register long nlongs, firstword;
|
long nlongs, firstword;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register unsigned long local_noDstLine, Lwordoff, Rwordoff;
|
unsigned long local_noDstLine, Lwordoff, Rwordoff;
|
||||||
register int x, y, lastcount, yextent;
|
int x, y, lastcount, yextent;
|
||||||
register ilCropPrivptr pPriv;
|
ilCropPrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -298,18 +298,18 @@ register ilCropPrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilCrop3ByteExecute (
|
static ilError ilCrop3ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes, nlines;
|
unsigned long srcnbytes, dstnbytes, nlines;
|
||||||
register unsigned long dstwidth;
|
unsigned long dstwidth;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register unsigned long local_noDstLine;
|
unsigned long local_noDstLine;
|
||||||
register int x, y, lastcount, yextent, xextent;
|
int x, y, lastcount, yextent, xextent;
|
||||||
register ilCropPrivptr pPriv;
|
ilCropPrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
nlines = *pNLines;
|
nlines = *pNLines;
|
||||||
|
@ -368,18 +368,18 @@ register ilCropPrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilCropByteExecute (
|
static ilError ilCropByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes, nlines;
|
unsigned long srcnbytes, dstnbytes, nlines;
|
||||||
register unsigned long dstwidth;
|
unsigned long dstwidth;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register unsigned long local_noDstLine;
|
unsigned long local_noDstLine;
|
||||||
register int x, y, lastcount, yextent, xextent;
|
int x, y, lastcount, yextent, xextent;
|
||||||
register ilCropPrivptr pPriv;
|
ilCropPrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
nlines = *pNLines;
|
nlines = *pNLines;
|
||||||
|
@ -440,7 +440,7 @@ ilBool ilCrop (
|
||||||
{
|
{
|
||||||
unsigned int state;
|
unsigned int state;
|
||||||
ilPipeInfo info;
|
ilPipeInfo info;
|
||||||
register ilCropPrivptr pPriv;
|
ilCropPrivptr pPriv;
|
||||||
ilDstElementData dstdata;
|
ilDstElementData dstdata;
|
||||||
ilImageDes imdes;
|
ilImageDes imdes;
|
||||||
ilImageFormat imformat;
|
ilImageFormat imformat;
|
||||||
|
|
|
@ -101,7 +101,7 @@ ilImageInfo *pDstImage
|
||||||
======================================================================== */
|
======================================================================== */
|
||||||
|
|
||||||
static ilError _ilDecompG3Line(
|
static ilError _ilDecompG3Line(
|
||||||
register ilDecompG3G4PrivPtr pPriv,
|
ilDecompG3G4PrivPtr pPriv,
|
||||||
ilPtr dstImageP
|
ilPtr dstImageP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -117,12 +117,12 @@ ilPtr dstImageP
|
||||||
ilPtr ImageP;
|
ilPtr ImageP;
|
||||||
int srcpos;
|
int srcpos;
|
||||||
|
|
||||||
register ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
|
ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
|
||||||
register ilDecompG4HuffTablePtrConst pDecodeTemp;
|
ilDecompG4HuffTablePtrConst pDecodeTemp;
|
||||||
register ilDecompG4HuffTablePtrConst pDecodeBlack = ilArFax1DDecodeBlack;
|
ilDecompG4HuffTablePtrConst pDecodeBlack = ilArFax1DDecodeBlack;
|
||||||
register ilPtr sByte;
|
ilPtr sByte;
|
||||||
register int no_of_ones;
|
int no_of_ones;
|
||||||
register int startPixel;
|
int startPixel;
|
||||||
|
|
||||||
static const unsigned char fillmasks[] =
|
static const unsigned char fillmasks[] =
|
||||||
{
|
{
|
||||||
|
@ -269,8 +269,8 @@ unsigned long *pNLines
|
||||||
int temp; /* some temp var.. */
|
int temp; /* some temp var.. */
|
||||||
ilBool tag_bit; /* True or 1 for G3 1D coded line ,else G3 2d */
|
ilBool tag_bit; /* True or 1 for G3 1D coded line ,else G3 2d */
|
||||||
long nLines; /* no. of lines in the current strip */
|
long nLines; /* no. of lines in the current strip */
|
||||||
register ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
|
ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
|
||||||
register ilDecompG4HuffTablePtrConst pDecodeTemp;
|
ilDecompG4HuffTablePtrConst pDecodeTemp;
|
||||||
|
|
||||||
|
|
||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
|
|
|
@ -129,9 +129,9 @@ static unsigned char oneruns[256] = {
|
||||||
|
|
||||||
IL_PRIVATE void
|
IL_PRIVATE void
|
||||||
_ilPutOnes(
|
_ilPutOnes(
|
||||||
register char *sByte,
|
char *sByte,
|
||||||
register int startPixel,
|
int startPixel,
|
||||||
register int no_of_ones )
|
int no_of_ones )
|
||||||
|
|
||||||
{
|
{
|
||||||
static const unsigned char masks[] =
|
static const unsigned char masks[] =
|
||||||
|
@ -186,10 +186,10 @@ int color,
|
||||||
int nTimes)
|
int nTimes)
|
||||||
{
|
{
|
||||||
|
|
||||||
register unsigned char *bp;
|
unsigned char *bp;
|
||||||
register int ini_diff;
|
int ini_diff;
|
||||||
register int n, fin_diff;
|
int n, fin_diff;
|
||||||
register unsigned char *table ;
|
unsigned char *table ;
|
||||||
|
|
||||||
bp = sByte;
|
bp = sByte;
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ ilImageInfo *pDstImage
|
||||||
image by Two dimensional coding.
|
image by Two dimensional coding.
|
||||||
======================================================================== */
|
======================================================================== */
|
||||||
ilError _ilDecompG4Line(
|
ilError _ilDecompG4Line(
|
||||||
register ilDecompG3G4PrivPtr pPriv,
|
ilDecompG3G4PrivPtr pPriv,
|
||||||
ilPtr pRefLine,
|
ilPtr pRefLine,
|
||||||
ilPtr dstImageP
|
ilPtr dstImageP
|
||||||
)
|
)
|
||||||
|
@ -357,9 +357,9 @@ ilPtr dstImageP
|
||||||
ilPtr ImageP;
|
ilPtr ImageP;
|
||||||
int srcpos;
|
int srcpos;
|
||||||
|
|
||||||
register ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
|
ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
|
||||||
register ilDecompG4HuffTablePtrConst pDecodeTemp;
|
ilDecompG4HuffTablePtrConst pDecodeTemp;
|
||||||
register ilDecompG4HuffTablePtrConst pDecodeBlack = ilArFax1DDecodeBlack;
|
ilDecompG4HuffTablePtrConst pDecodeBlack = ilArFax1DDecodeBlack;
|
||||||
|
|
||||||
|
|
||||||
/* Deccompression Procedure ....
|
/* Deccompression Procedure ....
|
||||||
|
|
|
@ -180,7 +180,7 @@ IL_EXTERN const ilDecompG4HuffTableRec ilArFax1DDecodeBlack[G4K_BlackTableSize];
|
||||||
IL_EXTERN const ilDecompG4HuffTableRec ilArFax2DDecodeTable[G4K_DecodeTableSize];
|
IL_EXTERN const ilDecompG4HuffTableRec ilArFax2DDecodeTable[G4K_DecodeTableSize];
|
||||||
|
|
||||||
IL_EXTERN ilError _ilDecompG4Line(
|
IL_EXTERN ilError _ilDecompG4Line(
|
||||||
register ilDecompG3G4PrivPtr pPriv,
|
ilDecompG3G4PrivPtr pPriv,
|
||||||
ilPtr pRefLine,
|
ilPtr pRefLine,
|
||||||
ilPtr dstImageP
|
ilPtr dstImageP
|
||||||
);
|
);
|
||||||
|
|
|
@ -104,14 +104,14 @@ static ilError ilDecompRawExecute (
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilJPEGPrivPtr pPriv;
|
ilJPEGPrivPtr pPriv;
|
||||||
ilJPEGDecodeStream streamRec;
|
ilJPEGDecodeStream streamRec;
|
||||||
ilError error;
|
ilError error;
|
||||||
iljpgPtr pPixels[ILJPG_MAX_COMPS];
|
iljpgPtr pPixels[ILJPG_MAX_COMPS];
|
||||||
long nBytesPerRow[ILJPG_MAX_COMPS];
|
long nBytesPerRow[ILJPG_MAX_COMPS];
|
||||||
int i;
|
int i;
|
||||||
ilImagePlaneInfo *pPlane;
|
ilImagePlaneInfo *pPlane;
|
||||||
register ilImageInfo *pSrcImage, *pDstImage;
|
ilImageInfo *pSrcImage, *pDstImage;
|
||||||
|
|
||||||
pPriv = (ilJPEGPrivPtr)pData->pPrivate;
|
pPriv = (ilJPEGPrivPtr)pData->pPrivate;
|
||||||
pSrcImage = pData->pSrcImage;
|
pSrcImage = pData->pSrcImage;
|
||||||
|
@ -151,7 +151,7 @@ static ilError ilDecompJIFExecute (
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilJPEGPrivPtr pPriv;
|
ilJPEGPrivPtr pPriv;
|
||||||
ilError error;
|
ilError error;
|
||||||
int i;
|
int i;
|
||||||
iljpgPtr pPixels[ILJPG_MAX_COMPS];
|
iljpgPtr pPixels[ILJPG_MAX_COMPS];
|
||||||
|
|
|
@ -124,7 +124,7 @@ static ilError ilDecompLZWCleanup (
|
||||||
======================================================================== */
|
======================================================================== */
|
||||||
|
|
||||||
static int ilCurrentBitsRead (
|
static int ilCurrentBitsRead (
|
||||||
register ilDecompPrivPtr pPriv
|
ilDecompPrivPtr pPriv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
|
@ -164,7 +164,7 @@ static void ilStringFromCode(
|
||||||
{
|
{
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
int node;
|
int node;
|
||||||
register ilDenodePtr denodes = pPriv->denodes;
|
ilDenodePtr denodes = pPriv->denodes;
|
||||||
|
|
||||||
if (code > 255) node = code - 2; /* remove for extra codes */
|
if (code > 255) node = code - 2; /* remove for extra codes */
|
||||||
else node = code;
|
else node = code;
|
||||||
|
@ -213,7 +213,7 @@ static void ilAddStringToTable (
|
||||||
======================================================================== */
|
======================================================================== */
|
||||||
|
|
||||||
static ilError ilInitializeDecodeTable (
|
static ilError ilInitializeDecodeTable (
|
||||||
register ilDecompPrivPtr pPriv
|
ilDecompPrivPtr pPriv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -263,20 +263,20 @@ static ilError ilDecompLZWExecute(
|
||||||
long nLines; /* Number of lines per source image strip */
|
long nLines; /* Number of lines per source image strip */
|
||||||
long nBytesToGo; /* Number of source image bytes left to unpack for current strip */
|
long nBytesToGo; /* Number of source image bytes left to unpack for current strip */
|
||||||
long nDstLineBytesToGo; /* Number of bytes left to write to this line of destination */
|
long nDstLineBytesToGo; /* Number of bytes left to write to this line of destination */
|
||||||
register ilPtr pSrcByte; /* Pointer to source image data */
|
ilPtr pSrcByte; /* Pointer to source image data */
|
||||||
register ilPtr pDstByte; /* Pointer to destination image data first byte */
|
ilPtr pDstByte; /* Pointer to destination image data first byte */
|
||||||
ilPtr pSrcStart; /* Pointer to initial src (comp) byte */
|
ilPtr pSrcStart; /* Pointer to initial src (comp) byte */
|
||||||
ilPtr pDstLine; /* Pointer to destination image data first byte of each scanline */
|
ilPtr pDstLine; /* Pointer to destination image data first byte of each scanline */
|
||||||
register ilDecompPrivPtr pPriv; /* Pointer to private image data */
|
ilDecompPrivPtr pPriv; /* Pointer to private image data */
|
||||||
ilImagePlaneInfo *pPlane;
|
ilImagePlaneInfo *pPlane;
|
||||||
|
|
||||||
/* Greeley defines */
|
/* Greeley defines */
|
||||||
register unsigned int bitCount;
|
unsigned int bitCount;
|
||||||
unsigned int numBits;
|
unsigned int numBits;
|
||||||
/* compatibility problem with long and unsigned long data fields */
|
/* compatibility problem with long and unsigned long data fields */
|
||||||
CARD32 bits;
|
CARD32 bits;
|
||||||
long k;
|
long k;
|
||||||
register unsigned int code;
|
unsigned int code;
|
||||||
unsigned int oldCode;
|
unsigned int oldCode;
|
||||||
unsigned int stringCount = 0;
|
unsigned int stringCount = 0;
|
||||||
ilError status = IL_OK;
|
ilError status = IL_OK;
|
||||||
|
|
|
@ -72,16 +72,16 @@ static ilError ilDecompPackbitsExecute(
|
||||||
|
|
||||||
unsigned long dstNBytes; /* Number of destination image bytes per row */
|
unsigned long dstNBytes; /* Number of destination image bytes per row */
|
||||||
long nLines; /* Number of lines per source image strip */
|
long nLines; /* Number of lines per source image strip */
|
||||||
register long nBytesToGo; /* Number of source image bytes left to unpack for current strip */
|
long nBytesToGo; /* Number of source image bytes left to unpack for current strip */
|
||||||
register long nDstLineBytesToGo; /* Number of bytes left to write to this line of destination */
|
long nDstLineBytesToGo; /* Number of bytes left to write to this line of destination */
|
||||||
register ilPtr pSrcByte; /* Pointer to source image data */
|
ilPtr pSrcByte; /* Pointer to source image data */
|
||||||
register ilPtr pDstByte; /* Pointer to destination image data first byte */
|
ilPtr pDstByte; /* Pointer to destination image data first byte */
|
||||||
ilPtr pSrcLine; /* Pointer to source image data first byte of each scanline */
|
ilPtr pSrcLine; /* Pointer to source image data first byte of each scanline */
|
||||||
ilPtr pDstLine; /* Pointer to destination image data first byte of each scanline */
|
ilPtr pDstLine; /* Pointer to destination image data first byte of each scanline */
|
||||||
ilDecompPBPrivPtr pPriv; /* Pointer to private image data */
|
ilDecompPBPrivPtr pPriv; /* Pointer to private image data */
|
||||||
ilImagePlaneInfo *pPlane;
|
ilImagePlaneInfo *pPlane;
|
||||||
register int count; /* run-length code value */
|
int count; /* run-length code value */
|
||||||
register ilByte repeatbyte; /* repeated data */
|
ilByte repeatbyte; /* repeated data */
|
||||||
|
|
||||||
|
|
||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
|
|
|
@ -238,11 +238,11 @@ ilDitherPrivPtr pPriv;
|
||||||
long nLinesM1;
|
long nLinesM1;
|
||||||
long srcRowBytes, dstRowBytes;
|
long srcRowBytes, dstRowBytes;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long x, yMod8Times8, width;
|
long x, yMod8Times8, width;
|
||||||
register const unsigned short *pMulR, *pMulG, *pMulB;
|
const unsigned short *pMulR, *pMulG, *pMulB;
|
||||||
register ilPtr pSrc, pDst, pTranslate;
|
ilPtr pSrc, pDst, pTranslate;
|
||||||
register unsigned long pixel, kernel;
|
unsigned long pixel, kernel;
|
||||||
register int upShiftR, upShiftG;
|
int upShiftR, upShiftG;
|
||||||
|
|
||||||
pPriv = (ilDitherPrivPtr)pData->pPrivate;
|
pPriv = (ilDitherPrivPtr)pData->pPrivate;
|
||||||
width = pPriv->width;
|
width = pPriv->width;
|
||||||
|
@ -302,10 +302,10 @@ ilDitherPrivPtr pPriv;
|
||||||
long nLinesM1;
|
long nLinesM1;
|
||||||
long srcRowBytes, dstRowBytes;
|
long srcRowBytes, dstRowBytes;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long x, yMod8Times8, width;
|
long x, yMod8Times8, width;
|
||||||
register const unsigned short *pMul8, *pMul4;
|
const unsigned short *pMul8, *pMul4;
|
||||||
register ilPtr pSrc, pDst, pTranslate;
|
ilPtr pSrc, pDst, pTranslate;
|
||||||
register unsigned long pixel, kernel;
|
unsigned long pixel, kernel;
|
||||||
|
|
||||||
pPriv = (ilDitherPrivPtr)pData->pPrivate;
|
pPriv = (ilDitherPrivPtr)pData->pPrivate;
|
||||||
width = pPriv->width;
|
width = pPriv->width;
|
||||||
|
@ -364,14 +364,14 @@ static ilError ilExecuteDiffusionRGB (
|
||||||
ilDitherPrivPtr pPriv;
|
ilDitherPrivPtr pPriv;
|
||||||
long srcRowBytes, dstRowBytes;
|
long srcRowBytes, dstRowBytes;
|
||||||
long nLinesM1, nPixelsM1, nPixelsM1Init;
|
long nLinesM1, nPixelsM1, nPixelsM1Init;
|
||||||
register int red, green, blue;
|
int red, green, blue;
|
||||||
register int redAboveError, greenAboveError, blueAboveError;
|
int redAboveError, greenAboveError, blueAboveError;
|
||||||
register int redAboveLeftError, greenAboveLeftError, blueAboveLeftError;
|
int redAboveLeftError, greenAboveLeftError, blueAboveLeftError;
|
||||||
register int redAboveRightError, greenAboveRightError, blueAboveRightError;
|
int redAboveRightError, greenAboveRightError, blueAboveRightError;
|
||||||
int redRShift, greenRShift, blueRShift;
|
int redRShift, greenRShift, blueRShift;
|
||||||
register long pixel;
|
long pixel;
|
||||||
register int *pError;
|
int *pError;
|
||||||
register ilPtr pSrc;
|
ilPtr pSrc;
|
||||||
long *pColorTable;
|
long *pColorTable;
|
||||||
ilPtr pDst, pSrcLine, pDstLine;
|
ilPtr pDst, pSrcLine, pDstLine;
|
||||||
|
|
||||||
|
@ -495,13 +495,13 @@ static ilError ilExecuteDiffusion484 (
|
||||||
ilDitherPrivPtr pPriv;
|
ilDitherPrivPtr pPriv;
|
||||||
long srcRowBytes, dstRowBytes;
|
long srcRowBytes, dstRowBytes;
|
||||||
long nLinesM1, nPixelsM1, nPixelsM1Init;
|
long nLinesM1, nPixelsM1, nPixelsM1Init;
|
||||||
register int red, green, blue;
|
int red, green, blue;
|
||||||
register int redAboveError, greenAboveError, blueAboveError;
|
int redAboveError, greenAboveError, blueAboveError;
|
||||||
register int redAboveLeftError, greenAboveLeftError, blueAboveLeftError;
|
int redAboveLeftError, greenAboveLeftError, blueAboveLeftError;
|
||||||
register int redAboveRightError, greenAboveRightError, blueAboveRightError;
|
int redAboveRightError, greenAboveRightError, blueAboveRightError;
|
||||||
register long pixel;
|
long pixel;
|
||||||
register int *pError;
|
int *pError;
|
||||||
register ilPtr pSrc;
|
ilPtr pSrc;
|
||||||
long *pColorTable;
|
long *pColorTable;
|
||||||
ilPtr pDst, pSrcLine, pDstLine;
|
ilPtr pDst, pSrcLine, pDstLine;
|
||||||
|
|
||||||
|
@ -614,12 +614,12 @@ static ilError ilExecuteQuickDiffusionRGB (
|
||||||
ilDitherPrivPtr pPriv;
|
ilDitherPrivPtr pPriv;
|
||||||
long srcRowBytes, dstRowBytes;
|
long srcRowBytes, dstRowBytes;
|
||||||
long nLinesM1, nPixelsM1, nPixelsM1Init;
|
long nLinesM1, nPixelsM1, nPixelsM1Init;
|
||||||
register int red, green, blue;
|
int red, green, blue;
|
||||||
register int redRShift, greenRShift, blueRShift;
|
int redRShift, greenRShift, blueRShift;
|
||||||
register long pixel;
|
long pixel;
|
||||||
register int *pError;
|
int *pError;
|
||||||
register ilPtr pSrc;
|
ilPtr pSrc;
|
||||||
register long *pColorTable;
|
long *pColorTable;
|
||||||
ilPtr pDst, pSrcLine, pDstLine;
|
ilPtr pDst, pSrcLine, pDstLine;
|
||||||
|
|
||||||
/* Same as regular diffusion above, except spread the errors in a simpler and
|
/* Same as regular diffusion above, except spread the errors in a simpler and
|
||||||
|
@ -771,9 +771,9 @@ static int ScanBox(
|
||||||
convertBoxTotalRec total, part1, part2;
|
convertBoxTotalRec total, part1, part2;
|
||||||
convertBoxCountRec count;
|
convertBoxCountRec count;
|
||||||
convertBoxRec slice;
|
convertBoxRec slice;
|
||||||
register convertBoxRec *pBox = &BoxTable[box];
|
convertBoxRec *pBox = &BoxTable[box];
|
||||||
double temp, ssq1, ssq2;
|
double temp, ssq1, ssq2;
|
||||||
register int axis, plane, rgb, n;
|
int axis, plane, rgb, n;
|
||||||
|
|
||||||
if ( CountBox( pBox, Ftable, &count ) ) {
|
if ( CountBox( pBox, Ftable, &count ) ) {
|
||||||
|
|
||||||
|
@ -848,13 +848,13 @@ static ilError ilChooseColorsExecute (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilDitherPrivPtr pPriv;
|
ilDitherPrivPtr pPriv;
|
||||||
long srcRowBytes, dstRowBytes, nRowsM1, nLinesM1;
|
long srcRowBytes, dstRowBytes, nRowsM1, nLinesM1;
|
||||||
long width, height;
|
long width, height;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long rowCount;
|
long rowCount;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register unsigned short *pPalette;
|
unsigned short *pPalette;
|
||||||
int nBoxes, nColors;
|
int nBoxes, nColors;
|
||||||
int index, axis, plane, inner, outer;
|
int index, axis, plane, inner, outer;
|
||||||
unsigned long *Ftable;
|
unsigned long *Ftable;
|
||||||
|
@ -886,7 +886,7 @@ convertBoxTotalRec total[256];
|
||||||
pSrcLine += srcRowBytes;
|
pSrcLine += srcRowBytes;
|
||||||
rowCount = nRowsM1;
|
rowCount = nRowsM1;
|
||||||
do {
|
do {
|
||||||
register ilByte R, G, B;
|
ilByte R, G, B;
|
||||||
|
|
||||||
R = *pSrc++; /* red */
|
R = *pSrc++; /* red */
|
||||||
G = *pSrc++; /* green */
|
G = *pSrc++; /* green */
|
||||||
|
@ -921,8 +921,8 @@ convertBoxTotalRec total[256];
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( outer = 0 ; outer < nBoxes ; outer++ ) {
|
for ( outer = 0 ; outer < nBoxes ; outer++ ) {
|
||||||
register convertBoxRec *pBox = &box[outer];
|
convertBoxRec *pBox = &box[outer];
|
||||||
register int R, G, B;
|
int R, G, B;
|
||||||
int rgb_inner, rgb_outer, rgb_limit;
|
int rgb_inner, rgb_outer, rgb_limit;
|
||||||
unsigned char multiple, candidate[256];
|
unsigned char multiple, candidate[256];
|
||||||
double ssq_inner, ssq_outer, distance;
|
double ssq_inner, ssq_outer, distance;
|
||||||
|
@ -975,7 +975,7 @@ convertBoxTotalRec total[256];
|
||||||
pDstLine += dstRowBytes;
|
pDstLine += dstRowBytes;
|
||||||
rowCount = nRowsM1;
|
rowCount = nRowsM1;
|
||||||
do {
|
do {
|
||||||
register ilByte R, G, B, P;
|
ilByte R, G, B, P;
|
||||||
|
|
||||||
R = *pSrc++; /* red */
|
R = *pSrc++; /* red */
|
||||||
G = *pSrc++; /* green */
|
G = *pSrc++; /* green */
|
||||||
|
@ -1010,13 +1010,13 @@ convertBoxTotalRec total[256];
|
||||||
IL_PRIVATE ilBool _ilConvertRGBToPalette (
|
IL_PRIVATE ilBool _ilConvertRGBToPalette (
|
||||||
ilPipe pipe,
|
ilPipe pipe,
|
||||||
ilPipeInfo *pInfo,
|
ilPipeInfo *pInfo,
|
||||||
register ilImageDes *pDes,
|
ilImageDes *pDes,
|
||||||
ilImageFormat *pFormat,
|
ilImageFormat *pFormat,
|
||||||
int option,
|
int option,
|
||||||
register ilConvertToPaletteInfo *pData
|
ilConvertToPaletteInfo *pData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilDitherPrivPtr pPriv;
|
ilDitherPrivPtr pPriv;
|
||||||
ilDstElementData dstData;
|
ilDstElementData dstData;
|
||||||
ilSrcElementData srcData;
|
ilSrcElementData srcData;
|
||||||
ilError (*executeFunction)(), (*cleanupFunction)();
|
ilError (*executeFunction)(), (*cleanupFunction)();
|
||||||
|
@ -1155,10 +1155,10 @@ IL_PRIVATE ilBool _ilConvertRGBToPalette (
|
||||||
with r/g/b/pixel together, instead of 0..65535 and rgb spread apart.
|
with r/g/b/pixel together, instead of 0..65535 and rgb spread apart.
|
||||||
*/
|
*/
|
||||||
if (diffusion) {
|
if (diffusion) {
|
||||||
register int i, index;
|
int i, index;
|
||||||
int red, green, blue;
|
int red, green, blue;
|
||||||
int redLevel, greenLevel, blueLevel;
|
int redLevel, greenLevel, blueLevel;
|
||||||
register long *pColorTemp;
|
long *pColorTemp;
|
||||||
pColorTable = (long *)IL_MALLOC (sizeof (long) * 256);
|
pColorTable = (long *)IL_MALLOC (sizeof (long) * 256);
|
||||||
if (!pColorTable) {
|
if (!pColorTable) {
|
||||||
ilDeclarePipeInvalid (pipe, IL_ERROR_MALLOC);
|
ilDeclarePipeInvalid (pipe, IL_ERROR_MALLOC);
|
||||||
|
@ -1190,9 +1190,9 @@ IL_PRIVATE ilBool _ilConvertRGBToPalette (
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (!chooseColors) {
|
if (!chooseColors) {
|
||||||
register int red, green, blue;
|
int red, green, blue;
|
||||||
register int redLevel, greenLevel, blueLevel;
|
int redLevel, greenLevel, blueLevel;
|
||||||
register unsigned short *pPal;
|
unsigned short *pPal;
|
||||||
|
|
||||||
pPal = pPalette;
|
pPal = pPalette;
|
||||||
for (red = 0; red < pData->levels[0]; red++) {
|
for (red = 0; red < pData->levels[0]; red++) {
|
||||||
|
|
|
@ -107,7 +107,7 @@ static ilEFSPrivatePtr ilInitEFS (
|
||||||
ilContext context
|
ilContext context
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSPrivatePtr pPriv;
|
ilEFSPrivatePtr pPriv;
|
||||||
|
|
||||||
/* If EFS file type data not present malloc and zero it, and then point
|
/* If EFS file type data not present malloc and zero it, and then point
|
||||||
context pAlloc to it - if not, could recurse forever.
|
context pAlloc to it - if not, could recurse forever.
|
||||||
|
@ -149,7 +149,7 @@ static ilEFSFileTypePtr ilFindFileType (
|
||||||
ilEFSFileTypePtr pListHead
|
ilEFSFileTypePtr pListHead
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSFileTypePtr pFileType;
|
ilEFSFileTypePtr pFileType;
|
||||||
|
|
||||||
pFileType = pListHead->h.pNext;
|
pFileType = pListHead->h.pNext;
|
||||||
while (pFileType != pListHead) {
|
while (pFileType != pListHead) {
|
||||||
|
@ -167,12 +167,12 @@ register ilEFSFileTypePtr pFileType;
|
||||||
checkOrder.
|
checkOrder.
|
||||||
*/
|
*/
|
||||||
static void ilAddFileTypeToList (
|
static void ilAddFileTypeToList (
|
||||||
register ilEFSFileTypePtr pFileType,
|
ilEFSFileTypePtr pFileType,
|
||||||
ilEFSFileTypePtr pListHead
|
ilEFSFileTypePtr pListHead
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSFileTypePtr pListFileType;
|
ilEFSFileTypePtr pListFileType;
|
||||||
register int checkOrder;
|
int checkOrder;
|
||||||
|
|
||||||
checkOrder = pFileType->info.checkOrder;
|
checkOrder = pFileType->info.checkOrder;
|
||||||
pListFileType = pListHead->h.pNext;
|
pListFileType = pListHead->h.pNext;
|
||||||
|
@ -191,11 +191,11 @@ register int checkOrder;
|
||||||
|
|
||||||
/* Object Destroy() function for file type objects. */
|
/* Object Destroy() function for file type objects. */
|
||||||
static void ilDestroyFileType (
|
static void ilDestroyFileType (
|
||||||
register ilEFSFileTypePtr pFileType
|
ilEFSFileTypePtr pFileType
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilEFSPrivatePtr pPriv;
|
ilEFSPrivatePtr pPriv;
|
||||||
register ilEFSFileTypePtr pReplaced;
|
ilEFSFileTypePtr pReplaced;
|
||||||
|
|
||||||
pPriv = (ilEFSPrivatePtr)
|
pPriv = (ilEFSPrivatePtr)
|
||||||
((ilContextPtr)(pFileType->h.o.p.context))->pAlloc[IL_CONTEXT_ALLOC_EFS];
|
((ilContextPtr)(pFileType->h.o.p.context))->pAlloc[IL_CONTEXT_ALLOC_EFS];
|
||||||
|
@ -215,14 +215,14 @@ register ilEFSFileTypePtr pReplaced;
|
||||||
|
|
||||||
ilEFSFileType ilEFSAddFileType (
|
ilEFSFileType ilEFSAddFileType (
|
||||||
ilContext context,
|
ilContext context,
|
||||||
register ilEFSFileTypeInfo *pInfo,
|
ilEFSFileTypeInfo *pInfo,
|
||||||
void *pOptions
|
void *pOptions
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilEFSPrivatePtr pPriv;
|
ilEFSPrivatePtr pPriv;
|
||||||
int i;
|
int i;
|
||||||
register ilEFSFileTypePtr pFileType, pReplace;
|
ilEFSFileTypePtr pFileType, pReplace;
|
||||||
register unsigned long openModes;
|
unsigned long openModes;
|
||||||
|
|
||||||
/* masks for defined bits in ilEFSFileTypeInfo - others invalid */
|
/* masks for defined bits in ilEFSFileTypeInfo - others invalid */
|
||||||
#define OPEN_MODE_MASKS (1<<IL_EFS_READ | 1<<IL_EFS_READ_SEQUENTIAL | 1<<IL_EFS_WRITE)
|
#define OPEN_MODE_MASKS (1<<IL_EFS_READ | 1<<IL_EFS_READ_SEQUENTIAL | 1<<IL_EFS_WRITE)
|
||||||
|
@ -307,7 +307,7 @@ ilBool ilEFSGetFileTypeInfo (
|
||||||
ilEFSFileTypeInfo *pInfo
|
ilEFSFileTypeInfo *pInfo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSFileTypePtr pFileType;
|
ilEFSFileTypePtr pFileType;
|
||||||
|
|
||||||
pFileType = (ilEFSFileTypePtr)fileType;
|
pFileType = (ilEFSFileTypePtr)fileType;
|
||||||
if (pFileType->h.o.p.objectType != IL_EFS_FILE_TYPE) {
|
if (pFileType->h.o.p.objectType != IL_EFS_FILE_TYPE) {
|
||||||
|
@ -331,9 +331,9 @@ ilBool ilEFSListFileTypes (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilEFSPrivatePtr pPriv;
|
ilEFSPrivatePtr pPriv;
|
||||||
register int nFileTypes;
|
int nFileTypes;
|
||||||
register ilEFSFileTypePtr pFileType;
|
ilEFSFileTypePtr pFileType;
|
||||||
register ilEFSFileType *pfileType;
|
ilEFSFileType *pfileType;
|
||||||
|
|
||||||
*pNFileTypes = 0;
|
*pNFileTypes = 0;
|
||||||
*pfileTypes = (ilEFSFileType *)NULL;
|
*pfileTypes = (ilEFSFileType *)NULL;
|
||||||
|
@ -386,7 +386,7 @@ static void ilDestroyFile (
|
||||||
ilEFSFilePtr pFile
|
ilEFSFilePtr pFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSFileTypePtr pFileType;
|
ilEFSFileTypePtr pFileType;
|
||||||
|
|
||||||
/* Get ptr to file type; if null, file not actually open yet; skip Close() */
|
/* Get ptr to file type; if null, file not actually open yet; skip Close() */
|
||||||
pFileType = (ilEFSFileTypePtr)pFile->info.fileType;
|
pFileType = (ilEFSFileTypePtr)pFile->info.fileType;
|
||||||
|
@ -405,8 +405,8 @@ ilEFSFile ilEFSOpen (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilEFSPrivatePtr pPriv;
|
ilEFSPrivatePtr pPriv;
|
||||||
register ilEFSFilePtr pFile;
|
ilEFSFilePtr pFile;
|
||||||
register ilEFSFileTypePtr pFileType, pListHead;
|
ilEFSFileTypePtr pFileType, pListHead;
|
||||||
ilBool readOpen;
|
ilBool readOpen;
|
||||||
long nPages;
|
long nPages;
|
||||||
ilPtr pOpenPriv;
|
ilPtr pOpenPriv;
|
||||||
|
@ -466,7 +466,7 @@ char extension [IL_EFS_MAX_EXTENSION_CHARS];
|
||||||
/* If not found, search for extension if enabled. */
|
/* If not found, search for extension if enabled. */
|
||||||
if (!pFileType && (searchOptions & IL_EFS_BY_EXTENSION)) {
|
if (!pFileType && (searchOptions & IL_EFS_BY_EXTENSION)) {
|
||||||
char *pExtension;
|
char *pExtension;
|
||||||
register ilEFSFileTypePtr pSearch;
|
ilEFSFileTypePtr pSearch;
|
||||||
int nChars;
|
int nChars;
|
||||||
|
|
||||||
pExtension = strrchr (fileName, '.');
|
pExtension = strrchr (fileName, '.');
|
||||||
|
@ -481,7 +481,7 @@ char extension [IL_EFS_MAX_EXTENSION_CHARS];
|
||||||
/* Search list for extension match until pFileType found or list done */
|
/* Search list for extension match until pFileType found or list done */
|
||||||
pSearch = pListHead->h.pNext;
|
pSearch = pListHead->h.pNext;
|
||||||
while (!pFileType && (pSearch != pListHead)) {
|
while (!pFileType && (pSearch != pListHead)) {
|
||||||
register int nExtensions = pSearch->info.nExtensions;
|
int nExtensions = pSearch->info.nExtensions;
|
||||||
while (nExtensions-- > 0)
|
while (nExtensions-- > 0)
|
||||||
if (STRING_EQUAL (extension, pSearch->info.extensions[nExtensions])) {
|
if (STRING_EQUAL (extension, pSearch->info.extensions[nExtensions])) {
|
||||||
pFileType = pSearch; /* extension found; quit */
|
pFileType = pSearch; /* extension found; quit */
|
||||||
|
@ -510,7 +510,7 @@ char extension [IL_EFS_MAX_EXTENSION_CHARS];
|
||||||
try open if enabled (checkOrder != 0) and openMode supported for file type.
|
try open if enabled (checkOrder != 0) and openMode supported for file type.
|
||||||
*/
|
*/
|
||||||
if (!pFileType && readOpen && (searchOptions & IL_EFS_BY_CHECKING)) {
|
if (!pFileType && readOpen && (searchOptions & IL_EFS_BY_CHECKING)) {
|
||||||
register ilEFSFileTypePtr pSearch;
|
ilEFSFileTypePtr pSearch;
|
||||||
|
|
||||||
pSearch = pListHead->h.pNext;
|
pSearch = pListHead->h.pNext;
|
||||||
while (pSearch != pListHead) {
|
while (pSearch != pListHead) {
|
||||||
|
@ -569,7 +569,7 @@ ilBool ilEFSGetFileInfo (
|
||||||
ilEFSFileInfo *pInfo /* RETURNED */
|
ilEFSFileInfo *pInfo /* RETURNED */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSFilePtr pFile;
|
ilEFSFilePtr pFile;
|
||||||
|
|
||||||
pFile = (ilEFSFilePtr)file;
|
pFile = (ilEFSFilePtr)file;
|
||||||
if (pFile->o.p.objectType != IL_EFS_FILE) {
|
if (pFile->o.p.objectType != IL_EFS_FILE) {
|
||||||
|
@ -594,7 +594,7 @@ ilBool ilEFSSeek (
|
||||||
void *pOptions
|
void *pOptions
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSFilePtr pFile;
|
ilEFSFilePtr pFile;
|
||||||
|
|
||||||
pFile = (ilEFSFilePtr)file;
|
pFile = (ilEFSFilePtr)file;
|
||||||
if (pOptions) {
|
if (pOptions) {
|
||||||
|
@ -628,7 +628,7 @@ ilBool ilEFSGetPageInfo (
|
||||||
ilEFSPageInfo *pInfo
|
ilEFSPageInfo *pInfo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSFilePtr pFile;
|
ilEFSFilePtr pFile;
|
||||||
|
|
||||||
pFile = (ilEFSFilePtr)file;
|
pFile = (ilEFSFilePtr)file;
|
||||||
if (pFile->o.p.objectType != IL_EFS_FILE) {
|
if (pFile->o.p.objectType != IL_EFS_FILE) {
|
||||||
|
@ -660,7 +660,7 @@ ilBool ilEFSReadImage (
|
||||||
void *pOptions
|
void *pOptions
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSFilePtr pFile;
|
ilEFSFilePtr pFile;
|
||||||
|
|
||||||
pFile = (ilEFSFilePtr)file;
|
pFile = (ilEFSFilePtr)file;
|
||||||
if (pOptions) {
|
if (pOptions) {
|
||||||
|
@ -715,7 +715,7 @@ ilBool ilEFSWriteImage (
|
||||||
void *pOptions
|
void *pOptions
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilEFSFilePtr pFile;
|
ilEFSFilePtr pFile;
|
||||||
|
|
||||||
pFile = (ilEFSFilePtr)file;
|
pFile = (ilEFSFilePtr)file;
|
||||||
if (pOptions) {
|
if (pOptions) {
|
||||||
|
@ -739,8 +739,8 @@ register ilEFSFilePtr pFile;
|
||||||
maskImage = (ilClientImage)NULL;
|
maskImage = (ilClientImage)NULL;
|
||||||
else {
|
else {
|
||||||
ilImageInfo *pInfo;
|
ilImageInfo *pInfo;
|
||||||
register const ilImageDes *pDes;
|
const ilImageDes *pDes;
|
||||||
register const ilImageFormat *pFormat;
|
const ilImageFormat *pFormat;
|
||||||
|
|
||||||
if (!ilQueryClientImage (maskImage, &pInfo, 0))
|
if (!ilQueryClientImage (maskImage, &pInfo, 0))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -59,8 +59,8 @@ static ilError ilExecuteBitAlign (
|
||||||
{
|
{
|
||||||
ilImagePlaneInfo *pImagePlane;
|
ilImagePlaneInfo *pImagePlane;
|
||||||
long srcRowBytes, dstRowBytes;
|
long srcRowBytes, dstRowBytes;
|
||||||
register long nLinesM1, nBytes;
|
long nLinesM1, nBytes;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
|
|
||||||
/* Use bcopy to copy each line; copy the lesser of the src/dstRowBytes.
|
/* Use bcopy to copy each line; copy the lesser of the src/dstRowBytes.
|
||||||
Exit if no lines or pixels.
|
Exit if no lines or pixels.
|
||||||
|
@ -115,9 +115,9 @@ static ilError ilExecute8Bit3PlaneToPixel (
|
||||||
ilImagePlaneInfo *pImagePlane;
|
ilImagePlaneInfo *pImagePlane;
|
||||||
long src0RowBytes, src1RowBytes, src2RowBytes, dstRowBytes;
|
long src0RowBytes, src1RowBytes, src2RowBytes, dstRowBytes;
|
||||||
long nPixelsM1Init;
|
long nPixelsM1Init;
|
||||||
register long nLinesM1, nPixelsM1;
|
long nLinesM1, nPixelsM1;
|
||||||
ilPtr pSrc0Line, pSrc1Line, pSrc2Line, pDstLine;
|
ilPtr pSrc0Line, pSrc1Line, pSrc2Line, pDstLine;
|
||||||
register ilPtr pSrc0, pSrc1, pSrc2, pDst;
|
ilPtr pSrc0, pSrc1, pSrc2, pDst;
|
||||||
|
|
||||||
/* Get ptr to start of 3 src planes and to dst */
|
/* Get ptr to start of 3 src planes and to dst */
|
||||||
pImagePlane = pData->pSrcImage->plane;
|
pImagePlane = pData->pSrcImage->plane;
|
||||||
|
@ -188,9 +188,9 @@ static ilError ilExecute8Bit3PixelToPlane (
|
||||||
ilImagePlaneInfo *pImagePlane;
|
ilImagePlaneInfo *pImagePlane;
|
||||||
long dst0RowBytes, dst1RowBytes, dst2RowBytes, srcRowBytes;
|
long dst0RowBytes, dst1RowBytes, dst2RowBytes, srcRowBytes;
|
||||||
long nPixelsM1Init;
|
long nPixelsM1Init;
|
||||||
register long nLinesM1, nPixelsM1;
|
long nLinesM1, nPixelsM1;
|
||||||
ilPtr pDst0Line, pDst1Line, pDst2Line, pSrcLine;
|
ilPtr pDst0Line, pDst1Line, pDst2Line, pSrcLine;
|
||||||
register ilPtr pDst0, pDst1, pDst2, pSrc;
|
ilPtr pDst0, pDst1, pDst2, pSrc;
|
||||||
|
|
||||||
/* Get ptr to start src plane and to 3 dst planes */
|
/* Get ptr to start src plane and to 3 dst planes */
|
||||||
pImagePlane = pData->pSrcImage->plane;
|
pImagePlane = pData->pSrcImage->plane;
|
||||||
|
@ -265,9 +265,9 @@ ilImagePlaneInfo *pImagePlane;
|
||||||
long srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
|
long srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
|
||||||
ilBool oddNumberOfNibbles;
|
ilBool oddNumberOfNibbles;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long nBytesM1;
|
long nBytesM1;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register ilByte byte;
|
ilByte byte;
|
||||||
|
|
||||||
/* Exit if no lines or pixels. */
|
/* Exit if no lines or pixels. */
|
||||||
pSrcImage = pData->pSrcImage;
|
pSrcImage = pData->pSrcImage;
|
||||||
|
@ -341,9 +341,9 @@ ilImagePlaneInfo *pImagePlane;
|
||||||
long srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
|
long srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
|
||||||
ilBool oddNumberOfNibbles;
|
ilBool oddNumberOfNibbles;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long nBytesM1;
|
long nBytesM1;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register ilByte byte0, byte1;
|
ilByte byte0, byte1;
|
||||||
|
|
||||||
/* Exit if no lines or pixels. */
|
/* Exit if no lines or pixels. */
|
||||||
pSrcImage = pData->pSrcImage;
|
pSrcImage = pData->pSrcImage;
|
||||||
|
@ -419,9 +419,9 @@ ilImagePlaneInfo *pImagePlane;
|
||||||
long srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
|
long srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
|
||||||
ilBool oddNumberOfNibbles;
|
ilBool oddNumberOfNibbles;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long nBytesM1;
|
long nBytesM1;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register ilByte byte;
|
ilByte byte;
|
||||||
|
|
||||||
/* Use bcopy to copy each line; copy the lesser of the src/dstRowBytes.
|
/* Use bcopy to copy each line; copy the lesser of the src/dstRowBytes.
|
||||||
Exit if no lines or pixels.
|
Exit if no lines or pixels.
|
||||||
|
@ -490,9 +490,9 @@ ilImageInfo *pSrcImage;
|
||||||
ilImagePlaneInfo *pImagePlane;
|
ilImagePlaneInfo *pImagePlane;
|
||||||
long srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
|
long srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long nBytesM1;
|
long nBytesM1;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register ilByte byte;
|
ilByte byte;
|
||||||
|
|
||||||
/* Use bcopy to copy each line; copy the lesser of the src/dstRowBytes.
|
/* Use bcopy to copy each line; copy the lesser of the src/dstRowBytes.
|
||||||
Exit if no lines or pixels.
|
Exit if no lines or pixels.
|
||||||
|
|
|
@ -47,13 +47,13 @@
|
||||||
#ifndef LSB_BIT_ORDER
|
#ifndef LSB_BIT_ORDER
|
||||||
# define flip_bits(start,n) /*EMPTY*/
|
# define flip_bits(start,n) /*EMPTY*/
|
||||||
#else
|
#else
|
||||||
extern void flip_bits(register ilPtr start, register unsigned n);
|
extern void flip_bits(ilPtr start, unsigned n);
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
flip_bits(register ilPtr start,
|
flip_bits(ilPtr start,
|
||||||
register unsigned n )
|
unsigned n )
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
|
@ -136,12 +136,12 @@ static ilError ilExecuteBiDiffusion (
|
||||||
#endif
|
#endif
|
||||||
ilBiDiffusionPrivPtr pPriv;
|
ilBiDiffusionPrivPtr pPriv;
|
||||||
long nLinesM1, nPixelsM1Init, nPixelsM1;
|
long nLinesM1, nPixelsM1Init, nPixelsM1;
|
||||||
register short *pPrevError, *pError;
|
short *pPrevError, *pError;
|
||||||
register int errorAcc, invert;
|
int errorAcc, invert;
|
||||||
long srcRowBytes, dstRowBytes;
|
long srcRowBytes, dstRowBytes;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register ilPtr pSrc;
|
ilPtr pSrc;
|
||||||
register CARD32 mask, *pDst;
|
CARD32 mask, *pDst;
|
||||||
CARD32 outLong;
|
CARD32 outLong;
|
||||||
|
|
||||||
pPriv = (ilBiDiffusionPrivPtr)pData->pPrivate;
|
pPriv = (ilBiDiffusionPrivPtr)pData->pPrivate;
|
||||||
|
@ -314,11 +314,11 @@ ilThresholdPrivPtr pPriv;
|
||||||
long nLinesM1, nPixelsM1Init;
|
long nLinesM1, nPixelsM1Init;
|
||||||
long srcRowBytes, dstRowBytes;
|
long srcRowBytes, dstRowBytes;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long nPixelsM1;
|
long nPixelsM1;
|
||||||
register ilPtr pSrc;
|
ilPtr pSrc;
|
||||||
register CARD32 mask, *pDst;
|
CARD32 mask, *pDst;
|
||||||
CARD32 outLong;
|
CARD32 outLong;
|
||||||
register ilByte threshold;
|
ilByte threshold;
|
||||||
|
|
||||||
pPriv = (ilThresholdPrivPtr)pData->pPrivate;
|
pPriv = (ilThresholdPrivPtr)pData->pPrivate;
|
||||||
threshold = *pPriv->pThreshold;
|
threshold = *pPriv->pThreshold;
|
||||||
|
|
|
@ -107,7 +107,7 @@ short out_w, out_h;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotateCleanup (
|
static ilError ilRotateCleanup (
|
||||||
register ilRotatePrivptr pPriv,
|
ilRotatePrivptr pPriv,
|
||||||
ilBool aborting
|
ilBool aborting
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -124,7 +124,7 @@ static ilError ilRotateCleanup (
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotateExecute (
|
static ilError ilRotateExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
|
@ -132,10 +132,10 @@ static ilError ilRotateExecute (
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
int nrows, nlines, nlinesout;
|
int nrows, nlines, nlinesout;
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -187,7 +187,7 @@ ilBool ilRotate(
|
||||||
{
|
{
|
||||||
unsigned int state;
|
unsigned int state;
|
||||||
ilPipeInfo info;
|
ilPipeInfo info;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
ilDstElementData dstdata;
|
ilDstElementData dstdata;
|
||||||
ilImageDes imdes;
|
ilImageDes imdes;
|
||||||
ilImageFormat imformat;
|
ilImageFormat imformat;
|
||||||
|
|
|
@ -399,7 +399,7 @@ DATA_OUT_PTR out;
|
||||||
OPERAND first_pix, last_pix, col;
|
OPERAND first_pix, last_pix, col;
|
||||||
float Y, x, y;
|
float Y, x, y;
|
||||||
OPERAND ex, ey, dx, dy;
|
OPERAND ex, ey, dx, dy;
|
||||||
register DATA_IN_PTR data;
|
DATA_IN_PTR data;
|
||||||
|
|
||||||
/* Find coord of first & last pixels in the new image coord. system */
|
/* Find coord of first & last pixels in the new image coord. system */
|
||||||
first_pix = First_Pixel(r_next_row_out);
|
first_pix = First_Pixel(r_next_row_out);
|
||||||
|
@ -491,7 +491,7 @@ DATA_OUT_PTR out;
|
||||||
OPERAND first_pix, last_pix, col;
|
OPERAND first_pix, last_pix, col;
|
||||||
float Y, x, y;
|
float Y, x, y;
|
||||||
OPERAND ex, ey, dx, dy;
|
OPERAND ex, ey, dx, dy;
|
||||||
register DATA_IN_PTR data, data2;
|
DATA_IN_PTR data, data2;
|
||||||
OPERAND val1, val2, x1, y1, t;
|
OPERAND val1, val2, x1, y1, t;
|
||||||
size_t input_row_size;
|
size_t input_row_size;
|
||||||
|
|
||||||
|
|
|
@ -91,12 +91,12 @@ static unsigned long ilSupportedCompressions [IL_MAX_TYPE+1] = {
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE ilError _ilValidateDesFormat (
|
IL_PRIVATE ilError _ilValidateDesFormat (
|
||||||
ilBool allowPrivateTypes,
|
ilBool allowPrivateTypes,
|
||||||
register const ilImageDes *pDes,
|
const ilImageDes *pDes,
|
||||||
register const ilImageFormat *pFormat
|
const ilImageFormat *pFormat
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#define MAX_BITS_PER_SAMPLE 24 /* maximum # of bits/sample supported */
|
#define MAX_BITS_PER_SAMPLE 24 /* maximum # of bits/sample supported */
|
||||||
register unsigned int i, j, nBits, nLevels, nSamplesPerPixel;
|
unsigned int i, j, nBits, nLevels, nSamplesPerPixel;
|
||||||
const ilYCbCrSampleInfo *pSample;
|
const ilYCbCrSampleInfo *pSample;
|
||||||
|
|
||||||
/* reserved must = 0; # samples must be 1 .. IL_MAX_SAMPLES.
|
/* reserved must = 0; # samples must be 1 .. IL_MAX_SAMPLES.
|
||||||
|
@ -241,14 +241,14 @@ const ilYCbCrSampleInfo *pSample;
|
||||||
format "*pFormat".
|
format "*pFormat".
|
||||||
*/
|
*/
|
||||||
void ilGetBytesPerRow (
|
void ilGetBytesPerRow (
|
||||||
register const ilImageDes *pDes,
|
const ilImageDes *pDes,
|
||||||
register const ilImageFormat *pFormat,
|
const ilImageFormat *pFormat,
|
||||||
long width,
|
long width,
|
||||||
long *pnBytesPerRow /* RETURNED */
|
long *pnBytesPerRow /* RETURNED */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register const unsigned short *pNBits;
|
const unsigned short *pNBits;
|
||||||
register int rowBitAlign, nBits, nSamplesPerPixel, i;
|
int rowBitAlign, nBits, nSamplesPerPixel, i;
|
||||||
|
|
||||||
pNBits = pFormat->nBitsPerSample;
|
pNBits = pFormat->nBitsPerSample;
|
||||||
rowBitAlign = pFormat->rowBitAlign;
|
rowBitAlign = pFormat->rowBitAlign;
|
||||||
|
@ -282,7 +282,7 @@ register int rowBitAlign, nBits, nSamplesPerPixel, i;
|
||||||
* (rowBitAlign / 8);
|
* (rowBitAlign / 8);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
register const ilYCbCrSampleInfo *pYCbCr;
|
const ilYCbCrSampleInfo *pYCbCr;
|
||||||
|
|
||||||
/* Planar order: each plane is independent; return nSamplesPerPixel rowbytes.
|
/* Planar order: each plane is independent; return nSamplesPerPixel rowbytes.
|
||||||
Take into account subsampling if YCbCr image.
|
Take into account subsampling if YCbCr image.
|
||||||
|
@ -319,15 +319,15 @@ register int rowBitAlign, nBits, nSamplesPerPixel, i;
|
||||||
Returns: zero if success, else error code.
|
Returns: zero if success, else error code.
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE ilError _ilMallocImagePixels (
|
IL_PRIVATE ilError _ilMallocImagePixels (
|
||||||
register ilImagePtr pImage
|
ilImagePtr pImage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int plane, nPlanes;
|
int plane, nPlanes;
|
||||||
int MCUMinus1;
|
int MCUMinus1;
|
||||||
register long nBytesToAlloc, nBytesPerRow, allocHeight;
|
long nBytesToAlloc, nBytesPerRow, allocHeight;
|
||||||
ilPtr pPixels;
|
ilPtr pPixels;
|
||||||
long rowBytesPerPlane [IL_MAX_SAMPLES];
|
long rowBytesPerPlane [IL_MAX_SAMPLES];
|
||||||
register ilYCbCrSampleInfo *pYCbCr;
|
ilYCbCrSampleInfo *pYCbCr;
|
||||||
|
|
||||||
|
|
||||||
/* Get the bytes per row, set into the image. */
|
/* Get the bytes per row, set into the image. */
|
||||||
|
@ -399,7 +399,7 @@ register ilYCbCrSampleInfo *pYCbCr;
|
||||||
Free the pixels of the image only if the IL owns them.
|
Free the pixels of the image only if the IL owns them.
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE void _ilFreeImagePixels (
|
IL_PRIVATE void _ilFreeImagePixels (
|
||||||
register ilImagePtr pImage
|
ilImagePtr pImage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int plane;
|
int plane;
|
||||||
|
@ -447,11 +447,11 @@ ilPtr pPixels;
|
||||||
is zero (0). Locks image to that strip height.
|
is zero (0). Locks image to that strip height.
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE ilBool _ilAllocStripOffsets (
|
IL_PRIVATE ilBool _ilAllocStripOffsets (
|
||||||
register ilImagePtr pImage,
|
ilImagePtr pImage,
|
||||||
register long stripHeight
|
long stripHeight
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register long nStrips;
|
long nStrips;
|
||||||
|
|
||||||
if (stripHeight <= 0)
|
if (stripHeight <= 0)
|
||||||
stripHeight = ilRecommendedStripHeight (pImage->i.pDes, pImage->i.pFormat,
|
stripHeight = ilRecommendedStripHeight (pImage->i.pDes, pImage->i.pFormat,
|
||||||
|
@ -485,7 +485,7 @@ ilInternalImage ilCreateInternalImage (
|
||||||
unsigned long mustBeZero
|
unsigned long mustBeZero
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
ilError error;
|
ilError error;
|
||||||
|
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ ilBool ilQueryInternalImage (
|
||||||
unsigned long mustBeZero
|
unsigned long mustBeZero
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
|
|
||||||
|
|
||||||
/* Check that given image is an internal image.
|
/* Check that given image is an internal image.
|
||||||
|
@ -649,7 +649,7 @@ ilClientImage ilCreateClientImage (
|
||||||
unsigned long mustBeZero
|
unsigned long mustBeZero
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
ilError error;
|
ilError error;
|
||||||
int plane, nPlanes;
|
int plane, nPlanes;
|
||||||
|
|
||||||
|
@ -771,7 +771,7 @@ ilBool ilQueryClientImage (
|
||||||
unsigned long mustBeZero
|
unsigned long mustBeZero
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
|
|
||||||
/* Validate given image of correct type; return false if not realized.
|
/* Validate given image of correct type; return false if not realized.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -122,7 +122,7 @@ IL_EXTERN void _ilFreeImagePixels (
|
||||||
is zero (0). Locks image to that strip height.
|
is zero (0). Locks image to that strip height.
|
||||||
*/
|
*/
|
||||||
IL_EXTERN ilBool _ilAllocStripOffsets (
|
IL_EXTERN ilBool _ilAllocStripOffsets (
|
||||||
register ilImagePtr pImage,
|
ilImagePtr pImage,
|
||||||
long stripHeight
|
long stripHeight
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -168,8 +168,8 @@ IL_EXTERN ilObjectPtr _ilCreateObject (
|
||||||
*/
|
*/
|
||||||
IL_EXTERN ilError _ilValidateDesFormat (
|
IL_EXTERN ilError _ilValidateDesFormat (
|
||||||
ilBool allowPrivateTypes,
|
ilBool allowPrivateTypes,
|
||||||
register const ilImageDes *pDes,
|
const ilImageDes *pDes,
|
||||||
register const ilImageFormat *pFormat
|
const ilImageFormat *pFormat
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -94,9 +94,9 @@ static ilError ilExecuteinvert (
|
||||||
{
|
{
|
||||||
ilinvertPtr pPriv;
|
ilinvertPtr pPriv;
|
||||||
long srcnbytes, dstnbytes;
|
long srcnbytes, dstnbytes;
|
||||||
register ilPtr psrcline, pdstline;
|
ilPtr psrcline, pdstline;
|
||||||
register ilPtr psrc, pdst;
|
ilPtr psrc, pdst;
|
||||||
register long nLines, nPixels;
|
long nLines, nPixels;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -47,12 +47,12 @@
|
||||||
*/
|
*/
|
||||||
ILJPG_PUBLIC_EXTERN
|
ILJPG_PUBLIC_EXTERN
|
||||||
iljpgError iljpgDecodeInit (
|
iljpgError iljpgDecodeInit (
|
||||||
register iljpgDataPtr pData,
|
iljpgDataPtr pData,
|
||||||
iljpgPtr *pPrivate /* RETURNED */
|
iljpgPtr *pPrivate /* RETURNED */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register iljpgDecodePrivPtr pPriv;
|
iljpgDecodePrivPtr pPriv;
|
||||||
register iljpgCompPtr pComp;
|
iljpgCompPtr pComp;
|
||||||
int comp;
|
int comp;
|
||||||
iljpgCompDataPtr pCompData;
|
iljpgCompDataPtr pCompData;
|
||||||
iljpgError error;
|
iljpgError error;
|
||||||
|
@ -155,10 +155,10 @@ iljpgError iljpgDecodeExecute (
|
||||||
int outHuff[64];
|
int outHuff[64];
|
||||||
iljpgByte outDCT[64];
|
iljpgByte outDCT[64];
|
||||||
int restartInterval;
|
int restartInterval;
|
||||||
register iljpgCompPtr pComp;
|
iljpgCompPtr pComp;
|
||||||
int nBytesInit;
|
int nBytesInit;
|
||||||
register int nLines, dc;
|
int nLines, dc;
|
||||||
register iljpgPtr pDstLine;
|
iljpgPtr pDstLine;
|
||||||
|
|
||||||
|
|
||||||
pPriv = (iljpgDecodePrivPtr)pPrivate;
|
pPriv = (iljpgDecodePrivPtr)pPrivate;
|
||||||
|
@ -273,8 +273,8 @@ iljpgError iljpgDecodeExecute (
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clip and output 8x8 block to position (bX, bY) */
|
/* Clip and output 8x8 block to position (bX, bY) */
|
||||||
{ register int nBytesM1;
|
{ int nBytesM1;
|
||||||
register iljpgPtr pSrc, pSrcLine, pDst;
|
iljpgPtr pSrc, pSrcLine, pDst;
|
||||||
|
|
||||||
if (nBytesInit > 8)
|
if (nBytesInit > 8)
|
||||||
nBytesInit = 8;
|
nBytesInit = 8;
|
||||||
|
|
|
@ -117,14 +117,14 @@ iljpgError iljpgDecodeJIF (
|
||||||
iljpgDataPtr *ppData /* RETURNED */
|
iljpgDataPtr *ppData /* RETURNED */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register iljpgDataPtr pData;
|
iljpgDataPtr pData;
|
||||||
iljpgBool firstMarker, SOSFound, SOF0Found;
|
iljpgBool firstMarker, SOSFound, SOF0Found;
|
||||||
iljpgError error;
|
iljpgError error;
|
||||||
int value, nFrameComps, length;
|
int value, nFrameComps, length;
|
||||||
iljpgPtr *ppTable;
|
iljpgPtr *ppTable;
|
||||||
iljpgCompDataPtr pComp;
|
iljpgCompDataPtr pComp;
|
||||||
register int i, index;
|
int i, index;
|
||||||
register iljpgPtr pTable;
|
iljpgPtr pTable;
|
||||||
struct {
|
struct {
|
||||||
int id, horiFactor, vertFactor, QTableIndex;
|
int id, horiFactor, vertFactor, QTableIndex;
|
||||||
} frameComp[ILJPG_MAX_COMPS], *pFrame;
|
} frameComp[ILJPG_MAX_COMPS], *pFrame;
|
||||||
|
|
|
@ -62,10 +62,10 @@ static void _il_fwft_rev_scale (
|
||||||
float *s /* pointer to pointer to descaling matrix */
|
float *s /* pointer to pointer to descaling matrix */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i, j, prevValue, value, QIndex;
|
int i, j, prevValue, value, QIndex;
|
||||||
double a, c0, b[8], pi;
|
double a, c0, b[8], pi;
|
||||||
register iljpgPtr qptr;
|
iljpgPtr qptr;
|
||||||
register float *sptr;
|
float *sptr;
|
||||||
|
|
||||||
pi = 4.0 * atan(1.0);
|
pi = 4.0 * atan(1.0);
|
||||||
c0 = 1.0 / (2.0 * 0.707106718);
|
c0 = 1.0 / (2.0 * 0.707106718);
|
||||||
|
@ -107,7 +107,7 @@ iljpgError _iljpgDeDCTInit (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
iljpgDataPtr pData;
|
iljpgDataPtr pData;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
pData = pPriv->pData;
|
pData = pPriv->pData;
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ iljpgError _iljpgDeDCTCleanup (
|
||||||
iljpgDecodePrivPtr pPriv
|
iljpgDecodePrivPtr pPriv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* Free any "rev scale" tables that were allocated in iljpgDeDCTInit() */
|
/* Free any "rev scale" tables that were allocated in iljpgDeDCTInit() */
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
|
@ -247,27 +247,27 @@ iljpgError _iljpgDeDCTCleanup (
|
||||||
*/
|
*/
|
||||||
ILJPG_PRIVATE_EXTERN
|
ILJPG_PRIVATE_EXTERN
|
||||||
void _iljpgDeDCTFull (
|
void _iljpgDeDCTFull (
|
||||||
register int *pSrc,
|
int *pSrc,
|
||||||
long nBytesPerRow,
|
long nBytesPerRow,
|
||||||
iljpgPtr ix, /* RETURNED */
|
iljpgPtr ix, /* RETURNED */
|
||||||
register float *pRevScale
|
float *pRevScale
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register int *zptr;
|
int *zptr;
|
||||||
float ox[64];
|
float ox[64];
|
||||||
register float in0, in1, in2, in3, in4, in5, in6, in7;
|
float in0, in1, in2, in3, in4, in5, in6, in7;
|
||||||
register float tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
float tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||||
register float tmp;
|
float tmp;
|
||||||
register int clipValue;
|
int clipValue;
|
||||||
register iljpgPtr ixaddr;
|
iljpgPtr ixaddr;
|
||||||
register float *oxaddr;
|
float *oxaddr;
|
||||||
/* Constants needed by the 16 point Winograd Fourier Transform for inv. DCT */
|
/* Constants needed by the 16 point Winograd Fourier Transform for inv. DCT */
|
||||||
register float b1 = 1.41421356;
|
float b1 = 1.41421356;
|
||||||
register float b2 = -2.61312587;
|
float b2 = -2.61312587;
|
||||||
register float b3 = 1.41421356;
|
float b3 = 1.41421356;
|
||||||
register float b4 = 1.08239220;
|
float b4 = 1.08239220;
|
||||||
register float b5 = 0.76536686;
|
float b5 = 0.76536686;
|
||||||
|
|
||||||
|
|
||||||
oxaddr = ox;
|
oxaddr = ox;
|
||||||
|
@ -541,27 +541,27 @@ void _iljpgDeDCTFull (
|
||||||
*/
|
*/
|
||||||
ILJPG_PRIVATE_EXTERN
|
ILJPG_PRIVATE_EXTERN
|
||||||
void _iljpgDeDCT4x4 (
|
void _iljpgDeDCT4x4 (
|
||||||
register int *pSrc,
|
int *pSrc,
|
||||||
long nBytesPerRow,
|
long nBytesPerRow,
|
||||||
iljpgPtr ix, /* RETURNED */
|
iljpgPtr ix, /* RETURNED */
|
||||||
register float *pRevScale
|
float *pRevScale
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register int *zptr;
|
int *zptr;
|
||||||
float ox[64];
|
float ox[64];
|
||||||
register float in0, in2, in3, in4, in5, in7;
|
float in0, in2, in3, in4, in5, in7;
|
||||||
register float tmp0, tmp1, tmp2, tmp5, tmp6, tmp7;
|
float tmp0, tmp1, tmp2, tmp5, tmp6, tmp7;
|
||||||
register float tmp;
|
float tmp;
|
||||||
register float *oxaddr;
|
float *oxaddr;
|
||||||
register int clipValue;
|
int clipValue;
|
||||||
register iljpgPtr ixaddr;
|
iljpgPtr ixaddr;
|
||||||
/* Constants needed by the 16 point Winograd Fourier Transform for inv. DCT */
|
/* Constants needed by the 16 point Winograd Fourier Transform for inv. DCT */
|
||||||
register float b1 = 1.41421356;
|
float b1 = 1.41421356;
|
||||||
register float b2 = -2.61312587;
|
float b2 = -2.61312587;
|
||||||
register float b3 = 1.41421356;
|
float b3 = 1.41421356;
|
||||||
register float b4 = 1.08239220;
|
float b4 = 1.08239220;
|
||||||
register float b5 = 0.76536686;
|
float b5 = 0.76536686;
|
||||||
|
|
||||||
#ifdef NOTDEF
|
#ifdef NOTDEF
|
||||||
orxptr = ox;
|
orxptr = ox;
|
||||||
|
@ -804,12 +804,12 @@ void _iljpgDeDCT4x4 (
|
||||||
void _iljpgDeDCTDCOnly (
|
void _iljpgDeDCTDCOnly (
|
||||||
int *pSrc,
|
int *pSrc,
|
||||||
long nBytesPerRow,
|
long nBytesPerRow,
|
||||||
register iljpgPtr pDst, /* RETURNED */
|
iljpgPtr pDst, /* RETURNED */
|
||||||
float *pRevScale
|
float *pRevScale
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i, dc;
|
int i, dc;
|
||||||
register int j;
|
int j;
|
||||||
|
|
||||||
j = *pSrc;
|
j = *pSrc;
|
||||||
j = (j < -2047) ? -2047 : ((j > 2047) ? 2047 : j);
|
j = (j < -2047) ? -2047 : ((j > 2047) ? 2047 : j);
|
||||||
|
|
|
@ -492,8 +492,8 @@ iljpgError _iljpgDehuffExecute (
|
||||||
#define is_dc (!coeff_ct) /* First coefficient is DC */
|
#define is_dc (!coeff_ct) /* First coefficient is DC */
|
||||||
int delta;
|
int delta;
|
||||||
int len, zrun;
|
int len, zrun;
|
||||||
register BITBUF bitbuf, ch, c;
|
BITBUF bitbuf, ch, c;
|
||||||
register int bitsleft;
|
int bitsleft;
|
||||||
iljpgError error = 0; /* assume no error */
|
iljpgError error = 0; /* assume no error */
|
||||||
int index;
|
int index;
|
||||||
int is_fourx4 = 1, is_dconly = 0;
|
int is_fourx4 = 1, is_dconly = 0;
|
||||||
|
|
|
@ -45,16 +45,16 @@
|
||||||
*/
|
*/
|
||||||
ILJPG_PUBLIC
|
ILJPG_PUBLIC
|
||||||
iljpgError iljpgEncodeInit (
|
iljpgError iljpgEncodeInit (
|
||||||
register iljpgDataPtr pData,
|
iljpgDataPtr pData,
|
||||||
iljpgPtr *pPrivate /* RETURNED */
|
iljpgPtr *pPrivate /* RETURNED */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register iljpgEncodePrivPtr pPriv;
|
iljpgEncodePrivPtr pPriv;
|
||||||
register iljpgECompPtr pComp;
|
iljpgECompPtr pComp;
|
||||||
iljpgCompDataPtr pCompData;
|
iljpgCompDataPtr pCompData;
|
||||||
int comp;
|
int comp;
|
||||||
iljpgError error;
|
iljpgError error;
|
||||||
register unsigned int index, i;
|
unsigned int index, i;
|
||||||
|
|
||||||
/* Validate *pData: valid hori/vertFactor, tables present, etc. */
|
/* Validate *pData: valid hori/vertFactor, tables present, etc. */
|
||||||
if (!_iljpgValidPars (pData))
|
if (!_iljpgValidPars (pData))
|
||||||
|
@ -108,8 +108,8 @@ iljpgError iljpgEncodeCleanup (
|
||||||
iljpgPtr pPrivate
|
iljpgPtr pPrivate
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register iljpgEncodePrivPtr pPriv;
|
iljpgEncodePrivPtr pPriv;
|
||||||
iljpgError error;
|
iljpgError error;
|
||||||
|
|
||||||
/* Free any scaled Q tables created by Init() */
|
/* Free any scaled Q tables created by Init() */
|
||||||
|
@ -151,7 +151,7 @@ iljpgError iljpgEncodeExecute (
|
||||||
{
|
{
|
||||||
iljpgEncodePrivPtr pPriv;
|
iljpgEncodePrivPtr pPriv;
|
||||||
iljpgDataPtr pData;
|
iljpgDataPtr pData;
|
||||||
register iljpgECompPtr pComp;
|
iljpgECompPtr pComp;
|
||||||
iljpgPtr pPixels;
|
iljpgPtr pPixels;
|
||||||
iljpgError error;
|
iljpgError error;
|
||||||
long nBytesPerRow, mcuMaxX, mcuMaxY, bX, bY;
|
long nBytesPerRow, mcuMaxX, mcuMaxY, bX, bY;
|
||||||
|
@ -201,8 +201,8 @@ iljpgError iljpgEncodeExecute (
|
||||||
clipped replicate pixel or above scan line out to 8x8.
|
clipped replicate pixel or above scan line out to 8x8.
|
||||||
*/
|
*/
|
||||||
{ int nBytesInit;
|
{ int nBytesInit;
|
||||||
register int nLines, nBytesM1, *pDst, *pDstLine;
|
int nLines, nBytesM1, *pDst, *pDstLine;
|
||||||
register iljpgPtr pSrc, pSrcLine;
|
iljpgPtr pSrc, pSrcLine;
|
||||||
|
|
||||||
nLines = pComp->height - bY;
|
nLines = pComp->height - bY;
|
||||||
if (nLines > 8)
|
if (nLines > 8)
|
||||||
|
|
|
@ -91,7 +91,7 @@ static iljpgError iljpgWriteHuffmanTable (
|
||||||
ILJPG_ENCODE_STREAM stream
|
ILJPG_ENCODE_STREAM stream
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i, nBytes;
|
int i, nBytes;
|
||||||
iljpgError error;
|
iljpgError error;
|
||||||
|
|
||||||
/* Huffman tables are: 16 bytes of # occurrences each # bits, followed by
|
/* Huffman tables are: 16 bytes of # occurrences each # bits, followed by
|
||||||
|
@ -133,10 +133,10 @@ ILJPG_PUBLIC iljpgError iljpgEncodeJIF (
|
||||||
iljpgJIFOffsetsPtr pOffsets
|
iljpgJIFOffsetsPtr pOffsets
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int index, i;
|
int index, i;
|
||||||
register iljpgPtr pTable;
|
iljpgPtr pTable;
|
||||||
register iljpgError error;
|
iljpgError error;
|
||||||
register iljpgCompDataPtr pComp;
|
iljpgCompDataPtr pComp;
|
||||||
long startOffset;
|
long startOffset;
|
||||||
|
|
||||||
# define PUT_BYTE(_byte) { \
|
# define PUT_BYTE(_byte) { \
|
||||||
|
|
|
@ -128,11 +128,11 @@ ILJPG_PRIVATE iljpgError _iljpgEnDCTScale (
|
||||||
float *pDst
|
float *pDst
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i, j, k, temp;
|
int i, j, k, temp;
|
||||||
double a, c0, b[8], pi;
|
double a, c0, b[8], pi;
|
||||||
register float *sptr;
|
float *sptr;
|
||||||
register iljpgPtr qptr;
|
iljpgPtr qptr;
|
||||||
register int *cptr;
|
int *cptr;
|
||||||
|
|
||||||
pi = 4.0 * atan(1.0);
|
pi = 4.0 * atan(1.0);
|
||||||
c0 = 1.0 / (2.0 * 0.707106718);
|
c0 = 1.0 / (2.0 * 0.707106718);
|
||||||
|
@ -175,19 +175,19 @@ static void fwfwddct_8x8 (
|
||||||
float *ox /* pointer to 8x8 output array containing DCT coefficients */
|
float *ox /* pointer to 8x8 output array containing DCT coefficients */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register float in0, in1, in2, in3, in4, in5, in6, in7;
|
float in0, in1, in2, in3, in4, in5, in6, in7;
|
||||||
register float tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
float tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||||
register float tmp;
|
float tmp;
|
||||||
register int *ixaddr;
|
int *ixaddr;
|
||||||
register float *oxaddr;
|
float *oxaddr;
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
/* constants needed by the 16 point Winograd Fourier Transform method */
|
/* constants needed by the 16 point Winograd Fourier Transform method */
|
||||||
register float a1 = 0.707106718;
|
float a1 = 0.707106718;
|
||||||
register float a2 = -0.541196100;
|
float a2 = -0.541196100;
|
||||||
register float a3 = 0.707106718;
|
float a3 = 0.707106718;
|
||||||
register float a4 = 1.306562963;
|
float a4 = 1.306562963;
|
||||||
register float a5 = 0.382683432;
|
float a5 = 0.382683432;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
ixaddr = ix;
|
ixaddr = ix;
|
||||||
|
@ -441,12 +441,12 @@ ILJPG_PRIVATE _iljpgEnDCT (
|
||||||
float *pScale
|
float *pScale
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i, value;
|
int i, value;
|
||||||
register float *sptr;
|
float *sptr;
|
||||||
register int *ixptr;
|
int *ixptr;
|
||||||
register float *oxptr;
|
float *oxptr;
|
||||||
register int *zptr;
|
int *zptr;
|
||||||
register float fvalue;
|
float fvalue;
|
||||||
float ox[64]; /* DCT coefficient buffer */
|
float ox[64]; /* DCT coefficient buffer */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -89,12 +89,12 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
ILJPG_PRIVATE
|
ILJPG_PRIVATE
|
||||||
iljpgError _iljpgBuildEnhuffTable (
|
iljpgError _iljpgBuildEnhuffTable (
|
||||||
register iljpgPtr pTableIn,
|
iljpgPtr pTableIn,
|
||||||
iljpgEnhuffTablePtr *ppTableOut /* RETURNED */
|
iljpgEnhuffTablePtr *ppTableOut /* RETURNED */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register iljpgEnhuffTablePtr pTable;
|
iljpgEnhuffTablePtr pTable;
|
||||||
register int i, j, nValues, value;
|
int i, j, nValues, value;
|
||||||
int huffSize[257]; /* called "HUFFSIZE" in JPEG spec */
|
int huffSize[257]; /* called "HUFFSIZE" in JPEG spec */
|
||||||
int huffCode[257]; /* called "HUFFCODE" in JPEG spec */
|
int huffCode[257]; /* called "HUFFCODE" in JPEG spec */
|
||||||
|
|
||||||
|
@ -156,10 +156,10 @@ iljpgError _iljpgEnhuffInit (
|
||||||
iljpgEncodePrivPtr pPriv
|
iljpgEncodePrivPtr pPriv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register iljpgEnhuffPtr pHuffPriv;
|
iljpgEnhuffPtr pHuffPriv;
|
||||||
register iljpgDataPtr pData;
|
iljpgDataPtr pData;
|
||||||
iljpgError error;
|
iljpgError error;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* Allocate Huffman private area and point to it in encode private */
|
/* Allocate Huffman private area and point to it in encode private */
|
||||||
pData = pPriv->pData;
|
pData = pPriv->pData;
|
||||||
|
@ -227,12 +227,12 @@ iljpgError _iljpgEnhuffCleanup (
|
||||||
*/
|
*/
|
||||||
static iljpgError _iljpgPackHuffman (
|
static iljpgError _iljpgPackHuffman (
|
||||||
iljpgEnhuffPtr pHuffPriv,
|
iljpgEnhuffPtr pHuffPriv,
|
||||||
register int *pHuff,
|
int *pHuff,
|
||||||
register int nHuff,
|
int nHuff,
|
||||||
ILJPG_ENCODE_STREAM stream
|
ILJPG_ENCODE_STREAM stream
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int size, value, huffBits, nHuffBits;
|
int size, value, huffBits, nHuffBits;
|
||||||
iljpgError error;
|
iljpgError error;
|
||||||
static int sizeMasks[9] = /* masks for lower "i" bits, indexed by i */
|
static int sizeMasks[9] = /* masks for lower "i" bits, indexed by i */
|
||||||
{0x0, 0x1, 0x3, 0x7, 0x0f, 0x1f, 0x3f, 0x7f, 0x0ff};
|
{0x0, 0x1, 0x3, 0x7, 0x0f, 0x1f, 0x3f, 0x7f, 0x0ff};
|
||||||
|
@ -290,10 +290,10 @@ iljpgError _iljpgEnhuffExecute (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
iljpgEnhuffPtr pHuffPriv;
|
iljpgEnhuffPtr pHuffPriv;
|
||||||
register iljpgEnhuffTablePtr pTable;
|
iljpgEnhuffTablePtr pTable;
|
||||||
int huff[4 * 64 + 10]; /* room for 64 * 2 pairs plus some slop */
|
int huff[4 * 64 + 10]; /* room for 64 * 2 pairs plus some slop */
|
||||||
register int *pHuff;
|
int *pHuff;
|
||||||
register int size, value, nACLeft, nZeros;
|
int size, value, nACLeft, nZeros;
|
||||||
# define ENHUFF(_value) { \
|
# define ENHUFF(_value) { \
|
||||||
*pHuff++ = pTable->size[_value]; \
|
*pHuff++ = pTable->size[_value]; \
|
||||||
*pHuff++ = pTable->code[_value]; \
|
*pHuff++ = pTable->code[_value]; \
|
||||||
|
@ -379,8 +379,8 @@ iljpgError _iljpgEnhuffFlush (
|
||||||
ILJPG_ENCODE_STREAM stream
|
ILJPG_ENCODE_STREAM stream
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register iljpgEnhuffPtr pHuffPriv;
|
iljpgEnhuffPtr pHuffPriv;
|
||||||
register int nHuffBits, huffBits;
|
int nHuffBits, huffBits;
|
||||||
iljpgError error;
|
iljpgError error;
|
||||||
|
|
||||||
/* If any bits left, flush them out. Pad with binary 1's, and
|
/* If any bits left, flush them out. Pad with binary 1's, and
|
||||||
|
|
|
@ -85,7 +85,7 @@ int _iljpgZigzagTable[];
|
||||||
*/
|
*/
|
||||||
ILJPG_PRIVATE_EXTERN
|
ILJPG_PRIVATE_EXTERN
|
||||||
iljpgBool _iljpgValidPars (
|
iljpgBool _iljpgValidPars (
|
||||||
register iljpgDataPtr pData
|
iljpgDataPtr pData
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -59,12 +59,12 @@ int _iljpgZigzagTable[64] = {
|
||||||
*/
|
*/
|
||||||
ILJPG_PRIVATE
|
ILJPG_PRIVATE
|
||||||
iljpgBool _iljpgValidPars (
|
iljpgBool _iljpgValidPars (
|
||||||
register iljpgDataPtr pData
|
iljpgDataPtr pData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int comp;
|
int comp;
|
||||||
iljpgCompDataPtr pCompData;
|
iljpgCompDataPtr pCompData;
|
||||||
register unsigned int index;
|
unsigned int index;
|
||||||
#define VALID_FACTOR(_f) ( ((_f) == 1) || ((_f) == 2) || ((_f) == 4) )
|
#define VALID_FACTOR(_f) ( ((_f) == 1) || ((_f) == 2) || ((_f) == 4) )
|
||||||
|
|
||||||
/* Validate *pData: valid hori/vertFactor, tables present, etc. */
|
/* Validate *pData: valid hori/vertFactor, tables present, etc. */
|
||||||
|
|
|
@ -78,8 +78,8 @@ static ilError ilMapByteExecute (
|
||||||
ilMapPrivPtr pPriv;
|
ilMapPrivPtr pPriv;
|
||||||
long srcRowBytes, dstRowBytes, nRowsM1, nLinesM1;
|
long srcRowBytes, dstRowBytes, nRowsM1, nLinesM1;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long rowCount;
|
long rowCount;
|
||||||
register ilPtr pSrc, pDst, pTranslate;
|
ilPtr pSrc, pDst, pTranslate;
|
||||||
|
|
||||||
/* Get data from private, exit if no rows or lines to do.
|
/* Get data from private, exit if no rows or lines to do.
|
||||||
*/
|
*/
|
||||||
|
@ -127,8 +127,8 @@ static ilError ilMap3ByteExecute (
|
||||||
ilMapPrivPtr pPriv;
|
ilMapPrivPtr pPriv;
|
||||||
long srcRowBytes, dstRowBytes, nRowsM1, nLinesM1;
|
long srcRowBytes, dstRowBytes, nRowsM1, nLinesM1;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long rowCount;
|
long rowCount;
|
||||||
register ilPtr pSrc, pDst, pTranslate;
|
ilPtr pSrc, pDst, pTranslate;
|
||||||
|
|
||||||
/* Get data from private, exit if no rows or lines to do.
|
/* Get data from private, exit if no rows or lines to do.
|
||||||
*/
|
*/
|
||||||
|
@ -193,8 +193,8 @@ ilBool ilMap (
|
||||||
ilClientImage mapImage
|
ilClientImage mapImage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilMapPrivPtr pPriv;
|
ilMapPrivPtr pPriv;
|
||||||
register ilContext context;
|
ilContext context;
|
||||||
ilPipeInfo info;
|
ilPipeInfo info;
|
||||||
ilImageDes des;
|
ilImageDes des;
|
||||||
ilImageFormat format;
|
ilImageFormat format;
|
||||||
|
|
|
@ -67,7 +67,7 @@ static ilError ilMirrorInit(
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
register unsigned char *pdstline;
|
unsigned char *pdstline;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,17 +91,17 @@ static ilError ilMirrorInit(
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilMirrorXBitonalExecute (
|
static ilError ilMirrorXBitonalExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, lastcount, srcnbytes, dstnbytes;
|
int x, y, lastcount, srcnbytes, dstnbytes;
|
||||||
register ilMirrorPrivptr pPriv;
|
ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -146,19 +146,19 @@ register ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilMirrorYBitonalExecute (
|
static ilError ilMirrorYBitonalExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *psrcbefore, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *psrcbefore, *pdstline;
|
||||||
register unsigned char srcbyte;
|
unsigned char srcbyte;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, lastcount, loffset, roffset;
|
int x, y, lastcount, loffset, roffset;
|
||||||
register int srcnbytes, dstnbytes, widthbytes;
|
int srcnbytes, dstnbytes, widthbytes;
|
||||||
register ilMirrorPrivptr pPriv;
|
ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -220,18 +220,18 @@ register ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilMirrorX3ByteExecute (
|
static ilError ilMirrorX3ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, lastcount;
|
int x, y, lastcount;
|
||||||
register ilMirrorPrivptr pPriv;
|
ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -279,18 +279,18 @@ register ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilMirrorY3ByteExecute (
|
static ilError ilMirrorY3ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, xoffset, lastcount;
|
int x, y, xoffset, lastcount;
|
||||||
register ilMirrorPrivptr pPriv;
|
ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -340,18 +340,18 @@ register ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilMirrorXByteExecute (
|
static ilError ilMirrorXByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, lastcount;
|
int x, y, lastcount;
|
||||||
register ilMirrorPrivptr pPriv;
|
ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -395,18 +395,18 @@ register ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilMirrorYByteExecute (
|
static ilError ilMirrorYByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, lastcount;
|
int x, y, lastcount;
|
||||||
register ilMirrorPrivptr pPriv;
|
ilMirrorPrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -460,7 +460,7 @@ ilBool ilMirror (
|
||||||
{
|
{
|
||||||
unsigned int state;
|
unsigned int state;
|
||||||
ilPipeInfo info;
|
ilPipeInfo info;
|
||||||
register ilMirrorPrivptr pPriv;
|
ilMirrorPrivptr pPriv;
|
||||||
ilDstElementData dstdata;
|
ilDstElementData dstdata;
|
||||||
ilImageDes imdes;
|
ilImageDes imdes;
|
||||||
ilImageFormat imformat;
|
ilImageFormat imformat;
|
||||||
|
|
|
@ -67,8 +67,8 @@ IL_PRIVATE ilObjectPtr _ilCreateObject (
|
||||||
size_t sizeInBytes /* size of object to create */
|
size_t sizeInBytes /* size of object to create */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilContextPtr pContext;
|
ilContextPtr pContext;
|
||||||
register ilObjectPtr pObject;
|
ilObjectPtr pObject;
|
||||||
|
|
||||||
/* Allocate object rec, return if failure.
|
/* Allocate object rec, return if failure.
|
||||||
*/
|
*/
|
||||||
|
@ -106,7 +106,7 @@ ilBool ilDestroyObject (
|
||||||
ilObject object
|
ilObject object
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilObjectPtr pObject;
|
ilObjectPtr pObject;
|
||||||
|
|
||||||
/* Downcount refCount, exit if not zero - object is still attached to others.
|
/* Downcount refCount, exit if not zero - object is still attached to others.
|
||||||
Call object-specific destroy function, free client private if present,
|
Call object-specific destroy function, free client private if present,
|
||||||
|
@ -161,7 +161,7 @@ IL_PRIVATE void _ilObjectDestroyContext (
|
||||||
ilContextPtr pContext
|
ilContextPtr pContext
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilObjectPtr pObject, pNextObject, pObjectHead;
|
ilObjectPtr pObject, pNextObject, pObjectHead;
|
||||||
|
|
||||||
/* Loop thru and destroy all objects until list points back to head (done).
|
/* Loop thru and destroy all objects until list points back to head (done).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -102,9 +102,9 @@ static void ilInitPackedPalette (
|
||||||
ilPaletteToRGBPrivPtr pPriv
|
ilPaletteToRGBPrivPtr pPriv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register unsigned long *pPacked, packed;
|
unsigned long *pPacked, packed;
|
||||||
register unsigned short *pRed, *pGreen, *pBlue, temp;
|
unsigned short *pRed, *pGreen, *pBlue, temp;
|
||||||
|
|
||||||
/* Pack the upper 8 bits of the rgb value, with blue in the high order bits. */
|
/* Pack the upper 8 bits of the rgb value, with blue in the high order bits. */
|
||||||
pPacked = pPriv->palette;
|
pPacked = pPriv->palette;
|
||||||
|
@ -138,9 +138,9 @@ static ilError ilExecutePaletteToRGBByte (
|
||||||
ilPaletteToRGBPrivPtr pPriv;
|
ilPaletteToRGBPrivPtr pPriv;
|
||||||
long srcRowBytes, dstRowBytes, nPixelsM1;
|
long srcRowBytes, dstRowBytes, nPixelsM1;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register unsigned long rgb, *pPackedPalette;
|
unsigned long rgb, *pPackedPalette;
|
||||||
register long nLinesM1, nPixelsM1Temp;
|
long nLinesM1, nPixelsM1Temp;
|
||||||
|
|
||||||
/* If firstStrip, init the packed palette in private */
|
/* If firstStrip, init the packed palette in private */
|
||||||
pPriv = (ilPaletteToRGBPrivPtr)pData->pPrivate;
|
pPriv = (ilPaletteToRGBPrivPtr)pData->pPrivate;
|
||||||
|
|
|
@ -80,7 +80,7 @@ typedef struct _ilElementRec {
|
||||||
ilError (*Cleanup)();
|
ilError (*Cleanup)();
|
||||||
ilError (*Destroy)();
|
ilError (*Destroy)();
|
||||||
ilError (*ExecuteThree)();
|
ilError (*ExecuteThree)();
|
||||||
ilError (*ExecuteFour)(register ilExecuteData *,
|
ilError (*ExecuteFour)(ilExecuteData *,
|
||||||
long,
|
long,
|
||||||
long *,
|
long *,
|
||||||
float);
|
float);
|
||||||
|
@ -227,10 +227,10 @@ void _ilSetDefaultStripSize (
|
||||||
structures are not freed; just the pixels.
|
structures are not freed; just the pixels.
|
||||||
*/
|
*/
|
||||||
static void ilFreeTempImageBuffers (
|
static void ilFreeTempImageBuffers (
|
||||||
register ilPipePtr pPipe
|
ilPipePtr pPipe
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
|
|
||||||
pImage = (ilImagePtr)pPipe->imageHead.pNext;
|
pImage = (ilImagePtr)pPipe->imageHead.pNext;
|
||||||
while (pImage != (ilImagePtr)&pPipe->imageHead) {
|
while (pImage != (ilImagePtr)&pPipe->imageHead) {
|
||||||
|
@ -245,13 +245,13 @@ register ilImagePtr pImage;
|
||||||
height of the image is not set; the caller must do that.
|
height of the image is not set; the caller must do that.
|
||||||
*/
|
*/
|
||||||
static ilImagePtr ilAllocTempImage (
|
static ilImagePtr ilAllocTempImage (
|
||||||
register ilPipePtr pPipe,
|
ilPipePtr pPipe,
|
||||||
ilPipeInfo *pInfo,
|
ilPipeInfo *pInfo,
|
||||||
ilImageDes *pDes,
|
ilImageDes *pDes,
|
||||||
ilImageFormat *pFormat
|
ilImageFormat *pFormat
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
|
|
||||||
pImage = (ilImagePtr)IL_MALLOC (sizeof (ilImageRec));
|
pImage = (ilImagePtr)IL_MALLOC (sizeof (ilImageRec));
|
||||||
if (!pImage)
|
if (!pImage)
|
||||||
|
@ -290,11 +290,11 @@ register ilImagePtr pImage;
|
||||||
The pipe state is set to IL_PIPE_COMPLETE.
|
The pipe state is set to IL_PIPE_COMPLETE.
|
||||||
*/
|
*/
|
||||||
static ilError ilCleanupRunningPipe (
|
static ilError ilCleanupRunningPipe (
|
||||||
register ilPipePtr pPipe,
|
ilPipePtr pPipe,
|
||||||
ilBool aborting
|
ilBool aborting
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilElementPtr pElement, pElementHead;
|
ilElementPtr pElement, pElementHead;
|
||||||
ilError error, prevError;
|
ilError error, prevError;
|
||||||
|
|
||||||
/* Run thru the list of elements and call Cleanup function if non-null, then
|
/* Run thru the list of elements and call Cleanup function if non-null, then
|
||||||
|
@ -336,9 +336,9 @@ ilBool ilEmptyPipe (
|
||||||
ilPipe pipe
|
ilPipe pipe
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
register ilElementPtr pElement, pNextElement, pElementHead;
|
ilElementPtr pElement, pNextElement, pElementHead;
|
||||||
register ilImagePtr pImage, pNextImage;
|
ilImagePtr pImage, pNextImage;
|
||||||
int i;
|
int i;
|
||||||
ilError error;
|
ilError error;
|
||||||
|
|
||||||
|
@ -419,7 +419,7 @@ ilPipe ilCreatePipe (
|
||||||
unsigned long mustBeZero
|
unsigned long mustBeZero
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
|
|
||||||
if (mustBeZero != 0) {
|
if (mustBeZero != 0) {
|
||||||
context->error = IL_ERROR_PAR_NOT_ZERO;
|
context->error = IL_ERROR_PAR_NOT_ZERO;
|
||||||
|
@ -462,7 +462,7 @@ ilBool ilDeclarePipeInvalid (
|
||||||
ilError error
|
ilError error
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
|
|
||||||
pPipe = (ilPipePtr)pipe;
|
pPipe = (ilPipePtr)pipe;
|
||||||
ilEmptyPipe ((ilPipe)pPipe);
|
ilEmptyPipe ((ilPipe)pPipe);
|
||||||
|
@ -484,7 +484,7 @@ unsigned int ilQueryPipe (
|
||||||
ilImageDes *pDes /* RETURNED */
|
ilImageDes *pDes /* RETURNED */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
|
|
||||||
pPipe = (ilPipePtr)pipe;
|
pPipe = (ilPipePtr)pipe;
|
||||||
if (pPipe->o.p.objectType != IL_PIPE) {
|
if (pPipe->o.p.objectType != IL_PIPE) {
|
||||||
|
@ -519,7 +519,7 @@ unsigned int ilGetPipeInfo (
|
||||||
ilImageFormat *pFormat
|
ilImageFormat *pFormat
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
|
|
||||||
pPipe = (ilPipePtr)pipe;
|
pPipe = (ilPipePtr)pipe;
|
||||||
if (pPipe->o.p.objectType != IL_PIPE) {
|
if (pPipe->o.p.objectType != IL_PIPE) {
|
||||||
|
@ -560,7 +560,7 @@ long ilRecommendedStripHeight (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
long bytesPerRow [IL_MAX_SAMPLES];
|
long bytesPerRow [IL_MAX_SAMPLES];
|
||||||
register long stripHeight, nBytes;
|
long stripHeight, nBytes;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Get the bytes/row, per plane. If pixel format, all bytes are in plane 0,
|
/* Get the bytes/row, per plane. If pixel format, all bytes are in plane 0,
|
||||||
|
@ -597,10 +597,10 @@ int i;
|
||||||
pipe height is changed (limits stripHeight to image height).
|
pipe height is changed (limits stripHeight to image height).
|
||||||
*/
|
*/
|
||||||
static void ilChangeStripHeight (
|
static void ilChangeStripHeight (
|
||||||
register ilPipePtr pPipe
|
ilPipePtr pPipe
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register long stripHeight;
|
long stripHeight;
|
||||||
|
|
||||||
/* Limit stripHeight to pipe height. */
|
/* Limit stripHeight to pipe height. */
|
||||||
stripHeight = pPipe->image.info.stripHeight;
|
stripHeight = pPipe->image.info.stripHeight;
|
||||||
|
@ -611,7 +611,7 @@ register long stripHeight;
|
||||||
|
|
||||||
/* If uncompressed image, calc recommendedStripHeight else current stripHeight */
|
/* If uncompressed image, calc recommendedStripHeight else current stripHeight */
|
||||||
if (pPipe->image.des.compression == IL_UNCOMPRESSED) {
|
if (pPipe->image.des.compression == IL_UNCOMPRESSED) {
|
||||||
register long i;
|
long i;
|
||||||
i = ilRecommendedStripHeight (&pPipe->image.des, &pPipe->image.format,
|
i = ilRecommendedStripHeight (&pPipe->image.des, &pPipe->image.format,
|
||||||
pPipe->image.info.width, pPipe->image.info.height);
|
pPipe->image.info.width, pPipe->image.info.height);
|
||||||
pPipe->image.info.recommendedStripHeight = (i > stripHeight) ? stripHeight : i;
|
pPipe->image.info.recommendedStripHeight = (i > stripHeight) ? stripHeight : i;
|
||||||
|
@ -635,7 +635,7 @@ IL_PRIVATE ilBool _ilAddPipeDestroyObject (
|
||||||
ilObject object
|
ilObject object
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
|
|
||||||
pPipe = (ilPipePtr)pipe;
|
pPipe = (ilPipePtr)pipe;
|
||||||
if (pPipe->nDestroyObjects >= IL_MAX_DESTROY_OBJECTS) {
|
if (pPipe->nDestroyObjects >= IL_MAX_DESTROY_OBJECTS) {
|
||||||
|
@ -657,7 +657,7 @@ register ilPipePtr pPipe;
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE ilBool _ilAddProducerImage (
|
IL_PRIVATE ilBool _ilAddProducerImage (
|
||||||
ilPipe pipe,
|
ilPipe pipe,
|
||||||
register ilImagePtr pImage,
|
ilImagePtr pImage,
|
||||||
unsigned int producerCode,
|
unsigned int producerCode,
|
||||||
long height,
|
long height,
|
||||||
long stripHeight,
|
long stripHeight,
|
||||||
|
@ -665,7 +665,7 @@ IL_PRIVATE ilBool _ilAddProducerImage (
|
||||||
ilBool needProducerThrottle
|
ilBool needProducerThrottle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
|
|
||||||
/* Copy image data into pipe info, point to given image as producer. */
|
/* Copy image data into pipe info, point to given image as producer. */
|
||||||
pPipe = (ilPipePtr)pipe;
|
pPipe = (ilPipePtr)pipe;
|
||||||
|
@ -714,8 +714,8 @@ IL_PRIVATE ilBool _ilSetFeedPipeData (
|
||||||
long nCompBytes
|
long nCompBytes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
|
|
||||||
pPipe = (ilPipePtr)pipe;
|
pPipe = (ilPipePtr)pipe;
|
||||||
if (pPipe->producerCode != IL_PIPE_FEED_IMAGE)
|
if (pPipe->producerCode != IL_PIPE_FEED_IMAGE)
|
||||||
|
@ -754,7 +754,7 @@ IL_PRIVATE void _ilSetPipeDesFormat (
|
||||||
ilImageFormat *pFormat
|
ilImageFormat *pFormat
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
|
|
||||||
pPipe = (ilPipePtr)pipe;
|
pPipe = (ilPipePtr)pipe;
|
||||||
if (pDes)
|
if (pDes)
|
||||||
|
@ -784,16 +784,16 @@ ilPtr ilAddPipeElement (
|
||||||
** parameter which is a floating pointing.
|
** parameter which is a floating pointing.
|
||||||
*/
|
*/
|
||||||
ilError (*ExecuteThree)(),
|
ilError (*ExecuteThree)(),
|
||||||
ilError (*ExecuteFour)(register ilExecuteData *,
|
ilError (*ExecuteFour)(ilExecuteData *,
|
||||||
long,
|
long,
|
||||||
long *,
|
long *,
|
||||||
float),
|
float),
|
||||||
unsigned long mustBeZero
|
unsigned long mustBeZero
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
unsigned int newState; /* pipe state after this element added */
|
unsigned int newState; /* pipe state after this element added */
|
||||||
register ilElementPtr pElement; /* ptr to new element to add to list */
|
ilElementPtr pElement; /* ptr to new element to add to list */
|
||||||
ilElementPtr pPrevElement;
|
ilElementPtr pPrevElement;
|
||||||
ilError error;
|
ilError error;
|
||||||
long stripHeight, srcBufferHeight;
|
long stripHeight, srcBufferHeight;
|
||||||
|
@ -1143,7 +1143,7 @@ ilBool ilAbortPipe (
|
||||||
ilPipe pipe
|
ilPipe pipe
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
|
|
||||||
pPipe = (ilPipePtr)pipe;
|
pPipe = (ilPipePtr)pipe;
|
||||||
if (pPipe->o.p.objectType != IL_PIPE) {
|
if (pPipe->o.p.objectType != IL_PIPE) {
|
||||||
|
@ -1168,8 +1168,8 @@ int ilExecutePipe (
|
||||||
float ratio
|
float ratio
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilPipePtr pPipe;
|
ilPipePtr pPipe;
|
||||||
register ilElementPtr pElement, pExecHead, pElementHead;
|
ilElementPtr pElement, pExecHead, pElementHead;
|
||||||
ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
long nLines, initNLines;
|
long nLines, initNLines;
|
||||||
ilError error;
|
ilError error;
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
*/
|
*/
|
||||||
IL_EXTERN ilBool _ilAddProducerImage (
|
IL_EXTERN ilBool _ilAddProducerImage (
|
||||||
ilPipe pipe,
|
ilPipe pipe,
|
||||||
register ilImagePtr pImage,
|
ilImagePtr pImage,
|
||||||
unsigned int producerCode,
|
unsigned int producerCode,
|
||||||
long height,
|
long height,
|
||||||
long stripHeight,
|
long stripHeight,
|
||||||
|
|
|
@ -190,7 +190,7 @@ extern ilPtr ilAddPipeElement (
|
||||||
** parameter which is a floating pointing.
|
** parameter which is a floating pointing.
|
||||||
*/
|
*/
|
||||||
ilError (*ExecuteThree)(),
|
ilError (*ExecuteThree)(),
|
||||||
ilError (*ExecuteFour)( register ilExecuteData *,
|
ilError (*ExecuteFour)( ilExecuteData *,
|
||||||
long,
|
long,
|
||||||
long *,
|
long *,
|
||||||
float),
|
float),
|
||||||
|
|
|
@ -219,7 +219,7 @@ static ilError ilReadXExecute (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilReadXPrivPtr pPriv;
|
ilReadXPrivPtr pPriv;
|
||||||
Drawable readDrawable;
|
Drawable readDrawable;
|
||||||
ilBool lastStrip;
|
ilBool lastStrip;
|
||||||
long nLines;
|
long nLines;
|
||||||
|
@ -278,9 +278,9 @@ long srcRowBytes, dstRowBytes, nBytesToCopy;
|
||||||
/* If a long/pixel image, must extract IL RGB bytes from X long/pixel image.
|
/* If a long/pixel image, must extract IL RGB bytes from X long/pixel image.
|
||||||
*/
|
*/
|
||||||
if (pPriv->isLongImage) {
|
if (pPriv->isLongImage) {
|
||||||
register ilPtr pDst;
|
ilPtr pDst;
|
||||||
register unsigned long temp, *pSrc;
|
unsigned long temp, *pSrc;
|
||||||
register long nLongsM1;
|
long nLongsM1;
|
||||||
|
|
||||||
while (nLines-- > 0) {
|
while (nLines-- > 0) {
|
||||||
pSrc = (unsigned long *)pSrcLine;
|
pSrc = (unsigned long *)pSrcLine;
|
||||||
|
@ -305,8 +305,8 @@ long srcRowBytes, dstRowBytes, nBytesToCopy;
|
||||||
copy buffer, else one line at a time.
|
copy buffer, else one line at a time.
|
||||||
*/
|
*/
|
||||||
if ((Ximage->depth == 1) && (Ximage->bitmap_bit_order == LSBFirst)) {
|
if ((Ximage->depth == 1) && (Ximage->bitmap_bit_order == LSBFirst)) {
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register long nBytesM1;
|
long nBytesM1;
|
||||||
|
|
||||||
if (nBytesToCopy > 0)
|
if (nBytesToCopy > 0)
|
||||||
while (nLines-- > 0) {
|
while (nLines-- > 0) {
|
||||||
|
@ -348,7 +348,7 @@ static ilError ilReadXExecuteSlow (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilReadXPrivPtr pPriv;
|
ilReadXPrivPtr pPriv;
|
||||||
ilReadXPrivRec priv;
|
ilReadXPrivRec priv;
|
||||||
Drawable readDrawable;
|
Drawable readDrawable;
|
||||||
ilBool lastStrip;
|
ilBool lastStrip;
|
||||||
|
@ -408,9 +408,9 @@ long srcRowBytes, dstRowBytes, nBytesToCopy;
|
||||||
/* If a long/pixel image, must extract IL RGB bytes from X long/pixel image.
|
/* If a long/pixel image, must extract IL RGB bytes from X long/pixel image.
|
||||||
*/
|
*/
|
||||||
if (pPriv->isLongImage) {
|
if (pPriv->isLongImage) {
|
||||||
register ilPtr pDst;
|
ilPtr pDst;
|
||||||
register unsigned long temp, *pSrc;
|
unsigned long temp, *pSrc;
|
||||||
register long nLongsM1;
|
long nLongsM1;
|
||||||
unsigned int X, Y;
|
unsigned int X, Y;
|
||||||
|
|
||||||
XVisualInfo *pVisualInfo;
|
XVisualInfo *pVisualInfo;
|
||||||
|
@ -446,8 +446,8 @@ long srcRowBytes, dstRowBytes, nBytesToCopy;
|
||||||
copy buffer, else one line at a time.
|
copy buffer, else one line at a time.
|
||||||
*/
|
*/
|
||||||
if ((Ximage->depth == 1) && (Ximage->bitmap_bit_order == LSBFirst)) {
|
if ((Ximage->depth == 1) && (Ximage->bitmap_bit_order == LSBFirst)) {
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register long nBytesM1;
|
long nBytesM1;
|
||||||
|
|
||||||
if (nBytesToCopy > 0)
|
if (nBytesToCopy > 0)
|
||||||
while (nLines-- > 0) {
|
while (nLines-- > 0) {
|
||||||
|
|
|
@ -70,13 +70,13 @@ static ilError ilRCIInit (
|
||||||
/* Execute() for ilReadImage() producer when the image is compressed.
|
/* Execute() for ilReadImage() producer when the image is compressed.
|
||||||
*/
|
*/
|
||||||
static ilError ilRCIExecute (
|
static ilError ilRCIExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine, /* ignored */
|
long dstLine, /* ignored */
|
||||||
long *pNLines /* ignored on input */
|
long *pNLines /* ignored on input */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilRCIPrivPtr pPriv;
|
ilRCIPrivPtr pPriv;
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
long offset;
|
long offset;
|
||||||
|
|
||||||
pPriv = (ilRCIPrivPtr)pData->pPrivate;
|
pPriv = (ilRCIPrivPtr)pData->pPrivate;
|
||||||
|
@ -114,8 +114,8 @@ ilBool ilReadImage (
|
||||||
ilObject image
|
ilObject image
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
register ilRCIPrivPtr pPriv;
|
ilRCIPrivPtr pPriv;
|
||||||
|
|
||||||
/* Validate that pipe and image are such, have same context and pipe empty */
|
/* Validate that pipe and image are such, have same context and pipe empty */
|
||||||
pImage = (ilImagePtr)image;
|
pImage = (ilImagePtr)image;
|
||||||
|
|
|
@ -73,7 +73,7 @@ static ilError ilRotateInit(
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
register unsigned char *pdstline;
|
unsigned char *pdstline;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
int bitoff;
|
int bitoff;
|
||||||
|
|
||||||
|
@ -115,22 +115,22 @@ static ilError ilRotateInit(
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotate90BitonalExecute (
|
static ilError ilRotate90BitonalExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned long *psrc, *pdst, *psrcline, *pdstline;
|
unsigned long *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnwords, dstnwords;
|
unsigned long srcnwords, dstnwords;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, xoffset, lastcount;
|
int x, y, xoffset, lastcount;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
register unsigned long srcMask;
|
unsigned long srcMask;
|
||||||
register unsigned long srcLong;
|
unsigned long srcLong;
|
||||||
register ilBool shortwidth;
|
ilBool shortwidth;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -203,19 +203,19 @@ register ilBool shortwidth;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotate180BitonalExecute (
|
static ilError ilRotate180BitonalExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *psrcbefore, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *psrcbefore, *pdstline;
|
||||||
register unsigned char srcbyte;
|
unsigned char srcbyte;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, lastcount, loffset, roffset;
|
int x, y, lastcount, loffset, roffset;
|
||||||
register int srcnbytes, dstnbytes, widthbytes;
|
int srcnbytes, dstnbytes, widthbytes;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -276,22 +276,22 @@ register ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotate270BitonalExecute (
|
static ilError ilRotate270BitonalExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned long *psrc, *pdst, *psrcline, *pdstline;
|
unsigned long *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnwords, dstnwords;
|
unsigned long srcnwords, dstnwords;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, xoffset, lastcount;
|
int x, y, xoffset, lastcount;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
register unsigned long srcMask, dstMask;
|
unsigned long srcMask, dstMask;
|
||||||
register unsigned long srcLong, dstLong;
|
unsigned long srcLong, dstLong;
|
||||||
register ilBool shortwidth;
|
ilBool shortwidth;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -365,16 +365,16 @@ register ilBool shortwidth;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotate903ByteExecute (
|
static ilError ilRotate903ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, xoffset, lastcount;
|
int x, y, xoffset, lastcount;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -425,18 +425,18 @@ register ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotate1803ByteExecute (
|
static ilError ilRotate1803ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, xoffset, lastcount;
|
int x, y, xoffset, lastcount;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -486,7 +486,7 @@ register ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotate2703ByteExecute (
|
static ilError ilRotate2703ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
|
@ -494,11 +494,11 @@ static ilError ilRotate2703ByteExecute (
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, lastcount, xoffset;
|
int x, y, lastcount, xoffset;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -544,7 +544,7 @@ register ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotate90ByteExecute (
|
static ilError ilRotate90ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
|
@ -552,12 +552,12 @@ static ilError ilRotate90ByteExecute (
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, xoffset, lastcount;
|
int x, y, xoffset, lastcount;
|
||||||
unsigned int dstrowpixels;
|
unsigned int dstrowpixels;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -601,18 +601,18 @@ register ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotate180ByteExecute (
|
static ilError ilRotate180ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, lastcount;
|
int x, y, lastcount;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -654,18 +654,18 @@ register ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilRotate270ByteExecute (
|
static ilError ilRotate270ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
register unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
unsigned char *psrc, *pdst, *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register int x, y, lastcount, xoffset;
|
int x, y, lastcount, xoffset;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
if (*pNLines <= 0) return IL_OK;
|
if (*pNLines <= 0) return IL_OK;
|
||||||
|
@ -721,7 +721,7 @@ ilBool ilRotate90 (
|
||||||
{
|
{
|
||||||
unsigned int state;
|
unsigned int state;
|
||||||
ilPipeInfo info;
|
ilPipeInfo info;
|
||||||
register ilRotatePrivptr pPriv;
|
ilRotatePrivptr pPriv;
|
||||||
ilDstElementData dstdata;
|
ilDstElementData dstdata;
|
||||||
ilImageDes imdes;
|
ilImageDes imdes;
|
||||||
ilImageFormat imformat;
|
ilImageFormat imformat;
|
||||||
|
|
|
@ -85,12 +85,12 @@ static ilError ilThrottleInit (
|
||||||
error on last one.
|
error on last one.
|
||||||
*/
|
*/
|
||||||
static ilError ilProducerThrottleExecute (
|
static ilError ilProducerThrottleExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine, /* ignored */
|
long dstLine, /* ignored */
|
||||||
long *pNLines /* ignored on input */
|
long *pNLines /* ignored on input */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilThrottlePrivPtr pPriv;
|
ilThrottlePrivPtr pPriv;
|
||||||
|
|
||||||
/* Set the next elements srcLine to our current line. Bump srcLine by
|
/* Set the next elements srcLine to our current line. Bump srcLine by
|
||||||
stripHeight (# lines just "written"), but if that is to/past end of image,
|
stripHeight (# lines just "written"), but if that is to/past end of image,
|
||||||
|
@ -116,12 +116,12 @@ register ilThrottlePrivPtr pPriv;
|
||||||
pData->srcLine must be startLine, as passed to ilFeedPipe()
|
pData->srcLine must be startLine, as passed to ilFeedPipe()
|
||||||
*/
|
*/
|
||||||
static ilError ilFeedProducerThrottleExecute (
|
static ilError ilFeedProducerThrottleExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine, /* ignored */
|
long dstLine, /* ignored */
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilThrottlePrivPtr pPriv;
|
ilThrottlePrivPtr pPriv;
|
||||||
long nLines;
|
long nLines;
|
||||||
|
|
||||||
/* Point next element to the feed data, set into pData by ilExecutePipe():
|
/* Point next element to the feed data, set into pData by ilExecutePipe():
|
||||||
|
@ -149,12 +149,12 @@ long nLines;
|
||||||
/* Execute() for when not the producer, but constant strips are not required.
|
/* Execute() for when not the producer, but constant strips are not required.
|
||||||
*/
|
*/
|
||||||
static ilError ilNonConstantThrottleExecute (
|
static ilError ilNonConstantThrottleExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine, /* ignored */
|
long dstLine, /* ignored */
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilThrottlePrivPtr pPriv;
|
ilThrottlePrivPtr pPriv;
|
||||||
|
|
||||||
|
|
||||||
/* Not from a producer, but !constantStrip; easy: caller just wants strips
|
/* Not from a producer, but !constantStrip; easy: caller just wants strips
|
||||||
|
@ -203,14 +203,14 @@ register ilThrottlePrivPtr pPriv;
|
||||||
/* Execute() for when not a producer and constant strips are required.
|
/* Execute() for when not a producer and constant strips are required.
|
||||||
*/
|
*/
|
||||||
static ilError ilConstantThrottleExecute (
|
static ilError ilConstantThrottleExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine, /* ignored */
|
long dstLine, /* ignored */
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilThrottlePrivPtr pPriv;
|
ilThrottlePrivPtr pPriv;
|
||||||
long nLines, nLinesToWrite;
|
long nLines, nLinesToWrite;
|
||||||
register ilError returnCode;
|
ilError returnCode;
|
||||||
|
|
||||||
pPriv = (ilThrottlePrivPtr)pData->pPrivate;
|
pPriv = (ilThrottlePrivPtr)pData->pPrivate;
|
||||||
if (pPriv->beingRecalled)
|
if (pPriv->beingRecalled)
|
||||||
|
@ -314,7 +314,7 @@ register ilError returnCode;
|
||||||
Handles uncompressed images only; compressed images handled separately.
|
Handles uncompressed images only; compressed images handled separately.
|
||||||
*/
|
*/
|
||||||
static ilError ilCopyImageExecute (
|
static ilError ilCopyImageExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine,
|
long dstLine,
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
|
@ -326,7 +326,7 @@ long srcRowBytes, dstRowBytes;
|
||||||
long nLines, nBytes, srcStart, dstStart;
|
long nLines, nBytes, srcStart, dstStart;
|
||||||
int nPlanes;
|
int nPlanes;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register long lineCount;
|
long lineCount;
|
||||||
|
|
||||||
/* Point to src/dst image and first plane of each */
|
/* Point to src/dst image and first plane of each */
|
||||||
pSrcImage = pData->pSrcImage;
|
pSrcImage = pData->pSrcImage;
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
} ilScalePriv, *ilScalePrivptr;
|
} ilScalePriv, *ilScalePrivptr;
|
||||||
|
|
||||||
#ifdef LSB_BIT_ORDER
|
#ifdef LSB_BIT_ORDER
|
||||||
extern void flip_bits(register ilPtr start, register unsigned n);
|
extern void flip_bits(ilPtr start, unsigned n);
|
||||||
#else
|
#else
|
||||||
# define flip_bits(start,n) /*EMPTY*/
|
# define flip_bits(start,n) /*EMPTY*/
|
||||||
#endif
|
#endif
|
||||||
|
@ -96,16 +96,16 @@ static ilError ilScaleInit(
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
|
|
||||||
static void ilswbitdown(
|
static void ilswbitdown(
|
||||||
register CARD32 *psrcline,
|
CARD32 *psrcline,
|
||||||
register CARD32 *pdstline,
|
CARD32 *pdstline,
|
||||||
unsigned long srcwidth,
|
unsigned long srcwidth,
|
||||||
unsigned long dstwidth
|
unsigned long dstwidth
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
register int acc, nbits;
|
int acc, nbits;
|
||||||
register CARD32 srcMask;
|
CARD32 srcMask;
|
||||||
register CARD32 srcLong;
|
CARD32 srcLong;
|
||||||
CARD32 dstLong;
|
CARD32 dstLong;
|
||||||
ilBool copy;
|
ilBool copy;
|
||||||
ilBool Lastbit;
|
ilBool Lastbit;
|
||||||
|
@ -215,16 +215,16 @@ ilBool Lastbit;
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
|
|
||||||
static void ilswbitup(
|
static void ilswbitup(
|
||||||
register CARD32 *psrcline,
|
CARD32 *psrcline,
|
||||||
register CARD32 *pdstline,
|
CARD32 *pdstline,
|
||||||
unsigned long srcwidth,
|
unsigned long srcwidth,
|
||||||
unsigned long dstwidth
|
unsigned long dstwidth
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
register int acc, nbits;
|
int acc, nbits;
|
||||||
register CARD32 srcMask;
|
CARD32 srcMask;
|
||||||
register CARD32 srcLong;
|
CARD32 srcLong;
|
||||||
CARD32 dstLong;
|
CARD32 dstLong;
|
||||||
ilBool Lastbit;
|
ilBool Lastbit;
|
||||||
|
|
||||||
|
@ -293,14 +293,14 @@ ilBool Lastbit;
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
|
|
||||||
static void ilsw3bytedown(
|
static void ilsw3bytedown(
|
||||||
register unsigned char *psrcline,
|
unsigned char *psrcline,
|
||||||
register unsigned char *pdstline,
|
unsigned char *pdstline,
|
||||||
unsigned long srcwidth,
|
unsigned long srcwidth,
|
||||||
unsigned long dstwidth
|
unsigned long dstwidth
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
register int acc, n3bytes;
|
int acc, n3bytes;
|
||||||
ilBool copy;
|
ilBool copy;
|
||||||
|
|
||||||
|
|
||||||
|
@ -338,14 +338,14 @@ ilBool copy;
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
|
|
||||||
static void ilsw3byteup(
|
static void ilsw3byteup(
|
||||||
register unsigned char *psrcline,
|
unsigned char *psrcline,
|
||||||
register unsigned char *pdstline,
|
unsigned char *pdstline,
|
||||||
unsigned long srcwidth,
|
unsigned long srcwidth,
|
||||||
unsigned long dstwidth
|
unsigned long dstwidth
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
register int acc, n3bytes;
|
int acc, n3bytes;
|
||||||
|
|
||||||
acc = dstwidth - srcwidth;
|
acc = dstwidth - srcwidth;
|
||||||
n3bytes = srcwidth;
|
n3bytes = srcwidth;
|
||||||
|
@ -373,14 +373,14 @@ register int acc, n3bytes;
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
|
|
||||||
static void ilswbytedown(
|
static void ilswbytedown(
|
||||||
register unsigned char *psrcline,
|
unsigned char *psrcline,
|
||||||
register unsigned char *pdstline,
|
unsigned char *pdstline,
|
||||||
unsigned long srcwidth,
|
unsigned long srcwidth,
|
||||||
unsigned long dstwidth
|
unsigned long dstwidth
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
register int acc, nbytes;
|
int acc, nbytes;
|
||||||
ilBool copy;
|
ilBool copy;
|
||||||
|
|
||||||
|
|
||||||
|
@ -412,14 +412,14 @@ ilBool copy;
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
|
|
||||||
static void ilswbyteup(
|
static void ilswbyteup(
|
||||||
register unsigned char *psrcline,
|
unsigned char *psrcline,
|
||||||
register unsigned char *pdstline,
|
unsigned char *pdstline,
|
||||||
unsigned long srcwidth,
|
unsigned long srcwidth,
|
||||||
unsigned long dstwidth
|
unsigned long dstwidth
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
register int acc, nbytes;
|
int acc, nbytes;
|
||||||
|
|
||||||
acc = dstwidth - srcwidth;
|
acc = dstwidth - srcwidth;
|
||||||
nbytes = srcwidth;
|
nbytes = srcwidth;
|
||||||
|
@ -447,18 +447,18 @@ register int acc, nbytes;
|
||||||
to scale the width.
|
to scale the width.
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilScaleBitonalExecute (
|
static ilError ilScaleBitonalExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register CARD32 *psrcline, *pdstline;
|
CARD32 *psrcline, *pdstline;
|
||||||
register unsigned long srcnwords, dstnwords;
|
unsigned long srcnwords, dstnwords;
|
||||||
register long nlines;
|
long nlines;
|
||||||
register unsigned long srcwidth, dstwidth;
|
unsigned long srcwidth, dstwidth;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register unsigned long local_noDstLine;
|
unsigned long local_noDstLine;
|
||||||
register ilScalePrivptr pPriv;
|
ilScalePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -556,18 +556,18 @@ register ilScalePrivptr pPriv;
|
||||||
to scale the width.
|
to scale the width.
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilScale3ByteExecute (
|
static ilError ilScale3ByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register unsigned char *psrcline, *pdstline;
|
unsigned char *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
register long nlines;
|
long nlines;
|
||||||
register unsigned long srcwidth, dstwidth;
|
unsigned long srcwidth, dstwidth;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register unsigned long local_noDstLine;
|
unsigned long local_noDstLine;
|
||||||
register ilScalePrivptr pPriv;
|
ilScalePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -667,18 +667,18 @@ register ilScalePrivptr pPriv;
|
||||||
to scale the width.
|
to scale the width.
|
||||||
============================================================================================================================= */
|
============================================================================================================================= */
|
||||||
static ilError ilScaleByteExecute (
|
static ilError ilScaleByteExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
unsigned long dstLine,
|
unsigned long dstLine,
|
||||||
unsigned long *pNLines
|
unsigned long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register unsigned char *psrcline, *pdstline;
|
unsigned char *psrcline, *pdstline;
|
||||||
register unsigned long srcnbytes, dstnbytes;
|
unsigned long srcnbytes, dstnbytes;
|
||||||
register long nlines;
|
long nlines;
|
||||||
register unsigned long srcwidth, dstwidth;
|
unsigned long srcwidth, dstwidth;
|
||||||
ilImagePlaneInfo *pplane;
|
ilImagePlaneInfo *pplane;
|
||||||
register unsigned long local_noDstLine;
|
unsigned long local_noDstLine;
|
||||||
register ilScalePrivptr pPriv;
|
ilScalePrivptr pPriv;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -784,7 +784,7 @@ ilBool ilScale (
|
||||||
{
|
{
|
||||||
unsigned int state;
|
unsigned int state;
|
||||||
ilPipeInfo info;
|
ilPipeInfo info;
|
||||||
register ilScalePrivptr pPriv;
|
ilScalePrivptr pPriv;
|
||||||
ilDstElementData dstdata;
|
ilDstElementData dstdata;
|
||||||
ilImageDes imdes;
|
ilImageDes imdes;
|
||||||
ilImageFormat imformat;
|
ilImageFormat imformat;
|
||||||
|
|
|
@ -155,11 +155,11 @@ static ilError ilScaleSample3ByteExecute (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilScaleSamplePtr pPriv;
|
ilScaleSamplePtr pPriv;
|
||||||
register ilPtr pSrc, pDst, pSrcTemp;
|
ilPtr pSrc, pDst, pSrcTemp;
|
||||||
register long pixel, i, j, right;
|
long pixel, i, j, right;
|
||||||
register unsigned long *pCornerTable, *pTopBelowTable;
|
unsigned long *pCornerTable, *pTopBelowTable;
|
||||||
register long colAcc, dstWidth;
|
long colAcc, dstWidth;
|
||||||
long nDstPixels, widthDiff;
|
long nDstPixels, widthDiff;
|
||||||
ilPtr psrcline, pdstline, pSrcEnd;
|
ilPtr psrcline, pdstline, pSrcEnd;
|
||||||
long srcnbytes, dstnbytes;
|
long srcnbytes, dstnbytes;
|
||||||
|
@ -381,11 +381,11 @@ static ilError ilScaleSampleByteExecute (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilScaleSamplePtr pPriv;
|
ilScaleSamplePtr pPriv;
|
||||||
register ilPtr pSrc, pDst, pSrcTemp;
|
ilPtr pSrc, pDst, pSrcTemp;
|
||||||
register long pixel, i, j, right;
|
long pixel, i, j, right;
|
||||||
register unsigned long *pCornerTable, *pTopBelowTable;
|
unsigned long *pCornerTable, *pTopBelowTable;
|
||||||
register long colAcc, dstWidth;
|
long colAcc, dstWidth;
|
||||||
long nDstPixels, widthDiff;
|
long nDstPixels, widthDiff;
|
||||||
ilPtr psrcline, pdstline, pSrcEnd;
|
ilPtr psrcline, pdstline, pSrcEnd;
|
||||||
long srcnbytes, dstnbytes;
|
long srcnbytes, dstnbytes;
|
||||||
|
@ -538,7 +538,7 @@ IL_PRIVATE void _ilScaleSample (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
register ilScaleSamplePtr pPriv;
|
ilScaleSamplePtr pPriv;
|
||||||
ilDstElementData dstdata;
|
ilDstElementData dstdata;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ ilBool ilFeedFromImage (
|
||||||
ilBool constantStrip
|
ilBool constantStrip
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
|
|
||||||
/* Validate that pipe and image are such, and that they have the same context. */
|
/* Validate that pipe and image are such, and that they have the same context. */
|
||||||
pImage = (ilImagePtr)image;
|
pImage = (ilImagePtr)image;
|
||||||
|
@ -141,7 +141,7 @@ static ilError ilTapInit (
|
||||||
ilImageInfo *pDstImage
|
ilImageInfo *pDstImage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int plane;
|
int plane;
|
||||||
ilImageInfo *pFeedInfo;
|
ilImageInfo *pFeedInfo;
|
||||||
|
|
||||||
pFeedInfo = pPriv->pFeedInfo;
|
pFeedInfo = pPriv->pFeedInfo;
|
||||||
|
@ -168,13 +168,13 @@ static ilError ilTapDestroy (
|
||||||
Feed the pipe bits entering this filter down the offshoot pipe.
|
Feed the pipe bits entering this filter down the offshoot pipe.
|
||||||
*/
|
*/
|
||||||
static ilError ilTapExecute (
|
static ilError ilTapExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine,
|
long dstLine,
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilTapPrivPtr pPriv;
|
ilTapPrivPtr pPriv;
|
||||||
register int plane;
|
int plane;
|
||||||
ilImageInfo *pFeedInfo, *pSrcImage;
|
ilImageInfo *pFeedInfo, *pSrcImage;
|
||||||
long start, nCompBytes;
|
long start, nCompBytes;
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ long start, nCompBytes;
|
||||||
/* Public function: see spec.
|
/* Public function: see spec.
|
||||||
*/
|
*/
|
||||||
ilPipe ilTapPipe (
|
ilPipe ilTapPipe (
|
||||||
register ilPipe pipe,
|
ilPipe pipe,
|
||||||
unsigned long mustBeZero,
|
unsigned long mustBeZero,
|
||||||
void *mustBeNull
|
void *mustBeNull
|
||||||
)
|
)
|
||||||
|
@ -227,7 +227,7 @@ ilImageFormat format;
|
||||||
ilImageInfo imageInfo, *pFeedInfo;
|
ilImageInfo imageInfo, *pFeedInfo;
|
||||||
ilSrcElementData srcData;
|
ilSrcElementData srcData;
|
||||||
ilError error;
|
ilError error;
|
||||||
register ilTapPrivPtr pPriv;
|
ilTapPrivPtr pPriv;
|
||||||
|
|
||||||
context = pipe->context;
|
context = pipe->context;
|
||||||
feedImage = (ilClientImage)NULL;
|
feedImage = (ilClientImage)NULL;
|
||||||
|
|
|
@ -88,7 +88,7 @@ static void ilFreeFileList (
|
||||||
ilFilePtr pFile
|
ilFilePtr pFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilFileImagePtr pFileImage, pAltFileImage, pFileImageTemp;
|
ilFileImagePtr pFileImage, pAltFileImage, pFileImageTemp;
|
||||||
|
|
||||||
/* Run thru the list of file images; for each: if a mask image destroy it
|
/* Run thru the list of file images; for each: if a mask image destroy it
|
||||||
(only one); if child images, destroy them - they are linked by pChild.
|
(only one); if child images, destroy them - they are linked by pChild.
|
||||||
|
@ -148,7 +148,7 @@ ilPtr pTagData, pTagAlloc;
|
||||||
ilFilePtr pFile;
|
ilFilePtr pFile;
|
||||||
ilFileTag *pTag, **ppTag;
|
ilFileTag *pTag, **ppTag;
|
||||||
int tagNumber, nFileTags, nItems, nTags, tagType, i;
|
int tagNumber, nFileTags, nItems, nTags, tagType, i;
|
||||||
register ilBool bigEndian;
|
ilBool bigEndian;
|
||||||
|
|
||||||
pFileImage = (ilFileImagePtr)fileImage;
|
pFileImage = (ilFileImagePtr)fileImage;
|
||||||
if (mustBeZero != 0) {
|
if (mustBeZero != 0) {
|
||||||
|
@ -363,7 +363,7 @@ RFTFatalError:
|
||||||
*/
|
*/
|
||||||
static void ilAddImageToList (
|
static void ilAddImageToList (
|
||||||
ilFilePtr pFile,
|
ilFilePtr pFile,
|
||||||
register ilFileImagePtr pFileImage,
|
ilFileImagePtr pFileImage,
|
||||||
ilFileImagePtr pPrevFileImage
|
ilFileImagePtr pPrevFileImage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -431,7 +431,7 @@ static void ilAddImageToList (
|
||||||
static ilError ilReadTagsAndAddImageToList (
|
static ilError ilReadTagsAndAddImageToList (
|
||||||
ilFilePtr pFile,
|
ilFilePtr pFile,
|
||||||
ilFileImagePtr *ppPrevFileImage,
|
ilFileImagePtr *ppPrevFileImage,
|
||||||
register ilFileImagePtr pFileImage
|
ilFileImagePtr pFileImage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
/* Indexes into "tagNumbers" below. NOTE: order is important, as tags are checked
|
/* Indexes into "tagNumbers" below. NOTE: order is important, as tags are checked
|
||||||
|
@ -495,11 +495,11 @@ ilFileTag *tag [AI_NTAGS];
|
||||||
ilBool present;
|
ilBool present;
|
||||||
ilError error;
|
ilError error;
|
||||||
ilPtr pTagAlloc;
|
ilPtr pTagAlloc;
|
||||||
register unsigned long value;
|
unsigned long value;
|
||||||
int i, tagIndex, nBits, resolutionUnit, fillOrder;
|
int i, tagIndex, nBits, resolutionUnit, fillOrder;
|
||||||
unsigned long group3CompData;
|
unsigned long group3CompData;
|
||||||
unsigned long group4CompData;
|
unsigned long group4CompData;
|
||||||
register ilFileTag *pTag;
|
ilFileTag *pTag;
|
||||||
ilYCbCrInfo *pYCbCr; /* null if not YCbCr ; else -> des...YCbCr */
|
ilYCbCrInfo *pYCbCr; /* null if not YCbCr ; else -> des...YCbCr */
|
||||||
|
|
||||||
/* Init/zero des and format in *pFileImage.
|
/* Init/zero des and format in *pFileImage.
|
||||||
|
@ -815,7 +815,7 @@ ilYCbCrInfo *pYCbCr; /* null if not YCbCr ; else -> des...YCb
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* compatibility problem with long or unsigned long data fields */
|
/* compatibility problem with long or unsigned long data fields */
|
||||||
register INT32 *pLong = (INT32 *)pTag->pItems;
|
INT32 *pLong = (INT32 *)pTag->pItems;
|
||||||
double num, denom;
|
double num, denom;
|
||||||
if ((pTag->nItems != 3) || (pTag->type != IL_TAG_RATIONAL))
|
if ((pTag->nItems != 3) || (pTag->type != IL_TAG_RATIONAL))
|
||||||
AIL_FATAL_ERROR (IL_ERROR_FILE_MALFORMED_TAG);
|
AIL_FATAL_ERROR (IL_ERROR_FILE_MALFORMED_TAG);
|
||||||
|
@ -858,7 +858,7 @@ ilYCbCrInfo *pYCbCr; /* null if not YCbCr ; else -> des...YCb
|
||||||
*/
|
*/
|
||||||
case REFERENCE_BLACK_WHITE:
|
case REFERENCE_BLACK_WHITE:
|
||||||
if (pYCbCr) {
|
if (pYCbCr) {
|
||||||
register ilYCbCrSampleInfo *pSample = pYCbCr->sample;
|
ilYCbCrSampleInfo *pSample = pYCbCr->sample;
|
||||||
int i;
|
int i;
|
||||||
if (!present) {
|
if (!present) {
|
||||||
pSample->refBlack = 0; pSample->refWhite = 255; pSample++;
|
pSample->refBlack = 0; pSample->refWhite = 255; pSample++;
|
||||||
|
@ -867,7 +867,7 @@ ilYCbCrInfo *pYCbCr; /* null if not YCbCr ; else -> des...YCb
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* compatibility problem with long and unsigned long data fields */
|
/* compatibility problem with long and unsigned long data fields */
|
||||||
register INT32 *pLong = (INT32 *)pTag->pItems;
|
INT32 *pLong = (INT32 *)pTag->pItems;
|
||||||
if (pTag->nItems != 6)
|
if (pTag->nItems != 6)
|
||||||
AIL_FATAL_ERROR (IL_ERROR_FILE_MALFORMED_TAG);
|
AIL_FATAL_ERROR (IL_ERROR_FILE_MALFORMED_TAG);
|
||||||
if (pTag->type == IL_TAG_LONG) { /* old type */
|
if (pTag->type == IL_TAG_LONG) { /* old type */
|
||||||
|
@ -901,7 +901,7 @@ ilYCbCrInfo *pYCbCr; /* null if not YCbCr ; else -> des...YCb
|
||||||
if (present) {
|
if (present) {
|
||||||
if (value & IL_TAG_P0_FLAG_DITHER_LEVELS) {
|
if (value & IL_TAG_P0_FLAG_DITHER_LEVELS) {
|
||||||
if (pFileImage->p.des.type == IL_PALETTE) {
|
if (pFileImage->p.des.type == IL_PALETTE) {
|
||||||
register short *pLevel = ((short *)pTag->pItems + 1);
|
short *pLevel = ((short *)pTag->pItems + 1);
|
||||||
if ((pTag->nItems < 4) || (pTag->type != IL_TAG_SHORT))
|
if ((pTag->nItems < 4) || (pTag->type != IL_TAG_SHORT))
|
||||||
AIL_FATAL_ERROR (IL_ERROR_FILE_MALFORMED_TAG);
|
AIL_FATAL_ERROR (IL_ERROR_FILE_MALFORMED_TAG);
|
||||||
pFileImage->p.des.flags |= IL_DITHERED_PALETTE;
|
pFileImage->p.des.flags |= IL_DITHERED_PALETTE;
|
||||||
|
@ -932,7 +932,7 @@ ilYCbCrInfo *pYCbCr; /* null if not YCbCr ; else -> des...YCb
|
||||||
|
|
||||||
/* If mask image: must be bitonal or discard it. */
|
/* If mask image: must be bitonal or discard it. */
|
||||||
if (imageType == maskImage) {
|
if (imageType == maskImage) {
|
||||||
register ilFileImagePtr pPrevFileImage = *ppPrevFileImage;
|
ilFileImagePtr pPrevFileImage = *ppPrevFileImage;
|
||||||
if (!pPrevFileImage /* no image before it */
|
if (!pPrevFileImage /* no image before it */
|
||||||
|| pPrevFileImage->p.pMask /* already has mask */
|
|| pPrevFileImage->p.pMask /* already has mask */
|
||||||
|| (pFileImage->p.des.nSamplesPerPixel != 1)
|
|| (pFileImage->p.des.nSamplesPerPixel != 1)
|
||||||
|
@ -983,8 +983,8 @@ ilByte fourBytes [4];
|
||||||
ilFileOffset IFDOffset;
|
ilFileOffset IFDOffset;
|
||||||
ilFileImagePtr pFileImage, pPrevFileImage;
|
ilFileImagePtr pFileImage, pPrevFileImage;
|
||||||
ilTIFFHeader header;
|
ilTIFFHeader header;
|
||||||
register ilFilePtr pFile;
|
ilFilePtr pFile;
|
||||||
register ilBool bigEndian;
|
ilBool bigEndian;
|
||||||
|
|
||||||
/* Check if image list already built - if so, return ptr to it.
|
/* Check if image list already built - if so, return ptr to it.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -128,7 +128,7 @@ typedef struct _ilFileRec {
|
||||||
*/
|
*/
|
||||||
/* compatibility problem with long and unsigned long data fields */
|
/* compatibility problem with long and unsigned long data fields */
|
||||||
#define IL_FLIP_LONG(_bigEndian, _4b, _long) { \
|
#define IL_FLIP_LONG(_bigEndian, _4b, _long) { \
|
||||||
register CARD32 _l; \
|
CARD32 _l; \
|
||||||
if (_bigEndian) { \
|
if (_bigEndian) { \
|
||||||
_l = *((ilPtr)(_4b)+0); _l <<= 8; \
|
_l = *((ilPtr)(_4b)+0); _l <<= 8; \
|
||||||
_l |= *((ilPtr)(_4b)+1); _l <<= 8; \
|
_l |= *((ilPtr)(_4b)+1); _l <<= 8; \
|
||||||
|
@ -147,7 +147,7 @@ typedef struct _ilFileRec {
|
||||||
/* Same for a short.
|
/* Same for a short.
|
||||||
*/
|
*/
|
||||||
#define IL_FLIP_SHORT(_bigEndian, _2b, _short) {\
|
#define IL_FLIP_SHORT(_bigEndian, _2b, _short) {\
|
||||||
register unsigned short _s; \
|
unsigned short _s; \
|
||||||
if (_bigEndian) { \
|
if (_bigEndian) { \
|
||||||
_s = *((ilPtr)(_2b)+0); _s <<= 8; \
|
_s = *((ilPtr)(_2b)+0); _s <<= 8; \
|
||||||
_s |= *((ilPtr)(_2b)+1); \
|
_s |= *((ilPtr)(_2b)+1); \
|
||||||
|
|
|
@ -86,12 +86,12 @@ static ilError ilReadJPEGTags (
|
||||||
long *pQOffsets, /* array of nComps file offsets to tables */
|
long *pQOffsets, /* array of nComps file offsets to tables */
|
||||||
long *pDCOffsets,
|
long *pDCOffsets,
|
||||||
long *pACOffsets,
|
long *pACOffsets,
|
||||||
register ilJPEGData *pCompData /* ptr to structure to fill in */
|
ilJPEGData *pCompData /* ptr to structure to fill in */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i, c, nBytes;
|
int i, c, nBytes;
|
||||||
register ilJPEGSampleData *pSample;
|
ilJPEGSampleData *pSample;
|
||||||
register ilPtr pTable;
|
ilPtr pTable;
|
||||||
ilByte buffer[16]; /* buffer for DC/AC table prefix (# codes) */
|
ilByte buffer[16]; /* buffer for DC/AC table prefix (# codes) */
|
||||||
|
|
||||||
/* Use sample/component index as table index; load tables based on sample */
|
/* Use sample/component index as table index; load tables based on sample */
|
||||||
|
@ -152,10 +152,10 @@ static ilError ilReadFileInit (
|
||||||
ilImageInfo *pDstImage
|
ilImageInfo *pDstImage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilReadFilePrivPtr pPriv = (ilReadFilePrivPtr)pPrivate;
|
ilReadFilePrivPtr pPriv = (ilReadFilePrivPtr)pPrivate;
|
||||||
ilFileImagePtr pFileImage;
|
ilFileImagePtr pFileImage;
|
||||||
ilError error;
|
ilError error;
|
||||||
register ilFileTag *pTag;
|
ilFileTag *pTag;
|
||||||
|
|
||||||
/* Data for tags to read: "numbers" is the array of tag ids, "nTags" in length.
|
/* Data for tags to read: "numbers" is the array of tag ids, "nTags" in length.
|
||||||
"?Index" vars are indices into "numbers" and returned data "tags".
|
"?Index" vars are indices into "numbers" and returned data "tags".
|
||||||
|
@ -263,8 +263,8 @@ int stripOffsetsIndex, stripByteCountsIndex, colorMapIndex,
|
||||||
Copy TIFF palette (size = 2 ** nBits) to pPriv->pPalette (size = 3 * 256).
|
Copy TIFF palette (size = 2 ** nBits) to pPriv->pPalette (size = 3 * 256).
|
||||||
*/
|
*/
|
||||||
if (pPriv->pPalette) {
|
if (pPriv->pPalette) {
|
||||||
register unsigned short *pPalette, *pFilePalette;
|
unsigned short *pPalette, *pFilePalette;
|
||||||
register int nPaletteEntries, i;
|
int nPaletteEntries, i;
|
||||||
|
|
||||||
pTag = tags [colorMapIndex];
|
pTag = tags [colorMapIndex];
|
||||||
if (!pTag)
|
if (!pTag)
|
||||||
|
@ -430,7 +430,7 @@ static ilError ilReadFileExecute (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilReadFilePrivPtr pPriv;
|
ilReadFilePrivPtr pPriv;
|
||||||
unsigned long nBytes, offset;
|
unsigned long nBytes, offset;
|
||||||
ilPtr pDst;
|
ilPtr pDst;
|
||||||
ilImagePlaneInfo *pDstImagePlane;
|
ilImagePlaneInfo *pDstImagePlane;
|
||||||
|
@ -500,8 +500,8 @@ ilBool ilReadFileImage (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilDstElementData dstData;
|
ilDstElementData dstData;
|
||||||
register ilFileImagePtr pFileImage;
|
ilFileImagePtr pFileImage;
|
||||||
register ilReadFilePrivPtr pPriv;
|
ilReadFilePrivPtr pPriv;
|
||||||
unsigned short *pPalette;
|
unsigned short *pPalette;
|
||||||
ilPtr pCompData;
|
ilPtr pCompData;
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ typedef struct {
|
||||||
/* Init() function for ilWriteFileImage().
|
/* Init() function for ilWriteFileImage().
|
||||||
*/
|
*/
|
||||||
static ilError ilWriteFileInit (
|
static ilError ilWriteFileInit (
|
||||||
register ilWriteFilePrivPtr pPriv,
|
ilWriteFilePrivPtr pPriv,
|
||||||
ilImageInfo *pSrcImage,
|
ilImageInfo *pSrcImage,
|
||||||
ilImageInfo *pDstImage
|
ilImageInfo *pDstImage
|
||||||
)
|
)
|
||||||
|
@ -132,15 +132,15 @@ static ilError ilWriteFileInit (
|
||||||
/* Cleanup() function for ilWriteFileImage().
|
/* Cleanup() function for ilWriteFileImage().
|
||||||
*/
|
*/
|
||||||
static ilError ilWriteFileCleanup (
|
static ilError ilWriteFileCleanup (
|
||||||
register ilWriteFilePrivPtr pPriv,
|
ilWriteFilePrivPtr pPriv,
|
||||||
ilBool aborting
|
ilBool aborting
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilFilePtr pFile;
|
ilFilePtr pFile;
|
||||||
ilFileOffset position;
|
ilFileOffset position;
|
||||||
ilByte fourBytes[4], nextBytes[4];
|
ilByte fourBytes[4], nextBytes[4];
|
||||||
ilPtr pBytes, pTag;
|
ilPtr pBytes, pTag;
|
||||||
register CARD32 *pTagOffsets, l;
|
CARD32 *pTagOffsets, l;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* If aborting pipe, just exit. The net effect is that if
|
/* If aborting pipe, just exit. The net effect is that if
|
||||||
|
@ -230,14 +230,14 @@ static ilError ilWriteFileDestroy (
|
||||||
into the tag memory buffer, so it will be written out by ilWriteFileCleanup().
|
into the tag memory buffer, so it will be written out by ilWriteFileCleanup().
|
||||||
*/
|
*/
|
||||||
static void ilCopyPalette (
|
static void ilCopyPalette (
|
||||||
register ilWriteFilePrivPtr pPriv,
|
ilWriteFilePrivPtr pPriv,
|
||||||
register unsigned short *pSrcPalette
|
unsigned short *pSrcPalette
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register unsigned short *pDstPalette;
|
unsigned short *pDstPalette;
|
||||||
register ilPtr pBytes;
|
ilPtr pBytes;
|
||||||
/* Since using IL_WRITE_FLIP_SHORT, palEntry should be unsigned short */
|
/* Since using IL_WRITE_FLIP_SHORT, palEntry should be unsigned short */
|
||||||
register unsigned short palEntry;
|
unsigned short palEntry;
|
||||||
unsigned long greenOffset, blueOffset;
|
unsigned long greenOffset, blueOffset;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ static ilError ilWriteFileExecute (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilWriteFilePrivPtr pPriv;
|
ilWriteFilePrivPtr pPriv;
|
||||||
ilFilePtr pFile;
|
ilFilePtr pFile;
|
||||||
unsigned long nBytes, rowBytes;
|
unsigned long nBytes, rowBytes;
|
||||||
ilPtr pBytes;
|
ilPtr pBytes;
|
||||||
|
@ -336,7 +336,7 @@ long position;
|
||||||
and write a JIF header into the TIFF file.
|
and write a JIF header into the TIFF file.
|
||||||
*/
|
*/
|
||||||
static ilError ilWriteJIFData (
|
static ilError ilWriteJIFData (
|
||||||
register ilWriteFilePrivPtr pPriv,
|
ilWriteFilePrivPtr pPriv,
|
||||||
ilFilePtr pFile,
|
ilFilePtr pFile,
|
||||||
ilImageInfo *pImage
|
ilImageInfo *pImage
|
||||||
)
|
)
|
||||||
|
@ -349,7 +349,7 @@ static ilError ilWriteJIFData (
|
||||||
ilJPEGData *pCompData;
|
ilJPEGData *pCompData;
|
||||||
ilError error;
|
ilError error;
|
||||||
long mcuWidth, mcuHeight;
|
long mcuWidth, mcuHeight;
|
||||||
register ilPtr pBytes;
|
ilPtr pBytes;
|
||||||
|
|
||||||
|
|
||||||
/* Init streamRec so output is written into malloc'd memory, and encode
|
/* Init streamRec so output is written into malloc'd memory, and encode
|
||||||
|
@ -452,11 +452,11 @@ static ilError ilWriteJPEGExecute (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilWriteFilePrivPtr pPriv;
|
ilWriteFilePrivPtr pPriv;
|
||||||
ilFilePtr pFile;
|
ilFilePtr pFile;
|
||||||
ilError error;
|
ilError error;
|
||||||
long position, nBytes, i, j;
|
long position, nBytes, i, j;
|
||||||
register ilPtr pBytes;
|
ilPtr pBytes;
|
||||||
ilByte marker[2];
|
ilByte marker[2];
|
||||||
|
|
||||||
/* The overall approach is to write a JIF image into the file plus strips.
|
/* The overall approach is to write a JIF image into the file plus strips.
|
||||||
|
@ -544,13 +544,13 @@ static ilError ilMergeWriteTags (
|
||||||
ilTagInfoPtr pInfo) /* returned tag info */
|
ilTagInfoPtr pInfo) /* returned tag info */
|
||||||
{
|
{
|
||||||
ilFileTag **ppTagsInit, **ppLastTag;
|
ilFileTag **ppTagsInit, **ppLastTag;
|
||||||
register ilFileTag **ppTag, **ppTagTemp, *pTag;
|
ilFileTag **ppTag, **ppTagTemp, *pTag;
|
||||||
ilPtr pTagData, pFileTags;
|
ilPtr pTagData, pFileTags;
|
||||||
long tagArraySize, tagDataSize, l;
|
long tagArraySize, tagDataSize, l;
|
||||||
CARD32 *pTagOffsets, *pLong;
|
CARD32 *pTagOffsets, *pLong;
|
||||||
int nTags, i;
|
int nTags, i;
|
||||||
unsigned short tagType, *pShort;
|
unsigned short tagType, *pShort;
|
||||||
register int tagNumber;
|
int tagNumber;
|
||||||
|
|
||||||
/* Allocate and null an array of ptrs to tags, size = # user + std tags, + 1
|
/* Allocate and null an array of ptrs to tags, size = # user + std tags, + 1
|
||||||
so that there is at least one guaranteed null tag ptr, for "end of array".
|
so that there is at least one guaranteed null tag ptr, for "end of array".
|
||||||
|
@ -729,13 +729,13 @@ static ilBool ilFormatPipeImage (
|
||||||
unsigned int compression,
|
unsigned int compression,
|
||||||
ilPtr pCompData,
|
ilPtr pCompData,
|
||||||
long *pStripHeight,
|
long *pStripHeight,
|
||||||
register ilPipeInfo *pInfo,
|
ilPipeInfo *pInfo,
|
||||||
register ilImageDes *pDes,
|
ilImageDes *pDes,
|
||||||
register ilImageFormat *pFormat
|
ilImageFormat *pFormat
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#define IL_WRITE_TIFF_STRIP_SIZE (16 * 1024) /* write 16KB strips as default */
|
#define IL_WRITE_TIFF_STRIP_SIZE (16 * 1024) /* write 16KB strips as default */
|
||||||
register long stripHeight;
|
long stripHeight;
|
||||||
long i, nLevels;
|
long i, nLevels;
|
||||||
ilBool mustConvert;
|
ilBool mustConvert;
|
||||||
unsigned long g3Flags, g4Flags;
|
unsigned long g3Flags, g4Flags;
|
||||||
|
@ -887,7 +887,7 @@ ilBool ilWriteFileImage (
|
||||||
|
|
||||||
long nStripsPerImage;
|
long nStripsPerImage;
|
||||||
ilFileTag tags [MAX_WRITE_TAGS];
|
ilFileTag tags [MAX_WRITE_TAGS];
|
||||||
register ilFileTag *pTag;
|
ilFileTag *pTag;
|
||||||
int nTags, i;
|
int nTags, i;
|
||||||
ilTagInfoRec tagInfo;
|
ilTagInfoRec tagInfo;
|
||||||
ilFilePtr pFile;
|
ilFilePtr pFile;
|
||||||
|
@ -1120,7 +1120,7 @@ char versionName [VERSION_LENGTH];
|
||||||
/* TIFF only allows subsampling as follows: Y = 1, Cr/Cb = 1,2,4 but
|
/* TIFF only allows subsampling as follows: Y = 1, Cr/Cb = 1,2,4 but
|
||||||
Cr and CB equal to each other; vert <= horiz.
|
Cr and CB equal to each other; vert <= horiz.
|
||||||
*/
|
*/
|
||||||
{ register ilYCbCrSampleInfo *pSample = des.typeInfo.YCbCr.sample;
|
{ ilYCbCrSampleInfo *pSample = des.typeInfo.YCbCr.sample;
|
||||||
|
|
||||||
if ((pSample[0].subsampleHoriz != 1)
|
if ((pSample[0].subsampleHoriz != 1)
|
||||||
|| (pSample[0].subsampleVert != 1)
|
|| (pSample[0].subsampleVert != 1)
|
||||||
|
|
|
@ -91,7 +91,7 @@ static ilError ilAddElementRGBGrayConversions (
|
||||||
void *pOptionData /* not used */
|
void *pOptionData /* not used */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* Init tables, index by R/G/B, which effectively multiply each component
|
/* Init tables, index by R/G/B, which effectively multiply each component
|
||||||
(0..255) by the NTSC conversion formula: 0.30 * R + 0.587 * G + 0.114 * B,
|
(0..255) by the NTSC conversion formula: 0.30 * R + 0.587 * G + 0.114 * B,
|
||||||
|
@ -126,12 +126,12 @@ static ilError ilExecuteRGBToGray (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilRGBToGrayRecPtr pPriv;
|
ilRGBToGrayRecPtr pPriv;
|
||||||
long srcnbytes, dstnbytes;
|
long srcnbytes, dstnbytes;
|
||||||
register ilPtr psrcline, pdstline;
|
ilPtr psrcline, pdstline;
|
||||||
register ilPtr psrc, pdst;
|
ilPtr psrc, pdst;
|
||||||
register long nLines, nPixels;
|
long nLines, nPixels;
|
||||||
register INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -200,11 +200,11 @@ static ilError ilExecuteGrayToRGB (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilRGBToGrayRecPtr pPriv;
|
ilRGBToGrayRecPtr pPriv;
|
||||||
register long nLinesM1, nPixelsM1;
|
long nLinesM1, nPixelsM1;
|
||||||
long srcRowBytes, dstRowBytes, nPixelsM1Init;
|
long srcRowBytes, dstRowBytes, nPixelsM1Init;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register ilByte byte;
|
ilByte byte;
|
||||||
|
|
||||||
pPriv = (ilRGBToGrayRecPtr)pData->pPrivate;
|
pPriv = (ilRGBToGrayRecPtr)pData->pPrivate;
|
||||||
nPixelsM1Init = pPriv->nPixels - 1;
|
nPixelsM1Init = pPriv->nPixels - 1;
|
||||||
|
|
|
@ -70,15 +70,15 @@ static void ilUpsampleQuadruple (
|
||||||
long nSrcBytes,
|
long nSrcBytes,
|
||||||
long srcRowBytes,
|
long srcRowBytes,
|
||||||
ilPtr pSrcLine,
|
ilPtr pSrcLine,
|
||||||
register long dstRowBytes,
|
long dstRowBytes,
|
||||||
ilPtr pDstLine
|
ilPtr pDstLine
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int temp0, temp1, delta;
|
int temp0, temp1, delta;
|
||||||
register unsigned long aLong;
|
unsigned long aLong;
|
||||||
long nSrcBytesM1, dstOffset;
|
long nSrcBytesM1, dstOffset;
|
||||||
register ilPtr pSrc, pSrcBelow, pDst;
|
ilPtr pSrc, pSrcBelow, pDst;
|
||||||
register int left, leftBelow, right, rightBelow;
|
int left, leftBelow, right, rightBelow;
|
||||||
|
|
||||||
#define FUPINTER(_start, _delta, _temp, _result) { \
|
#define FUPINTER(_start, _delta, _temp, _result) { \
|
||||||
_result = (_start) << 8; \
|
_result = (_start) << 8; \
|
||||||
|
@ -178,9 +178,9 @@ ilImagePlaneInfo *pSrcPlane, *pDstPlane;
|
||||||
int sample, subsampleShift;
|
int sample, subsampleShift;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
long width, nLines, nSrcLines, nSrcBytes, srcRowBytes, nSrcBytesM2;
|
long width, nLines, nSrcLines, nSrcBytes, srcRowBytes, nSrcBytesM2;
|
||||||
register long dstRowBytes;
|
long dstRowBytes;
|
||||||
register ilPtr pSrc, pSrcBelow, pDst;
|
ilPtr pSrc, pSrcBelow, pDst;
|
||||||
register int left, leftBelow, right, rightBelow;
|
int left, leftBelow, right, rightBelow;
|
||||||
|
|
||||||
/* Get width and height of _upsampled_ image; exit if zero. */
|
/* Get width and height of _upsampled_ image; exit if zero. */
|
||||||
pPriv = (ilUpFastPrivPtr)pData->pPrivate;
|
pPriv = (ilUpFastPrivPtr)pData->pPrivate;
|
||||||
|
@ -299,7 +299,7 @@ IL_PRIVATE ilBool _ilFastUpsample (
|
||||||
int scaleFactor
|
int scaleFactor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilUpFastPrivPtr pUpPriv;
|
ilUpFastPrivPtr pUpPriv;
|
||||||
ilUpFastPrivRec upPriv;
|
ilUpFastPrivRec upPriv;
|
||||||
int i, j;
|
int i, j;
|
||||||
ilYCbCrSampleInfo *pSample;
|
ilYCbCrSampleInfo *pSample;
|
||||||
|
@ -431,9 +431,9 @@ static void ilUpsampleHorizontal (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
long nMidPixels, nEndPixels;
|
long nMidPixels, nEndPixels;
|
||||||
register long nPixelsM1;
|
long nPixelsM1;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register ilByte pixel, prevPixel;
|
ilByte pixel, prevPixel;
|
||||||
|
|
||||||
if (nLines <= 0)
|
if (nLines <= 0)
|
||||||
return;
|
return;
|
||||||
|
@ -498,7 +498,7 @@ register ilByte pixel, prevPixel;
|
||||||
3 (prevPixel) | (12+3)/4=3 (15+3)/4=4 (18+3)/4=5 6 (src pixel) |
|
3 (prevPixel) | (12+3)/4=3 (15+3)/4=4 (18+3)/4=5 6 (src pixel) |
|
||||||
*/
|
*/
|
||||||
case 2: {
|
case 2: {
|
||||||
register int delta, temp;
|
int delta, temp;
|
||||||
|
|
||||||
nMidPixels = (width >> 2) - 1;
|
nMidPixels = (width >> 2) - 1;
|
||||||
nEndPixels = width - (nMidPixels << 2) - 1;
|
nEndPixels = width - (nMidPixels << 2) - 1;
|
||||||
|
@ -547,12 +547,12 @@ static void ilUpsampleVertical (
|
||||||
unsigned int shift, /* 0 = no upsample; 1 = * 2 (doubling); 2 = * 4 */
|
unsigned int shift, /* 0 = no upsample; 1 = * 2 (doubling); 2 = * 4 */
|
||||||
long width, /* width of _whole_ (un-upsampled) image */
|
long width, /* width of _whole_ (un-upsampled) image */
|
||||||
long nLines, /* # of dst lines (after upsampling) */
|
long nLines, /* # of dst lines (after upsampling) */
|
||||||
register long rowBytes, /* bytes / row in src/dst image */
|
long rowBytes, /* bytes / row in src/dst image */
|
||||||
ilPtr pLine /* ptr to first line of src/dst image */
|
ilPtr pLine /* ptr to first line of src/dst image */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
long nPixelsM1Init;
|
long nPixelsM1Init;
|
||||||
register long nPixelsM1;
|
long nPixelsM1;
|
||||||
|
|
||||||
/* Return if no pixels or lines to do. */
|
/* Return if no pixels or lines to do. */
|
||||||
if (nLines <= 0)
|
if (nLines <= 0)
|
||||||
|
@ -572,7 +572,7 @@ register long nPixelsM1;
|
||||||
and third lines, filling in the second with the average of the two.
|
and third lines, filling in the second with the average of the two.
|
||||||
*/
|
*/
|
||||||
case 1: {
|
case 1: {
|
||||||
register ilPtr pDst, pSrc1, pSrc2;
|
ilPtr pDst, pSrc1, pSrc2;
|
||||||
|
|
||||||
nLines--; /* don't count first line already in buffer */
|
nLines--; /* don't count first line already in buffer */
|
||||||
while (nLines >= 2) { /* two src lines, line between to interpolate */
|
while (nLines >= 2) { /* two src lines, line between to interpolate */
|
||||||
|
@ -601,8 +601,8 @@ register long nPixelsM1;
|
||||||
0 and 4, interpolating 1..3 - see horizontal upsampling.
|
0 and 4, interpolating 1..3 - see horizontal upsampling.
|
||||||
*/
|
*/
|
||||||
case 2: {
|
case 2: {
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register int pixel, delta;
|
int pixel, delta;
|
||||||
long rowBytesTimes4 = rowBytes << 2;
|
long rowBytesTimes4 = rowBytes << 2;
|
||||||
|
|
||||||
nLines--; /* don't count first line already in buffer */
|
nLines--; /* don't count first line already in buffer */
|
||||||
|
@ -649,7 +649,7 @@ static ilError ilExecuteUpsample (
|
||||||
long *pNLines /* ignored on input */
|
long *pNLines /* ignored on input */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilUpsamplePrivPtr pPriv;
|
ilUpsamplePrivPtr pPriv;
|
||||||
ilImagePlaneInfo *pSrcPlane, *pDstPlane;
|
ilImagePlaneInfo *pSrcPlane, *pDstPlane;
|
||||||
int nSamples;
|
int nSamples;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
|
@ -724,14 +724,14 @@ IL_PRIVATE ilBool _ilUpsampleYCbCr (
|
||||||
ilBool upSample
|
ilBool upSample
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilUpsamplePrivPtr pUpPriv;
|
ilUpsamplePrivPtr pUpPriv;
|
||||||
ilImageDes pipeDes;
|
ilImageDes pipeDes;
|
||||||
ilUpsampleShiftRec *pShift;
|
ilUpsampleShiftRec *pShift;
|
||||||
ilYCbCrSampleInfo *pSample;
|
ilYCbCrSampleInfo *pSample;
|
||||||
int sample;
|
int sample;
|
||||||
ilDstElementData dstData;
|
ilDstElementData dstData;
|
||||||
ilSrcElementData srcData;
|
ilSrcElementData srcData;
|
||||||
register long i, j;
|
long i, j;
|
||||||
|
|
||||||
/* Only 8 bit planar YCbCr can currently be upsampled; if not that and upsampling
|
/* Only 8 bit planar YCbCr can currently be upsampled; if not that and upsampling
|
||||||
needed, error; if no upsampling (only convert to gray) convert to planar.
|
needed, error; if no upsampling (only convert to gray) convert to planar.
|
||||||
|
|
|
@ -51,10 +51,10 @@
|
||||||
IL JPG package format.
|
IL JPG package format.
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE void _ilJPEGDataIn (
|
IL_PRIVATE void _ilJPEGDataIn (
|
||||||
register const ilImageDes *pDes,
|
const ilImageDes *pDes,
|
||||||
long width,
|
long width,
|
||||||
long height,
|
long height,
|
||||||
register iljpgDataPtr pDst
|
iljpgDataPtr pDst
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int maxSubsample;
|
int maxSubsample;
|
||||||
|
@ -69,7 +69,7 @@ IL_PRIVATE void _ilJPEGDataIn (
|
||||||
NOTE: currently only YCbCr data in IL is subsampled!
|
NOTE: currently only YCbCr data in IL is subsampled!
|
||||||
*/
|
*/
|
||||||
if (pDes->type == IL_YCBCR) {
|
if (pDes->type == IL_YCBCR) {
|
||||||
register const ilYCbCrSampleInfo *pSample = pDes->typeInfo.YCbCr.sample;
|
const ilYCbCrSampleInfo *pSample = pDes->typeInfo.YCbCr.sample;
|
||||||
|
|
||||||
maxSubsample = pSample[0].subsampleHoriz;
|
maxSubsample = pSample[0].subsampleHoriz;
|
||||||
if (pSample[1].subsampleHoriz > maxSubsample)
|
if (pSample[1].subsampleHoriz > maxSubsample)
|
||||||
|
@ -110,8 +110,8 @@ IL_PRIVATE void _ilJPEGDataIn (
|
||||||
Note: the restartInterval is also copied.
|
Note: the restartInterval is also copied.
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE void _ilJPEGTablesIn (
|
IL_PRIVATE void _ilJPEGTablesIn (
|
||||||
register ilJPEGData *pSrc,
|
ilJPEGData *pSrc,
|
||||||
register iljpgDataPtr pDst
|
iljpgDataPtr pDst
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -157,10 +157,10 @@ IL_PRIVATE void _ilJPEGTablesIn (
|
||||||
/* Free the tables in the given IL JPEG data block, which is not freed.
|
/* Free the tables in the given IL JPEG data block, which is not freed.
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE void _ilJPEGFreeTables (
|
IL_PRIVATE void _ilJPEGFreeTables (
|
||||||
register ilJPEGData *pData
|
ilJPEGData *pData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
if (pData->QTables[i]) {
|
if (pData->QTables[i]) {
|
||||||
|
@ -184,11 +184,11 @@ IL_PRIVATE void _ilJPEGFreeTables (
|
||||||
to it or null if malloc failed.
|
to it or null if malloc failed.
|
||||||
*/
|
*/
|
||||||
static ilPtr _ilJPEGCopyHuffmanTable (
|
static ilPtr _ilJPEGCopyHuffmanTable (
|
||||||
register ilPtr pSrc
|
ilPtr pSrc
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i, nBytes;
|
int i, nBytes;
|
||||||
register ilPtr pDst;
|
ilPtr pDst;
|
||||||
|
|
||||||
/* Huffman tables are: 16 bytes of # occurrences each # bits, followed by
|
/* Huffman tables are: 16 bytes of # occurrences each # bits, followed by
|
||||||
bytes for each of those # occurrences. Size of table = 16 + sum(0..15).
|
bytes for each of those # occurrences. Size of table = 16 + sum(0..15).
|
||||||
|
@ -207,11 +207,11 @@ static ilPtr _ilJPEGCopyHuffmanTable (
|
||||||
If an error, free all malloc'd tables in dest, null them and return false.
|
If an error, free all malloc'd tables in dest, null them and return false.
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE ilBool _ilJPEGCopyData (
|
IL_PRIVATE ilBool _ilJPEGCopyData (
|
||||||
register ilJPEGData *pSrc,
|
ilJPEGData *pSrc,
|
||||||
register ilJPEGData *pDst
|
ilJPEGData *pDst
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* Zero table ptrs in *pDst in case of error; copy index info */
|
/* Zero table ptrs in *pDst in case of error; copy index info */
|
||||||
bzero ((char *)pDst, sizeof (ilJPEGData));
|
bzero ((char *)pDst, sizeof (ilJPEGData));
|
||||||
|
@ -251,11 +251,11 @@ cdMallocError:
|
||||||
to be written. Zero (0) is returned if success else an error code.
|
to be written. Zero (0) is returned if success else an error code.
|
||||||
*/
|
*/
|
||||||
IL_PRIVATE iljpgError _ilReallocJPEGEncode (
|
IL_PRIVATE iljpgError _ilReallocJPEGEncode (
|
||||||
register ilJPEGEncodeStreamPtr pStream,
|
ilJPEGEncodeStreamPtr pStream,
|
||||||
long nBytes
|
long nBytes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register long offset;
|
long offset;
|
||||||
|
|
||||||
/* Allocate space so exactly "nBytes" more bytes will fit in output buffer.
|
/* Allocate space so exactly "nBytes" more bytes will fit in output buffer.
|
||||||
There are "offset" bytes in the buffer now so allocate offset + nBytes.
|
There are "offset" bytes in the buffer now so allocate offset + nBytes.
|
||||||
|
|
|
@ -97,8 +97,8 @@ static ilError ilWriteCompressedCleanup (
|
||||||
ilBool aborting
|
ilBool aborting
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePlaneInfo *pImagePlane;
|
ilImagePlaneInfo *pImagePlane;
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
ilError error;
|
ilError error;
|
||||||
|
|
||||||
pImage = pPriv->pImage;
|
pImage = pPriv->pImage;
|
||||||
|
@ -137,13 +137,13 @@ ilError error;
|
||||||
/* Execute() function for ilWriteImage(), writing compressed images.
|
/* Execute() function for ilWriteImage(), writing compressed images.
|
||||||
*/
|
*/
|
||||||
static ilError ilWriteCompressedExecute (
|
static ilError ilWriteCompressedExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine,
|
long dstLine,
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePrivPtr pPriv;
|
ilImagePrivPtr pPriv;
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
|
|
||||||
pPriv = (ilImagePrivPtr)pData->pPrivate;
|
pPriv = (ilImagePrivPtr)pData->pPrivate;
|
||||||
pImage = pPriv->pImage;
|
pImage = pPriv->pImage;
|
||||||
|
@ -193,12 +193,12 @@ static ilBool ilWriteCompressedImage (
|
||||||
ilObject image
|
ilObject image
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
ilPipeInfo info;
|
ilPipeInfo info;
|
||||||
ilImageDes des;
|
ilImageDes des;
|
||||||
ilImageFormat format;
|
ilImageFormat format;
|
||||||
ilBool mustConvert;
|
ilBool mustConvert;
|
||||||
register ilImagePrivPtr pPriv;
|
ilImagePrivPtr pPriv;
|
||||||
ilSrcElementData srcData;
|
ilSrcElementData srcData;
|
||||||
long stripHeight;
|
long stripHeight;
|
||||||
ilPtr pCompData;
|
ilPtr pCompData;
|
||||||
|
@ -289,7 +289,7 @@ ilPtr pCompData;
|
||||||
/* Execute() for WriteImage(): merely bumps srcLine by # lines written.
|
/* Execute() for WriteImage(): merely bumps srcLine by # lines written.
|
||||||
*/
|
*/
|
||||||
static ilError ilWriteImageExecute (
|
static ilError ilWriteImageExecute (
|
||||||
register ilExecuteData *pData,
|
ilExecuteData *pData,
|
||||||
long dstLine,
|
long dstLine,
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
|
@ -322,9 +322,9 @@ ilBool ilWriteImage (
|
||||||
ilObject image
|
ilObject image
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilImagePtr pImage;
|
ilImagePtr pImage;
|
||||||
register ilImagePrivPtr pPriv;
|
ilImagePrivPtr pPriv;
|
||||||
register ilContext context;
|
ilContext context;
|
||||||
ilPipeInfo info;
|
ilPipeInfo info;
|
||||||
ilSrcElementData srcData;
|
ilSrcElementData srcData;
|
||||||
|
|
||||||
|
|
|
@ -208,10 +208,10 @@ FUNC(xpmGetRgbName, char *, (xpmRgbName * rgbn, int rgbn_max,
|
||||||
int red, int green, int blue));
|
int red, int green, int blue));
|
||||||
FUNC(xpmFreeRgbNames, void, (xpmRgbName * rgbn, int rgbn_max));
|
FUNC(xpmFreeRgbNames, void, (xpmRgbName * rgbn, int rgbn_max));
|
||||||
|
|
||||||
FUNC(xpm_xynormalizeimagebits, int, (register unsigned char *bp,
|
FUNC(xpm_xynormalizeimagebits, int, (unsigned char *bp,
|
||||||
register XImage * img));
|
XImage * img));
|
||||||
FUNC(xpm_znormalizeimagebits, int, (register unsigned char *bp,
|
FUNC(xpm_znormalizeimagebits, int, (unsigned char *bp,
|
||||||
register XImage * img));
|
XImage * img));
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Macros
|
* Macros
|
||||||
|
|
|
@ -75,7 +75,7 @@ static ilError ilExecuteSubsample (
|
||||||
long *pNLines /* ignored on input */
|
long *pNLines /* ignored on input */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilSubsamplePrivPtr pPriv;
|
ilSubsamplePrivPtr pPriv;
|
||||||
ilImagePlaneInfo *pSrcPlane, *pDstPlane;
|
ilImagePlaneInfo *pSrcPlane, *pDstPlane;
|
||||||
int nSamples;
|
int nSamples;
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
|
@ -83,9 +83,9 @@ long height, width;
|
||||||
long srcRowInc, dstRowBytes;
|
long srcRowInc, dstRowBytes;
|
||||||
long nDstLinesM1, nDstPixelsM1Init;
|
long nDstLinesM1, nDstPixelsM1Init;
|
||||||
ilSubsampleShiftPtr pShift;
|
ilSubsampleShiftPtr pShift;
|
||||||
register long nDstPixelsM1, srcRowBytes, i;
|
long nDstPixelsM1, srcRowBytes, i;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register unsigned int pixel;
|
unsigned int pixel;
|
||||||
|
|
||||||
/* Get width and height of _upsampled_ image; exit if zero. */
|
/* Get width and height of _upsampled_ image; exit if zero. */
|
||||||
pPriv = (ilSubsamplePrivPtr)pData->pPrivate;
|
pPriv = (ilSubsamplePrivPtr)pData->pPrivate;
|
||||||
|
@ -202,7 +202,7 @@ IL_PRIVATE ilBool _ilSubsampleYCbCr (
|
||||||
ilImageFormat *pFormat
|
ilImageFormat *pFormat
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilSubsamplePrivPtr pSubPriv;
|
ilSubsamplePrivPtr pSubPriv;
|
||||||
ilSubsamplePrivRec priv;
|
ilSubsamplePrivRec priv;
|
||||||
ilSubsampleShiftRec *pShift;
|
ilSubsampleShiftRec *pShift;
|
||||||
ilYCbCrSampleInfo *pSample;
|
ilYCbCrSampleInfo *pSample;
|
||||||
|
@ -315,10 +315,10 @@ static ilError ilExecutePlanarYCbCrToRGB (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilPtr pYLine, pCbLine, pCrLine, pDstLine;
|
ilPtr pYLine, pCbLine, pCrLine, pDstLine;
|
||||||
register ilRGBTransPtr pTrans;
|
ilRGBTransPtr pTrans;
|
||||||
register ilPtr pY, pCb, pCr, pDst;
|
ilPtr pY, pCb, pCr, pDst;
|
||||||
register long YTrans, CbTrans, CrTrans, pixel, nPixelsM1;
|
long YTrans, CbTrans, CrTrans, pixel, nPixelsM1;
|
||||||
register int Y;
|
int Y;
|
||||||
long nPixelsM1Init, nLinesM1;
|
long nPixelsM1Init, nLinesM1;
|
||||||
long YRowBytes, CbRowBytes, CrRowBytes, dstRowBytes;
|
long YRowBytes, CbRowBytes, CrRowBytes, dstRowBytes;
|
||||||
ilImagePlaneInfo *pPlane;
|
ilImagePlaneInfo *pPlane;
|
||||||
|
@ -408,10 +408,10 @@ static ilError ilExecutePixelYCbCrToRGB (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilPtr pSrcLine, pDstLine;
|
ilPtr pSrcLine, pDstLine;
|
||||||
register ilRGBTransPtr pTrans;
|
ilRGBTransPtr pTrans;
|
||||||
register ilPtr pSrc, pDst;
|
ilPtr pSrc, pDst;
|
||||||
register long YTrans, CbTrans, CrTrans, pixel, nPixelsM1;
|
long YTrans, CbTrans, CrTrans, pixel, nPixelsM1;
|
||||||
register int Y;
|
int Y;
|
||||||
long nPixelsM1Init, nLinesM1;
|
long nPixelsM1Init, nLinesM1;
|
||||||
long srcRowBytes, dstRowBytes;
|
long srcRowBytes, dstRowBytes;
|
||||||
ilImagePlaneInfo *pPlane;
|
ilImagePlaneInfo *pPlane;
|
||||||
|
@ -489,11 +489,11 @@ static ilRGBTransPtr ilGetYCbCrConvertTable (
|
||||||
ilImageDes *pDes
|
ilImageDes *pDes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilRGBTransPtr pTrans;
|
ilRGBTransPtr pTrans;
|
||||||
const ilYCbCrInfo *pYCbCr, *pStdYCbCr;
|
const ilYCbCrInfo *pYCbCr, *pStdYCbCr;
|
||||||
double Lr, Lg, Lb, scaledY;
|
double Lr, Lg, Lb, scaledY;
|
||||||
register double factor, gFactor;
|
double factor, gFactor;
|
||||||
register int i, refBlack, upper, lower;
|
int i, refBlack, upper, lower;
|
||||||
ilBool isStd;
|
ilBool isStd;
|
||||||
struct {
|
struct {
|
||||||
int refBlack;
|
int refBlack;
|
||||||
|
@ -608,7 +608,7 @@ IL_PRIVATE ilBool _ilConvertYCbCrToRGB (
|
||||||
ilDstElementData dstData;
|
ilDstElementData dstData;
|
||||||
ilError (*executeFunction)(), (*destroyFunction)();
|
ilError (*executeFunction)(), (*destroyFunction)();
|
||||||
ilYCbCrToRGBPrivPtr pPriv;
|
ilYCbCrToRGBPrivPtr pPriv;
|
||||||
register ilRGBTransPtr pTrans;
|
ilRGBTransPtr pTrans;
|
||||||
|
|
||||||
if ((pFormat->nBitsPerSample[0] != 8)
|
if ((pFormat->nBitsPerSample[0] != 8)
|
||||||
|| (pFormat->nBitsPerSample[1] != 8)
|
|| (pFormat->nBitsPerSample[1] != 8)
|
||||||
|
@ -717,12 +717,12 @@ ilPtr pYLine, pCbLine, pCrLine, pDstLine;
|
||||||
int *pKernelRowEnd;
|
int *pKernelRowEnd;
|
||||||
long nPixelsDiv2M1;
|
long nPixelsDiv2M1;
|
||||||
ilPtr pCb, pCr;
|
ilPtr pCb, pCr;
|
||||||
register long YRowBytes, dstRowBytes;
|
long YRowBytes, dstRowBytes;
|
||||||
register long Y, Cb, Cr, YTrans, CbTrans, CrTrans, comp, pixel;
|
long Y, Cb, Cr, YTrans, CbTrans, CrTrans, comp, pixel;
|
||||||
register ilPtr pY, pDst;
|
ilPtr pY, pDst;
|
||||||
register ilRGBTransPtr pTrans;
|
ilRGBTransPtr pTrans;
|
||||||
register ilPtr pTranslate;
|
ilPtr pTranslate;
|
||||||
register int *pKernel, kernel;
|
int *pKernel, kernel;
|
||||||
#define YCBCR2_KERNEL_SIZE 8 /* size of dither kernel used */
|
#define YCBCR2_KERNEL_SIZE 8 /* size of dither kernel used */
|
||||||
|
|
||||||
/* This filter handles a pipe image of YCbCr subsampled by 2 in Cb/Cr only.
|
/* This filter handles a pipe image of YCbCr subsampled by 2 in Cb/Cr only.
|
||||||
|
@ -894,14 +894,14 @@ d3ClipB: if (comp > YCBCR2_MAX_B) comp = YCBCR2_MAX_B; else comp = 0;
|
||||||
with the dither values pre-multiplied into them.
|
with the dither values pre-multiplied into them.
|
||||||
*/
|
*/
|
||||||
static void ilSetupYCbCrDitherTable (
|
static void ilSetupYCbCrDitherTable (
|
||||||
register ilRGBTransPtr pTrans,
|
ilRGBTransPtr pTrans,
|
||||||
ilImageDes *pDes
|
ilImageDes *pDes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ilYCbCrInfo *pYCbCr;
|
ilYCbCrInfo *pYCbCr;
|
||||||
double Lr, Lg, Lb, scaledY;
|
double Lr, Lg, Lb, scaledY;
|
||||||
register double factor, gFactor, rbDither, gDither;
|
double factor, gFactor, rbDither, gDither;
|
||||||
register int i, refBlack, upper, lower;
|
int i, refBlack, upper, lower;
|
||||||
struct {
|
struct {
|
||||||
int refBlack;
|
int refBlack;
|
||||||
double scale;
|
double scale;
|
||||||
|
@ -1033,9 +1033,9 @@ IL_PRIVATE ilBool _ilDitherYCbCr (
|
||||||
/* alloc pPalette unless not palette dst; init with ramp if not choosing */
|
/* alloc pPalette unless not palette dst; init with ramp if not choosing */
|
||||||
pPalette = (unsigned short *)NULL;
|
pPalette = (unsigned short *)NULL;
|
||||||
if (pData->dstType == IL_PALETTE) {
|
if (pData->dstType == IL_PALETTE) {
|
||||||
register int red, green, blue;
|
int red, green, blue;
|
||||||
register int redLevel, greenLevel, blueLevel;
|
int redLevel, greenLevel, blueLevel;
|
||||||
register unsigned short *pPal;
|
unsigned short *pPal;
|
||||||
|
|
||||||
pPalette = (unsigned short *)IL_MALLOC_ZERO (3 * 256 * sizeof(unsigned short));
|
pPalette = (unsigned short *)IL_MALLOC_ZERO (3 * 256 * sizeof(unsigned short));
|
||||||
if (!pPalette)
|
if (!pPalette)
|
||||||
|
@ -1146,15 +1146,15 @@ static ilError ilExecuteRGBToYCbCr (
|
||||||
long *pNLines
|
long *pNLines
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilRGBToYCbCrPrivPtr pPriv;
|
ilRGBToYCbCrPrivPtr pPriv;
|
||||||
ilPtr pSrcLine, pYLine, pCbLine, pCrLine;
|
ilPtr pSrcLine, pYLine, pCbLine, pCrLine;
|
||||||
register ilPtr pSrc, pY, pCb, pCr;
|
ilPtr pSrc, pY, pCb, pCr;
|
||||||
register long nPixelsM1;
|
long nPixelsM1;
|
||||||
register long YRefBlack, CbRefBlack, CrRefBlack;
|
long YRefBlack, CbRefBlack, CrRefBlack;
|
||||||
long nPixelsM1Init, nLinesM1;
|
long nPixelsM1Init, nLinesM1;
|
||||||
long YRowBytes, CbRowBytes, CrRowBytes, srcRowBytes;
|
long YRowBytes, CbRowBytes, CrRowBytes, srcRowBytes;
|
||||||
ilImagePlaneInfo *pPlane;
|
ilImagePlaneInfo *pPlane;
|
||||||
register long R, G, B, pixel;
|
long R, G, B, pixel;
|
||||||
|
|
||||||
|
|
||||||
/* Set nPixels/LinesM1 to # pixels / lines - 1; exit if either 0. */
|
/* Set nPixels/LinesM1 to # pixels / lines - 1; exit if either 0. */
|
||||||
|
@ -1247,13 +1247,13 @@ CrClip: if (pixel > 255) pixel = 255; else pixel = 0;
|
||||||
IL_PRIVATE ilBool _ilConvertRGBToYCbCr (
|
IL_PRIVATE ilBool _ilConvertRGBToYCbCr (
|
||||||
ilPipe pipe,
|
ilPipe pipe,
|
||||||
ilPipeInfo *pInfo,
|
ilPipeInfo *pInfo,
|
||||||
register ilImageDes *pDes,
|
ilImageDes *pDes,
|
||||||
register const ilImageDes *pNewDes,
|
const ilImageDes *pNewDes,
|
||||||
ilImageFormat *pFormat
|
ilImageFormat *pFormat
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ilRGBToYCbCrPrivPtr pPriv;
|
ilRGBToYCbCrPrivPtr pPriv;
|
||||||
register ilYCbCrInfo *pYCbCr;
|
ilYCbCrInfo *pYCbCr;
|
||||||
ilDstElementData dstData;
|
ilDstElementData dstData;
|
||||||
double Lr, Lg, Lb, range;
|
double Lr, Lg, Lb, range;
|
||||||
long YR, YG, YB;
|
long YR, YG, YB;
|
||||||
|
|
Loading…
Reference in a new issue