Index: /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TComDataCU.cpp	(revision 160)
+++ /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TComDataCU.cpp	(revision 161)
@@ -7094,11 +7094,27 @@
   memcpy( m_puhInterDir + uiAbsPartIdxDst, pcCU->getInterDir() + uiAbsPartIdxSrc,       sizeof( m_puhInterDir[0] ) * uiNumPartition );
 
+#if !MTK_UNCONSTRAINED_MVI
   memcpy( m_apiMVPIdx[0] + uiAbsPartIdxDst, pcCU->getMVPIdx(REF_PIC_LIST_0) + uiAbsPartIdxSrc, sizeof(*m_apiMVPIdx[0]) * uiNumPartition );
   memcpy( m_apiMVPIdx[1] + uiAbsPartIdxDst, pcCU->getMVPIdx(REF_PIC_LIST_1) + uiAbsPartIdxSrc, sizeof(*m_apiMVPIdx[0]) * uiNumPartition );
   memcpy( m_apiMVPNum[0] + uiAbsPartIdxDst, pcCU->getMVPNum(REF_PIC_LIST_0) + uiAbsPartIdxSrc, sizeof(*m_apiMVPNum[0]) * uiNumPartition );
   memcpy( m_apiMVPNum[1] + uiAbsPartIdxDst, pcCU->getMVPNum(REF_PIC_LIST_1) + uiAbsPartIdxSrc, sizeof(*m_apiMVPNum[0]) * uiNumPartition );
+#endif
 
   pcCU->getCUMvField( REF_PIC_LIST_0 )->copyTo( &m_acCUMvField[0], -Int(uiAbsPartIdxSrc) + uiAbsPartIdxDst, uiAbsPartIdxSrc, uiNumPartition );
   pcCU->getCUMvField( REF_PIC_LIST_1 )->copyTo( &m_acCUMvField[1], -Int(uiAbsPartIdxSrc) + uiAbsPartIdxDst, uiAbsPartIdxSrc, uiNumPartition );
+
+#if MTK_UNCONSTRAINED_MVI
+  if( pcCU->getSlice()->getSliceType() == P_SLICE)
+  {
+    m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir,  0, 1);
+    m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, -1, 1);
+  }
+  else
+  {
+    m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir,  0, 3);
+    m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir,  0, 3);
+  }
+#endif
+
 
 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
Index: /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TComMotionInfo.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TComMotionInfo.cpp	(revision 160)
+++ /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TComMotionInfo.cpp	(revision 161)
@@ -374,3 +374,25 @@
 }
 #endif
+
+
+
+#if MTK_UNCONSTRAINED_MVI
+Void TComCUMvField::setUndefinedMv( Int iPartAddr, Int iNumPart, Char* pePredMode, UChar* puhInterDir, Int refIdx, Int InterDir )
+{
+  PredMode predMode = MODE_INTRA;
+  TComMv cMv(0,0); 
+
+  for ( Int i = 0; i < iNumPart; i++ )
+  { 
+    predMode = static_cast<PredMode>( pePredMode[ iPartAddr+i ] );
+    if( predMode==MODE_INTRA  )
+    {
+      m_pcMv[iPartAddr+i] = cMv;
+      puhInterDir[iPartAddr+i] = InterDir; 
+      m_piRefIdx[iPartAddr+i] = refIdx;
+    }
+  }
+}
+#endif
+
 //! \}
Index: /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TComMotionInfo.h
===================================================================
--- /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TComMotionInfo.h	(revision 160)
+++ /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TComMotionInfo.h	(revision 161)
@@ -169,4 +169,8 @@
   Void decreaseMvAccuracy( Int iPartAddr, Int iNumPart, Int iShift );
 #endif
+
+#if MTK_UNCONSTRAINED_MVI
+  Void setUndefinedMv( Int iPartAddr, Int iNumPart, Char* pePredMode, UChar* puhInterDir, Int refIdx, Int InterDir );
+#endif
 };
 
Index: /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TypeDef.h	(revision 160)
+++ /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibCommon/TypeDef.h	(revision 161)
@@ -42,4 +42,6 @@
 //! \{
 
+#define MTK_UNCONSTRAINED_MVI             1    //JCT3V-B0083
+
 #define FIXES                             1
 #define POZNAN_CABAC_INIT_FLAG_FIX        1
Index: /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncCu.cpp	(revision 160)
+++ /branches/HTM-4.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncCu.cpp	(revision 161)
@@ -3009,4 +3009,5 @@
   assert( bRecursiveCall == ( uhDepth != uhTextureModeDepth ) );
 
+#if !MTK_UNCONSTRAINED_MVI
   if( uhDepth == uhTextureModeDepth )
   {
@@ -3019,4 +3020,5 @@
     }
   }
+#endif
 
 #if HHI_VSO
