Index: /branches/HTM-9.2-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 765)
@@ -515,5 +515,5 @@
   ("AdvMultiviewResPred",      m_uiUseAdvResPred,           (UInt)1, "Usage of Advanced Residual Prediction" )
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   ("SubPULog2Size", m_iSubPULog2Size, (Int)3, "Sub-PU size index: 2^n")
 #endif
@@ -525,5 +525,5 @@
   ("InterSDC",                 m_bDepthInterSDCFlag,        true, "Enable depth inter SDC")
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   ("MPI",                      m_bMPIFlag,        true, "Enable MPI")
 #endif
@@ -780,9 +780,5 @@
 #endif
 #if H_3D_IV_MERGE
-#if QC_DEPTH_IV_MRG_F0125  
   ("IvMvPred",                        m_ivMvPredFlag            , std::vector<Bool>(2, true)            , "inter view motion prediction " )
-#else
-  ("IvMvPred",                        m_ivMvPredFlag,           true            , "inter view motion prediction " )  
-#endif
 #endif
 #if H_3D_NBDV_REF
@@ -1537,5 +1533,5 @@
   xConfirmPara( ( 0 != m_uiUseAdvResPred ) &&  ( 1 != m_uiUseAdvResPred ), "UseAdvResPred must be 0 or 1." );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   xConfirmPara( m_iSubPULog2Size < 2,                                        "SubPULog2Size must be 2 or greater.");
   xConfirmPara( m_iSubPULog2Size > 6,                                        "SubPULog2Size must be 6 or smaller.");
@@ -2498,10 +2494,6 @@
 #endif
 #if H_3D_IV_MERGE
-#if QC_DEPTH_IV_MRG_F0125
   printf("IvMvPred:%d %d", m_ivMvPredFlag[0] ? 1 : 0, m_ivMvPredFlag[1] ? 1 : 0);
-#else
-  printf("IvMvPred:%d ", m_ivMvPredFlag );
-#endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   printf(" SubPULog2Size:%d  " , m_iSubPULog2Size  );
 #endif
@@ -2530,5 +2522,5 @@
   printf( "interSDC: %d ", m_bDepthInterSDCFlag ? 1 : 0 );
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   printf( "MPI: %d ", m_bMPIFlag ? 1 : 0 );
 #endif
Index: /branches/HTM-9.2-dev0/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/HTM-9.2-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 765)
@@ -136,10 +136,6 @@
 
 #if H_3D_IV_MERGE
-#if QC_DEPTH_IV_MRG_F0125
   vector<Bool>           m_ivMvPredFlag;                      ///< Interview motion vector prediction 
-#else
-  Bool                   m_ivMvPredFlag;                      ///< Interview motion vector prediction 
-#endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Int                    m_iSubPULog2Size;                    
 #endif
@@ -503,5 +499,5 @@
   Bool m_bDepthInterSDCFlag;                                ///< flag for inter SDC of depth map coding
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   Bool m_bMPIFlag;                                           ///< flag for MPI of depth map coding
 #endif
Index: /branches/HTM-9.2-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 765)
@@ -160,15 +160,8 @@
     //====== Camera Parameters =========
     m_cTEncTop.setCameraParameters             ( &m_cCameraData );     
-#if QC_DEPTH_IV_MRG_F0125
     m_cTEncTop.setCamParPrecision              ( m_cCameraData.getCamParsCodedPrecision  () );
     m_cTEncTop.setCamParInSliceHeader          ( m_cCameraData.getVaryingCameraParameters() );
     m_cTEncTop.setCodedScale                   ( m_cCameraData.getCodedScale             () );
     m_cTEncTop.setCodedOffset                  ( m_cCameraData.getCodedOffset            () );
-#else
-    m_cTEncTop.setCamParPrecision              ( isDepth ? false : m_cCameraData.getCamParsCodedPrecision  () );
-    m_cTEncTop.setCamParInSliceHeader          ( isDepth ? 0     : m_cCameraData.getVaryingCameraParameters() );
-    m_cTEncTop.setCodedScale                   ( isDepth ? 0     : m_cCameraData.getCodedScale             () );
-    m_cTEncTop.setCodedOffset                  ( isDepth ? 0     : m_cCameraData.getCodedOffset            () );
-#endif
 #if H_3D_VSO
     //====== VSO =========
@@ -194,5 +187,5 @@
     m_cTEncTop.setARPStepNum                   ( ( isDepth || 0==layerIdInVps ) ? 1 : H_3D_ARP_WFNR     );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     m_cTEncTop.setSubPULog2Size                 (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size   );
 #endif
@@ -214,5 +207,5 @@
     m_cTEncTop.setInterSDCEnable               ( isDepth ? m_bDepthInterSDCFlag    : false );
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
     m_cTEncTop.setUseMPI               ( isDepth ? m_bMPIFlag    : false );
 #endif
@@ -1974,12 +1967,8 @@
     vps.setARPStepNum      ( layer, ( isDepth || isLayerZero ) ? 1 : H_3D_ARP_WFNR     );
 #endif  
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     if( isDepth )
     {
-#if MTK_F0110_FIX
       vps.setSubPULog2Size         ( layer, (layer != 1) ? 6: 0 ); 
-#else
-      vps.setSubPULog2Size         ( layer, (layer != 1) ? m_iSubPULog2Size: 0 ); 
-#endif
     }
     else
@@ -2007,5 +1996,4 @@
 
 #if H_3D_IV_MERGE
-#if QC_DEPTH_IV_MRG_F0125
     if( isDepth )
     {
@@ -2016,7 +2004,4 @@
       vps.setIvMvPredFlag         ( layer, !isLayerZero && m_ivMvPredFlag[0] ); 
     }
-#else
-    vps.setIvMvPredFlag         ( layer, !isLayerZero && !isDepth && m_ivMvPredFlag ); 
-#endif
 #endif
 #if H_3D_NBDV_REF
@@ -2029,5 +2014,5 @@
     vps.setInterSDCFlag( layer, !isLayerZero && isDepth && m_bDepthInterSDCFlag );
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
     vps.setMPIFlag( layer, !isLayerZero && isDepth && m_bMPIFlag );
 #endif
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 765)
@@ -367,13 +367,7 @@
 INIT_ARPW[3][NUM_ARPW_CTX] = 
 {
-#if LGE_ARP_CTX_F0161
     { 162, 153, 154, 162 },
     { 162, 153, 154, 162 },
     { 162, 153, 154, 162 },
-#else
-  { 154, 154, 154, 154 }, 
-  { 154, 154, 154, 154 }, 
-  { 154, 154, 154, 154 }, 
-#endif
 };
 #endif
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 765)
@@ -136,5 +136,5 @@
   m_piVSPFlag            = NULL;
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   m_pbSPIVMPFlag         = NULL;
 #endif
@@ -190,5 +190,5 @@
     m_piVSPFlag          = (Char*  )xMalloc(Char,   uiNumPartition);
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     m_pbSPIVMPFlag       = (Bool*  )xMalloc(Bool,   uiNumPartition);
 #endif
@@ -342,5 +342,5 @@
     if ( m_piVSPFlag          ) { xFree(m_piVSPFlag);           m_piVSPFlag         = NULL; }
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     if ( m_pbSPIVMPFlag       ) { xFree(m_pbSPIVMPFlag);           m_pbSPIVMPFlag         = NULL; }
 #endif
@@ -541,5 +541,5 @@
     m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui];
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     m_pbSPIVMPFlag[ui] = pcFrom->m_pbSPIVMPFlag[ui];
 #endif
@@ -586,5 +586,5 @@
     memset( m_piVSPFlag         + firstElement, 0,                        numElements * sizeof( *m_piVSPFlag ) );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     memset( m_pbSPIVMPFlag      + firstElement, 0,                        numElements * sizeof( *m_pbSPIVMPFlag ) );
 #endif
