Index: /branches/HTM-DEV-2.0-dev2-MediaTek/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev2-MediaTek/source/App/TAppDecoder/TAppDecTop.cpp	(revision 563)
+++ /branches/HTM-DEV-2.0-dev2-MediaTek/source/App/TAppDecoder/TAppDecTop.cpp	(revision 564)
@@ -311,5 +311,9 @@
         TComPic* picLastCoded = m_ivPicLists.getPic( m_tDecTop[dI]->getLayerId(), pocLastPic );
         assert( picLastCoded != NULL );        
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+        picLastCoded->compressMotion(1);
+#else
         picLastCoded->compressMotion();         
+#endif
       }
     }
Index: /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp	(revision 563)
+++ /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp	(revision 564)
@@ -3083,7 +3083,14 @@
       abCandIsInter[iCount] = true;      
       puhInterDirNeighbours[iCount] = pcTextureCU->getInterDir( uiPartIdxCenter );
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+      pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
+      if (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)
+#else
       if( ( puhInterDirNeighbours[iCount] & 1 ) == 1 )
-      {
+#endif
+      {
+#if !MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
         pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
+#endif
         TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv();
 
@@ -3102,7 +3109,14 @@
       if ( getSlice()->isInterB() )
       {
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+        pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
+        if (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)
+#else
         if( ( puhInterDirNeighbours[iCount] & 2 ) == 2 )
+#endif
         {
+#if !MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
           pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
+#endif
           TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv();
 #if H_3D_IC
@@ -3115,4 +3129,8 @@
         }
       }
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+      puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0;
+      puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0;
+#endif
 #if H_3D_NBDV
       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
@@ -4381,8 +4399,15 @@
                                         + ( iPartWidth/m_pcPic->getMinCUWidth()  )/2];
 }
-
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+Void TComDataCU::compressMV(int scale)
+#else
 Void TComDataCU::compressMV()
-{
+#endif
+{
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+  Int scaleFactor = (4 / scale ) * AMVP_DECIMATION_FACTOR / m_unitSize;
+#else
   Int scaleFactor = 4 * AMVP_DECIMATION_FACTOR / m_unitSize;
+#endif
   if (scaleFactor > 0)
   {
Index: /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.h	(revision 563)
+++ /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.h	(revision 564)
@@ -591,7 +591,9 @@
   Void          getMvPredAbove        ( TComMv&     rcMvPred )   { rcMvPred = m_cMvFieldB.getMv(); }
   Void          getMvPredAboveRight   ( TComMv&     rcMvPred )   { rcMvPred = m_cMvFieldC.getMv(); }
-  
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+  Void          compressMV            (int scale);
+#else            
   Void          compressMV            ();
-  
+#endif  
   // -------------------------------------------------------------------------------------------------------------------
   // utility functions for neighbouring information
Index: /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPic.cpp	(revision 563)
+++ /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPic.cpp	(revision 564)
@@ -146,6 +146,9 @@
   deleteSEIs(m_SEIs);
 }
-
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+Void TComPic::compressMotion(int scale)
+#else
 Void TComPic::compressMotion()
+#endif
 {
   TComPicSym* pPicSym = getPicSym(); 
@@ -153,5 +156,9 @@
   {
     TComDataCU* pcCU = pPicSym->getCU(uiCUAddr);
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+    pcCU->compressMV(scale); 
+#else
     pcCU->compressMV(); 
+#endif
   } 
 }
Index: /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPic.h
===================================================================
--- /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPic.h	(revision 563)
+++ /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComPic.h	(revision 564)
@@ -179,6 +179,9 @@
   Void          setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i;    }
   Int           getNumReorderPics(UInt tlayer)        { return m_numReorderPics[tlayer]; }
-
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+  Void          compressMotion(int scale); 
+#else   
   Void          compressMotion(); 
+#endif
   UInt          getCurrSliceIdx()            { return m_uiCurrSliceIdx;                }
   Void          setCurrSliceIdx(UInt i)      { m_uiCurrSliceIdx = i;                   }
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 563)
+++ /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TypeDef.h	(revision 564)
@@ -99,4 +99,5 @@
 #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
+#define MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170            1   // Progressive MV Compression, JCT3V-E0170
 
 #if H_3D_NBDV
Index: /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibDecoder/TDecGop.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibDecoder/TDecGop.cpp	(revision 563)
+++ /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibDecoder/TDecGop.cpp	(revision 564)
@@ -214,5 +214,7 @@
     rpcPic->destroyNonDBFilterInfo();
   }
-
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+  rpcPic->compressMotion(2); 
+#endif
 #if !H_3D
   rpcPic->compressMotion(); 
Index: /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 563)
+++ /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 564)
@@ -1768,5 +1768,7 @@
         pcPic->destroyNonDBFilterInfo();
       }
-
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+      pcPic->compressMotion(2); 
+#endif
 #if !H_3D
       pcPic->compressMotion(); 
Index: /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncTop.cpp	(revision 563)
+++ /branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncTop.cpp	(revision 564)
@@ -392,5 +392,9 @@
   if( picLastCoded )
   {
+#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
+    picLastCoded->compressMotion(1); 
+#else
     picLastCoded->compressMotion(); 
+#endif
   }
 #endif
