Index: branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPrediction.cpp	(revision 559)
+++ branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPrediction.cpp	(revision 563)
@@ -953,5 +953,9 @@
   if ( yFrac == 0 )
   {
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac,       !bi || bICFlag
+#else
     m_if.filterHorLuma( ref, refStride, dst, dstStride, width, height, xFrac,       !bi 
+#endif
 #if H_3D_ARP
     , filterType
@@ -961,5 +965,9 @@
   else if ( xFrac == 0 )
   {
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi || bICFlag
+#else
     m_if.filterVerLuma( ref, refStride, dst, dstStride, width, height, yFrac, true, !bi 
+#endif
 #if H_3D_ARP
     , filterType
@@ -980,5 +988,9 @@
 #endif 
       );
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height,              yFrac, false, !bi || bICFlag
+#else
     m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height,              yFrac, false, !bi
+#endif
 #if H_3D_ARP
     , filterType
@@ -1006,4 +1018,5 @@
       for ( j = 0; j < width; j++ )
       {
+#if !MTK_CLIPPING_ALIGN_IC_E0168
         if( bi )
         {
@@ -1012,8 +1025,25 @@
         }
         else
+#endif
           dst[j] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, ( ( a*dst[j] ) >> iShift ) + b );
       }
       dst += dstStride;
     }
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    if(bi)
+    {
+      Pel *dst2      = dstPic->getLumaAddr( partAddr );
+      Int shift = IF_INTERNAL_PREC - g_bitDepthY;
+      for (i = 0; i < height; i++)
+      {
+        for (j = 0; j < width; j++)
+        {
+          Short val = dst2[j] << shift;
+          dst2[j] = val - (Short)IF_INTERNAL_OFFS;
+        }
+        dst2 += dstStride;
+      }
+    }
+#endif
   }
 #endif
@@ -1066,10 +1096,18 @@
   if ( yFrac == 0 )
   {
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    m_if.filterHorChroma(refCb, refStride, dstCb,  dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag
+#else
     m_if.filterHorChroma(refCb, refStride, dstCb,  dstStride, cxWidth, cxHeight, xFrac, !bi
+#endif
 #if H_3D_ARP
     , filterType
 #endif
     );    
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    m_if.filterHorChroma(refCr, refStride, dstCr,  dstStride, cxWidth, cxHeight, xFrac, !bi || bICFlag
+#else
     m_if.filterHorChroma(refCr, refStride, dstCr,  dstStride, cxWidth, cxHeight, xFrac, !bi
+#endif
 #if H_3D_ARP
     , filterType
@@ -1079,10 +1117,18 @@
   else if ( xFrac == 0 )
   {
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag
+#else
     m_if.filterVerChroma(refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, yFrac, true, !bi
+#endif
 #if H_3D_ARP
     , filterType
 #endif
     );
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi || bICFlag
+#else
     m_if.filterVerChroma(refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, yFrac, true, !bi
+#endif
 #if H_3D_ARP
     , filterType
@@ -1097,5 +1143,9 @@
 #endif  
       );
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight  , yFrac, false, !bi || bICFlag
+#else
     m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCb, dstStride, cxWidth, cxHeight  , yFrac, false, !bi
+#endif
 #if H_3D_ARP
     , filterType
@@ -1108,5 +1158,9 @@
 #endif 
       );
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight  , yFrac, false, !bi || bICFlag
+#else
     m_if.filterVerChroma(extY  + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight  , yFrac, false, !bi
+#endif
 #if H_3D_ARP
     , filterType
@@ -1130,4 +1184,5 @@
       for ( j = 0; j < cxWidth; j++ )
       {
+#if !MTK_CLIPPING_ALIGN_IC_E0168
         if( bi )
         {
@@ -1136,4 +1191,5 @@
         }
         else
+#endif
           dstCb[j] = Clip3(  0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCb[j] ) >> iShift ) + b );
       }
@@ -1149,4 +1205,5 @@
       for ( j = 0; j < cxWidth; j++ )
       {
+#if !MTK_CLIPPING_ALIGN_IC_E0168
         if( bi )
         {
@@ -1155,8 +1212,30 @@
         }
         else
+#endif
           dstCr[j] = Clip3( 0, ( 1 << g_bitDepthC ) - 1, ( ( a*dstCr[j] ) >> iShift ) + b );
       }
       dstCr += dstStride;
     }
+#if MTK_CLIPPING_ALIGN_IC_E0168
+    if(bi)
+    {
+      Pel* dstCb2 = dstPic->getCbAddr( partAddr );
+      Pel* dstCr2 = dstPic->getCrAddr( partAddr );
+      Int shift = IF_INTERNAL_PREC - g_bitDepthC;
+      for (i = 0; i < cxHeight; i++)
+      {
+        for (j = 0; j < cxWidth; j++)
+        {
+          Short val = dstCb2[j] << shift;
+          dstCb2[j] = val - (Short)IF_INTERNAL_OFFS;
+
+          val = dstCr2[j] << shift;
+          dstCr2[j] = val - (Short)IF_INTERNAL_OFFS;
+        }
+        dstCb2 += dstStride;
+        dstCr2 += dstStride;
+      }
+    }
+#endif
   }
 #endif
Index: branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TypeDef.h	(revision 559)
+++ branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TypeDef.h	(revision 563)
@@ -98,4 +98,5 @@
 #define SHARP_ILLUCOMP_REFINE_E0046       1
 #define MTK_FAST_TEXTURE_ENCODING_E0173   1   // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173
+#define MTK_CLIPPING_ALIGN_IC_E0168       1   // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168
 
 #if H_3D_NBDV