@@ -759,5 +759,5 @@
       m_piVSPFlag[ui] = 0;
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
       m_pbSPIVMPFlag[ui] = 0;
 #endif
@@ -859,5 +859,5 @@
   memset( m_piVSPFlag,          0, sizeof( Char  ) * m_uiNumPartition );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   memset( m_pbSPIVMPFlag,       0, sizeof( Bool  ) * m_uiNumPartition );
 #endif
@@ -948,5 +948,5 @@
       m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui];
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
       m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui];
 #endif
@@ -1098,5 +1098,5 @@
   m_piVSPFlag           = pcCU->getVSPFlag()          + uiPart;
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   m_pbSPIVMPFlag        = pcCU->getSPIVMPFlag()          + uiPart;
 #endif
@@ -1247,5 +1247,5 @@
   m_pDvInfo            = pcCU->getDvInfo()                + uiAbsPartIdx;
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   m_pbSPIVMPFlag       = pcCU->getSPIVMPFlag()               + uiAbsPartIdx;
 #endif
@@ -1299,5 +1299,5 @@
 
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   memcpy( m_pbSPIVMPFlag        + uiOffset, pcCU->getSPIVMPFlag(),        sizeof( Bool ) * uiNumPartition );
 #endif
@@ -1421,5 +1421,5 @@
   memcpy( rpcCU->getDvInfo()            + m_uiAbsIdxInLCU, m_pDvInfo,             sizeof( *m_pDvInfo ) * m_uiNumPartition );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   memcpy( rpcCU->getSPIVMPFlag()        + m_uiAbsIdxInLCU, m_pbSPIVMPFlag,        sizeof( Bool ) * m_uiNumPartition );
 #endif
@@ -1530,5 +1530,5 @@
   memcpy( rpcCU->getVSPFlag()           + uiPartOffset, m_piVSPFlag,           sizeof(Char) * uiQNumPart );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   memcpy( rpcCU->getSPIVMPFlag()        + uiPartOffset, m_pbSPIVMPFlag,        sizeof(Bool) * uiQNumPart );
 #endif
@@ -2647,5 +2647,5 @@
 }
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
 Void TComDataCU::setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
 {
@@ -3860,5 +3860,5 @@
       , InheritedVSPDisInfo*  inheritedVSPDisInfo
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
       , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
 #endif
@@ -3980,9 +3980,5 @@
     iPosLeftAbove[1] = numA1B1B0;
 #if H_3D_VSP
-#if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F0111
     if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 
-#else
-    if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1
-#endif
 #if H_3D_IC
       && !bICFlag
@@ -3994,7 +3990,4 @@
     {
       vspFlag[numA1B1B0] = 1;
-#if !MTK_VSP_SIMPLIFICATION_F0111
-      xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo);
-#endif
     }
 #endif
@@ -6368,5 +6361,5 @@
 }
 #endif
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
 Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
 {
@@ -6948,5 +6941,5 @@
 #endif
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
 Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight)
 {
@@ -7000,9 +6993,6 @@
 #if H_3D_IV_MERGE
 Bool
-TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc 
-#if QC_DEPTH_IV_MRG_F0125
-, Bool bIsDepth           
-#endif
-#if MTK_SPIVMP_F0110
+TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth           
+#if H_3D_SPIVMP
 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
 #endif
@@ -7013,9 +7003,5 @@
   
   //--- get base CU/PU and check prediction mode ---
-#if QC_DEPTH_IV_MRG_F0125
   TComPic*    pcBasePic   = pcSlice->getIvPic( bIsDepth, iViewIndex );
-#else
-  TComPic*    pcBasePic   = pcSlice->getIvPic( false, iViewIndex );
-#endif
   TComPicYuv* pcBaseRec   = pcBasePic->getPicYuvRec   ();
 
@@ -7028,12 +7014,7 @@
   pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
 
-#if !MTK_SPIVMP_F0110
-#if QC_DEPTH_IV_MRG_F0125
+#if !H_3D_SPIVMP
   iCurrPosX  += ( iWidth  >> 1 );
   iCurrPosY  += ( iHeight >> 1 );
-#else
-  iCurrPosX  += ( ( iWidth  - 1 ) >> 1 );
-  iCurrPosY  += ( ( iHeight - 1 ) >> 1 );
-#endif
 #endif
 
@@ -7053,5 +7034,5 @@
 #endif
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   ////////////////////////////////
   //////////sub-PU IvMC///////////
@@ -7183,5 +7164,5 @@
   ////////////////////////////////
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++) 
 #else
@@ -7192,5 +7173,5 @@
     // iLoopCan == 1 --> IvMCShift 
 
-#if !MTK_SPIVMP_F0110
+#if !H_3D_SPIVMP
     Int         iBaseCUAddr;
     Int         iBaseAbsPartIdx;
@@ -7200,5 +7181,5 @@
     Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 );
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
     iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); 
@@ -7209,5 +7190,5 @@
     pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
 #else
@@ -7241,5 +7222,5 @@
                   TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
 #if H_3D_NBDV 
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
                   if( !bIsDepth )
                   {
@@ -7249,5 +7230,5 @@
                     cMv.setIDVVer    (cDv.getVer());  
                     cMv.setIDVVId    (iViewIndex); 
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
                   }
 #endif
@@ -7266,5 +7247,5 @@
     }
   }
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)
 #else
@@ -7297,5 +7278,5 @@
 #endif
           cMv.setHor( cMv.getHor() + ioffsetDV );
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE 
           if( bIsDepth )
             cMv.setHor((cMv.getHor()+2)>>2); 
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 765)
@@ -198,5 +198,5 @@
                                       ///< 0: non-VSP; 1: VSP
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Bool*         m_pbSPIVMPFlag;       ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP
                                       ///< 0: non-SPIVMP; 1: SPIVMP
@@ -501,6 +501,4 @@
 #if H_3D
   Void          rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo*  inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV);
-#endif
-#if QC_DEPTH_IV_MRG_F0125
   Bool          getDispNeighBlocks  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
   Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
@@ -515,5 +513,5 @@
   Void          getIVNStatus       ( UInt uiPartIdx,  DisInfo* pDInfo, Bool& bIVFMerge,  Int& iIVFMaxD);
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Void          getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight);
   Void          getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr );
@@ -521,9 +519,7 @@
 #endif
 #if H_3D_IV_MERGE
-  Bool          getInterViewMergeCands          ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc 
-#if QC_DEPTH_IV_MRG_F0125
-    , Bool bIsDepth           
-#endif
-#if MTK_SPIVMP_F0110
+  Bool          getInterViewMergeCands          ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc, Bool bIsDepth           
+
+#if H_3D_SPIVMP
     , TComMvField* pcMFieldSP, UChar* puhInterDirSP
 #endif
@@ -675,5 +671,5 @@
                                             , InheritedVSPDisInfo*  inheritedVSPDisInfo
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
                                             , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
 #endif
@@ -684,5 +680,5 @@
   inline Void   xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount,  InheritedVSPDisInfo*  inheritedVSPDisInfo);
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Bool*         getSPIVMPFlag        ()                        { return m_pbSPIVMPFlag;          }
   Bool          getSPIVMPFlag        ( UInt uiIdx )            { return m_pbSPIVMPFlag[uiIdx];   }
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComMotionInfo.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComMotionInfo.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComMotionInfo.cpp	(revision 765)
@@ -40,5 +40,5 @@
 #include "assert.h"
 #include <stdlib.h>
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
 #include "TComDataCU.h"
 #include "TComPic.h"
