summarylogtreecommitdiffstats
path: root/libecwj2-3.3-2593.patch
blob: fbb66adca78c53002425b918c5ba48761515e10c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- Source/C/NCSEcw/NCSJP2/NCSJPCResolution.cpp	2006-07-03 10:15:12.000000000 -0500
+++ Source/C/NCSEcw/NCSJP2/NCSJPCResolution.cpp	2008-12-10 08:58:47.000000000 -0600
@@ -1773,11 +1773,11 @@
 		//Step0-1 == 2State.
 		//
 
-		UINT32 n = 0;
+		INT32 n = 0;
 		nWidth = NCSCeilDiv(nWidth, 2);
 
-		UINT32 n2n = n * 2 - 2;
-			
+		INT32 n2n = n * 2 - 2;
+		
 		INT32 nPrevVert01 = pSrc1Down[n2n] - NCSFloorDiv(pSrc0[n2n] + pSrc2Down[n2n], 2);
 		INT32 nPrevVert11 = pSrc1Down[n2n+1] - NCSFloorDiv(pSrc0[n2n+1] + pSrc2Down[n2n+1], 2);
 		INT32 nPrevVert00 = pSrc0[n2n] + NCSFloorDiv(pSrc1Up[n2n] - NCSFloorDiv(pSrc2Up[n2n] + pSrc0[n2n], 2) + nPrevVert01 + 2, 4);
@@ -1788,7 +1788,7 @@
 		INT32 nVert01 = pSrc1Down[n2n] - NCSFloorDiv(pSrc0[n2n] + pSrc2Down[n2n], 2);
 		INT32 nVert00 = pSrc0[n2n] + NCSFloorDiv(pSrc1Up[n2n] - NCSFloorDiv(pSrc2Up[n2n] + pSrc0[n2n], 2) + nVert01 + 2, 4);
 
-		for(; n < nWidth; n++) {
+		for(; n < (INT32)nWidth; n++) {
 			n2n = 2 * n;
 
 			INT32 nVert11 = pSrc1Down[n2n+1] - NCSFloorDiv(pSrc0[n2n+1] + pSrc2Down[n2n+1], 2);