123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJP2File.cpp
- --- libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJP2File.cpp Wed Sep 30 11:55:26 2009 +0100
- +++ libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJP2File.cpp Wed Sep 30 12:20:09 2009 +0100
- @@ -137,7 +137,7 @@
- m_bCodestreamOnly = false;
-
- m_eCompressionOrder = CNCSJPCProgressionOrderType::RPCL;
- - m_nDecompressionLayers = CNCSJPCBuffer::MAXUINT16;
- + m_nDecompressionLayers = CNCSJPCBuffer::NCS_MAXUINT16;
-
- m_nNextLine = 0;
- //Default geodata usage - was JP2_GEODATA_USE_WLD_GML_PCS
- diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCBuffer.cpp
- --- libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCBuffer.cpp Wed Sep 30 11:55:26 2009 +0100
- +++ libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCBuffer.cpp Wed Sep 30 12:20:09 2009 +0100
- @@ -26,19 +26,19 @@
-
- //void * memcpy_amd(void *dest, const void *src, size_t n);
-
- -const UINT32 CNCSJPCBuffer::MAXUINT8 = (unsigned)0xff;
- -const UINT32 CNCSJPCBuffer::MAXUINT16 = (unsigned)0xffff;
- -const UINT32 CNCSJPCBuffer::MAXUINT32 = (unsigned)0xffffffff;
- -const UINT32 CNCSJPCBuffer::MINUINT8 = 0;
- -const UINT32 CNCSJPCBuffer::MINUINT16 = 0;
- -const UINT32 CNCSJPCBuffer::MINUINT32 = 0;
- +const UINT32 CNCSJPCBuffer::NCS_MAXUINT8 = (unsigned)0xff;
- +const UINT32 CNCSJPCBuffer::NCS_MAXUINT16 = (unsigned)0xffff;
- +const UINT32 CNCSJPCBuffer::NCS_MAXUINT32 = (unsigned)0xffffffff;
- +const UINT32 CNCSJPCBuffer::NCS_MINUINT8 = 0;
- +const UINT32 CNCSJPCBuffer::NCS_MINUINT16 = 0;
- +const UINT32 CNCSJPCBuffer::NCS_MINUINT32 = 0;
-
- -const UINT32 CNCSJPCBuffer::MAXINT8 = 0x7f;
- -const UINT32 CNCSJPCBuffer::MAXINT16 = 0x7fff;
- -const UINT32 CNCSJPCBuffer::MAXINT32 = 0x7fffffff;
- -const INT32 CNCSJPCBuffer::MININT8 = (-1 * (signed)CNCSJPCBuffer::MAXINT8 - 1);
- -const INT32 CNCSJPCBuffer::MININT16 = (-1 * (signed)CNCSJPCBuffer::MAXINT16 - 1);
- -const INT32 CNCSJPCBuffer::MININT32 = (-1 * (signed)CNCSJPCBuffer::MAXINT32 - 1);
- +const UINT32 CNCSJPCBuffer::NCS_MAXINT8 = 0x7f;
- +const UINT32 CNCSJPCBuffer::NCS_MAXINT16 = 0x7fff;
- +const UINT32 CNCSJPCBuffer::NCS_MAXINT32 = 0x7fffffff;
- +const INT32 CNCSJPCBuffer::NCS_MININT8 = (-1 * (signed)CNCSJPCBuffer::NCS_MAXINT8 - 1);
- +const INT32 CNCSJPCBuffer::NCS_MININT16 = (-1 * (signed)CNCSJPCBuffer::NCS_MAXINT16 - 1);
- +const INT32 CNCSJPCBuffer::NCS_MININT32 = (-1 * (signed)CNCSJPCBuffer::NCS_MAXINT32 - 1);
-
- const UINT32 CNCSJPCBuffer::AT_OWNER = (1 << 0);
- const UINT32 CNCSJPCBuffer::AT_CHILD = (1 << 1);
- @@ -308,27 +308,27 @@
- switch(m_eType) {
- case CNCSJPCBuffer::BT_INT16:
- // Optimise some common cases
- - if(nMin == MINUINT8 && nMax == MAXUINT8) {
- + if(nMin == NCS_MINUINT8 && nMax == NCS_MAXUINT8) {
- // UINT8 range
- for(x = 0; x < nWidth; x++) {
- INT16 v = ((INT16*)m_pBuffer)[x];
- if(v & 0xff00) { // Top bit is sign bit, so this tests for both >nMax & <nMin in one
- - if(v > (INT16)MAXUINT8) {
- - ((INT16*)m_pBuffer)[x] = MAXUINT8;
- - } else if(v < (INT16)MINUINT8) {
- - ((INT16*)m_pBuffer)[x] = MINUINT8;
- + if(v > (INT16)NCS_MAXUINT8) {
- + ((INT16*)m_pBuffer)[x] = NCS_MAXUINT8;
- + } else if(v < (INT16)NCS_MINUINT8) {
- + ((INT16*)m_pBuffer)[x] = NCS_MINUINT8;
- }
- }
- }
- - } else if(nMin == MININT8 && nMax == MAXINT8) {
- + } else if(nMin == NCS_MININT8 && nMax == NCS_MAXINT8) {
- // INT8 range
- for(x = 0; x < nWidth; x++) {
- INT16 v = ((INT16*)m_pBuffer)[x];
- if(v & 0xff80) { // Top bit is sign bit, so this tests for both >nMax & <nMin in one
- - if(v > (INT16)MAXINT8) {
- - ((INT16*)m_pBuffer)[x] = MAXINT8;
- - } else if(v < (INT16)MININT8) {
- - ((INT16*)m_pBuffer)[x] = MININT8;
- + if(v > (INT16)NCS_MAXINT8) {
- + ((INT16*)m_pBuffer)[x] = NCS_MAXINT8;
- + } else if(v < (INT16)NCS_MININT8) {
- + ((INT16*)m_pBuffer)[x] = NCS_MININT8;
- }
- }
- }
- @@ -345,27 +345,27 @@
- break;
- case CNCSJPCBuffer::BT_INT32:
- // Optimise some common cases
- - if(nMin == MINUINT16 && nMax == MAXUINT16) {
- + if(nMin == NCS_MINUINT16 && nMax == NCS_MAXUINT16) {
- // UINT16 range
- for(x = 0; x < nWidth; x++) {
- INT32 v = ((INT32*)m_pBuffer)[x];
- if(v & 0xffff0000) { // Top bit is sign bit, so this tests for both >nMax & <nMin in one
- - if(v > (INT32)MAXUINT16) {
- - ((INT32*)m_pBuffer)[x] = MAXUINT16;
- - } else if(v < (INT32)MINUINT16) {
- - ((INT32*)m_pBuffer)[x] = MINUINT16;
- + if(v > (INT32)NCS_MAXUINT16) {
- + ((INT32*)m_pBuffer)[x] = NCS_MAXUINT16;
- + } else if(v < (INT32)NCS_MINUINT16) {
- + ((INT32*)m_pBuffer)[x] = NCS_MINUINT16;
- }
- }
- }
- - } else if(nMin == MININT16 && nMax == MAXINT16) {
- + } else if(nMin == NCS_MININT16 && nMax == NCS_MAXINT16) {
- // INT16 range
- for(x = 0; x < nWidth; x++) {
- INT32 v = ((INT32*)m_pBuffer)[x];
- if(v & 0xffff8000) { // Top bit is sign bit, so this tests for both >nMax & <nMin in one
- - if(v > (INT32)MAXINT16) {
- - ((INT32*)m_pBuffer)[x] = MAXINT16;
- - } else if(v < (INT32)MININT16) {
- - ((INT32*)m_pBuffer)[x] = MININT16;
- + if(v > (INT32)NCS_MAXINT16) {
- + ((INT32*)m_pBuffer)[x] = NCS_MAXINT16;
- + } else if(v < (INT32)NCS_MININT16) {
- + ((INT32*)m_pBuffer)[x] = NCS_MININT16;
- }
- }
- }
- @@ -403,13 +403,13 @@
- return(Clip(NCSCeil(fMin), NCSFloor(fMax)));
- break;
- case CNCSJPCBuffer::BT_IEEE4:
- - if(fMin == MINUINT8 && fMax == MAXUINT8) {
- + if(fMin == NCS_MINUINT8 && fMax == NCS_MAXUINT8) {
- for(x = 0; x < nWidth; x++) {
- IEEE4 v = ((IEEE4*)m_pBuffer)[x];
- - if(v > MAXUINT8) {
- - ((IEEE4*)m_pBuffer)[x] = MAXUINT8;
- - } else if(v < MINUINT8) {
- - ((IEEE4*)m_pBuffer)[x] = MINUINT8;
- + if(v > NCS_MAXUINT8) {
- + ((IEEE4*)m_pBuffer)[x] = NCS_MAXUINT8;
- + } else if(v < NCS_MINUINT8) {
- + ((IEEE4*)m_pBuffer)[x] = NCS_MINUINT8;
- }
- }
- } else {
- diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCPLTMarker.cpp
- --- libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCPLTMarker.cpp Wed Sep 30 11:55:26 2009 +0100
- +++ libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCPLTMarker.cpp Wed Sep 30 12:20:09 2009 +0100
- @@ -173,7 +173,7 @@
- nPrevHeaderLength = TMP.m_nHeaderLength;
- TMP.m_nHeaderLength += (UINT32)nTotalHeaderLength;
- }
- - if(nTotalHeaderLength > CNCSJPCBuffer::MAXUINT32) {
- + if(nTotalHeaderLength > CNCSJPCBuffer::NCS_MAXUINT32) {
- // Too big to store cumulated length in the PacketLength struct, so
- // set it back to false and reparse the entire PLT
- m_bCumulativeLengths = false;
- @@ -202,7 +202,7 @@
- nPrevHeaderLength = TMP.m_nHeaderLength;
- TMP.m_nHeaderLength += nTotalHeaderLength;
- }
- - if(nTotalHeaderLength > CNCSJPCBuffer::MAXUINT32) {
- + if(nTotalHeaderLength > CNCSJPCBuffer::NCS_MAXUINT32) {
- // Too big to store cumulated length in the PacketLength struct, so
- // set it back to false and reparse the entire PLT
- m_bCumulativeLengths = false;
- diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCT1Coder.cpp
- --- libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCT1Coder.cpp Wed Sep 30 11:55:26 2009 +0100
- +++ libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCT1Coder.cpp Wed Sep 30 12:20:09 2009 +0100
- @@ -917,7 +917,7 @@
-
- int passno=0;
- int passtype;
- - INT32 nMax = CNCSJPCBuffer::MININT32;
- + INT32 nMax = CNCSJPCBuffer::NCS_MININT32;
-
- UINT32 nWidth = pDecBuf->GetWidth();
- UINT32 nHeight = pDecBuf->GetHeight();
- @@ -956,7 +956,7 @@
- UINT32 nSubWidth = nWidth / 8;
-
- __m128 mm7 = _mm_set1_ps(fRatio);
- - __m128i mm4 = _mm_set1_epi16((short)CNCSJPCBuffer::MININT16);
- + __m128i mm4 = _mm_set1_epi16((short)CNCSJPCBuffer::NCS_MININT16);
-
- for(UINT32 y = 0; y < nHeight; y++) {
- INT16 *pSrc = (INT16*)pDecBuf->GetPtr() + y * nDecStep;
- @@ -1008,7 +1008,7 @@
- UINT32 nSubWidth = nWidth / 4;
-
- __m128 mm7 = _mm_set1_ps(fRatio);
- - __m64 mm4 = _mm_set1_pi16((short)CNCSJPCBuffer::MININT16);
- + __m64 mm4 = _mm_set1_pi16((short)CNCSJPCBuffer::NCS_MININT16);
-
- for(UINT32 y = 0; y < nHeight; y++) {
- INT16 *pSrc = (INT16*)pDecBuf->GetPtr() + y * nDecStep;
- diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/include/NCSJPCBuffer.h
- --- libecwj2-3.3/Source/include/NCSJPCBuffer.h Wed Sep 30 11:55:26 2009 +0100
- +++ libecwj2-3.3/Source/include/NCSJPCBuffer.h Wed Sep 30 12:20:09 2009 +0100
- @@ -48,30 +48,30 @@
- class NCSJPC_EXPORT_ALL CNCSJPCBuffer: public CNCSJPCRect {
- public:
- /** Maximum UINT8 value */
- - static const UINT32 MAXUINT8;
- + static const UINT32 NCS_MAXUINT8;
- /** Maximum UINT16 value */
- - static const UINT32 MAXUINT16;
- + static const UINT32 NCS_MAXUINT16;
- /** Maximum UINT32 value */
- - static const UINT32 MAXUINT32;
- + static const UINT32 NCS_MAXUINT32;
- /** Minimum UINT8 value */
- - static const UINT32 MINUINT8;
- + static const UINT32 NCS_MINUINT8;
- /** Minimum UINT16 value */
- - static const UINT32 MINUINT16;
- + static const UINT32 NCS_MINUINT16;
- /** Minimum UINT32 value */
- - static const UINT32 MINUINT32;
- + static const UINT32 NCS_MINUINT32;
-
- /** Maximum INT8 value */
- - static const UINT32 MAXINT8;
- + static const UINT32 NCS_MAXINT8;
- /** Maximum INT16 value */
- - static const UINT32 MAXINT16;
- + static const UINT32 NCS_MAXINT16;
- /** Maximum INT32 value */
- - static const UINT32 MAXINT32;
- + static const UINT32 NCS_MAXINT32;
- /** Minimum INT8 value */
- - static const INT32 MININT8;
- + static const INT32 NCS_MININT8;
- /** Minimum INT16 value */
- - static const INT32 MININT16;
- + static const INT32 NCS_MININT16;
- /** Minimum INT32 value */
- - static const INT32 MININT32;
- + static const INT32 NCS_MININT32;
-
- /**
- * SystemInfo class - Some basic system capabilities we care about.
|