@@ -328,5 +328,5 @@
 }
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
 Void TComCUMvField::setMvFieldSP( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  )
 {
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComMotionInfo.h
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComMotionInfo.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComMotionInfo.h	(revision 765)
@@ -50,5 +50,5 @@
 // ====================================================================================================================
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
 class TComDataCU;
 #endif
@@ -173,5 +173,5 @@
   Void    setAllRefIdx ( Int iRefIdx,                 PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 );
   Void    setAllMvField( TComMvField const & mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 );
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Void    setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  );
 #endif
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 765)
@@ -520,5 +520,5 @@
 }
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
 Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr )
 {
@@ -631,5 +631,5 @@
       else
       {
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
         if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0)  
         {
@@ -671,5 +671,5 @@
             xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
           }
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
         }
 #endif
@@ -717,5 +717,5 @@
       else
       {
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
        if (pcCU->getSPIVMPFlag(uiPartAddr)!=0)  
       {
@@ -756,5 +756,5 @@
           xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
         }
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
        }
 #endif
@@ -784,39 +784,39 @@
   pcCU->clipMv(cMv);
 #if H_3D_ARP
-#if QC_MTK_INTERVIEW_ARP_F0123_F0108
   if(pcCU->getARPW( uiPartAddr ) > 0  && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC())
   {
-      xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi );
+    xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi );
   }
   else
-#endif
-  if(  pcCU->getARPW( uiPartAddr ) > 0 
-    && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N 
-    && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() 
-    )
-  {
-    xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );
-  }
-  else
-  {
+  {
+    if(  pcCU->getARPW( uiPartAddr ) > 0 
+      && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N 
+      && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() 
+      )
+    {
+      xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );
+    }
+    else
+    {
 #endif
 #if H_3D_IC
-    Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() );
-    xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
+      Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() );
+      xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
 #if H_3D_ARP
-      , false
-#endif
-      , bICFlag );
-    bICFlag = bICFlag && (iWidth > 8);
-    xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
+        , false
+#endif
+        , bICFlag );
+      bICFlag = bICFlag && (iWidth > 8);
+      xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi
 #if H_3D_ARP
-      , false
-#endif
-      , bICFlag );
+        , false
+#endif
+        , bICFlag );
 #else
-  xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
-  xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
+      xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
+      xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );
 #endif
 #if H_3D_ARP
+    }
   }
 #endif
@@ -872,5 +872,4 @@
   pcBaseViewDepthPicYuv->extendPicBorder();
 
-#if MTK_F0109_LG_F0120_VSP_BLOCK
   Int vspSize=0;
   xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp,vspSize );
@@ -878,10 +877,4 @@
   xPredInterLumaBlkFromDM   ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
   xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
-#else
-  xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp );
-  // sub-PU based compensation
-  xPredInterLumaBlkFromDM   ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
-  xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
-#endif
 }
 #endif
@@ -913,10 +906,6 @@
   if( cDistparity.bDV ) 
   {
-#if SHARP_ARP_REF_CHECK_F0105
     Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList);
     if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() )
-#else
-    if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC()!= pcCU->getSlice()->getPOC() )
-#endif
     {
       bTobeScaled = true;
@@ -925,13 +914,7 @@
     pcPicYuvBaseCol =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(),                              cDistparity.m_aVIdxCan );
 
-#if SHARP_ARP_REF_CHECK_F0105
     pcPicYuvBaseRef =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan );
 
     if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan))
-#else
-    pcPicYuvBaseRef =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC(), cDistparity.m_aVIdxCan );
-    
-    if( ( !pcPicYuvBaseCol || pcPicYuvBaseCol->getPOC() != pcCU->getSlice()->getPOC() ) || ( !pcPicYuvBaseRef || pcPicYuvBaseRef->getPOC() != pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() ) )
-#endif
     {
       dW = 0;
@@ -940,9 +923,5 @@
     else
     {
-#if SHARP_ARP_REF_CHECK_F0105
       assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() );
-#else
-      assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() );
-#endif
     }
 
@@ -993,5 +972,4 @@
   }
 }
-#if QC_MTK_INTERVIEW_ARP_F0123_F0108
 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled )
 {
@@ -1015,10 +993,8 @@
 
   assert(dW > 0);
-#if SHARP_ARP_REF_CHECK_F0105
   if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex()))
   {
     dW = 0;
   }
-#endif
   Int uiLCUAddr,uiAbsPartAddr;
   Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2  + ((cDMv.getHor() + 2)>>2);
@@ -1098,5 +1074,4 @@
   }
 }
-#endif
 
 #endif
@@ -1758,9 +1733,5 @@
 #if H_3D_VSP
 // not fully support iRatioTxtPerDepth* != 1
-#if MTK_F0109_LG_F0120_VSP_BLOCK
 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
