X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fjpeg%2Fljpg%2Fhuffd.c;h=92e34562626dc8a21dcbf5e3641d9aa14647648d;hb=4662532382a4cf72d4fce97a9b6c792c5fea40d7;hp=e23fffb55c8f2698985df733a84d0980b409bf51;hpb=769cf91297c76f800eeb884a429dfc44bfbd1d7e;p=gdcm.git diff --git a/src/jpeg/ljpg/huffd.c b/src/jpeg/ljpg/huffd.c index e23fffb5..92e34562 100644 --- a/src/jpeg/ljpg/huffd.c +++ b/src/jpeg/ljpg/huffd.c @@ -5,7 +5,7 @@ * software */ /* - * $Id: huffd.c,v 1.1 2003/10/21 12:08:53 jpr Exp $ + * $Id: huffd.c,v 1.3 2004/08/18 02:26:08 malaterre Exp $ */ #include #include @@ -26,7 +26,7 @@ static int bitsLeft; /* # of unused bits in it */ * The following variables keep track of the input buffer * for the JPEG data, which is read by ReadJpegData. */ -Uchar *inputBuffer; /* Input buffer for JPEG data */ +Uchar *inputBuffer = 0; /* Input buffer for JPEG data */ int inputBufferOffset = 0; /* Offset of current byte */ /* @@ -533,7 +533,7 @@ void DecodeImage (DecompressInfo *dcPtr, unsigned short **image, int depth) else if (depth == 24) PmPutRow24 (curRowBuf, numCOL, &image24tmp); - swap(MCU *, prevRowBuf, curRowBuf); + gdcmSWAP(MCU *, prevRowBuf, curRowBuf); /* optimal case : 8 bit image, one color component, no restartInRows */ if ((depth == 8) && (compsInScan == 1) && (dcPtr->restartInRows == 0)) @@ -631,7 +631,7 @@ void DecodeImage (DecompressInfo *dcPtr, unsigned short **image, int depth) else if (depth == 24) PmPutRow24 (curRowBuf, numCOL, &image24tmp); - swap(MCU *,prevRowBuf,curRowBuf); + gdcmSWAP(MCU *,prevRowBuf,curRowBuf); continue; } dcPtr->restartRowsToGo--; @@ -646,7 +646,7 @@ void DecodeImage (DecompressInfo *dcPtr, unsigned short **image, int depth) /* The upper neighbors are predictors for the first column. */ for (curComp = 0; curComp < compsInScan; curComp++) - { + { ci = dcPtr->MCUmembership[curComp]; compptr = dcPtr->curCompInfo[ci]; dctbl = dcPtr->dcHuffTblPtrs[compptr->dcTblNo]; @@ -661,7 +661,7 @@ void DecodeImage (DecompressInfo *dcPtr, unsigned short **image, int depth) for (col=1; col < numCOL; col++) { for (curComp = 0; curComp < compsInScan; curComp++) - { + { ci = dcPtr->MCUmembership[curComp]; compptr = dcPtr->curCompInfo[ci]; dctbl = dcPtr->dcHuffTblPtrs[compptr->dcTblNo]; @@ -684,7 +684,7 @@ void DecodeImage (DecompressInfo *dcPtr, unsigned short **image, int depth) else if (depth == 24) PmPutRow24 (curRowBuf, numCOL, &image24tmp); - swap(MCU *, prevRowBuf, curRowBuf); + gdcmSWAP(MCU *, prevRowBuf, curRowBuf); }/*endfor row*/ }/*endelse*/