Index: /branches/HTM-3.1-LG/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /branches/HTM-3.1-LG/source/Lib/TLibCommon/TComPrediction.cpp	(revision 97)
+++ /branches/HTM-3.1-LG/source/Lib/TLibCommon/TComPrediction.cpp	(revision 98)
@@ -539,18 +539,21 @@
 	// Do prediction
 	{
-		UInt uiSum0 = 0, uiSum1 = 0;
-		UInt uiMean0, uiMean1;
-		UInt uiCount0 = 0, uiCount1 = 0;
+		//UInt uiSum0 = 0, uiSum1 = 0;
+    Int iSum0 = 0, iSum1 = 0;
+		//UInt uiMean0, uiMean1;
+    Int iMean0, iMean1;
+		//UInt uiCount0 = 0, uiCount1 = 0;
+    Int iCount0 = 0, iCount1 = 0;
 		for( UInt ui = 0; ui < iWidth; ui++ )
 		{
 			if( pbRegion[ ui ] == false )
 			{
-				uiSum0 += (pSrc[ ui + 1 ]);
-				uiCount0++;
+				iSum0 += (pSrc[ ui + 1 ]);
+				iCount0++;
 			}
 			else
 			{
-				uiSum1 += (pSrc[ ui + 1 ]);
-				uiCount1++;
+				iSum1 += (pSrc[ ui + 1 ]);
+				iCount1++;
 			}
 		}
@@ -559,19 +562,19 @@
 			if( pbRegion[ ui * iWidth ] == false )
 			{
-				uiSum0 += (pSrc[ (ui + 1) * srcStride ]);
-				uiCount0++;
+				iSum0 += (pSrc[ (ui + 1) * srcStride ]);
+				iCount0++;
 			}
 			else
 			{
-				uiSum1 += (pSrc[ (ui + 1) * srcStride ]);
-				uiCount1++;
+				iSum1 += (pSrc[ (ui + 1) * srcStride ]);
+				iCount1++;
 			}
 		}
-		if( uiCount0 == 0 )
+		if( iCount0 == 0 )
 			assert(false);
-		if( uiCount1 == 0 )
+		if( iCount1 == 0 )
 			assert(false);
-		uiMean0 = uiSum0 / uiCount0; // TODO : integer op.
-		uiMean1 = uiSum1 / uiCount1;
+		iMean0 = iSum0 / iCount0; // TODO : integer op.
+		iMean1 = iSum1 / iCount1;
 #if LGE_EDGE_INTRA_DELTA_DC
 		if( bDelta ) 
@@ -581,6 +584,6 @@
 			xDeltaDCQuantScaleUp( pcCU, iDeltaDC0 );
 			xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
-			uiMean0 = Clip( uiMean0 + iDeltaDC0 );
-			uiMean1 = Clip( uiMean1 + iDeltaDC1 );
+			iMean0 = Clip( iMean0 + iDeltaDC0 );
+			iMean1 = Clip( iMean1 + iDeltaDC1 );
 		}
 #endif
@@ -590,7 +593,7 @@
 			{
 				if( pbRegion[ uii + ui * iWidth ] == false )
-					pDst[ uii + ui * dstStride ] = uiMean0;
+					pDst[ uii + ui * dstStride ] = iMean0;
 				else
-					pDst[ uii + ui * dstStride ] = uiMean1;
+					pDst[ uii + ui * dstStride ] = iMean1;
 			}
 		}
Index: /branches/HTM-3.1-LG/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-3.1-LG/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 97)
+++ /branches/HTM-3.1-LG/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 98)
@@ -6476,5 +6476,5 @@
 		{
 			UShort usAbs0=0, usAbs1=0, usAbs2=0;  // 0 : left, 1 : current, 2 : right
-			Bool   bSign0=false, bSign1=false, bSign2=false;
+			//Bool   bSign0=false, bSign1=false, bSign2=false;
 			if( x > 0 && *(pbEdgeXPtr-1) == true )
 			{
@@ -6482,10 +6482,10 @@
 				{
 					usAbs0 = *(psDiffXPtr-1);
-					bSign0 = true;
+					//bSign0 = true;
 				}
 				else
 				{
 					usAbs0 = (-1) * *(psDiffXPtr-1);
-					bSign0 = false;
+					//bSign0 = false;
 				}
 			}
@@ -6495,10 +6495,10 @@
 				{
 					usAbs1 = *(psDiffXPtr);
-					bSign1 = true;
+					//bSign1 = true;
 				}
 				else
 				{
 					usAbs1 = (-1) * *(psDiffXPtr);
-					bSign1 = false;
+					//bSign1 = false;
 				}
 			}
@@ -6508,10 +6508,10 @@
 				{
 					usAbs2 = *(psDiffXPtr+1);
-					bSign2 = true;
+					//bSign2 = true;
 				}
 				else
 				{
 					usAbs2 = (-1) * *(psDiffXPtr+1);
-					bSign2 = false;
+					//bSign2 = false;
 				}
 			}
@@ -6555,5 +6555,5 @@
 		{
 			UShort usAbs0=0, usAbs1=0, usAbs2=0;  // 0 : upper, 1 : current, 2 : bottom
-			Bool   bSign0=false, bSign1=false, bSign2=false;
+			//Bool   bSign0=false, bSign1=false, bSign2=false;
 			if( y > 0 && *(pbEdgeYPtr-iWidth) == true )
 			{
@@ -6561,10 +6561,10 @@
 				{
 					usAbs0 = *(psDiffYPtr-iWidth);
-					bSign0 = true;
+					//bSign0 = true;
 				}
 				else
 				{
 					usAbs0 = (-1) * *(psDiffYPtr-iWidth);
-					bSign0 = false;
+					//bSign0 = false;
 				}
 			}
@@ -6574,10 +6574,10 @@
 				{
 					usAbs1 = *(psDiffYPtr);
-					bSign1 = true;
+					//bSign1 = true;
 				}
 				else
 				{
 					usAbs1 = (-1) * *(psDiffYPtr);
-					bSign1 = false;
+					//bSign1 = false;
 				}
 			}
@@ -6587,10 +6587,10 @@
 				{
 					usAbs2 = *(psDiffYPtr+iWidth);
-					bSign2 = true;
+					//bSign2 = true;
 				}
 				else
 				{
 					usAbs2 = (-1) * *(psDiffYPtr+iWidth);
-					bSign2 = false;
+					//bSign2 = false;
 				}
 			}