-#else
-Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
-#endif
 {
   Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
@@ -1790,232 +1761,4 @@
   Pel *depth = yuvDepth->getLumaAddr();
 
-#if !SHARP_VSP_BLOCK_IN_AMP_F0102
-  if( width<8 || height<8 )
-  { // no split
-    Int rightOffset = width - 1;
-    Int depStrideBlock = depStride * nTxtPerDepthY;
-    Pel *refDepthTop = refDepth;
-    Pel *refDepthBot = refDepthTop + (height-1)*refDepStride;
-
-    Pel maxDepth = refDepthTop[0] > refDepthBot[0] ? refDepthTop[0] : refDepthBot[0];
-    if( maxDepth < refDepthTop[rightOffset] ) { maxDepth = refDepthTop[rightOffset]; }
-    if( maxDepth < refDepthBot[rightOffset] ) { maxDepth = refDepthBot[rightOffset]; }
-
-    for( Int sY=0; sY<height; sY+=nTxtPerDepthY )
-    {
-      for( Int sX=0; sX<width; sX+=nTxtPerDepthX )
-      {
-        depth[sX] = maxDepth;
-      }
-      depth += depStrideBlock;
-    }
-#if MTK_F0109_LG_F0120_VSP_BLOCK
-  if(width==4)
-    vspSize=0;
-  else
-    vspSize=1;
-#endif
-  }
-  else
-  { // split to 4x8, or 8x4
-    Int blocksize    = 8;
-    Int subblocksize = 4;
-    Int depStrideBlock = depStride * blocksize;
-    Pel *depthTmp = NULL;
-    Int depStrideTmp = depStride * nTxtPerDepthY;
-    Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };
-    Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };
-    Pel repDepth4x8[2] = {0, 0};
-    Pel repDepth8x4[2] = {0, 0};
-#endif
-
-#if !MTK_F0109_LG_F0120_VSP_BLOCK
-#if SHARP_VSP_BLOCK_IN_AMP_F0102
-    Int blocksize    = 8;
-    Int subblocksize = 4;
-    Int depStrideBlock = depStride * blocksize;
-    Pel *depthTmp = NULL;
-    Int depStrideTmp = depStride * nTxtPerDepthY;
-    Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };
-    Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };
-#endif
-    Int refDepStrideBlock    = refDepStride * blocksize;
-    Int refDepStrideSubBlock = refDepStride * subblocksize;
-
-    refDepthTmp[0] = refDepth;
-    refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;
-    refDepthTmp[1] = refDepthTmp[2] - refDepStride;
-    refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;
-
-#if SHARP_VSP_BLOCK_IN_AMP_F0102
-    Int subBlockW, subBlockH;
-    Int blockW, blockH;
-    subBlockW = subBlockH = 8;
-    if (height % 8)
-    {
-      subBlockW = 8;
-      subBlockH = 4;
-      blockW = width;  // no further split
-      blockH = height; // no further split
-    }
-    else if (width % 8)
-    {
-      subBlockW = 4;
-      subBlockH = 8;
-      blockW = width;  // no further split
-      blockH = height; // no further split
-    }
-    else
-    {
-      blockW = blockH = 8;
-    }
-    for( Int y=0; y<height; y+=blockH )
-    {
-      for( Int x=0; x<width; x+=blockW )
-      {
-        if (blockW == 8 && blockH == 8)
-        {
-          Bool ULvsBR = false, URvsBL = false;
-          ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];
-          URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];
-          if( ULvsBR ^ URvsBL )
-          { // 4x8
-            subBlockW = 4;
-            subBlockH = 8;
-          }
-          else
-          {
-            subBlockW = 8;
-            subBlockH = 4;
-          }
-        }
-        for( Int yy=0; yy<blockH; yy+=subBlockH )
-        {
-          for( Int xx=0; xx<blockW; xx+=subBlockW )
-          {
-            Pel  maxDepthVal = 0;
-            Int xP0, xP1, yP0, yP1;
-            xP0 = x+xx;
-            xP1 = x+xx+subBlockW-1;
-            yP0 = yy;
-            yP1 = yy+subBlockH-1;
-            maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP0*refDepStride]);
-            maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP0*refDepStride]);
-            maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP1*refDepStride]);
-            maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP1*refDepStride]);
-            depthTmp = &depth[x+xx+yy*depStride];
-            for( Int sY=0; sY<subBlockH; sY+=nTxtPerDepthY )
-            {
-              for( Int sX=0; sX<subBlockW; sX+=nTxtPerDepthX )
-              {
-                depthTmp[sX] = maxDepthVal;
-              }
-              depthTmp += depStrideTmp;
-            }
-          }
-        }
-      }
-      refDepthTmp[0] += refDepStrideBlock;
-      depth       += depStrideBlock;
-    }
-#else // SHARP_VSP_BLOCK_IN_AMP_F0102
-    for( Int y=0; y<height; y+=blocksize )
-    {
-      for( Int x=0; x<width; x+=blocksize )
-      {
-        Bool ULvsBR = false, URvsBL = false;
-
-        ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];
-        URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];
-
-        if( ULvsBR ^ URvsBL )
-        { // 4x8
-          repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]];
-          if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] )
-          {
-            repDepth4x8[0] = refDepthTmp[3][x+offset[0]];
-          }
-          if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] )
-          {
-            repDepth4x8[0] = refDepthTmp[3][x+offset[1]];
-          }
-          repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]];
-          if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] )
-          {
-            repDepth4x8[1] = refDepthTmp[3][x+offset[2]];
-          }
-          if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] )
-          {
-            repDepth4x8[1] = refDepthTmp[3][x+offset[3]];
-          }
-
-          depthTmp = &depth[x];
-          for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
-          {
-            for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
-            {
-              depthTmp[sX] = repDepth4x8[0];
-            }
-            depthTmp += depStrideTmp;
-          }
-          depthTmp = &depth[x+subblocksize];
-          for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
-          {
-            for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
-            {
-              depthTmp[sX] = repDepth4x8[1];
-            }
-            depthTmp += depStrideTmp;
-          }
-        }
-        else
-        { // 8x4
-          repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]];
-          if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] )
-          {
-            repDepth8x4[0] = refDepthTmp[1][x+offset[0]];
-          }
-          if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] )
-          {
-            repDepth8x4[0] = refDepthTmp[1][x+offset[3]];
-          }
-          repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]];
-          if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] )
-          {
-            repDepth8x4[1] = refDepthTmp[3][x+offset[0]];
-          }
-          if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] )
-          {
-            repDepth8x4[1] = refDepthTmp[3][x+offset[3]];
-          }
-          
-          depthTmp = &depth[x];
-          for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
-          {
-            for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
-            {
-              depthTmp[sX] = repDepth8x4[0];
-            }
-            depthTmp += depStrideTmp;
-          }
-          for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
-          {
-            for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
-            {
-              depthTmp[sX] = repDepth8x4[1];
-            }
-            depthTmp += depStrideTmp;
-          }
-        }
-      }
-      refDepthTmp[0] += refDepStrideBlock;
-      refDepthTmp[1] += refDepStrideBlock;
-      refDepthTmp[2] += refDepStrideBlock;
-      refDepthTmp[3] += refDepStrideBlock;
-      depth       += depStrideBlock;
-    }
-#endif // SHARP_VSP_BLOCK_IN_AMP_F0102
-#else
-#if SHARP_VSP_BLOCK_IN_AMP_F0102
   if ((height % 8))
   {
@@ -2069,149 +1812,15 @@
       }
     }
-  }
-#else // SHARP_VSP_BLOCK_IN_AMP_F0102
-    Int refDepStrideBlock    = refDepStride * height;
-    Int refDepStrideSubBlock = refDepStride * height/2;
-    refDepthTmp[0] = refDepth;
-    refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;
-    refDepthTmp[1] = refDepthTmp[2] - refDepStride;
-    refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;
-    offset[3] = width-1;
-    Bool ULvsBR = false, URvsBL = false;
-    ULvsBR = refDepthTmp[0][0+offset[0]] < refDepthTmp[3][0+offset[3]];
-    URvsBL = refDepthTmp[0][0+offset[3]] < refDepthTmp[3][0+offset[0]];
-    refDepStrideBlock    = refDepStride * blocksize;
-    refDepStrideSubBlock = refDepStride * subblocksize;
-    refDepthTmp[0] = refDepth;
-    refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;
-    refDepthTmp[1] = refDepthTmp[2] - refDepStride;
-    refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;
-    offset[3] = blocksize-1;
-    if( ULvsBR ^ URvsBL )
-    {
-    vspSize = 0;//4x8
-    for( Int y=0; y<height; y+=blocksize )
-    {
-      for( Int x=0; x<width; x+=blocksize )
-      {
-        { // 4x8
-          repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]];
-          if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] )
-          {
-            repDepth4x8[0] = refDepthTmp[3][x+offset[0]];
-          }
-          if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] )
-          {
-            repDepth4x8[0] = refDepthTmp[3][x+offset[1]];
-          }
-          repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]];
-          if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] )
-          {
-            repDepth4x8[1] = refDepthTmp[3][x+offset[2]];
-          }
-          if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] )
-          {
-            repDepth4x8[1] = refDepthTmp[3][x+offset[3]];
-  }
-
-          depthTmp = &depth[x];
-          for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
-          {
-            for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
-            {
-              depthTmp[sX] = repDepth4x8[0];
-            }
-            depthTmp += depStrideTmp;
-          }
-          depthTmp = &depth[x+subblocksize];
-          for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )
-          {
-            for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )
-            {
-              depthTmp[sX] = repDepth4x8[1];
-            }
-            depthTmp += depStrideTmp;
-          }
-        }
-      }
-      refDepthTmp[0] += refDepStrideBlock;
-      refDepthTmp[1] += refDepStrideBlock;
-      refDepthTmp[2] += refDepStrideBlock;
-      refDepthTmp[3] += refDepStrideBlock;
-      depth       += depStrideBlock;
-    }
-  }
-  else
-  { // 8x4
-    vspSize = 1;
-    for( Int y=0; y<height; y+=blocksize )
-    {
-      for( Int x=0; x<width; x+=blocksize )
-      {
-        repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]];
-        if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] )
-        {
-          repDepth8x4[0] = refDepthTmp[1][x+offset[0]];
-        }
-        if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] )
-        {
-          repDepth8x4[0] = refDepthTmp[1][x+offset[3]];
-        }
-        repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]];
-        if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] )
-        {
-          repDepth8x4[1] = refDepthTmp[3][x+offset[0]];
-        }
-        if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] )
-        {
-          repDepth8x4[1] = refDepthTmp[3][x+offset[3]];
-        }
-
-        depthTmp = &depth[x];
-        for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
-        {
-          for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
-          {
-            depthTmp[sX] = repDepth8x4[0];
-          }
-          depthTmp += depStrideTmp;
-        }
-        for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )
-        {
-          for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )
-          {
-            depthTmp[sX] = repDepth8x4[1];
-          }
-          depthTmp += depStrideTmp;
-}
-      }
-      refDepthTmp[0] += refDepStrideBlock;
-      refDepthTmp[1] += refDepStrideBlock;
-      refDepthTmp[2] += refDepStrideBlock;
-      refDepthTmp[3] += refDepStrideBlock;
-      depth       += depStrideBlock;
-    }
-  }
-#endif    
-#endif
-#if !SHARP_VSP_BLOCK_IN_AMP_F0102
-  }
-#endif
-
-
-}
-#if MTK_F0109_LG_F0120_VSP_BLOCK
+  }    
+}
+
 Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize)
