Index: /branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1604)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1605)
@@ -3252,6 +3252,6 @@
 
   const Window &windowRL = m_pcSlice->getPPS()->getRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc));
-  Int iBX = (((iPelX - leftStartL) * posScalingFactor[0][refLayerIdc] + (1<<15)) >> 16) + windowRL.getWindowLeftOffset();
-  Int iBY = (((iPelY - topStartL ) * posScalingFactor[1][refLayerIdc] + (1<<15)) >> 16) + windowRL.getWindowTopOffset();
+  Int iBX = Int( ( Int64( iPelX - leftStartL ) * posScalingFactor[0][refLayerIdc] + ( 1 << 15 ) ) >> 16 ) + windowRL.getWindowLeftOffset();
+  Int iBY = Int( ( Int64( iPelY - topStartL  ) * posScalingFactor[1][refLayerIdc] + ( 1 << 15 ) ) >> 16 ) + windowRL.getWindowTopOffset();
 
   // offset for collocated block in the motion mapping
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp	(revision 1604)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp	(revision 1605)
@@ -271,5 +271,5 @@
     {
       Int x = i;
-      refPos16 = (((x - phaseXL)*scaleX - addX) >> shiftXM4) + refOffsetX;
+      refPos16 = Int( ( Int64( x - phaseXL )*scaleX - addX ) >> shiftXM4 ) + refOffsetX;
       phase    = refPos16 & 15;
       refPos   = refPos16 >> 4;
@@ -300,5 +300,5 @@
     {
       Int y = j;
-      refPos16 = ((( y - phaseYL )*scaleY - addY) >> shiftYM4) + refOffsetY;
+      refPos16 = Int( ( Int64( y - phaseYL )*scaleY - addY ) >> shiftYM4 ) + refOffsetY;
       phase    = refPos16 & 15;
       refPos   = refPos16 >> 4;
@@ -400,5 +400,5 @@
     {
       Int x = i;
-      refPos16 = (((x - srlLOffsetC)*scaleX - addX) >> shiftXM4) + refOffsetXC;
+      refPos16 = Int( ( Int64( x - srlLOffsetC )*scaleX - addX ) >> shiftXM4 ) + refOffsetXC;
       phase    = refPos16 & 15;
       refPos   = refPos16 >> 4;
@@ -448,5 +448,5 @@
     {
       Int y = j;
-      refPos16 = (((y - srlTOffsetC)*scaleY - addY) >> shiftYM4) + refOffsetYC;
+      refPos16 = Int( ( Int64( y - srlTOffsetC )*scaleY - addY ) >> shiftYM4 ) + refOffsetYC;
       phase    = refPos16 & 15;
       refPos   = refPos16 >> 4;
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1604)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1605)
@@ -1715,7 +1715,5 @@
                                      heightEL == heightBL ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );
 
-        m_pcPic->setPosScalingFactor( refLayerIdc, 
-                                     ((widthBL  << 16) + (widthEL  >> 1)) / widthEL, 
-                                     ((heightBL << 16) + (heightEL >> 1)) / heightEL );
+        m_pcPic->setPosScalingFactor( refLayerIdc, ( ( Int64( widthBL ) << 16 ) + ( widthEL >> 1 ) ) / widthEL, ( ( Int64( heightBL ) << 16 ) + ( heightEL >> 1 ) ) / heightEL );
 
         TComPicYuv* pBaseColRec = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec();
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1604)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1605)
@@ -1663,7 +1663,5 @@
                                                heightEL == heightBL ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );
 
-        pcSlice->getPic()->setPosScalingFactor( refLayerIdc, 
-                                                ((widthBL  << 16) + (widthEL  >> 1)) / widthEL,
-                                                ((heightBL << 16) + (heightEL >> 1)) / heightEL );
+        pcSlice->getPic()->setPosScalingFactor( refLayerIdc, ( ( Int64( widthBL ) << 16 ) + ( widthEL >> 1 ) ) / widthEL, ( ( Int64( heightBL ) << 16 ) + ( heightEL >> 1 ) ) / heightEL );
 
         TComPicYuv* pBaseColRec = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec();