-#else
-Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )
-#endif
 {
   Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;
   Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE;
   
-#if MTK_F0109_LG_F0120_VSP_BLOCK
   nTxtPerDepthX = nTxtPerDepthX << vspSize;
   nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
-#endif
+
   Int refStride = picRef->getStride();
   Int dstStride = yuvDst->getStride();
@@ -2319,9 +1928,5 @@
 }
 
-#if MTK_F0109_LG_F0120_VSP_BLOCK
 Void TComPrediction::xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize)
-#else
-Void TComPrediction::xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )
-#endif
 {
 #if (H_3D_VSP_BLOCKSIZE==1)
@@ -2333,8 +1938,7 @@
 #endif
 
-#if MTK_F0109_LG_F0120_VSP_BLOCK
   nTxtPerDepthX = nTxtPerDepthX << vspSize;
   nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);
-#endif
+
   Int refStride = picRef->getCStride();
   Int dstStride = yuvDst->getCStride();
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComPrediction.h
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComPrediction.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComPrediction.h	(revision 765)
@@ -93,7 +93,5 @@
 #if H_3D_ARP
   Void xPredInterUniARP         ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL );
-#if QC_MTK_INTERVIEW_ARP_F0123_F0108
   Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL );
-#endif
 #endif
   Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false          );
@@ -123,13 +121,7 @@
 
 #if H_3D_VSP
-#if MTK_F0109_LG_F0120_VSP_BLOCK
   Void xGetVirtualDepth           ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int txtPerDepthX=1, Int txtPerDepthY=1 );
   Void xPredInterLumaBlkFromDM    ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);
   Void xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);
-#else
-  Void xGetVirtualDepth           ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int txtPerDepthX=1, Int txtPerDepthY=1 );
-  Void xPredInterLumaBlkFromDM    ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );
-  Void xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );
-#endif
 #endif
 
@@ -142,5 +134,5 @@
   Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight );
   Bool xCheckIdenticalMotion    ( TComDataCU* pcCU, UInt PartAddr);
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Bool xCheckTwoSPMotion ( TComDataCU* pcCU, UInt PartAddr0, UInt PartAddr1 );
   Void xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr );
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 765)
@@ -753,18 +753,7 @@
   {        
     if ( this->getNumRefIdx( RefPicList( uiRefListIdx ) ) == 0)
+    {
         continue;
-#if !SHARP_ARP_REF_CHECK_F0105
-// move the following to setARPStepNum() to define ARP related thing in ARP function.
-#if QC_MTK_INTERVIEW_ARP_F0123_F0108
-     for(Int i = 0; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ )
-       {
-       if ( this->getRefPic(RefPicList(uiRefListIdx), i)->getPOC() != getPOC() )
-       {
-         this->setFirstTRefIdx (RefPicList(uiRefListIdx), i);
-         break;
-       }
-     }
-#endif
-#endif
+    }
     Bool bZeroIdxLtFlag = this->getRefPic(RefPicList(uiRefListIdx), 0)->getIsLongTerm();
     for(Int i = 1; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ )
@@ -1872,5 +1861,5 @@
 #if H_3D_IV_MERGE
     m_ivMvPredFlag         [ i ] = false;
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     m_iSubPULog2Size       [ i ] = 0;
 #endif
@@ -1885,5 +1874,5 @@
     m_bInterSDCFlag        [ i ] = false;
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
     m_bMPIFlag             [ i ] = false;
 #endif
@@ -3324,20 +3313,8 @@
 
 #if H_3D_ARP
-#if SHARP_ARP_REF_CHECK_F0105
 Void TComSlice::setARPStepNum( TComPicLists*ivPicLists )
-#else
-Void TComSlice::setARPStepNum()                                  
-#endif
-{
-#if SHARP_ARP_REF_CHECK_F0105
+{
   Bool tempRefPicInListsFlag = false;
-#else
-  Bool bAllIvRef = true;
-#endif
-#if QC_MTK_INTERVIEW_ARP_F0123_F0108
   if(!getVPS()->getUseAdvRP(getLayerId()) || this->isIRAP())
-#else
-  if(!getVPS()->getUseAdvRP(getLayerId()))
-#endif
   {
     m_nARPStepNum = 0;
@@ -3345,5 +3322,4 @@
   else
   {
-#if SHARP_ARP_REF_CHECK_F0105
     setFirstTRefIdx (REF_PIC_LIST_0, -1);
     setFirstTRefIdx (REF_PIC_LIST_1, -1);
@@ -3361,30 +3337,6 @@
     tempRefPicInListsFlag = getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0;
     m_nARPStepNum = tempRefPicInListsFlag ? getVPS()->getARPStepNum(getLayerId()) : 0;
-#else
-    for( Int iRefListId = 0; iRefListId < 2; iRefListId++ )
-    {
-      RefPicList  eRefPicList = RefPicList( iRefListId );
-      Int iNumRefIdx = getNumRefIdx(eRefPicList);
-      
-      if( iNumRefIdx <= 0 )
-      {
-        continue;
-      }
-
-      for ( Int i = 0; i < iNumRefIdx; i++ )
-      {
-        if( getRefPic( eRefPicList, i)->getPOC() != getPOC() )
-        {
-          bAllIvRef = false;
-          break;
-        }
-      }
-
-      if( bAllIvRef == false ) { break; }
-    }
-    m_nARPStepNum = !bAllIvRef ? getVPS()->getARPStepNum(getLayerId()) : 0;
-#endif
-  }
-#if SHARP_ARP_REF_CHECK_F0105
+  }
+
   if (tempRefPicInListsFlag)
   {
@@ -3407,7 +3359,6 @@
         }
       }
-  }
-}
-#endif
+    }
+  }
 }
 #endif
@@ -3514,5 +3465,5 @@
 #endif 
 
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
   setupLUT = setupLUT || ( getVPS()->getIvMvPredFlag(layerIdInVPS ) && getIsDepth() );
 #endif
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 765)
@@ -838,5 +838,5 @@
 #if H_3D_IV_MERGE
   Bool        m_ivMvPredFlag             [ MAX_NUM_LAYERS ]; 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Int         m_iSubPULog2Size           [MAX_NUM_LAYERS   ];
 #endif
@@ -874,5 +874,5 @@
   Bool        m_bInterSDCFlag[MAX_NUM_LAYERS   ];
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   Bool        m_bMPIFlag[MAX_NUM_LAYERS   ];
 #endif
@@ -1167,5 +1167,5 @@
   Void    setIvMvPredFlag     ( Int layerIdInVps, Bool val )  { m_ivMvPredFlag[ layerIdInVps ] = val; }
   Bool    getIvMvPredFlag     ( Int layerIdInVps )            { return m_ivMvPredFlag[ layerIdInVps ]; }; 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Int     getSubPULog2Size(Int layerIdInVps)           { return m_iSubPULog2Size[layerIdInVps]; }
   Void    setSubPULog2Size(Int layerIdInVps, Int u)    { m_iSubPULog2Size[layerIdInVps] = u;}
@@ -1202,5 +1202,5 @@
   Void    setInterSDCFlag      ( Int layerIdInVps, Bool bval ){ m_bInterSDCFlag[layerIdInVps] = bval; }
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   Bool    getMPIFlag      ( Int layerIdInVps )           { return m_bMPIFlag[layerIdInVps]; }
   Void    setMPIFlag      ( Int layerIdInVps, Bool bval ){ m_bMPIFlag[layerIdInVps] = bval; }
@@ -1805,7 +1805,5 @@
   UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
   Bool hasCamParInSliceHeader()  { return m_bCamParInSliceHeader; }
-#if QC_DEPTH_IV_MRG_F0125
   Void setHasCamParInSliceHeader( Bool b )  { m_bCamParInSliceHeader = b; }
-#endif
   Int* getCodedScale         ()  { return m_aaiCodedScale [0]; }
   Int* getCodedOffset        ()  { return m_aaiCodedOffset[0]; }
@@ -2214,12 +2212,8 @@
 #endif
 #if H_3D_ARP
-#if SHARP_ARP_REF_CHECK_F0105
   Bool m_arpRefPicAvailable[2][MAX_NUM_LAYERS];
-#endif
   TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS];
   UInt                 m_nARPStepNum; 
-#if QC_MTK_INTERVIEW_ARP_F0123_F0108
   Int         m_aiFirstTRefIdx    [2]; 
-#endif
 #endif
 #if H_3D_IC
@@ -2308,9 +2302,5 @@
 #if H_3D_ARP
   Void      setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx )      { m_pBaseViewRefPicList[iViewIdx] = pListPic;                   }
-#if SHARP_ARP_REF_CHECK_F0105
   Void      setARPStepNum( TComPicLists*ivPicLists );
-#else
-  Void      setARPStepNum();                                 
-#endif
   TComPic*  getBaseViewRefPic    ( UInt uiPOC , Int iViewIdx )                       { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); }
   UInt      getARPStepNum( )                                                         { return m_nARPStepNum;                                         }  
@@ -2513,9 +2503,7 @@
   Int       getAlterRefIdx          ( RefPicList e )        { return  m_aiAlterRefIdx[e];     }
 #endif
-#if QC_MTK_INTERVIEW_ARP_F0123_F0108
+#if H_3D_ARP
   Int       getFirstTRefIdx        ( RefPicList e )                { return  m_aiFirstTRefIdx[e];     }
   Void      setFirstTRefIdx        ( RefPicList e, Int i )         { m_aiFirstTRefIdx[e]    = i;      }
-#endif
-#if SHARP_ARP_REF_CHECK_F0105
   Bool      getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; }
 #endif
Index: /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 765)
@@ -99,4 +99,7 @@
                                               // MTK_TEXTURE_MRGCAND_BUGFIX_E0182  Bug fix for TEXTURE MERGING CANDIDATE     , JCT3V-E0182
 #define H_3D_ARP                          1   // Advanced residual prediction (ARP), JCT3V-D0177
+                                              // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108
+                                              // SHARP_ARP_REF_CHECK_F0105        ARP reference picture selection and DPB check
+                                              // LGE_ARP_CTX_F0161                JCT3V-F0161
 #define H_3D_IC                           1   // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060
                                               // Unifying rounding offset, for IC part, JCT3V-D0135
@@ -114,5 +117,4 @@
                                               // NBDV_DEFAULT_VIEWIDX_BUGFIX Bug fix for invalid default view index for NBDV
                                               // NTT_DoNBDV_VECTOR_CLIP_E0141 disparity vector clipping in DoNBDV, JCT3V-E0141 and JCT3V-E0209
-
 #endif
 
@@ -127,4 +129,9 @@
                                               // NTT_VSP_DC_BUGFIX_E0208 bugfix for sub-PU based DC in VSP, JCT3V-E0208
                                               // NTT_VSP_COMMON_E0207_E0208 common part of JCT3V-E0207 and JCT3V-E0208
+                                              // MTK_F0109_LG_F0120_VSP_BLOCK MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120  
+                                              // SHARP_VSP_BLOCK_IN_AMP_F0102 VSP partitioning for AMP
+                                              // MTK_VSP_SIMPLIFICATION_F0111 1. Inherited VSP also use NBDV of current CU, 2. VSP cannot be inherited from above LCU rowss
+                                              // LGE_SHARP_VSP_INHERIT_F0104 
+
 #define H_3D_IV_MERGE                     1   // Inter-view motion merge candidate
                                               // HHI_INTER_VIEW_MOTION_PRED 
@@ -136,5 +143,8 @@
                                               // TEXTURE MERGING CANDIDATE     , JCT3V-C0137
                                               // QC_INRIA_MTK_MRG_E0126 
-                                              // ETRIKHU_MERGE_REUSE_F0093
+                                              // ETRIKHU_MERGE_REUSE_F0093 QC_DEPTH_IV_MRG_F0125, JCT3V-F0125: Depth oriented Inter-view MV candidate
+                                              // EC_MPI_ENABLING_MERGE_F0150, MPI flag in VPS and enabling in Merge mode
+
+
 
 
@@ -170,5 +180,7 @@
 #define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
                                               // LGE_INTER_SDC_E0156  Enable inter SDC for depth coding
+#define H_3D_SPIVMP                       1   // H_3D_SPIVMP    // JCT3V-F0110: Sub-PU level inter-view motion prediction
 #define H_3D_FCO                          0   // Flexible coding order for 3D
+
 
 
@@ -211,5 +223,5 @@
 #endif
 
-////   ****** neighbouring block-based disparity vector  *********
+////   ****** NEIGHBOURING BLOCK-BASED DISPARITY VECTOR  *********
 #if H_3D_NBDV
 #define DVFROM_LEFT                       0
@@ -266,13 +278,18 @@
 #endif
 
-/////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////   HTM-9.2 Integrations //////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////
-
-// !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
-// !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
-// !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
-// !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
-// !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!
+#if H_3D
+#define PPS_FIX_DEPTH                           1
+#endif
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////   HTM-10.0 Integrations //////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////
+
+// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
+// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
+// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
+// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
+// !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!!
 
 /////////////////////////////////////////////////////////////////////////////////////////
@@ -316,35 +333,4 @@
 #define H_MV_6_PS_O0109_23                      1  // (PS/O0109/profile_ref_minus1 constraint) #23 Modify the semantics of profile_ref_minus1[ i ] to replace shall be less than i?with shall be less than or equal to i? from discussion of JCTVC-O0109 
 #define H_MV_6_PS_O0109_24                      1  // (PS/O0109/vps_vui_present_flag move) #24 Move the vps_vui_present_flag to precede vps_vui_offset, and make vps_vui_offset conditional on that flag, from JCTVC-O0109
-/////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////   HTM-9.0 Integrations //////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////
-
-#if H_3D
-#define PPS_FIX_DEPTH                           1
-
-#define FIX_MISSING_MACRO_R690                  1 // Missing macro in integration to revision 690
-#define SEC_MPI_ENABLING_MERGE_F0150            1 // MPI flag in VPS and enabling in Merge mode
-
-#if H_3D_ARP
-#define QC_MTK_INTERVIEW_ARP_F0123_F0108        1 //JCT3V-F0123; JCT3V-F0108
-#define SHARP_ARP_REF_CHECK_F0105               1 // ARP reference picture selection and DPB check
-#define LGE_ARP_CTX_F0161                       1 //JCT3V-F0161
-#endif
-
-#if H_3D_IV_MERGE
-#define QC_DEPTH_IV_MRG_F0125                   1 // JCT3V-F0125: Depth oriented Inter-view MV candidate
-#define MTK_SPIVMP_F0110                        1 // JCT3V-F0110: Sub-PU level inter-view motion prediction
-#define MTK_F0110_FIX                           1 // Disable Sub-PU IVMP in Depth, fix some delete problems
-#define BUGFIX_F0093                            1 // bug fix for F0093 for depth IvMC pruning
-#define BUGFIX_2_F0093                          1 // bug fix for VSP inheritance
-#endif
-
-#if H_3D_VSP
-#define MTK_F0109_LG_F0120_VSP_BLOCK            1 // MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120  
-#define SHARP_VSP_BLOCK_IN_AMP_F0102            1 // VSP partitioning for AMP
-#define MTK_VSP_SIMPLIFICATION_F0111            1 // 1. Inherited VSP also use NBDV of current CU, 2. VSP cannot be inherited from above LCU rowss
-#define LGE_SHARP_VSP_INHERIT_F0104             1
-#endif
-#endif
 
 
Index: /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 765)
@@ -1859,5 +1859,5 @@
     pcVPS->setARPStepNum( i, 1 );
 #endif  
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     pcVPS->setSubPULog2Size(i, 0);
 #endif
@@ -1868,5 +1868,5 @@
 #if H_3D_IV_MERGE
         READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
         READ_UVLC (uiCode, "log2_sub_PU_size_minus2");     pcVPS->setSubPULog2Size(i, uiCode+2); 
 #endif
@@ -1885,5 +1885,5 @@
       else
       {
-#if QC_DEPTH_IV_MRG_F0125 && H_3D_IV_MERGE
+#if H_3D_IV_MERGE
         if(i!=1)
         {
@@ -1891,5 +1891,5 @@
         }
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
         if (i!=1)
         {
@@ -1897,5 +1897,5 @@
         }
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
         READ_FLAG( uiCode, "mpi_flag[i]" );             pcVPS->setMPIFlag( i, uiCode == 1 ? true : false );
 #endif
@@ -2568,5 +2568,4 @@
       READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
 #if H_3D_IV_MERGE
-#if SEC_MPI_ENABLING_MERGE_F0150
       if(rpcSlice->getIsDepth())
       {
@@ -2580,8 +2579,5 @@
         rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
       }
-#else
-      Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;
-      rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
-#endif
+
 #else
       rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode);
Index: /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 765)
@@ -135,5 +135,5 @@
 Void TDecCu::decompressCU( TComDataCU* pcCU )
 {
-#if !QC_DEPTH_IV_MRG_F0125
+#if !H_3D_IV_MERGE
   xDecompressCU( pcCU, 0,  0 );
 #endif
@@ -315,5 +315,5 @@
       m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth)  );
       m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
       if( pcCU->getSlice()->getIsDepth())
       {
@@ -333,5 +333,5 @@
         DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
       }
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
       }
 #endif
@@ -401,5 +401,5 @@
     memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
     memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
@@ -412,5 +412,5 @@
     m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
       , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
 #endif
@@ -462,5 +462,5 @@
       }
     }
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 
     if (bSPIVMPFlag[uiMergeIndex])
@@ -482,15 +482,10 @@
       }
     }
-#if MTK_F0110_FIX
     delete[] pcMvFieldSP;
     delete[] puhInterDirSP;
-#else
-    delete pcMvFieldSP;
-    delete puhInterDirSP;
-#endif
 #endif
 
     xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
     xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
 #endif
@@ -508,5 +503,5 @@
     {
       xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
       xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
 #endif
@@ -528,5 +523,5 @@
   setdQPFlag( bCodeDQP );
   xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
   xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
 #endif
@@ -546,5 +541,5 @@
 {
   TComPic* pcPic = pcCU->getPic();
-#if !QC_DEPTH_IV_MRG_F0125  
+#if !H_3D_IV_MERGE
   Bool bBoundary = false;
   UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
Index: /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 765)
@@ -209,5 +209,5 @@
   UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
   TComMvField*  pcMvFieldSP;
@@ -256,5 +256,5 @@
           memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
           InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
           memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
 #endif
@@ -262,5 +262,5 @@
           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
             , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
 #endif
@@ -293,5 +293,5 @@
         memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
         InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
         memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
 #endif
@@ -299,5 +299,5 @@
         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
           , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
 #endif
@@ -331,5 +331,5 @@
         }
       }
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
       pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );  
       if (bSPIVMPFlag[uiMergeIndex] != 0)
@@ -385,12 +385,7 @@
     }
   }
-#if MTK_SPIVMP_F0110
-#if MTK_F0110_FIX
+#if H_3D_SPIVMP
   delete[] pcMvFieldSP;
   delete[] puhInterDirSP;
-#else
-  delete pcMvFieldSP;
-  delete puhInterDirSP;
-#endif
 #endif
   return;
Index: /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 765)
@@ -302,5 +302,5 @@
 }
 
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
 Void
 CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice )
@@ -1007,9 +1007,5 @@
     pcSlice->setRefPicList     ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 
 #if H_3D_ARP
-#if SHARP_ARP_REF_CHECK_F0105
     pcSlice->setARPStepNum(m_ivPicLists);
-#else
-    pcSlice->setARPStepNum();
-#endif
     if( pcSlice->getARPStepNum() > 1 )
     {
@@ -1113,5 +1109,5 @@
   }
 
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
   if( pcSlice->getIsDepth() && m_pcCamParsCollector )
   {
@@ -1127,5 +1123,5 @@
     m_pcCamParsCollector->setSlice( pcSlice );
   }
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
   if( pcSlice->getIsDepth() )
   {
Index: /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.h	(revision 765)
@@ -78,5 +78,5 @@
   Int**** getBaseViewShiftLUTI()  { return m_aiBaseViewShiftLUT;   }
 
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
   Void  copyCamParamForSlice( TComSlice* pcSlice );
 #endif
Index: /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 765)
@@ -1646,5 +1646,5 @@
 #if H_3D_IV_MERGE
         WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
         WRITE_UVLC( pcVPS->getSubPULog2Size(i)-2, "log2_sub_PU_size_minus2[i]");
 #endif
@@ -1662,11 +1662,9 @@
       else
       {
-#if QC_DEPTH_IV_MRG_F0125
         if(i!=1)
         {
           WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
         }
-#endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
         if (i!=1)
         {
@@ -1674,5 +1672,5 @@
         }
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
         WRITE_FLAG( pcVPS->getMPIFlag( i ) ? 1 : 0 ,          "mpi_flag[i]" );
 #endif
@@ -2142,5 +2140,4 @@
     {
 #if H_3D_IV_MERGE
-#if SEC_MPI_ENABLING_MERGE_F0150
       if(pcSlice->getIsDepth())
       {
@@ -2154,8 +2151,4 @@
         WRITE_UVLC( ( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
       }
-#else
-      Bool ivMvPredFlag = pcSlice->getVPS()->getIvMvPredFlag( pcSlice->getLayerIdInVps() ) ;
-      WRITE_UVLC( ( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
-#endif
 #else
       WRITE_UVLC(MRG_MAX_NUM_CANDS - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
@@ -2197,12 +2190,8 @@
   }
 #if CAM_HLS_F0044
-#if QC_DEPTH_IV_MRG_F0125
 #if CAM_HLS_F0136_F0045_F0082
   if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() )
 #else
   if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )
-#endif
-#else
-  if( pcSlice->getSPS()->hasCamParInSliceHeader() )
 #endif
   {
@@ -2227,12 +2216,8 @@
 #else
     WRITE_UVLC(0,"slice_header_extension_length"); //<- this element needs to be set to the correct value!!
-#if QC_DEPTH_IV_MRG_F0125
 #if CAM_HLS_F0136_F0045_F0082
     if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() )
 #else
     if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )
-#endif
-#else
-    if( pcSlice->getSPS()->hasCamParInSliceHeader() )
 #endif
     {
Index: /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 765)
@@ -408,5 +408,5 @@
   UInt      m_uiARPStepNum;
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Int      m_iSubPULog2Size;
 #endif
@@ -423,5 +423,5 @@
   Bool      m_useDLT;
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   Bool      m_useMPI;
 #endif
@@ -511,5 +511,5 @@
   Void       setARPStepNum                  ( UInt  u )      { m_uiARPStepNum = u;       }
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Int        getSubPULog2Size                   ()                   { return m_iSubPULog2Size;}
   Void       setSubPULog2Size                   (Int u)              { m_iSubPULog2Size = u; }     
@@ -1011,5 +1011,5 @@
   Bool      getUsePC                        ()         { return m_bUsePC;  }
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   Void      setUseMPI                       ( Bool b ) { m_useMPI = b;    }
   Bool      getUseMPI                       ()         { return m_useMPI; }
Index: /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 765)
@@ -567,5 +567,5 @@
           PartSize ePartTemp = rpcTempCU->getPartitionSize(0);
           rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
           if (rpcTempCU->getSlice()->getIsDepth() )
           {
@@ -582,5 +582,5 @@
             DvInfo.bDV = rpcTempCU->getDisMvpCandNBDV(&DvInfo);
 
-#if QC_DEPTH_IV_MRG_F0125
+#if H_3D_IV_MERGE
           }
 #endif
@@ -1839,9 +1839,5 @@
   for( Int nARPW=nARPWMax; nARPW >= 0 ; nARPW-- )
   {
-#if FIX_MISSING_MACRO_R690
     memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM*sizeof(Int) );
-#else
-    memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS*sizeof(Int) );
-#endif
     rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
     rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uhDepth );
@@ -1855,5 +1851,5 @@
     memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
     memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
@@ -1867,5 +1863,5 @@
     rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,inheritedVSPDisInfo
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
       , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
 #endif
@@ -1910,5 +1906,5 @@
           rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
           rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth);
           if (bSPIVMPFlag[uiMergeCand])
@@ -1936,5 +1932,5 @@
             rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
             rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
           }
 #endif
@@ -2057,12 +2053,7 @@
   }
  }
-#if MTK_SPIVMP_F0110
-#if MTK_F0110_FIX
+#if H_3D_SPIVMP
  delete[] pcMvFieldSP;
  delete[] puhInterDirSP;
-#else
- delete pcMvFieldSP;
- delete puhInterDirSP;
-#endif
 #endif
 #if H_3D_ARP
@@ -2134,24 +2125,4 @@
 
     m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth] );
-
-#if !QC_MTK_INTERVIEW_ARP_F0123_F0108
-    if(rpcTempCU->getPartitionSize(0)==SIZE_2Nx2N)
-    {
-      Bool bSignalflag[2] = { true, true };
-      for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ )
-      {
-        RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
-        Int iRefIdx = rpcTempCU->getCUMvField(eRefList)->getRefIdx(0);
-        if( iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx) )
-        {
-          bSignalflag[uiRefListIdx] = false;
-        }
-      }
-      if( !bSignalflag[0] && !bSignalflag[1] )
-      {
-        rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth );
-      }
-    }
-#endif
   }
   else
@@ -2173,21 +2144,4 @@
    {
      m_ppcWeightedTempCU[uhDepth]->copyPartFrom( rpcTempCU , 0 , uhDepth );
-
-#if !QC_MTK_INTERVIEW_ARP_F0123_F0108
-     Bool bSignalflag[2] = { true, true };
-     for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ )
-     {
-       RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
-       Int iRefIdx = rpcTempCU->getCUMvField(eRefList)->getRefIdx(0);
-       if( iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx) )
-       {
-         bSignalflag[uiRefListIdx] = false;
-       }
-     }
-     if( !bSignalflag[0] && !bSignalflag[1])
-     {
-       rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth );
-     }
-#endif
    }
   }
Index: /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 765)
@@ -745,9 +745,5 @@
 #if H_3D_ARP
     //GT: This seems to be broken when layerId in vps is not equal to layerId in nuh
-#if SHARP_ARP_REF_CHECK_F0105
     pcSlice->setARPStepNum(m_ivPicLists);
-#else
-    pcSlice->setARPStepNum();
-#endif
     if(pcSlice->getARPStepNum() > 1)
     {
Index: /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 765)
@@ -3581,5 +3581,5 @@
                                  , InheritedVSPDisInfo*  inheritedVSPDisInfo
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
                                  , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
 #endif
@@ -3607,5 +3607,5 @@
                                         , inheritedVSPDisInfo
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
                                         , pbSPIVMPFlag, pcMvFieldSP, puhInterDirSP
 #endif
@@ -3628,5 +3628,5 @@
                                       , inheritedVSPDisInfo
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
                                       , pbSPIVMPFlag, pcMvFieldSP, puhInterDirSP
 #endif
@@ -3654,5 +3654,5 @@
       PartSize ePartSize = pcCU->getPartitionSize( 0 );
 
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
       pcCU->setSPIVMPFlagSubParts( pbSPIVMPFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx )); 
       if (pbSPIVMPFlag[uiMergeCand])
@@ -3676,5 +3676,5 @@
         pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
         pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
       }
 #endif
@@ -4355,5 +4355,5 @@
       DisInfo OriginalDvInfo = pcCU->getDvInfo(uiAbsPartIdx);
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
       Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
       memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
@@ -4368,5 +4368,5 @@
                       , inheritedVSPDisInfo
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
                       , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
 #endif 
@@ -4382,5 +4382,5 @@
         pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
         pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );  
         if (bSPIVMPFlag[uiMRGIndex]!=0)
@@ -4416,5 +4416,5 @@
             pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
           }
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
         }
 #endif
@@ -4430,5 +4430,5 @@
       else
       {
-#if MTK_SPIVMP_F0110        
+#if H_3D_SPIVMP        
         pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 
 #endif
@@ -4445,12 +4445,7 @@
         }
       }
-#if MTK_SPIVMP_F0110
-#if MTK_F0110_FIX
+#if H_3D_SPIVMP
       delete[] pcMvFieldSP;
       delete[] puhInterDirSP;
-#else
-      delete pcMvFieldSP;
-      delete puhInterDirSP;
-#endif
 #endif
     }
@@ -5366,5 +5361,5 @@
       dZeroCost = dCost + 1;
     }
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     if ( dZeroCost < dCost || pcCU->getQtRootCbf(0)==0)
 #else
Index: /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncSearch.h	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncSearch.h	(revision 765)
@@ -417,5 +417,5 @@
                                   , InheritedVSPDisInfo*  inheritedVSPDisInfo
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
                                   , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
 #endif
Index: /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 765)
@@ -556,5 +556,4 @@
   rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
 #if H_3D_IV_MERGE
-#if SEC_MPI_ENABLING_MERGE_F0150
   if(rpcSlice->getIsDepth())
   {
@@ -565,7 +564,4 @@
     rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ? 1 : 0 ) );
   }
-#else
-   rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ? 1 : 0 ) );
-#endif
 #else
   rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
Index: /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 764)
+++ /branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 765)
@@ -855,7 +855,4 @@
 #if H_3D
 #if !CAM_HLS_F0136_F0045_F0082
-#if !QC_DEPTH_IV_MRG_F0125
-  if ( !m_isDepth )
-#endif
   {
     m_cSPS.initCamParaSPS           ( m_viewIndex, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
