Index: branches/HTM-12.1-dev0/source/Lib/TAppCommon/program_options_lite.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TAppCommon/program_options_lite.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TAppCommon/program_options_lite.h	(revision 1074)
@@ -378,17 +378,9 @@
         std::string cDescBuffer;
 
-#if !FIX_TICKET_62
-        cNameBuffer       .resize( name.size() + 10 );
-        cDescBuffer.resize( desc.size() + 10 );
-#endif
-
         storage.resize(uiMaxNum);
         for ( unsigned int uiK = 0; uiK < uiMaxNum; uiK++ )
         {
-
-#if FIX_TICKET_62
           cNameBuffer       .resize( name.size() + 10 );
           cDescBuffer.resize( desc.size() + 10 );
-#endif
 
           Bool duplicate = (uiK != 0); 
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 1074)
@@ -51,5 +51,5 @@
 #define NUM_SPLIT_FLAG_CTX            3       ///< number of context models for split flag
 #define NUM_SKIP_FLAG_CTX             3       ///< number of context models for skip flag
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 #define NUM_SINGLEDEPTH_FLAG_CTX                     1
 #define NUM_SINGLE_DEPTH_VALUE_DATA_CTX              1       
@@ -153,5 +153,5 @@
   { CNU,  CNU,  CNU, }, 
 };
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 static const UChar 
 INIT_SINGLEDEPTH_FLAG[3][NUM_SINGLEDEPTH_FLAG_CTX] =  
@@ -450,15 +450,9 @@
 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] =
 {
-#if SEC_DBBP_EXPLICIT_SIG_I0077
-  { CNU },
-  { CNU },
-  { CNU },
-#else
-  { 161 },
-  { 161 },
-  { 161 },
-#endif
-};
-#endif
-
-#endif
+  { CNU },
+  { CNU },
+  { CNU },
+};
+#endif
+
+#endif
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1074)
@@ -60,5 +60,5 @@
   
   m_skipFlag           = NULL;
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_singleDepthFlag     = NULL;
   m_apSingleDepthValue  = NULL;
@@ -185,5 +185,5 @@
 
     m_skipFlag           = new Bool[ uiNumPartition ];
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     m_singleDepthFlag     = new Bool[ uiNumPartition ];
     m_apSingleDepthValue  = (Pel*)xMalloc(Pel, uiNumPartition);
@@ -335,5 +335,5 @@
 
     if ( m_skipFlag           ) { delete[] m_skipFlag;          m_skipFlag          = NULL; }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     if ( m_singleDepthFlag    ) { delete[] m_singleDepthFlag;   m_singleDepthFlag     = NULL; }
     if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue);  m_apSingleDepthValue  = NULL; }
@@ -503,5 +503,5 @@
     TComDataCU * pcFrom = pcPic->getCU(getAddr());
     m_skipFlag[ui]   = pcFrom->getSkipFlag(ui);
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     m_singleDepthFlag[ui]    = pcFrom->getSingleDepthFlag(ui);
     m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui);
@@ -563,5 +563,5 @@
   {
     memset( m_skipFlag          + firstElement, false,                    numElements * sizeof( *m_skipFlag ) );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     memset( m_singleDepthFlag     + firstElement, false,                  numElements * sizeof( *m_singleDepthFlag ) );
     memset( m_apSingleDepthValue  + firstElement,     0,                  numElements * sizeof( *m_apSingleDepthValue ) );
@@ -754,5 +754,5 @@
       m_puhTransformSkip[2][ui] = 0;
       m_skipFlag[ui]   = false;
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
       m_singleDepthFlag[ui]     = false;
       m_apSingleDepthValue[ui]  = 0;
@@ -933,5 +933,5 @@
   {
     m_skipFlag[ui]   = false;
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     m_singleDepthFlag[ui]   = false;
     m_apSingleDepthValue[ui]= 0;
@@ -958,5 +958,5 @@
       m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V);
       m_skipFlag[ui]   = pcCU->getSkipFlag(uiPartOffset+ui);
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
       m_singleDepthFlag[ui]    = pcCU->getSingleDepthFlag(uiPartOffset+ui);
       m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui);
@@ -1111,5 +1111,5 @@
   
   m_skipFlag=pcCU->getSkipFlag()          + uiPart;
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_singleDepthFlag     = pcCU->getSingleDepthFlag()   + uiPart;
   m_apSingleDepthValue  = pcCU->getSingleDepthValue()  + uiPart;
@@ -1252,5 +1252,5 @@
   
   m_skipFlag           = pcCU->getSkipFlag ()             + uiAbsPartIdx;
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_singleDepthFlag     = pcCU->getSingleDepthFlag ()             + uiAbsPartIdx;
   m_apSingleDepthValue  = pcCU->getSingleDepthValue ()            + uiAbsPartIdx;
@@ -1331,5 +1331,5 @@
   Int sizeInChar  = sizeof( Char ) * uiNumPartition;
   memcpy( m_skipFlag   + uiOffset, pcCU->getSkipFlag(),       sizeof( *m_skipFlag )   * uiNumPartition );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   memcpy( m_singleDepthFlag     + uiOffset, pcCU->getSingleDepthFlag(),       sizeof( *m_singleDepthFlag )   * uiNumPartition );
   memcpy( m_apSingleDepthValue  + uiOffset, pcCU->getSingleDepthValue(),      sizeof( *m_apSingleDepthValue ) * uiNumPartition);
@@ -1455,5 +1455,5 @@
 
   memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   memcpy( rpcCU->getSingleDepthFlag()  + m_uiAbsIdxInLCU, m_singleDepthFlag,    sizeof( *m_singleDepthFlag ) * m_uiNumPartition );
   memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition);
@@ -1574,5 +1574,5 @@
   Int sizeInChar  = sizeof( Char ) * uiQNumPart;
   memcpy( rpcCU->getSkipFlag()       + uiPartOffset, m_skipFlag,   sizeof( *m_skipFlag )   * uiQNumPart );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   memcpy( rpcCU->getSingleDepthFlag()  + uiPartOffset, m_singleDepthFlag,    sizeof( *m_singleDepthFlag )   * uiQNumPart );
   memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart);
@@ -2497,5 +2497,5 @@
   memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) );
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth )
 {
@@ -2677,9 +2677,5 @@
   }
 
-#if HS_DMM_SIGNALLING_I0120
   if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) )
-#else
-  if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) && !isDimDeltaDC( getLumaIntraDir( uiAbsPartIdx ) ) )
-#endif
   {
     return true;
@@ -2694,9 +2690,5 @@
   // check prediction mode
   UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx );  
-#if HS_DMM_SIGNALLING_I0120
   if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX  ) )
-#else
-  if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) )
-#endif
     return true;
   
@@ -3373,40 +3365,4 @@
   for(Int iLoop = 0; iLoop < 2; iLoop ++ ) 
   {
-#if !SEC_SIMP_SHIFTED_DV_I0086
-    // IvDcShift (Derived from spatial Iv neighboring blocks)
-    if( iLoop == 1 )
-    {
-      Int iFirDispCand = -1;
-      TComMvField mvIvDcShift[2];
-      UChar dirIvDcShift;
-
-      if (xGetPosFirstAvailDmvCand(MRG_IVSHIFT, iFirDispCand))
-      {
-        TComMv cMv;
-        cMv = m_mergCands[iFirDispCand].m_cMvField[0].getMv();
-        cMv.setHor(cMv.getHor()+4);
-        if(m_pcSlice->getVPS()->getViewSynthesisPredFlag(m_pcSlice->getLayerIdInVps()))
-        {
-          cMv.setVer(0);
-        }
-#if !(NTT_BUG_FIX_TK54)
-        clipMv( cMv );
-#endif
-
-        dirIvDcShift = m_mergCands[iFirDispCand].m_uDir;
-        mvIvDcShift[0].setMvField(cMv, m_mergCands[iFirDispCand].m_cMvField[0].getRefIdx() );
-        mvIvDcShift[1].setMvField(m_mergCands[iFirDispCand].m_cMvField[1].getMv(), m_mergCands[iFirDispCand].m_cMvField[1].getRefIdx() );
-        m_mergCands[MRG_IVSHIFT].setCand(mvIvDcShift, dirIvDcShift, false, false);
-        
-        if( mrgCandIdx == iCount ) 
-        {
-          return true;
-        }
-        iCount++;
-        break;
-      }
-    }
-#endif
-
     /// iLoop = 0 --> IvMCShift
     /// iLoop = 1 --> IvDCShift  (Derived from IvDC)
@@ -3455,23 +3411,4 @@
 } 
 
-#if !SEC_SIMP_SHIFTED_DV_I0086
-inline Bool TComDataCU::xGetPosFirstAvailDmvCand(Int iCount, Int& posFirstAvailDmvCand )
-{
-  for ( Int currListPos = 0; currListPos < iCount; currListPos++ )
-  {
-    if ( !m_mergCands[currListPos].m_bAvailable || ( currListPos == MRG_IVMC ) || ( currListPos == MRG_IVDC ) || ( m_mergCands[currListPos].m_iVspFlag != 0 ))
-    {
-      continue;
-    }
-    else if((m_mergCands[currListPos].m_bAvailable) && (m_mergCands[currListPos].m_cMvField[0].getRefIdx() != -1 ) && (getSlice()->getViewIndex() != getSlice()->getRefPic(RefPicList(0), m_mergCands[currListPos].m_cMvField[0].getRefIdx())->getViewIndex()))
-    {
-      posFirstAvailDmvCand = currListPos;
-      return true;
-    }
-  }
-  return false;  
-}
-#endif
-                                      
 #endif
 
@@ -3921,7 +3858,4 @@
 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
 #endif
-#if H_3D_VSP && !FIX_TICKET_79
-      , InheritedVSPDisInfo*  inheritedVSPDisInfo
-#endif
 #if H_3D_SPIVMP
       , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
@@ -3951,10 +3885,4 @@
   //////////////////////////////////
   DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
-#if !FIX_TICKET_79
-  for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++)
-  {
-    inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo;   // To prevent run-time error, this code must be executed always for merging process.
-  }
-#endif
   m_cDefaultDisInfo = cDisInfo;
 
@@ -4177,5 +4105,5 @@
     TComPic * pcTexPic = m_pcSlice->getTexturePic();
 #if H_3D_FCO
-#if LGE_FCO_I0116
+#if H_3D_FCO
     if (pcTexPic && pcTexPic->getReconMark())
 #else
@@ -4251,7 +4179,4 @@
                 TComMv cMv = cDefaultMvField.getMv() + cMvRounding;
                 cMv >>= 2;
-#if !FIX_TICKET_68
-                clipMv( cMv );
-#endif
                 cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ;
                 break;
@@ -5325,13 +5250,4 @@
 #endif
 
-#if !FIX_TICKET_76
-#if H_3D_VSP
-inline Void TComDataCU::xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo*  inheritedVSPDisInfo)
-{
-  inheritedVSPDisInfo[iCount].m_acDvInfo.m_acNBDV   = pcCURef->getDvInfo(uiAbsPartIdx).m_acNBDV;
-  inheritedVSPDisInfo[iCount].m_acDvInfo.m_aVIdxCan = pcCURef->getDvInfo(uiAbsPartIdx).m_aVIdxCan;
-}
-#endif
-#endif
 /** Check whether the current PU and a spatial neighboring PU are in a same ME region.
  * \param xN, xN   location of the upper-left corner pixel of a neighboring PU
@@ -5976,9 +5892,6 @@
     Int iColRefViewId  = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewIndex(); 
     iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId );
-#if SEC_HLS_CLEANUP_I0100
+
     if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag(getSlice()->getLayerIdInVps()) ) 
-#else
-    if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag() ) 
-#endif
     {
       rcMv = cColMv.scaleMv( iScale );
@@ -6164,9 +6077,5 @@
   TComMv cMv; 
 #if MTK_I0093
-#if H_3D_FIX_64BIT_SHIFT
   Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ];
-#else
-  Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[  1 << ( getSlice()->getSPS()->getBitDepthY() - 1 ) ];
-#endif
 #else
   Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ 128 ];
@@ -6181,5 +6090,5 @@
 #endif
 
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index)
 {
@@ -6795,9 +6704,5 @@
   if( getSlice()->getIsDepth() )
   {
-#if MTK_I0099_VPS_EX2
     iSubPUSize = 1<<getSlice()->getVPS()->getSubPUMPILog2Size(getSlice()->getLayerId());
-#else
-    iSubPUSize = 1 << getSlice()->getVPS()->getSubPUMPILog2Size();
-#endif
   }
 
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 1074)
@@ -110,5 +110,5 @@
   // -------------------------------------------------------------------------------------------------------------------
   Bool*         m_skipFlag;           ///< array of skip flags
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Bool*         m_singleDepthFlag;           ///< array of single depth flags
   Pel*          m_apSingleDepthValue;
@@ -250,7 +250,4 @@
 #if H_3D_IV_MERGE
   Bool          xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int*   ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ); 
-#if! SEC_SIMP_SHIFTED_DV_I0086
-  Bool          xGetPosFirstAvailDmvCand( Int iCount, Int& iFirDispCand );
-#endif
 #endif
 
@@ -353,5 +350,5 @@
   Void         setSkipFlag           ( UInt idx, Bool skip)     { m_skipFlag[idx] = skip;   }
   Void         setSkipFlagSubParts   ( Bool skip, UInt absPartIdx, UInt depth );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Bool*        getSingleDepthFlag            ()                        { return m_singleDepthFlag;          }
   Bool         getSingleDepthFlag            (UInt idx)                { return m_singleDepthFlag[idx];     }
@@ -505,5 +502,5 @@
   Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
    Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
 #endif
@@ -670,7 +667,4 @@
   Void          getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
 #endif
-#if H_3D_VSP && !FIX_TICKET_79
-                                            , InheritedVSPDisInfo*  inheritedVSPDisInfo
-#endif
 #if H_3D_SPIVMP
                                             , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
@@ -680,8 +674,4 @@
 
 #if H_3D_VSP
-#if !FIX_TICKET_76
-  inline Void   xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount,  InheritedVSPDisInfo*  inheritedVSPDisInfo);
-#endif
-
 #if H_3D_SPIVMP
   Bool*         getSPIVMPFlag        ()                        { return m_pbSPIVMPFlag;          }
@@ -771,5 +761,5 @@
 #endif
 
-#if SHARP_DMM1_I0110
+#if H_3D_DIM
   Bool         isDMM1UpscaleMode       ( UInt uiWidth ){ Bool bDMM1UpsampleModeFlag = true; UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ bDMM1UpsampleModeFlag = false; } return bDMM1UpsampleModeFlag; };
   UInt         getDMM1BasePatternWidth ( UInt uiWidth ){ UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ uiBaseWidth =  uiWidth; } return uiBaseWidth; }
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h	(revision 1074)
@@ -79,10 +79,5 @@
 } IDVInfo;
 #endif
-#if H_3D_VSP && !FIX_TICKET_79
-typedef struct _InheritedVSPDisCand 
-{
-  DisInfo m_acDvInfo;
-} InheritedVSPDisInfo;
-#endif
+
 // ====================================================================================================================
 // Class definition
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1074)
@@ -423,7 +423,4 @@
 
   UInt dimType    = getDimType  ( uiIntraMode );
-#if !HS_DMM_SIGNALLING_I0120
-  Bool dimDeltaDC = isDimDeltaDC( uiIntraMode );
-#endif
   Bool isDmmMode  = (dimType <  DMM_NUM_TYPE);
 
@@ -440,11 +437,7 @@
     case( DMM1_IDX ): 
       {
-#if SHARP_DMM1_I0110
         dmmSegmentation = pcCU->isDMM1UpscaleMode((UInt)iWidth) ? 
             &(g_dmmWedgeLists[ g_aucConvertToBit[pcCU->getDMM1BasePatternWidth((UInt)iWidth)] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]) : 
             &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
-#else
-        dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
-#endif
       } break;
     case( DMM4_IDX ): 
@@ -464,5 +457,4 @@
     }
     assert( dmmSegmentation );
-#if SHARP_DMM1_I0110
     if( dimType == DMM1_IDX && pcCU->isDMM1UpscaleMode((UInt)iWidth) ) 
     {
@@ -475,8 +467,4 @@
         patternStride = dmmSegmentation->getStride ();
     }
-#else
-    biSegPattern  = dmmSegmentation->getPattern();
-    patternStride = dmmSegmentation->getStride ();
-#endif
   }
 #endif
@@ -495,9 +483,5 @@
   Pel segDC1 = 0;
   Pel segDC2 = 0;
-#if HS_DMM_SIGNALLING_I0120
   if( !pcCU->getSDCFlag( uiAbsPartIdx ) )
-#else
-  if( dimDeltaDC )
-#endif
   {
     Pel deltaDC1 = pcCU->getDimDeltaDC( dimType, 0, uiAbsPartIdx );
@@ -568,10 +552,9 @@
     pcCU->getSPAbsPartIdx(uiPartAddr, iSPWidth, iSPHeight, i, iNumSPInOneLine, uiSPAddr[i]);
   }
-#if SHARP_ARP_CHROMA_I0104
   if( pcCU->getARPW( uiPartAddr ) != 0 )
   {
     return;
   }
-#endif
+
   // horizontal sub-PU merge
   for (Int i=0; i<iNumSP; i++)
@@ -745,5 +728,5 @@
   Int uiMinDepth = MAX_INT;
   Int uiMaxDepth = 0;
-#if SEC_DBBP_DMM4_THRESHOLD_I0076
+
   iSumDepth  = pDepthPels[ 0 ];
   iSumDepth += pDepthPels[ uiWidth - 1 ];
@@ -760,26 +743,5 @@
   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);
   uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
-#else
-  for (Int y=0; y<uiHeight; y++)
-  {
-    for (Int x=0; x<uiWidth; x++)
-    {
-      Int depthPel = pDepthPels[x];
-      iSumDepth += depthPel;
-      
-      if( depthPel > uiMaxDepth )
-      {
-        uiMaxDepth = depthPel;
-      }
-      if( depthPel < uiMinDepth )
-      {
-        uiMinDepth = depthPel;
-      }
-    }
-    
-    // next row
-    pDepthPels += uiDepthStride;
-  }
-#endif
+
   
   // don't generate mask for blocks with small depth range (encoder decision)
@@ -790,10 +752,5 @@
   
   AOF(uiWidth==uiHeight);
-#if SEC_DBBP_DMM4_THRESHOLD_I0076
   Int iMean = iSumDepth >> 2;
-#else
-  Int iSizeInBits = g_aucConvertToBit[uiWidth]+2;
-  Int iMean = iSumDepth >> iSizeInBits*2;       // iMean /= (uiWidth*uiHeight);
-#endif
   
   // start again for segmentation
@@ -842,9 +799,5 @@
 }
 
-#if SHARP_DBBP_SIMPLE_FLTER_I0109
 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize )
-#else
-Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr )
-#endif
 {
   Pel*  piSrc[2]    = {pInYuv[0]->getLumaAddr(uiPartAddr), pInYuv[1]->getLumaAddr(uiPartAddr)};
@@ -854,7 +807,4 @@
   
   UInt  uiMaskStride= MAX_CU_SIZE;
-#if !SHARP_DBBP_SIMPLE_FLTER_I0109
-  Pel  filSrc = 0;
-#endif
   Pel* tmpTar = 0;
   tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight);
@@ -880,5 +830,4 @@
   }
   
-#if SHARP_DBBP_SIMPLE_FLTER_I0109
   if (partSize == SIZE_Nx2N)
   {
@@ -917,39 +866,4 @@
     }
   }
-#else
-  for (Int y=0; y<uiHeight; y++)
-  {
-    for (Int x=0; x<uiWidth; x++)
-    {
-      Bool t = (y==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x];
-      Bool l = (x==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x-1];
-      Bool b = (y==uiHeight-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x];
-      Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x+1];
-      Bool c =pMaskStart[y*uiMaskStride+x];
-
-      Pel left, right, top, bottom;
-      left   = (x==0)          ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x-1];
-      right  = (x==uiWidth-1)  ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1];
-      top    = (y==0)          ? tmpTar[y*uiWidth+x] : tmpTar[(y-1)*uiWidth+x];
-      bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x];
-
-      if(!((l&&r&&c) || (!l&&!r&&!c)))
-      {
-        filSrc = Clip3( Pel( 0 ), Pel( 255 ), Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 ));
-      }
-      else
-      {
-        filSrc = tmpTar[y*uiWidth+x];
-      }
-
-      if(!((t&&b&&c) || (!t&&!b&&!c)))
-      {
-        filSrc = Clip3( Pel( 0 ), Pel( 255 ), Pel(( top + (filSrc << 1) + bottom ) >> 2 ));
-      }
-      piDst[x] = filSrc;
-    }
-    piDst     += uiDstStride;
-  }
-#endif
 
   if ( tmpTar    ) { xFree(tmpTar);             tmpTar        = NULL; }
@@ -989,5 +903,4 @@
   }
 
-#if SHARP_DBBP_SIMPLE_FLTER_I0109
   if (partSize == SIZE_Nx2N)
   {
@@ -1056,51 +969,5 @@
     }
   }
-#else
-  for (Int y=0; y<uiHeightC; y++)
-  {
-    for (Int x=0; x<uiWidthC; x++)
-    {
-      Bool t = (y==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2];
-      Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2];
-      Bool b = (y==uiHeightC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2];
-      Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2];
-      Bool c =pMaskStart[y*2*uiMaskStride+x*2];
-
-      Pel leftU, rightU, topU, bottomU;
-      leftU   = (x==0)           ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x-1];
-      rightU  = (x==uiWidthC-1)  ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x+1];
-      topU    = (y==0)           ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y-1)*uiWidthC+x];
-      bottomU = (y==uiHeightC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y+1)*uiWidthC+x];
-
-      Pel leftV, rightV, topV, bottomV;
-      leftV   = (x==0)           ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x-1];
-      rightV  = (x==uiWidthC-1)  ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x+1];
-      topV    = (y==0)           ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y-1)*uiWidthC+x];
-      bottomV = (y==uiHeightC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y+1)*uiWidthC+x];
-
-      if(!((l&&r&&c) || (!l&&!r&&!c)))
-      {
-        filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 ));
-        filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 ));
-      }
-      else
-      {
-        filSrcU = tmpTarU[y*uiWidthC+x];
-        filSrcV = tmpTarV[y*uiWidthC+x];
-      }
-
-      if(!((t&&b&&c) || (!t&&!b&&!c)))
-      {
-        filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topU + (filSrcU << 1) + bottomU ) >> 2 ));
-        filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topV + (filSrcV << 1) + bottomV ) >> 2 ));
-      }
-
-      piDstU[x] = filSrcU;
-      piDstV[x] = filSrcV;
-    }
-    piDstU      += uiDstStrideC;
-    piDstV      += uiDstStrideC;
-  }
-#endif
+
   if ( tmpTarU    ) { xFree(tmpTarU);             tmpTarU        = NULL; }
   if ( tmpTarV    ) { xFree(tmpTarV);             tmpTarV        = NULL; }
@@ -1475,11 +1342,7 @@
   pcCU->clipMv(cMv);
   TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec();
-#if QC_I0129_ARP_FIX
   xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true );
   xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true );
-#else
-  xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, true );
-  xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, true );
-#endif
+
   if( dW > 0 )
   {
@@ -1489,45 +1352,25 @@
     TComMv cMVwithDisparity = cMv + cDistparity.m_acNBDV;
     pcCU->clipMv(cMVwithDisparity);
-#if SHARP_ARP_CHROMA_I0104
     if (iWidth <= 8)
     {
       pYuvB0->clear(); pYuvB1->clear();
     }
-#endif
 
     assert ( cDistparity.bDV );
     
-#if NTT_BUG_FIX_TK54
     TComMv cNBDV = cDistparity.m_acNBDV;
     pcCU->clipMv( cNBDV );
     
     pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec();
-#if QC_I0129_ARP_FIX
     xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true );
-#if SHARP_ARP_CHROMA_I0104
     if (iWidth > 8)
-#endif
-    xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true );
-#else
-    xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true );
-    xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true );
-#endif
-#else
-    pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec();
-    xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true );
-    xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true );
-#endif
+      xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true );
     
     pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec();
-#if QC_I0129_ARP_FIX
     xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true );
-#if SHARP_ARP_CHROMA_I0104
+  
     if (iWidth > 8)
-#endif
-    xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true );
-#else
-    xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true );
-    xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true );
-#endif
+      xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true );
+    
     pYuvB0->subtractARP( pYuvB0 , pYuvB1 , uiPartAddr , iWidth , iHeight );
 
@@ -1540,5 +1383,4 @@
 }
 
-#if QC_I0051_ARP_SIMP
 Bool TComPrediction::xCheckBiInterviewARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc )
 {
@@ -1572,9 +1414,6 @@
         Int  iCurrRefPOC = pcPicYuvBaseTRef->getPOC();
         Int  iCurrRef    = pcCU->getSlice()->getFirstTRefIdx(eRefPicListCurr);
-#if MTK_I0072_IVARP_SCALING_FIX
+
         if( iCurrRef >= 0 && iCurrPOC != iCurrRefPOC)
-#else
-        if( iCurrRef >= 0)
-#endif
         {
           pcPicYuvCurrTRef =  pcCU->getSlice()->getRefPic(eRefPicListCurr,iCurrRef);  
@@ -1608,5 +1447,4 @@
   return false;
 }
-#endif
 
 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled )
@@ -1643,5 +1481,4 @@
   pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr);
   TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr );
-#if QC_I0051_ARP_SIMP
   if( pcCU->getSlice()->isInterB() && !pcCU->getSlice()->getIsDepth() )
   {
@@ -1708,7 +1545,4 @@
 
   if( !pColCU->isIntra( uiAbsPartAddr ) && !bTMVAvai )
-#else
-  if(!pColCU->isIntra(uiAbsPartAddr))
-#endif
   {
     TComMvField puMVField;
@@ -1723,9 +1557,5 @@
         Int  iCurrRefPOC = pcPicYuvBaseTRef->getPOC();
         Int  iCurrRef    = pcCU->getSlice()->getFirstTRefIdx(eRefPicListCurr);
-#if MTK_I0072_IVARP_SCALING_FIX
         if (iCurrRef >= 0 && iCurrRefPOC != iCurrPOC)
-#else
-        if( iCurrRef >= 0)
-#endif
         {
           pcPicYuvCurrTRef =  pcCU->getSlice()->getRefPic(eRefPicListCurr,iCurrRef);  
@@ -1754,11 +1584,8 @@
     pcPicYuvCurrTRef =  pcCU->getSlice()->getRefPic  (eRefPicList,  pcCU->getSlice()->getFirstTRefIdx(eRefPicList));      
   }
-#if QC_I0129_ARP_FIX
+
   xPredInterLumaBlk  ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ),        bTMVAvai);
   xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ),        bTMVAvai);
-#else
-  xPredInterLumaBlk  ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi,        bTMVAvai);
-  xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi,        bTMVAvai);
-#endif
+
   if( dW > 0 && bTMVAvai ) 
   {
@@ -1771,28 +1598,19 @@
     pcCU->clipMv(cBaseTMV);
     pcCU->clipMv(cTempMv);
-#if SHARP_ARP_CHROMA_I0104
+
     if (iWidth <= 8)
     {
       pYuvCurrTRef->clear(); pYuvBaseTRef->clear();
     }
-#endif
-#if QC_I0129_ARP_FIX
     xPredInterLumaBlk  ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true,   true);
-#if SHARP_ARP_CHROMA_I0104
+
     if (iWidth > 8)
-#endif
-    xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true,   true);
+      xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true,   true);
+
     xPredInterLumaBlk  ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, true,   true); 
-#if SHARP_ARP_CHROMA_I0104
+
     if (iWidth > 8)
-#endif
-    xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, true,   true); 
-#else
-    xPredInterLumaBlk  ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi,   true);
-    xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi,   true);
-    xPredInterLumaBlk  ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, bi,   true); 
-    xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, bi,   true); 
-
-#endif
+      xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, true,   true); 
+
     pYuvCurrTRef->subtractARP( pYuvCurrTRef , pYuvBaseTRef , uiPartAddr , iWidth , iHeight );  
     if(dW == 2)
@@ -1803,5 +1621,4 @@
   }
 }
-
 #endif
 
@@ -2328,18 +2145,7 @@
   Int iRecStride = ( eType == TEXT_LUMA ) ? pRecPic->getStride() : pRecPic->getCStride();
   Int iRefStride = ( eType == TEXT_LUMA ) ? pRefPic->getStride() : pRefPic->getCStride();
-#if SEC_IC_NEIGHBOR_CLIP_I0080
   Int iRefOffset, iHor, iVer;
-#else
-  Int iCUPelX, iCUPelY, iRefX, iRefY, iRefOffset, iHor, iVer;
-
-  iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
-  iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
-#endif
   iHor = pcCU->getSlice()->getIsDepth() ? pMv->getHor() : ( ( pMv->getHor() + 2 ) >> 2 );
   iVer = pcCU->getSlice()->getIsDepth() ? pMv->getVer() : ( ( pMv->getVer() + 2 ) >> 2 );
-#if !SEC_IC_NEIGHBOR_CLIP_I0080
-  iRefX   = iCUPelX + iHor;
-  iRefY   = iCUPelY + iVer;
-#endif
   if( eType != TEXT_LUMA )
   {
@@ -2357,9 +2163,5 @@
   Int precShift = std::max(0, (( eType == TEXT_LUMA ) ? g_bitDepthY : g_bitDepthC) - 12);
 
-#if SEC_IC_NEIGHBOR_CLIP_I0080
   if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) )
-#else
-  if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) && iCUPelY > 0 && iRefY > 0 )
-#endif
   {
     iRefOffset = iHor + iVer * iRefStride - iRefStride;
@@ -2391,9 +2193,5 @@
   }
 
-#if SEC_IC_NEIGHBOR_CLIP_I0080
   if( pcCU->getPULeft( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) )
-#else
-  if( pcCU->getPULeft( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) && iCUPelX > 0 && iRefX > 0 )
-#endif
   {
     iRefOffset = iHor + iVer * iRefStride - 1;
@@ -2429,5 +2227,4 @@
   }
 
-#if FIX_TICKET_71
   if( iCountShift == 0 )
   {
@@ -2436,5 +2233,4 @@
     return;
   }
-#endif
 
   xy += xx >> IC_REG_COST_SHIFT;
@@ -2553,5 +2349,5 @@
   // find contour for texture luma block
   UInt iDC = 0;
-#if SEC_DBBP_DMM4_THRESHOLD_I0076
+
   iDC  = piRefBlkY[ 0 ];
   iDC += piRefBlkY[ uiWidth - 1 ];
@@ -2559,13 +2355,4 @@
   iDC += piRefBlkY[ uiWidth * (uiHeight - 1) + uiWidth - 1 ];
   iDC = iDC >> 2;
-#else
-  for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 
-  { 
-    iDC += piRefBlkY[k]; 
-  }
-
-  Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2;   // 
-  iDC = iDC >> (cuMaxLog2Size - pcCU->getDepth(0))*2;        //  iDC /= (uiWidth*uiHeight);
-#endif
 
   piRefBlkY = cTempYuv.getLumaAddr();
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComPrediction.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComPrediction.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComPrediction.h	(revision 1074)
@@ -90,7 +90,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_I0051_ARP_SIMP
   Bool xCheckBiInterviewARP     ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc );
-#endif
   Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL );
 #endif
@@ -179,9 +177,5 @@
   PartSize      getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize);
   Bool          getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask );
-#if SHARP_DBBP_SIMPLE_FLTER_I0109
   Void          combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize );
-#else
-  Void          combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr = 0 );
-#endif
 #endif
 
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComRom.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComRom.cpp	(revision 1074)
@@ -355,13 +355,7 @@
   HALF_PEL,    //   8x8
   FULL_PEL,    //  16x16
-#if SHARP_DMM1_I0110
   FULL_PEL,    //  32x32
   FULL_PEL,    //  64x64
   FULL_PEL     // 128x128
-#else
-  DOUBLE_PEL,  //  32x32
-  DOUBLE_PEL,  //  64x64
-  DOUBLE_PEL   // 128x128
-#endif
 };
 
@@ -374,7 +368,5 @@
      0,    4,    7,    8,    8,    0 };
 
-#if SHARP_DMM1_I0110
 Bool g_wedgePattern[32*32];
-#endif
 
 extern std::vector< std::vector<TComWedgelet> >   g_dmmWedgeLists;
@@ -388,11 +380,4 @@
 
 Char  g_aucConvertToBit  [ MAX_CU_SIZE+1 ];
-#if !MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
-#if H_3D_IC
-UInt g_aICEnableCANDIDATE[10] = { 0, };
-UInt g_aICEnableNUM[ 10 ] = { 0, };
-Int g_lastlayer=0;
-#endif
-#endif
 #if ENC_DEC_TRACE
 FILE*  g_hTrace = NULL;
@@ -676,9 +661,5 @@
   if( !g_dmmWedgeLists.empty() ) return;
 
-#if SHARP_DMM1_I0110
   for( UInt ui = g_aucConvertToBit[DIM_MIN_SIZE]; ui < (g_aucConvertToBit[DIM_MAX_SIZE]); ui++ )
-#else
-  for( UInt ui = g_aucConvertToBit[DIM_MIN_SIZE]; ui < (g_aucConvertToBit[DIM_MAX_SIZE]+1); ui++ )
-#endif
   {
     UInt uiWedgeBlockSize = ((UInt)DIM_MIN_SIZE)<<ui;
@@ -764,7 +745,4 @@
   switch( eWedgeRes )
   {
-#if !SHARP_DMM1_I0110
-  case( DOUBLE_PEL ): { uiBlockSize = (uiWidth>>1); break; }
-#endif
   case(   FULL_PEL ): { uiBlockSize =  uiWidth;     break; }
   case(   HALF_PEL ): { uiBlockSize = (uiWidth<<1); break; }
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComRom.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComRom.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComRom.h	(revision 1074)
@@ -166,7 +166,5 @@
 extern const UChar                                           g_dmm3IntraTabIdxBits[6];
 
-#if SHARP_DMM1_I0110
 extern Bool                                                  g_wedgePattern[32*32];
-#endif 
 
 extern       std::vector< std::vector<TComWedgelet> >        g_dmmWedgeLists;
@@ -230,11 +228,4 @@
 
 extern       Char   g_aucConvertToBit  [ MAX_CU_SIZE+1 ];   // from width to log2(width)-2
-#if !MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
-#if H_3D_IC
-extern UInt g_aICEnableCANDIDATE[10];
-extern UInt g_aICEnableNUM[ 10 ]; //10 layers
-extern Int  g_lastlayer;
-#endif
-#endif
 
 #ifndef ENC_DEC_TRACE
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 1074)
@@ -142,5 +142,5 @@
 , m_depthToDisparityF             ( NULL )
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 , m_bApplySingleDepthMode         (false)
 #endif
@@ -650,9 +650,5 @@
   
   TComPic**             refPicSetStCurr    [2] = { RefPicSetStCurr0, RefPicSetStCurr1 };
-#if FIX_WARNING
   Int numPocStCurr[2] = { (Int)NumPocStCurr0, (Int)NumPocStCurr1 }; 
-#else
-  Int numPocStCurr[2] = { NumPocStCurr0, NumPocStCurr1 }; 
-#endif
 
   for (Int li = 0; li < ((m_eSliceType==B_SLICE) ? 2 : 1); li++)
@@ -1105,5 +1101,5 @@
   }
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode;
 #endif
@@ -1970,12 +1966,6 @@
     m_viewIndex         [i] = -1; 
     m_vpsDepthModesFlag [i] = false;
-#if SEC_HLS_CLEANUP_I0100
     m_ivMvScalingFlag[i] = true; 
-#else
-    m_ivMvScalingFlag = true; 
-#endif
-#if SEPARATE_FLAG_I0085
     m_bIVPFlag [i]      = false;
-#endif
 #endif
 
@@ -2016,5 +2006,5 @@
 #endif
 #endif
-#if MTK_I0099_VPS_EX2
+#if H_3D_QTLPC
     m_bLimQtPredFlag       [ i ] = false;
 #endif
@@ -2028,5 +2018,5 @@
     m_bInterSDCFlag        [ i ] = false;
 #endif
-#if SEPARATE_FLAG_I0085
+#if H_3D
     m_bIVPFlag             [ i ] = false;
 #endif
@@ -2309,7 +2299,5 @@
   for ( i = 0; i < iNumViews ; i++ )
   {
-#if H_3D_FIX_UNINIT
     m_bCamParPresent[i] = false; 
-#endif
     m_bCamParInSliceHeader[i] = false; 
     m_aaaiCodedScale[i] = new Int*[ 2 ];
@@ -2910,10 +2898,4 @@
 , m_pcmLog2MaxSize            (  5)
 , m_uiPCMLog2MinSize          (  7)
-#if !MTK_I0099_VPS_EX2
-#if H_3D_QTLPC
-, m_bUseQTL                   (false)
-, m_bUsePC                    (false)
-#endif
-#endif
 , m_bitDepthY                 (  8)
 , m_bitDepthC                 (  8)
@@ -3186,7 +3168,4 @@
     // allocate some memory and initialize with default mapping
     m_iNumDepthmapValues[i] = ((1 << m_uiDepthViewBitDepth)-1)+1;
-#if !FIX_TICKET_77
-    m_iBitsPerDepthValue[i] = numBitsForValue(m_iNumDepthmapValues[i]);
-#endif
     m_iDepthValue2Idx[i]    = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);
     m_iIdx2DepthValue[i]    = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);
@@ -3277,10 +3256,6 @@
   // update DLT variables
   m_iNumDepthmapValues[layerIdInVps] = iNumDepthValues;
-#if !FIX_TICKET_77
-  m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]);
-#endif
-}
-
-#if H_3D_DELTA_DLT
+}
+
 Void TComDLT::getDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTOut, UInt *puiDeltaDLTOutNum )
 {
@@ -3347,5 +3322,4 @@
   setDepthLUTs(layerIdInVps, aiIdx2DepthValue, uiNumDepthValues);
 }
-#endif
 
 #endif
@@ -4065,5 +4039,5 @@
       m_bApplyIC = true;
       Int refLayer = curLayer-1;
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
+
       Int ICEnableCandidate = getICEnableCandidate(refLayer);
       Int ICEnableNum = getICEnableNum(refLayer);
@@ -4083,22 +4057,4 @@
       setICEnableCandidate(curLayer, 0);
       setICEnableNum(curLayer, 0);
-#else
-      if( (refLayer>=0) && (g_aICEnableCANDIDATE[refLayer]>0) )
-      {    
-        Double ratio=Double(g_aICEnableNUM[refLayer])/Double(g_aICEnableCANDIDATE[refLayer]);
-
-        if( ratio > IC_LOW_LATENCY_ENCODING_THRESHOLD)
-{
-          m_bApplyIC=true;
-        }
-        else
-        {
-          m_bApplyIC=false;
-        }
-      }
-      g_aICEnableNUM[curLayer]=0;
-      g_aICEnableCANDIDATE[curLayer]=0;
-      g_lastlayer=getDepth();
-#endif
     }
   }
@@ -4210,5 +4166,5 @@
 
 #if H_3D_DDD
-#if LGE_FCO_I0116
+#if H_3D_FCO
   if( getIsDepth() && getViewIndex() > 0 && getVPS()->getMPIFlag(layerIdInVPS))
 #else
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 1074)
@@ -1009,17 +1009,11 @@
 #if H_3D_IV_MERGE
   Bool        m_ivMvPredFlag             [ MAX_NUM_LAYERS ]; 
-#if SEC_HLS_CLEANUP_I0100
   Bool        m_ivMvScalingFlag          [ MAX_NUM_LAYERS ]; 
-#endif
 #if H_3D_SPIVMP
   Int         m_iSubPULog2Size           [MAX_NUM_LAYERS   ];
-#if MTK_I0099_VPS_EX2
   Int         m_iSubPUMPILog2Size        [MAX_NUM_LAYERS   ];
-#else
-  Int         m_iSubPUMPILog2Size;
-#endif
-#endif
-#endif
-#if MTK_I0099_VPS_EX2
+#endif
+#endif
+#if H_3D_QTLPC
   Bool        m_bLimQtPredFlag           [ MAX_NUM_LAYERS ];
 #endif
@@ -1031,8 +1025,7 @@
 #endif
   Bool        m_vpsDepthModesFlag        [MAX_NUM_LAYERS   ];
-#if SEPARATE_FLAG_I0085
+#if H_3D
   Bool        m_bIVPFlag                 [MAX_NUM_LAYERS   ];
 #endif
-
 #if H_3D
   UInt        m_uiCamParPrecision;
@@ -1041,9 +1034,4 @@
   Int         ***m_aaaiCodedScale ;
   Int         ***m_aaaiCodedOffset;
-
-#if !SEC_HLS_CLEANUP_I0100
-  Bool        m_ivMvScalingFlag; 
-#endif
-
 #endif
 #if H_3D_INTER_SDC
@@ -1470,14 +1458,9 @@
   Int     getSubPULog2Size(Int layerIdInVps)           { return m_iSubPULog2Size[layerIdInVps]; }
   Void    setSubPULog2Size(Int layerIdInVps, Int u)    { m_iSubPULog2Size[layerIdInVps] = u;}
-#if MTK_I0099_VPS_EX2
   Int     getSubPUMPILog2Size(Int layerIdInVps)           { return m_iSubPUMPILog2Size[layerIdInVps]; }
   Void    setSubPUMPILog2Size(Int layerIdInVps, Int u)    { m_iSubPUMPILog2Size[layerIdInVps] = u;}
-#else
-  Int     getSubPUMPILog2Size( )           { return m_iSubPUMPILog2Size; }
-  Void    setSubPUMPILog2Size( Int u )     { m_iSubPUMPILog2Size = u;    }
-#endif
-#endif
-#endif
-#if MTK_I0099_VPS_EX2
+#endif
+#endif
+#if H_3D_QTLPC
   Void    setLimQtPredFlag    ( Int layerIdInVps, Bool val )  { m_bLimQtPredFlag[ layerIdInVps ] = val; }
   Bool    getLimQtPredFlag    ( Int layerIdInVps ) { return m_bLimQtPredFlag[layerIdInVps];}
@@ -1493,16 +1476,10 @@
   Void    setVpsDepthModesFlag( Int layerIdInVps, Bool val )               { m_vpsDepthModesFlag[ layerIdInVps ] = val; }
   Bool    getVpsDepthModesFlag( Int layerIdInVps )                         { return m_vpsDepthModesFlag[ layerIdInVps ]; }
-#if SEPARATE_FLAG_I0085
+
   Void    setIVPFlag( Int layerIdInVps, Bool val )                    { m_bIVPFlag[ layerIdInVps ] = val; }
   Bool    getIVPFlag( Int layerIdInVps )                              { return m_bIVPFlag[ layerIdInVps ]; }
-#endif
-
-#if SEC_HLS_CLEANUP_I0100
+
   Bool    getIvMvScalingFlag   ( Int layerIdInVps )                        { return m_ivMvScalingFlag[ layerIdInVps ]; }
   Void    setIvMvScalingFlag   (Int layerIdInVps, Bool b )                 { m_ivMvScalingFlag[ layerIdInVps ] = b;    }  
-#else
-  Bool    getIvMvScalingFlag   (  )                       { return m_ivMvScalingFlag; }
-  Void    setIvMvScalingFlag   ( Bool b )                 { m_ivMvScalingFlag = b;    }  
-#endif
 
 #if H_3D_INTER_SDC
@@ -1530,7 +1507,4 @@
   Bool        m_bInterViewDltPredEnableFlag[ MAX_NUM_LAYERS ];
 
-#if !FIX_TICKET_77
-  Int         m_iBitsPerDepthValue       [ MAX_NUM_LAYERS ];
-#endif
   Int         m_iNumDepthmapValues       [ MAX_NUM_LAYERS ];
   Int*        m_iDepthValue2Idx          [ MAX_NUM_LAYERS ];
@@ -1559,20 +1533,11 @@
   UInt    getDepthViewBitDepth()                          { return m_uiDepthViewBitDepth; }
 
-#if !FIX_TICKET_77
-  Int     getBitsPerDepthValue( Int layerIdInVps )        { return getUseDLTFlag(layerIdInVps)?m_iBitsPerDepthValue[layerIdInVps]:g_bitDepthY; }
-#endif
   Int     getNumDepthValues( Int layerIdInVps )           { return getUseDLTFlag(layerIdInVps)?m_iNumDepthmapValues[layerIdInVps]:((1 << g_bitDepthY)-1); }
   Int     depthValue2idx( Int layerIdInVps, Pel value )   { return getUseDLTFlag(layerIdInVps)?m_iDepthValue2Idx[layerIdInVps][value]:value; }
-#if RWTH_DLT_CLIP_I0057
   Pel     idx2DepthValue( Int layerIdInVps, UInt uiIdx )  { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][ClipY(uiIdx)]:uiIdx; }
-#else
-  Pel     idx2DepthValue( Int layerIdInVps, UInt uiIdx )  { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][uiIdx]:uiIdx; }
-#endif
   Void    setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 );
-#if H_3D_DELTA_DLT
   Int*    idx2DepthValue( Int layerIdInVps )  { return m_iIdx2DepthValue[layerIdInVps]; }
   Void    getDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTOut, UInt *puiDeltaDLTOutNum );
   Void    setDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTIn, UInt uiDeltaDLTInNum );
-#endif
 };
 #endif
@@ -1833,10 +1798,4 @@
   Bool        m_useAMP;
 
-#if !MTK_I0099_VPS_EX2
-#if H_3D_QTLPC
-  Bool        m_bUseQTL;
-  Bool        m_bUsePC;
-#endif
-#endif
   // Parameter
   Int         m_bitDepthY;
@@ -2120,12 +2079,4 @@
 
 #endif
-#if !MTK_I0099_VPS_EX2
-#if H_3D_QTLPC
-  Void setUseQTL( Bool b ) { m_bUseQTL = b;    }
-  Bool getUseQTL()         { return m_bUseQTL; }
-  Void setUsePC ( Bool b ) { m_bUsePC  = b;    }
-  Bool getUsePC ()         { return m_bUsePC;  }
-#endif
-#endif
 #if H_MV
   Int  getLayerId            ()           { return m_layerId; }
@@ -2599,8 +2550,8 @@
   UInt         m_aiDDDShift    [MAX_NUM_LAYERS];
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Bool      m_bApplySingleDepthMode;
 #endif
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
+#if H_3D_IC
   Int *m_aICEnableCandidate;
   Int *m_aICEnableNum;
@@ -2676,5 +2627,5 @@
   TComPic*  getTexturePic       ()                              { return  m_ivPicsCurrPoc[0][ m_viewIndex ]; }
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void      setApplySingleDepthMode( Bool b )                                { m_bApplySingleDepthMode = b; }
   Bool      getApplySingleDepthMode()                                        { return m_bApplySingleDepthMode; }
@@ -2917,9 +2868,7 @@
   Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; }; 
   Bool getVpsDepthModesFlag  ()  { return getVPS()->getVpsDepthModesFlag( getVPS()->getLayerIdInVps( m_layerId ) ); }
-#if SEPARATE_FLAG_I0085
   Bool getIVPFlag       ()  { return getVPS()->getIVPFlag( getVPS()->getLayerIdInVps( m_layerId ) ); }
 #endif
-#endif
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
+#if H_3D_IC
   Void    setICEnableCandidate( Int* ICEnableCandidate)   { m_aICEnableCandidate = ICEnableCandidate; };
   Void    setICEnableNum( Int* ICEnableNum)   { m_aICEnableNum = ICEnableNum; };
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComWedgelet.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComWedgelet.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComWedgelet.cpp	(revision 1074)
@@ -68,7 +68,5 @@
                                                             m_uiHeight ( rcWedge.m_uiHeight  ),
                                                             m_pbPattern( (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) ) )
-#if SHARP_DMM1_I0110
                                                             ,m_pbScaledPattern( g_wedgePattern )
-#endif
 {
   ::memcpy( m_pbPattern, rcWedge.m_pbPattern, sizeof(Bool) * (m_uiWidth * m_uiHeight));
@@ -88,7 +86,5 @@
 
   m_pbPattern = (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) );
-#if SHARP_DMM1_I0110
   m_pbScaledPattern = g_wedgePattern;
-#endif
 }
 
@@ -187,21 +183,7 @@
   switch( m_eWedgeRes )
   {
-#if !SHARP_DMM1_I0110
-  case( DOUBLE_PEL ): { uiTempBlockSize =  m_uiWidth;     uhXs = (m_uhXs<<1); uhYs = (m_uhYs<<1); uhXe = (m_uhXe<<1); uhYe = (m_uhYe<<1); } break;
-#endif
   case(   FULL_PEL ): { uiTempBlockSize =  m_uiWidth;     uhXs =  m_uhXs;     uhYs =  m_uhYs;     uhXe =  m_uhXe;     uhYe =  m_uhYe;     } break;
   case(   HALF_PEL ): { uiTempBlockSize = (m_uiWidth<<1); uhXs =  m_uhXs;     uhYs =  m_uhYs;     uhXe =  m_uhXe;     uhYe =  m_uhYe;     } break;
   }
-
-#if !SHARP_DMM1_I0110
-  if( m_eWedgeRes == DOUBLE_PEL) // adjust line-end for DOUBLE_PEL resolution
-  {
-    if( m_uhOri == 1 ) { uhXs = uiTempBlockSize-1; }
-    if( m_uhOri == 2 ) { uhXe = uiTempBlockSize-1; uhYs = uiTempBlockSize-1; }
-    if( m_uhOri == 3 ) { uhYe = uiTempBlockSize-1; }
-    if( m_uhOri == 4 ) { uhYe = uiTempBlockSize-1; }
-    if( m_uhOri == 5 ) { uhXs = uiTempBlockSize-1; }
-  }
-#endif
 
   Bool* pbTempPattern = new Bool[ (uiTempBlockSize * uiTempBlockSize) ];
@@ -233,7 +215,4 @@
   switch( m_eWedgeRes )
   {
-#if !SHARP_DMM1_I0110
-  case( DOUBLE_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break;
-#endif
   case(   FULL_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break;
   case(   HALF_PEL ): // sub-sampling by factor 2
@@ -327,24 +306,22 @@
 }
 
-#if SHARP_DMM1_I0110
 Bool* TComWedgelet::getScaledPattern(UInt uiDstSize)
 {
-    Bool *pbSrcPat = this->getPattern();
-    UInt uiSrcSize = this->getStride();
-
-    Int scale = (g_aucConvertToBit[uiDstSize] - g_aucConvertToBit[uiSrcSize]);
-    assert(scale>=0);
-    for (Int y=0; y<uiDstSize; y++)
-    {
-       for (Int x=0; x<uiDstSize; x++)
-       {
-           Int srcX = x>>scale;
-           Int srcY = y>>scale;
-           m_pbScaledPattern[y*uiDstSize + x] = pbSrcPat[ srcY*uiSrcSize + srcX ];
-       }
-   }
-   return m_pbScaledPattern;
-}
-#endif
+  Bool *pbSrcPat = this->getPattern();
+  UInt uiSrcSize = this->getStride();
+
+  Int scale = (g_aucConvertToBit[uiDstSize] - g_aucConvertToBit[uiSrcSize]);
+  assert(scale>=0);
+  for (Int y=0; y<uiDstSize; y++)
+  {
+    for (Int x=0; x<uiDstSize; x++)
+    {
+      Int srcX = x>>scale;
+      Int srcY = y>>scale;
+      m_pbScaledPattern[y*uiDstSize + x] = pbSrcPat[ srcY*uiSrcSize + srcX ];
+    }
+  }
+  return m_pbScaledPattern;
+}
 
 TComWedgeNode::TComWedgeNode()
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComWedgelet.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComWedgelet.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComWedgelet.h	(revision 1074)
@@ -58,5 +58,4 @@
 #define DIM_NO_IDX     MAX_UINT
 
-#if HS_DMM_SIGNALLING_I0120
 __inline UInt getDimType  ( Int intraMode ) 
 { 
@@ -64,11 +63,5 @@
     return (dimType >= 0 && dimType < DIM_NUM_TYPE) ? (UInt)dimType : DIM_NO_IDX; 
 }
-#else
-__inline UInt getDimType  ( Int intraMode ) { Int dimType = (intraMode-DIM_OFFSET)/2; return (dimType >= 0 && dimType < DIM_NUM_TYPE) ? (UInt)dimType : DIM_NO_IDX; }
-#endif
 __inline Bool isDimMode   ( Int intraMode ) { return (getDimType( intraMode ) < DIM_NUM_TYPE); }
-#if !HS_DMM_SIGNALLING_I0120
-__inline Bool isDimDeltaDC( Int intraMode ) { return (isDimMode( intraMode ) && ((intraMode-DIM_OFFSET)%2) == 1); }
-#endif
 #endif
 
@@ -79,7 +72,4 @@
 enum WedgeResolution
 {
-#if !SHARP_DMM1_I0110
-  DOUBLE_PEL,
-#endif
   FULL_PEL,
   HALF_PEL
@@ -106,7 +96,5 @@
 
   Bool* m_pbPattern;
-#if SHARP_DMM1_I0110
   Bool* m_pbScaledPattern;
-#endif
 
   Void  xGenerateWedgePattern();
@@ -134,7 +122,5 @@
   Bool            getIsCoarse() { return m_bIsCoarse; }
   UInt            getAng     () { return m_uiAng; }
-#if SHARP_DMM1_I0110
   Bool*           getScaledPattern(UInt uiWidth);
-#endif
 
   Void  setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false );
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComYuv.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComYuv.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComYuv.cpp	(revision 1074)
@@ -689,8 +689,6 @@
   UInt iSrc1Stride = pcYuvSrc1->getStride();
   UInt iDstStride  = getStride();
-#if QC_I0129_ARP_FIX
   Int iIFshift = IF_INTERNAL_PREC - g_bitDepthY;
   Int iOffSet  = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS;
-#endif
   for ( y = uiHeight-1; y >= 0; y-- )
   {
@@ -700,9 +698,5 @@
       if( bClip )
       {
-#if QC_I0129_ARP_FIX
         pDst[x] = ClipY( ( pDst[x] + iOffSet ) >> iIFshift );
-#else
-        pDst[x] = ClipY( pDst[x] );
-#endif
       }
     }
@@ -727,8 +721,8 @@
   UInt  iSrc1Stride = pcYuvSrc1->getCStride();
   UInt  iDstStride  = getCStride();
-#if QC_I0129_ARP_FIX
+
   Int iIFshift = IF_INTERNAL_PREC - g_bitDepthC;
   Int iOffSet  = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS;
-#endif
+
   for ( y = uiHeight-1; y >= 0; y-- )
   {
@@ -739,11 +733,6 @@
       if( bClip )
       {
-#if QC_I0129_ARP_FIX
         pDstU[x] = ClipC( ( pDstU[x] + iOffSet ) >> iIFshift );
         pDstV[x] = ClipC( ( pDstV[x] + iOffSet ) >> iIFshift );
-#else
-        pDstU[x] = ClipC( pDstU[x] );
-        pDstV[x] = ClipC( pDstV[x] );
-#endif
       }
     }
@@ -761,8 +750,7 @@
 {
   subtractARPLuma  ( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth    , uiHeight    );
-#if SHARP_ARP_CHROMA_I0104
+
   if (uiWidth > 8)
-#endif
-  subtractARPChroma( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 );
+    subtractARPChroma( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 );
 }
 
@@ -823,8 +811,7 @@
 {
   multiplyARPLuma( uiAbsPartIdx , uiWidth , uiHeight , dW );
-#if SHARP_ARP_CHROMA_I0104
+
   if (uiWidth > 8)
-#endif
-  multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW );
+    multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW );
 }
 
Index: branches/HTM-12.1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 1074)
@@ -111,5 +111,7 @@
                                               // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 
                                               // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085  Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085
-
+                                              // QC_I0051_ARP_SIMP          
+                                              // SHARP_ARP_CHROMA_I0104     
+                                              // MTK_I0072_IVARP_SCALING_FIX
 
 #define H_3D_IC                           1   // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060
@@ -123,10 +125,6 @@
                                               // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121
                                               // MTK_LOW_LATENCY_IC_ENCODING_H0086  Low-latency IC encoding in JCT3V-H0086
-
-#define MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX  1  // Remove the global variables used in JCT3V-H0086
-
-
-#define SEC_IC_NEIGHBOR_CLIP_I0080        1   // Clipping of neighboring sample position, JCT3V-I0080
-
+                                              // MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX  1  // Remove the global variables used in JCT3V-H0086
+                                              // SEC_IC_NEIGHBOR_CLIP_I0080    // Clipping of neighboring sample position, JCT3V-I0080
 
 #if H_3D_NBDV
@@ -177,7 +175,8 @@
                                               // SHARP_SIMPLE_MERGE_H0062      Restrict 3D-HEVC merge cand in small PUs
                                               // MTK_DIS_SPBIP8X4_H0205        Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction
-                                              // SEC_ADAPT_DISABLE_IVMP        Disalbing IVMP merge candidates when IC is enabled, JCT3V-H0070
-
-#define SEC_SIMP_SHIFTED_DV_I0086         1   // Simplification of Shifted DV candidate, JCT3V-I0086
+                                              // SEC_ADAPT_DISABLE_IVMP        Disabling IVMP merge candidates when IC is enabled, JCT3V-H0070
+                                              // SEC_SIMP_SHIFTED_DV_I0086     Simplification of Shifted DV candidate, JCT3V-I0086
+
+
 
 #define H_3D_TMVP                         1   // QC_TMVP_C0047 
@@ -222,11 +221,16 @@
                                               // SEC_NO_RESI_DLT_H0105    
                                               // MTK_DLT_CODING_FIX_H0091 
-
-#define MTK_SINGLE_DEPTH_MODE_I0095       1   // Single depth mode proposed in JCT3V-I0095
-#if MTK_SINGLE_DEPTH_MODE_I0095
-#define MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE            2 // size of the sample candidate list
-#endif
-
-#define H_3D_FIX_UNINIT                   1   // Fix uninitialized flag
+                                              // HS_DMM_SIGNALLING_I0120
+                                              // SHARP_DMM1_I0110 // LUT size reduction for DMM1 proposed in JCT3V-I0110 
+                                              // FAST_SDC_OFFSET_DECISION_I0084
+                                              // SEPARATE_FLAG_I0085
+                                              // H_3D_DELTA_DLT
+                                              // RWTH_DLT_CLIP_I0057               1
+
+
+
+#define H_3D_SINGLE_DEPTH                 1   // Single depth mode proposed in JCT3V-I0095
+
+
 #define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
                                               // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding
@@ -245,9 +249,8 @@
                                               // MTK_DBBP_SIGNALING_H0094    
                                               // H_3D_FIX_DBBP_IVMP        Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 
-
-#define SEC_DBBP_EXPLICIT_SIG_I0077       1   // Remove the partition derivation and signal dbbp_flag only when the partion mode is 2NxN/Nx2N, JCT3V-I0077
-#define SEC_DBBP_DISALLOW_8x8_I0078       1   // Disallow DBBP in 8x8 CU, JCT3V-I0078
-#define SHARP_DBBP_SIMPLE_FLTER_I0109     1   // Simple condition and one dimensional dilter for DBBP
-#define SEC_DBBP_DMM4_THRESHOLD_I0076     1   // Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076
+                                              // SEC_DBBP_EXPLICIT_SIG_I0077       1   // Remove the partition derivation and signal dbbp_flag only when the partition mode is 2NxN/Nx2N, JCT3V-I0077
+                                              // Disallow DBBP in 8x8 CU, JCT3V-I0078
+                                              // SHARP_DBBP_SIMPLE_FLTER_I0109     1   // Simple condition and one dimensional filter for DBBP
+                                              // SEC_DBBP_DMM4_THRESHOLD_I0076     Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076
 
 
@@ -256,8 +259,8 @@
 #define H_3D_FCO                          0   // Flexible coding order for 3D
 #if H_3D_FCO
-#define LGE_FCO_I0116                     1
-#endif
-
-#define SCU_HS_FAST_INTRA_SDC_I0123       1
+#define H_3D_FCO                     1
+#endif
+
+#define H_3D_FAST_INTRA_SDC               1   // I0123
 
 // OTHERS
@@ -271,16 +274,8 @@
 #endif
 
-#define MTK_I0099_VPS_EX2                 1  ///< JCT3V-I0099, sub-PU size signaling and lim_qt_pred_flag in VPS extension 2
-#define MTK_I0099_FIX                     1  ///< Fix the problem of removing encoder only QTL 
-
 // Rate Control
 #define KWU_FIX_URQ                       1
 #define KWU_RC_VIEWRC_E0227               0  ///< JCT3V-E0227, view-wise target bitrate allocation
 #define KWU_RC_MADPRED_E0227              0  ///< JCT3V-E0227, inter-view MAD prediction
-
-#define SEC_VPS_CLEANUP_I0090             1
-#define SEC_HLS_CLEANUP_I0100             1
-
-#define H_3D_FIX_64BIT_SHIFT              1
 #endif // H_3D
 
@@ -292,12 +287,9 @@
 
 // Fixes
-#define FIX_TICKET_79                     1    // Unused VSP code
-#define FIX_TICKET_75                     1    // Bi-pred restriction bug in VSP
-#define FIX_TICKET_68                     1    // MV clipping bug in the sub-PU MPI default MV generation
-#define FIX_TICKET_71                     1    // IC parameters is meaningless in HTM when no training samples are available
-#define FIX_TICKET_77                     1    // Unused variable m_iBitsPerDepthValue
-#define FIX_TICKET_76                     1    // unused functions
-#define FIX_TICKET_62                     1    // buffer overflow for print
-#define FIX_TICKET_61                     1    // layerIdsInSets size check
+
+///// ***** SINGLE DEPTH MODE *********
+#if H_3D_SINGLE_DEPTH
+#define SINGLE_DEPTH_MODE_CAND_LIST_SIZE            2 // size of the sample candidate list
+#endif
 
 ///// ***** VIEW SYNTHESIS OPTIMIZAION *********
@@ -308,5 +300,4 @@
 #define H_3D_VSO_RM_ASSERTIONS            0   // Output VSO assertions
 #define H_3D_VSO_SYNTH_DIST_OUT           0   // Output of synthesized view distortion instead of depth distortion in encoder output
-#define H_3D_VSO_FIX                      1   // This fix should be enabled after verification 
 #endif
 
@@ -321,29 +312,16 @@
 #if H_3D_ARP
 #define H_3D_ARP_WFNR                     3
-#define QC_I0129_ARP_FIX                  1
-#define QC_I0051_ARP_SIMP                 1
-#define SHARP_ARP_CHROMA_I0104            1
-#define MTK_I0072_IVARP_SCALING_FIX       1
 #endif
 
 ///// ***** DEPTH INTRA MODES *********
 #if H_3D_DIM
+                                              // HHI_DMM4_ENC_I0066
 #define H_3D_DIM_DMM                      1   // Depth Modeling Modes
 #define H_3D_DIM_SDC                      1   // Simplified Depth Coding method
 #define H_3D_DIM_DLT                      1   // Depth Lookup Table
-#define HS_DMM_SIGNALLING_I0120  1   
-#define SHARP_DMM1_I0110                  1   // LUT size reduction for DMM1 proposed in JCT3V-I0110 
-#define FIX_WARNING                       1   // fix narrowing conversion of NumPocStCurr0,NumPocStCurr1 at TComSlice.cpp
-#define FAST_SDC_OFFSET_DECISION_I0084    1
-#define SEPARATE_FLAG_I0085               1
-
-#if H_3D_DIM_DLT
-#define H_3D_DELTA_DLT                    1
-#define RWTH_DLT_CLIP_I0057               1
-#endif
+
 #define H_3D_DIM_ENC                      1   // Depth Intra encoder optimizations, includes:
                                               // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
                                               // LG_ZEROINTRADEPTHRESI_A0087
-#define HHI_DMM4_ENC_I0066                1
 #endif
 ///// ***** VIEW SYNTHESIS PREDICTION *********
@@ -370,5 +348,5 @@
 #if H_3D_DBBP
 #define DBBP_INVALID_SHORT                (-4)
-#define RWTH_DBBP_PACK_MODE               SIZE_2NxN
+#define DBBP_PACK_MODE               SIZE_2NxN
 #endif
 
Index: branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1074)
@@ -505,7 +505,4 @@
               READ_CODE(8, uiNumDepthValues, "num_depth_values_in_dlt[i]");   // num_entry
 
-#if !H_3D_DELTA_DLT
-              if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false )       // Single-view DLT Diff Coding
-#endif
               {
                 // The condition if( pcVPS->getNumDepthValues(i) > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component. 
@@ -555,5 +552,4 @@
             }
             
-#if H_3D_DELTA_DLT
             if( pcDLT->getInterViewDltPredEnableFlag( i ) )
             {
@@ -571,8 +567,5 @@
               pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
             }
-#else
-            // store final DLT
-            pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
-#endif
+
           }
         }
@@ -1107,17 +1100,5 @@
 Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
 { 
-#if !MTK_I0099_VPS_EX2
-  UInt uiCode; 
-#if H_3D_QTLPC
-  //GT: This has to go to VPS
-  if( depthFlag )
-  {
-    READ_FLAG( uiCode, "use_qtl_flag" );
-    pcSPS->setUseQTL( uiCode );
-    READ_FLAG( uiCode, "use_pc_flag" );
-    pcSPS->setUsePC( uiCode );
-  }
-#endif
-#endif
+
 }
 #endif
@@ -2106,9 +2087,5 @@
 {
   UInt uiCode; 
-#if SEC_VPS_CLEANUP_I0090
   for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
-#else
-  for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )
-#endif
   {
 #if H_3D_ARP
@@ -2119,20 +2096,12 @@
     pcVPS->setSubPULog2Size(i, 0);
 #endif
-#if !SEC_VPS_CLEANUP_I0090
-    if ( i != 0 )
-#endif
-    {
-#if MTK_I0099_VPS_EX2
+    {
+#if H_3D_IV_MERGE
       READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
-#if SEC_HLS_CLEANUP_I0100
       READ_FLAG( uiCode, "iv_mv_scaling_flag[i]");       pcVPS->setIvMvScalingFlag         ( i, uiCode == 1 ? true : false );
 #endif
-#endif
       if( !( pcVPS->getDepthId( i ) == 1 ) )
       {
 #if H_3D_IV_MERGE
-#if !MTK_I0099_VPS_EX2
-        READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
-#endif
         if( !pcVPS->getNumDirectRefLayers(i) )
         {
@@ -2166,33 +2135,13 @@
       else
       {
-#if !MTK_I0099_VPS_EX2
-#if H_3D_IV_MERGE
-        if(i!=1)
-        {
-          READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
-          if( !pcVPS->getNumDirectRefLayers(i) )
-          {
-            assert( !uiCode );         
-          }
-        }
-#endif
-#if H_3D_SPIVMP
-        if (i!=1)
-        {
-          READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]");     pcVPS->setSubPULog2Size(i, uiCode+3); 
-        }
-#endif
-#endif
 #if H_3D_IV_MERGE
         READ_FLAG( uiCode, "mpi_flag[i]" );             pcVPS->setMPIFlag( i, uiCode == 1 ? true : false );
-#endif
-#if MTK_I0099_VPS_EX2
         READ_UVLC (uiCode, "log2_mpi_sub_PU_size_minus3[i]");     pcVPS->setSubPUMPILog2Size(i, uiCode+3);
 #endif
         READ_FLAG( uiCode, "vps_depth_modes_flag[i]" );             pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );
-#if SEPARATE_FLAG_I0085
+#if H_3D
         READ_FLAG( uiCode, "ivp_flag[i]" );                   pcVPS->setIVPFlag( i, uiCode == 1 ? true : false );
 #endif
-#if MTK_I0099_VPS_EX2
+#if H_3D_QTLPC
         READ_FLAG( uiCode, "lim_qt_pred_flag[i]");                  pcVPS->setLimQtPredFlag     ( i, uiCode == 1 ? true : false ); 
 #endif
@@ -2209,9 +2158,5 @@
 
   READ_UVLC( uiCamParPrecision, "cp_precision" );
-#if SEC_VPS_CLEANUP_I0090
   for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)
-#else
-  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
-#endif
   {
     pcVPS->setCamParPresent         ( viewIndex, false );
@@ -2235,10 +2180,4 @@
     }
   }
-#if !MTK_I0099_VPS_EX2
-  READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3");              pcVPS->setSubPUMPILog2Size( uiCode + 3 ); 
-#endif
-#if !SEC_HLS_CLEANUP_I0100
-  READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 
-#endif
 }
 #endif
@@ -2865,9 +2804,5 @@
     }
 #if H_3D_IC
-#if SEC_HLS_CLEANUP_I0100
     else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
-#else
-    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth())
-#endif
     {
       UInt uiCodeTmp = 0;
@@ -2883,5 +2818,5 @@
     }
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     if(rpcSlice->getIsDepth())
     {
@@ -3009,5 +2944,5 @@
 
 #if H_3D
-#if LGE_FCO_I0116
+#if H_3D_FCO
   if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && rpcSlice->getIsDepth() )
 #else
@@ -3331,5 +3266,5 @@
   assert(0);
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
 {
Index: branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1074)
@@ -126,5 +126,5 @@
   
   Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void  parseSingleDepthMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif  
Index: branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1074)
@@ -420,7 +420,4 @@
     Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
     memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
-#if !FIX_TICKET_79
-    InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
-#endif
 #if H_3D_SPIVMP
     Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
@@ -434,7 +431,4 @@
     m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 
-#if !FIX_TICKET_79
-      , inheritedVSPDisInfo
-#endif
 #if H_3D_SPIVMP
       , pcMvFieldSP, puhInterDirSP
@@ -456,10 +450,4 @@
     m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
 #endif
-#endif
-#if H_3D_VSP && !FIX_TICKET_79
-    if(vspFlag[uiMergeIndex])
-    {
-      pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiAbsPartIdx, 0, uiDepth);
-    }
 #endif
     pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
@@ -546,5 +534,5 @@
     return;
   }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
   if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
@@ -580,5 +568,5 @@
   m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
   setdQPFlag( bCodeDQP );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   }
 #endif
@@ -682,5 +670,5 @@
       break;
     case MODE_INTRA:
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
       if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
         xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth );
@@ -730,5 +718,5 @@
   }
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -749,5 +737,5 @@
   Pel DepthNeighbours[5];
   Int index =0;
-  for( Int i = 0; (i < 5) && (index<MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE) ; i++ )
+  for( Int i = 0; (i < 5) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
   {
     if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i))
@@ -859,5 +847,5 @@
   // get collocated depth block
   UInt uiDepthStride = 0;
-#if LGE_FCO_I0116
+#if H_3D_FCO
   Pel* pDepthPels = pcCU->getVirtualDepthBlock(pcCU->getZorderIdxInCU(), pcCU->getWidth(0), pcCU->getHeight(0), uiDepthStride);
 #else
@@ -932,10 +920,6 @@
   
   // reconstruct final prediction signal by combining both segments
-#if SHARP_DBBP_SIMPLE_FLTER_I0109
   m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize);
-#else
-  m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0));
-#endif
-  
+
   // inter recon
   xDecodeInterTexture( pcCU, 0, uiDepth );
@@ -1311,20 +1295,11 @@
     Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
 
-#if SHARP_DMM1_I0110
     WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode(uiWidth) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] :  &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
-#else
-    WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
-#endif
     TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
 
     uiNumSegments = 2;
 
-#if SHARP_DMM1_I0110
     pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
     uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
-#else
-    pbMask = pcWedgelet->getPattern();
-    uiMaskStride = pcWedgelet->getStride();
-#endif
   }
   if( getDimType( uiLumaPredMode ) == DMM4_IDX )
Index: branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCu.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCu.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCu.h	(revision 1074)
@@ -123,5 +123,5 @@
   Void setdQPFlag               ( Bool b )                { m_bDecodeDQP = b;           }
   Void xFillPCMBuffer           (TComDataCU* pCU, UInt depth);
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
Index: branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1074)
@@ -52,5 +52,5 @@
   m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -152,45 +152,7 @@
   
 #if H_3D_DBBP
-
-#if SEC_DBBP_EXPLICIT_SIG_I0077
-#if SEC_DBBP_DISALLOW_8x8_I0078
   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
-#else
-  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )
-#endif
-#else
-#if SEC_DBBP_DISALLOW_8x8_I0078
-  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )
-#else
-  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
-#endif
-#endif
   {
     decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
-#if !SEC_DBBP_EXPLICIT_SIG_I0077    
-    if( pcCU->getDBBPFlag(uiAbsPartIdx) )
-    {
-      
-      // get collocated depth block
-      UInt uiDepthStride = 0;
-      Pel* pDepthPels = NULL;
-      pDepthPels = pcCU->getVirtualDepthBlock(uiAbsPartIdx, pcCU->getWidth(uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), uiDepthStride);
-      
-      AOF( pDepthPels != NULL );
-      AOF( uiDepthStride != 0 );
-      
-      // derive true partitioning for this CU based on depth
-      // (needs to be done in parsing process as motion vector predictors are also derived during parsing)
-      PartSize eVirtualPartSize = m_pcPrediction->getPartitionSizeFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(uiAbsPartIdx));
-      AOF( eVirtualPartSize != SIZE_NONE );
-      
-      pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);
-      
-      // make sure that DBBP flag is set for both segments
-      UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
-      pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth);
-      pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
-    }
-#endif
   }
 #endif
@@ -311,7 +273,4 @@
           Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
           memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
-#if !FIX_TICKET_79
-          InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
-#endif
 #if H_3D_SPIVMP
           memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
@@ -320,7 +279,4 @@
           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
-#if !FIX_TICKET_79
-            , inheritedVSPDisInfo
-#endif
 #if H_3D_SPIVMP
             , pcMvFieldSP, puhInterDirSP
@@ -334,10 +290,4 @@
           pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
 
-#if !FIX_TICKET_79
-          if(vspFlag[uiMergeIndex])
-          {
-            pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
-          }
-#endif
 #else
 #if H_3D
@@ -360,7 +310,4 @@
         Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
         memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
-#if !FIX_TICKET_79
-        InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
-#endif
 #if H_3D_SPIVMP
         memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
@@ -369,7 +316,4 @@
         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
-#if !FIX_TICKET_79
-          , inheritedVSPDisInfo
-#endif
 #if H_3D_SPIVMP
           , pcMvFieldSP, puhInterDirSP
@@ -382,10 +326,4 @@
           ,numValidMergeCand );
         pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
-#if !FIX_TICKET_79
-        if(vspFlag[uiMergeIndex])
-        {
-          pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
-        }
-#endif
 #else
 #if H_3D
@@ -485,9 +423,5 @@
 #endif
     }
-#if H_3D_VSP && !FIX_TICKET_75
-    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0))
-#else
     if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
-#endif
     {
       pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
Index: branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1074)
@@ -89,5 +89,5 @@
 public:
   virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   virtual Void parseSingleDepthMode       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
 #endif
@@ -179,5 +179,5 @@
   Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
 #endif
Index: branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1074)
@@ -52,5 +52,5 @@
 , m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
 , m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 , m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
@@ -136,5 +136,5 @@
   m_cCUSplitFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
   m_cCUSkipFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_cCUSingleDepthFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
   m_cSingleDepthValueSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
@@ -207,5 +207,5 @@
   m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
   m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
   m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
@@ -432,84 +432,5 @@
 #endif
 
-#if !FIX_TICKET_76
-#if H_3D_DIM_SDC
-Void TDecSbac::xParseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment )
-{
-  assert( pcCU->getSlice()->getIsDepth() );
-  assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
-  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
-  assert( uiSegment < 2 );
-  
-  UInt uiResidual = 0;
-  UInt uiBit      = 0;
-  UInt uiAbsIdx   = 0;
-  UInt uiSign     = 0;
-  Int  iIdx       = 0;
-  
-#if H_3D_DIM_DLT
-  UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );
-#else
-  UInt uiMaxResidualBits = g_bitDepthY;
-#endif
-  assert( uiMaxResidualBits <= g_bitDepthY );
-  
-  m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) );
-  
-#if H_MV_ENC_DEC_TRAC
-  DTRACE_CU("sdc_residual_flag[i]", uiResidual)
-#endif
-  
-  if (uiResidual)
-  {
-    // decode residual sign bit
-    m_pcTDecBinIf->decodeBinEP(uiSign);
-#if H_MV_ENC_DEC_TRAC
-    DTRACE_CU("sdc_residual_sign_flag[i]", uiSign)
-#endif
-    
-    // decode residual magnitude
-    // prefix part
-    UInt uiCount = 0;
-#if H_3D_DIM_DLT
-    UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() );
-#else
-    UInt uiNumDepthValues = ((1 << g_bitDepthY)-1);
-#endif
-    UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2);
-    for ( UInt ui = 0; ui < uiPrefixThreshold; ui++)
-    {
-      m_pcTDecBinIf->decodeBin( uiBit, m_cSDCResidualSCModel.get(0, 0, 0) );
-      if ( uiBit == 0 )
-        break;
-      else
-        uiCount++;
-    }
-    // suffix part
-    if ( uiCount == uiPrefixThreshold )
-    {
-      for ( UInt ui = 0; ui < numBitsForValue(uiNumDepthValues - uiPrefixThreshold); ui++ )
-      {
-        m_pcTDecBinIf->decodeBinEP( uiBit );
-        uiAbsIdx |= uiBit << ui;
-      }
-      uiAbsIdx += uiCount;
-    }
-    else
-    {
-      uiAbsIdx = uiCount;
-    }
-  
-#if H_MV_ENC_DEC_TRAC
-    DTRACE_CU("sdc_residual_abs_minus1[i]", uiAbsIdx)
-#endif
-    
-    uiAbsIdx += 1;
-    iIdx =(Int)(uiSign ? -1 : 1)*uiAbsIdx;
-  }
-  
-  pcCU->setSDCSegmentDCOffset(iIdx, uiSegment, uiAbsPartIdx);
-}
-#endif
-#endif
+
 #endif
 /** Parse I_PCM information. 
@@ -649,5 +570,5 @@
 #endif
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -671,5 +592,5 @@
 
     UInt uiUnaryIdx = 0;
-    UInt uiNumCand = MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE;
+    UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE;
     if ( uiNumCand > 1 )
     {
@@ -778,13 +699,10 @@
 
   UInt uiSymbol;
+  Bool bParseSplitFlag    = true;
+
 #if H_3D_QTLPC
-  Bool bParseSplitFlag    = true;
-
-#if MTK_I0099_VPS_EX2
+
   TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
   Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
-#else
-  TComSPS *sps            = pcCU->getPic()->getSlice(0)->getSPS();
-#endif
   TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
   Bool bDepthMapDetect    = (pcTexture != NULL);
@@ -793,12 +711,8 @@
   Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
 
-#if MTK_I0099_VPS_EX2
-#if LGE_FCO_I0116
+#if H_3D_FCO
   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark())
 #else
   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag)
-#endif
-#else
-  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
 #endif
   {
@@ -843,10 +757,6 @@
 #if H_3D_QTLPC
   Bool bParsePartSize    = true;
-#if MTK_I0099_VPS_EX2
   TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
   Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
-#else
-  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
-#endif
   TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
   Bool bDepthMapDetect   = (pcTexture != NULL);
@@ -857,12 +767,9 @@
   Bool depthDependent = false;
   UInt uiTexturePart = uiMode;
-#if MTK_I0099_VPS_EX2
-#if LGE_FCO_I0116
+
+#if H_3D_FCO
   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark())
 #else
   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag )
-#endif
-#else
-  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
 #endif
   {
@@ -1076,9 +983,5 @@
   {
 #if H_3D_DIM
-#if SEPARATE_FLAG_I0085
     if( pcCU->getSlice()->getVpsDepthModesFlag() || pcCU->getSlice()->getIVPFlag() )
-#else
-    if( pcCU->getSlice()->getVpsDepthModesFlag() )
-#endif
     {
       parseIntraDepth( pcCU, absPartIdx+partOffset*j, depth );
@@ -1222,5 +1125,4 @@
   if( uiIsDimMode )
   {
-#if SEPARATE_FLAG_I0085
     if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag() )
     {
@@ -1228,54 +1130,19 @@
       if( !uiSymbol )
       {
-#if HS_DMM_SIGNALLING_I0120
         pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
-#else
-        pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );
-#endif
       }
       else
       {
-#if HS_DMM_SIGNALLING_I0120
         pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
-#else
-        pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );
-#endif
       }
     }
     else if ( pcCU->getSlice()->getVpsDepthModesFlag() )
     {
-#if HS_DMM_SIGNALLING_I0120
       pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
-#else
-      pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );
-#endif
     }
     else if( pcCU->getSlice()->getIVPFlag() )
     {
-#if HS_DMM_SIGNALLING_I0120
       pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
-#else
-      pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );
-#endif
-    }
-#else
-    m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
-    if( !uiSymbol )
-    {
-#if HS_DMM_SIGNALLING_I0120
-      pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
-#else
-      pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );
-#endif
-    }
-    else
-    {
-#if HS_DMM_SIGNALLING_I0120
-      pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
-#else
-      pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );
-#endif
-    }
-#endif
+    }
   }
 }
@@ -2190,43 +2057,15 @@
   }
 
-#if HS_DMM_SIGNALLING_I0120
   UInt symbol = 1;
   UInt uiNumSegments = isDimMode( pcCU->getLumaIntraDir( absPartIdx ) ) ? 2 : 1;
-#else
-  UInt symbol = 0;
-  UInt uiNumSegments = 0;
-#endif
-
-#if HS_DMM_SIGNALLING_I0120
+
   if( pcCU->isIntra( absPartIdx ) && pcCU->getSDCFlag( absPartIdx ))
   {
-#else
-  if( pcCU->isIntra( absPartIdx ) )
-  {
-    UInt dir     = pcCU->getLumaIntraDir( absPartIdx );
-    uiNumSegments = isDimMode( dir ) ? 2 : 1;
-#endif
+
     m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, 0 ) );
-#if !HS_DMM_SIGNALLING_I0120
-    if( pcCU->getSDCFlag( absPartIdx ) )
-    {
-#endif
       assert( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N );
       pcCU->setTrIdxSubParts( 0, absPartIdx, depth );
       pcCU->setCbfSubParts( 1, 1, 1, absPartIdx, depth );
     }
-#if !HS_DMM_SIGNALLING_I0120
-    else
-    {
-      pcCU->setLumaIntraDirSubParts( dir + symbol, absPartIdx, depth );
-    }
-  }
-  else
-  {
-    uiNumSegments = 1;
-    symbol = 1;
-  }
-#endif
-
 
   for( UInt segment = 0; segment < uiNumSegments; segment++ )
@@ -2289,5 +2128,4 @@
   m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
   
-#if SEC_DBBP_EXPLICIT_SIG_I0077
   PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
   AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
@@ -2295,12 +2133,4 @@
   pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth);
   pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
-#else
-  if( uiSymbol )
-  {
-    pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth);
-    UInt uiCurrPartNumQ = (pcCU->getPic()->getNumPartInCU() >> (2 * uiDepth)) >> 2;
-    pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth);
-  }
-#endif
 }
 #endif
Index: branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 1074)
@@ -129,5 +129,5 @@
   
   Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#if MTK_SINGLE_DEPTH_MODE_I0095  
+#if H_3D_SINGLE_DEPTH  
   Void parseSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif  
@@ -182,5 +182,5 @@
   ContextModel3DBuffer m_cCUSplitFlagSCModel;
   ContextModel3DBuffer m_cCUSkipFlagSCModel;
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
   ContextModel3DBuffer m_cSingleDepthValueSCModel;
Index: branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1074)
@@ -229,5 +229,5 @@
   }
 
-#if !LGE_FCO_I0116
+#if !H_3D_FCO
   if ( pcSlice->getIsDepth())
   {
@@ -1272,5 +1272,5 @@
 
 #if H_3D_IV_MERGE
-#if LGE_FCO_I0116
+#if H_3D_FCO
   if( !pcSlice->getIsDepth() && m_pcCamParsCollector )
 #else
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1074)
@@ -385,5 +385,4 @@
             }
             
-#if H_3D_DELTA_DLT
             if( pcDLT->getInterViewDltPredEnableFlag( i ) )
             {
@@ -395,8 +394,8 @@
               pcDLT->getDeltaDLT(i, piRefDLT, uiRefNum, aiIdx2DepthValue_coded, &uiNumDepthValues_coded);
             }
-#endif
 
             if ( NULL == (puiDltDiffValues = (UInt *)calloc(uiNumDepthValues_coded, sizeof(UInt))) )
             {
+              // This should be changed to an assertion. 
               exit(-1);
             }
@@ -477,8 +476,4 @@
             {
               WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[i]");    // num_entry
-
-#if !H_3D_DELTA_DLT
-              if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false )   // Single-view DLT Diff Coding
-#endif
               {
                 // The condition if( uiNumDepthValues_coded > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component.
@@ -951,17 +946,6 @@
 Void TEncCavlc::codeSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
 {
-#if H_3D_QTLPC
-#if !MTK_I0099_VPS_EX2
-//GT: This has to go to VPS
-if( depthFlag )
-{
-  WRITE_FLAG( pcSPS->getUseQTL() ? 1 : 0, "use_qtl_flag");
-  WRITE_FLAG( pcSPS->getUsePC()  ? 1 : 0, "use_pc_flag");
-}
-#endif
-#endif
-}
-
-
+
+}
 #endif
 
@@ -1805,27 +1789,13 @@
 Void TEncCavlc::codeVPSExtension2( TComVPS* pcVPS )
 { 
-#if SEC_VPS_CLEANUP_I0090
   for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
-#else
-  for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )
-#endif
-  {
-#if !SEC_VPS_CLEANUP_I0090
-    if (i!= 0)
-#endif
-    {
-#if MTK_I0099_VPS_EX2
+  {
+    {
       WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
-#if SEC_HLS_CLEANUP_I0100
       WRITE_FLAG( pcVPS->getIvMvScalingFlag( i ) ? 1 : 0 ,       "iv_mv_scaling_flag[i]" );
-#endif
-
-#endif
+
       if ( !( pcVPS->getDepthId( i ) == 1 ) )
       {
 #if H_3D_IV_MERGE
-#if !MTK_I0099_VPS_EX2
-        WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
-#endif
 #if H_3D_SPIVMP
         WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]");
@@ -1847,29 +1817,14 @@
       else
       {
-#if !MTK_I0099_VPS_EX2
-        if(i!=1)
-        {
-          WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
-        }
-#if H_3D_SPIVMP
-        if (i!=1)
-        {
-          WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]");
-        }
-#endif
-#endif
 #if H_3D_IV_MERGE
         WRITE_FLAG( pcVPS->getMPIFlag( i ) ? 1 : 0 ,          "mpi_flag[i]" );
 #endif
-#if MTK_I0099_VPS_EX2
         WRITE_UVLC( pcVPS->getSubPUMPILog2Size(i)-3, "log2_mpi_sub_PU_size_minus3[i]");
-#endif
+
         WRITE_FLAG( pcVPS->getVpsDepthModesFlag( i ) ? 1 : 0 ,          "vps_depth_modes_flag[i]" );
-#if SEPARATE_FLAG_I0085
+#if H_3D
         WRITE_FLAG( pcVPS->getIVPFlag( i ) ? 1 : 0 ,               "IVP_flag[i]" );
 #endif
-#if MTK_I0099_VPS_EX2
         WRITE_FLAG( pcVPS->getLimQtPredFlag    ( i ) ? 1 : 0 ,          "lim_qt_pred_flag[i]"     ); 
-#endif
 
 #if H_3D_INTER_SDC
@@ -1880,9 +1835,5 @@
   }
   WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" );
-#if SEC_VPS_CLEANUP_I0090
   for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)
-#else
-  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
-#endif
   {
     WRITE_FLAG( pcVPS->getCamParPresent(viewIndex) ? 1 : 0, "cp_present_flag[i]" );
@@ -1902,12 +1853,4 @@
     }
   }
-#if !MTK_I0099_VPS_EX2
-  WRITE_UVLC( pcVPS->getSubPUMPILog2Size( ) - 3, "log2_sub_PU_MPI_size_minus3");
-#endif
-#if H_3D_TMVP
-#if !SEC_HLS_CLEANUP_I0100
-  WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 ,          "iv_mv_scaling_flag" );
-#endif
-#endif
 }
 #endif
@@ -2308,9 +2251,5 @@
     }
 #if H_3D_IC
-#if SEC_HLS_CLEANUP_I0100
     else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
-#else
-    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth())
-#endif
     {
       WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" );
@@ -2321,5 +2260,5 @@
     }
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     if(pcSlice->getIsDepth())
     {
@@ -2385,5 +2324,5 @@
   }
 #if H_3D
-#if LGE_FCO_I0116
+#if H_3D_FCO
   if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && pcSlice->getIsDepth() )
 #else
@@ -2762,5 +2701,5 @@
   assert(0);
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TEncCavlc::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1074)
@@ -129,5 +129,5 @@
   Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx );
 #endif
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 1074)
@@ -414,11 +414,9 @@
 #if H_3D_DIM
   Bool      m_useDMM;
-#if SEPARATE_FLAG_I0085
   Bool      m_useIVP;
-#endif
   Bool      m_useSDC;
   Bool      m_useDLT;
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Bool      m_useSingleDepthMode;
 #endif
@@ -426,11 +424,6 @@
   Bool      m_useMPI;
 #endif
-#if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX
 #if H_3D_QTLPC
   Bool      m_bUseQTL;
-#if !MTK_I0099_VPS_EX2
-  Bool      m_bUsePC;
-#endif
-#endif
 #endif
 #endif
@@ -1013,8 +1006,6 @@
   Bool      getUseDMM                       ()        { return m_useDMM; }
   Void      setUseDMM                       ( Bool b) { m_useDMM = b;    }
-#if SEPARATE_FLAG_I0085
   Bool      getUseIVP                       ()        { return m_useIVP; }
   Void      setUseIVP                       ( Bool b) { m_useIVP = b;    }
-#endif
   Bool      getUseSDC                       ()        { return m_useSDC; }
   Void      setUseSDC                       ( Bool b) { m_useSDC = b;    }
@@ -1022,17 +1013,11 @@
   Void      setUseDLT                       ( Bool b) { m_useDLT = b;    }
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void       setUseSingleDepthMode          ( Bool bVal )    { m_useSingleDepthMode = bVal; }
   Bool       getUseSingleDepthMode          ()               { return m_useSingleDepthMode; }
 #endif
-#if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX
 #if H_3D_QTLPC
   Void      setUseQTL                       ( Bool b ) { m_bUseQTL = b;    }
   Bool      getUseQTL                       ()         { return m_bUseQTL; }
-#if !MTK_I0099_VPS_EX2
-  Void      setUsePC                        ( Bool b ) { m_bUsePC  = b;    }
-  Bool      getUsePC                        ()         { return m_bUsePC;  }
-#endif
-#endif
 #endif
 #if H_3D_IV_MERGE
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1074)
@@ -409,10 +409,6 @@
 
 #if H_3D_QTLPC
-#if MTK_I0099_VPS_EX2
   TComVPS *vps            = pcPic->getSlice(0)->getVPS();
   Bool  bLimQtPredFalg    = vps->getLimQtPredFlag(pcPic->getSlice(0)->getLayerId()); 
-#else
-  TComSPS *sps            = pcPic->getSlice(0)->getSPS();
-#endif
   TComPic *pcTexture      = rpcBestCU->getSlice()->getTexturePic();
 
@@ -535,17 +531,8 @@
 #if H_3D_QTLPC
       //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
-
-#if MTK_I0099_VPS_EX2
-#if MTK_I0099_FIX
-#if LGE_FCO_I0116
+#if H_3D_FCO
       if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ) && pcTexture->getReconMark())
 #else
       if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ))
-#endif
-#else
-      if(depthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFalg)
-#endif
-#else
-      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL())
 #endif
       {
@@ -702,13 +689,5 @@
 
 #if H_3D_QTLPC      
-#if MTK_I0099_VPS_EX2
-#if MTK_I0099_FIX
       if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ))
-#else
-      if(depthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFalg)
-#endif
-#else
-      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL())
-#endif
       {
         bTrySplitDQP = bTrySplit;
@@ -734,5 +713,5 @@
     }
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
     if(rpcBestCU->getSlice()->getApplySingleDepthMode())
@@ -1057,13 +1036,9 @@
               rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0     
 #if H_3D_DIM_ENC
-#if HHI_DMM4_ENC_I0066
               || rpcBestCU->getSlice()->getIsDepth()
-#else
-            || ( rpcBestCU->getSlice()->getIsDepth() && rpcBestCU->getSlice()->isIRAP() )
-#endif
 #endif
             ) // avoid very complex intra if it is unlikely
           {
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
             Bool bOnlyIVP = false;
             if( rpcBestCU->getSlice()->getIsDepth() && !(rpcBestCU->getSlice()->isIRAP()) && 
@@ -1098,5 +1073,5 @@
                 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
                 {
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
                   xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN, bOnlyIVP );
 #else
@@ -1590,5 +1565,5 @@
     return;
   }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_pcEntropyCoder->encodeSingleDepthMode( pcCU, uiAbsPartIdx );
   if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
@@ -1627,5 +1602,5 @@
   m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP );
   setdQPFlag( bCodeDQP );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   }
 #endif
@@ -1863,7 +1838,4 @@
     Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
     memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
-#if !FIX_TICKET_79
-    InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
-#endif
 #if H_3D_SPIVMP
     Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
@@ -1878,7 +1850,4 @@
     rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
-#if !FIX_TICKET_79
-      , inheritedVSPDisInfo
-#endif
 #if H_3D_SPIVMP
       , pcMvFieldSP, puhInterDirSP
@@ -1895,9 +1864,5 @@
 
 #else
-#if FIX_TICKET_79
     rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand );
-#else
-    rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand );
-#endif
 #endif
 
@@ -1942,7 +1907,4 @@
 #if H_3D_VSP
           rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
-#if !FIX_TICKET_79
-          rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth );
-#endif
 #endif
 #if H_3D_DDD
@@ -2043,5 +2005,5 @@
 
           rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
           rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
 #endif
@@ -2061,12 +2023,7 @@
           if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual )
           {
-#if FAST_SDC_OFFSET_DECISION_I0084
             Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE};
             for( Int uiOffest = 1 ; uiOffest <= 5 ; uiOffest++ )
-#else
-            for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )
-#endif
             {
-#if FAST_SDC_OFFSET_DECISION_I0084
               if( uiOffest > 3)
               {
@@ -2084,5 +2041,4 @@
                 }
               }
-#endif
               if( rpcTempCU != rpcTempCUPre )
               {
@@ -2091,5 +2047,5 @@
               }
               rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
               rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
 #endif
@@ -2106,5 +2062,4 @@
               }
 #endif
-#if FAST_SDC_OFFSET_DECISION_I0084
               Int iSdcOffset = 0;
               if(uiOffest % 2 == 0)
@@ -2127,13 +2082,4 @@
                 dOffsetCost [uiOffest -1] = rpcTempCU->getTotalCost();
               }
-#else
-              m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 
-                m_ppcOrigYuv[uhDepth], 
-                ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth], 
-                m_ppcResiYuvTemp[uhDepth], 
-                m_ppcRecoYuvTemp[uhDepth],
-                uiOffest,
-                uhDepth );
-#endif
 
               xCheckDQP( rpcTempCU );
@@ -2253,5 +2199,5 @@
   
   rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
 #endif
@@ -2342,12 +2288,7 @@
   if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && ePartSize == SIZE_2Nx2N)
   {
-#if FAST_SDC_OFFSET_DECISION_I0084
     Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE};
     for( Int uiOffest = 1 ; uiOffest <= 5 ; uiOffest++ )
-#else
-    for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )
-#endif
-    {
-#if FAST_SDC_OFFSET_DECISION_I0084
+    {
       if( uiOffest > 3)
       {
@@ -2365,5 +2306,5 @@
         }
       }
-#endif
+
       if( rpcTempCU != rpcTempCUPre )
       {
@@ -2373,5 +2314,5 @@
       }
       rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
       rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
 #endif
@@ -2389,5 +2330,4 @@
 #endif
 
-#if FAST_SDC_OFFSET_DECISION_I0084
       Int iSdcOffset = 0;
       if(uiOffest % 2 == 0)
@@ -2410,13 +2350,4 @@
         dOffsetCost [uiOffest -1] = rpcTempCU->getTotalCost();
       }
-#else
-      m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 
-        m_ppcOrigYuv[uhDepth],
-        ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],
-        m_ppcResiYuvTemp[uhDepth],
-        m_ppcRecoYuvTemp[uhDepth],
-        uiOffest,
-        uhDepth );
-#endif
 
       xCheckDQP( rpcTempCU );
@@ -2493,5 +2424,5 @@
   }
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TEncCu::xCheckRDCostSingleDepth( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
 {
@@ -2560,4 +2491,5 @@
 }
 #endif
+
 Void TEncCu::xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG )
 {
@@ -2581,5 +2513,6 @@
   AOF( uiWidth == uiHeight );
   
-#if SEC_DBBP_DISALLOW_8x8_I0078
+#if H_3D_DBBP
+  // Is this correct here, was under the macro SEC_DBBP_DISALLOW_8x8_I0078, however the function is related to Single Depth Mode
   if(uiWidth <= 8)
   {
@@ -2592,5 +2525,5 @@
   // fetch virtual depth block
   UInt uiDepthStride = 0;
-#if LGE_FCO_I0116
+#if H_3D_FCO
   Pel* pDepthPels = rpcTempCU->getVirtualDepthBlock(rpcTempCU->getZorderIdxInCU(), uiWidth, uiHeight, uiDepthStride);
 #else
@@ -2688,10 +2621,5 @@
   
   // reconstruct final prediction signal by combining both segments
-#if SHARP_DBBP_SIMPLE_FLTER_I0109
   m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize);
-#else
-  m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight);
-#endif
-  
   m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false );
   
@@ -2701,5 +2629,5 @@
 #endif
 
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
 Void TEncCu::xCheckRDCostIntra( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize, Bool bOnlyIVP )
 #else
@@ -2721,5 +2649,5 @@
 
   rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
 #endif
@@ -2733,5 +2661,5 @@
     m_pcPredSearch->preestChromaPredMode( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth] );
   }
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
   m_pcPredSearch  ->estIntraPredQT      ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, bSeparateLumaChroma, bOnlyIVP );
 #else
@@ -2751,5 +2679,5 @@
   }
   m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
   if(!rpcTempCU->getSingleDepthFlag(0))
@@ -2768,5 +2696,5 @@
   m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP );
   setdQPFlag( bCodeDQP );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   }
 #endif        
@@ -2798,5 +2726,5 @@
 
   rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
 #endif
@@ -2817,5 +2745,5 @@
   }
   m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
 #endif
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCu.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCu.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCu.h	(revision 1074)
@@ -159,8 +159,8 @@
   Void  xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false );
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void  xCheckRDCostSingleDepth   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
 #endif
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
   Void  xCheckRDCostIntra   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bOnlyIVP );
 #else
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1074)
@@ -119,5 +119,5 @@
   m_pcEntropyCoderIf->codeSkipFlag( pcCU, uiAbsPartIdx );
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TEncEntropy::encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
@@ -185,5 +185,4 @@
   else
   {
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     Int ICEnableCandidate = pcCU->getSlice()->getICEnableCandidate(pcCU->getSlice()->getDepth());
     Int ICEnableNum = pcCU->getSlice()->getICEnableNum(pcCU->getSlice()->getDepth());
@@ -195,11 +194,4 @@
     pcCU->getSlice()->setICEnableCandidate(pcCU->getSlice()->getDepth(), ICEnableCandidate);
     pcCU->getSlice()->setICEnableNum(pcCU->getSlice()->getDepth(), ICEnableNum);
-#else
-    g_aICEnableCANDIDATE[pcCU->getSlice()->getDepth()]++;
-    if(pcCU->getICFlag(uiAbsPartIdx))
-    {
-      g_aICEnableNUM[pcCU->getSlice()->getDepth()]++;
-    }
-#endif
   }
   if( pcCU->isICFlagRequired( uiAbsPartIdx ) )
@@ -273,42 +265,10 @@
   }
   
+  m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth );
+  
 #if H_3D_DBBP
-#if! SEC_DBBP_EXPLICIT_SIG_I0077
-  PartSize eVirtualPartSize = pcCU->getPartitionSize(uiAbsPartIdx);
-  if( pcCU->getDBBPFlag(uiAbsPartIdx) )
-  {
-    AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
-    
-    // temporarily change partition size for DBBP blocks
-    pcCU->setPartSizeSubParts(RWTH_DBBP_PACK_MODE, uiAbsPartIdx, uiDepth);
-  }
-#endif
-#endif
-  
-  m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth );
-  
-#if H_3D_DBBP
-#if SEC_DBBP_EXPLICIT_SIG_I0077
-#if SEC_DBBP_DISALLOW_8x8_I0078
   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
-#else
-  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )
-#endif
-#else
-#if SEC_DBBP_DISALLOW_8x8_I0078
-  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )
-#else
-  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
-#endif
-#endif
   {
     encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD);
-#if !SEC_DBBP_EXPLICIT_SIG_I0077
-    if( pcCU->getDBBPFlag(uiAbsPartIdx) )
-    {
-      // restore virtual partition size for DBBP blocks
-      pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);
-    }
-#endif
   }
 #endif
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h	(revision 1074)
@@ -86,5 +86,5 @@
   virtual Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
   virtual Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   virtual Void codeSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
 #endif
@@ -174,5 +174,5 @@
   Void encodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
   Void encodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD=false );
 #endif
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1074)
@@ -160,7 +160,7 @@
 #endif
 #endif
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
-  m_aICEnableCandidate           = pcTEncTop->getICEnableCandidate(); 
-  m_aICEnableNum           = pcTEncTop->getICEnableNum(); 
+#if H_3D_IC
+  m_aICEnableCandidate   = pcTEncTop->getICEnableCandidate(); 
+  m_aICEnableNum         = pcTEncTop->getICEnableNum(); 
 #endif
 #if KWU_FIX_URQ
@@ -937,5 +937,5 @@
     pcSlice->setRefPicList ( rcListPic );
 #endif
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     TEncTop* pcEncTop = (TEncTop*) m_pcCfg;
     bool enableSingleDepthMode=false;
@@ -971,5 +971,5 @@
 #endif    
 #endif
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
+#if H_3D_IC
     pcSlice->setICEnableCandidate( m_aICEnableCandidate );         
     pcSlice->setICEnableNum( m_aICEnableNum );         
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncGOP.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncGOP.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncGOP.h	(revision 1074)
@@ -116,7 +116,7 @@
 #endif
 #endif
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
-  Int *m_aICEnableCandidate; 
-  Int *m_aICEnableNum; 
+#if H_3D_IC
+  Int*                    m_aICEnableCandidate; 
+  Int*                    m_aICEnableNum; 
 #endif
   //--Adaptive Loop filter
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1074)
@@ -58,5 +58,5 @@
 , m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
 , m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 , m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
@@ -134,5 +134,5 @@
   
   m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
   m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
@@ -214,5 +214,5 @@
       curCost  = m_cCUSplitFlagSCModel.calcCost       ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG );
       curCost += m_cCUSkipFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
       curCost += m_cCUSingleDepthFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
       curCost += m_cSingleDepthValueSCModel.calcCost         ( curSliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
@@ -255,9 +255,5 @@
       curCost += m_CUTransquantBypassFlagSCModel.calcCost( curSliceType, qp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG );
 #if H_3D_DIM
-#if SEPARATE_FLAG_I0085
     if( m_pcSlice->getVpsDepthModesFlag() || m_pcSlice->getIVPFlag() )
-#else
-    if( m_pcSlice->getVpsDepthModesFlag() )
-#endif
     {
       curCost += m_cDepthIntraModeSCModel.calcCost    ( curSliceType, qp, (UChar*)INIT_DEPTH_INTRA_MODE );
@@ -291,5 +287,5 @@
   
   m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
   m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
@@ -454,5 +450,5 @@
   m_pcBinIf->encodeBinsEP( bins, numBins );
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TEncSbac::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
@@ -462,5 +458,5 @@
   {
     UInt uiUnaryIdx = (UInt) pcCU->getSingleDepthValue(uiAbsPartIdx);
-    UInt uiNumCand = MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE;
+    UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE;
     if ( uiNumCand > 1 )
     {
@@ -563,92 +559,4 @@
 
 #endif
-
-#if !FIX_TICKET_76
-#if H_3D_DIM_SDC
-Void TEncSbac::xCodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )
-{
-  assert( pcCU->getSlice()->getIsDepth() );
-  assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
-  assert( pcCU->getSDCFlag(uiAbsPartIdx) );
-  assert( uiSegment < 2 );
-  
-  Pel segmentDCOffset = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);
-  
-  UInt uiResidual = segmentDCOffset == 0 ? 0 : 1;
-  UInt uiSign     = segmentDCOffset < 0 ? 1 : 0;
-  UInt uiAbsIdx   = abs(segmentDCOffset);
-
-#if H_3D_DIM_DLT
-  UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );
-#else
-  UInt uiMaxResidualBits = g_bitDepthY;
-#endif
-  assert( uiMaxResidualBits <= g_bitDepthY );
-  
-  // residual flag
-  m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) );
-#if H_MV_ENC_DEC_TRAC
-  DTRACE_CU("sdc_residual_flag[i]", uiResidual)
-#endif  
-  
-  if (uiResidual)
-  {
-    // encode sign bit of residual
-    m_pcBinIf->encodeBinEP( uiSign );
-#if H_MV_ENC_DEC_TRAC
-    DTRACE_CU("sdc_residual_sign_flag[i]", uiSign)
-#endif
-#if H_3D_DIM_DLT    
-    UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() );
-#else
-    UInt uiNumDepthValues = ((1 << g_bitDepthY)-1);
-#endif
-
-    assert(uiAbsIdx <= uiNumDepthValues);
-    
-    // encode residual magnitude
-    uiAbsIdx -= 1;
-
-#if H_MV_ENC_DEC_TRAC
-    DTRACE_CU("sdc_residual_abs_minus1[i]", uiAbsIdx)
-#endif
-
-    // prefix part
-    if ( uiAbsIdx == 0 )
-    {
-      m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) );
-    }
-    else
-    {
-      UInt l = uiAbsIdx;
-      UInt k = 0;
-      UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2);
-      while ( l > 0 && k < uiPrefixThreshold )
-      {
-        m_pcBinIf->encodeBin( 1, m_cSDCResidualSCModel.get(0, 0, 0) );
-        l--;
-        k++;
-      }
-      if ( uiAbsIdx < uiPrefixThreshold )
-      {
-        m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) );
-      }      
-      else
-      { // suffix part
-        uiAbsIdx -= uiPrefixThreshold;
-        UInt uiSuffixLength = numBitsForValue(uiNumDepthValues - uiPrefixThreshold);
-        UInt uiBitInfo = 0;
-        for ( Int i = 0; i < uiSuffixLength; i++)
-        {
-          uiBitInfo = ( uiAbsIdx & ( 1 << i ) ) >> i;
-          m_pcBinIf->encodeBinEP( uiBitInfo);
-        }
-      }
-    }
-    
-  }
-}
-#endif
-#endif
 #endif
 
@@ -717,10 +625,6 @@
   PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
 #if H_3D_QTLPC
-#if MTK_I0099_VPS_EX2
   TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
   Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
-#else
-  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
-#endif
   TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
   Bool bDepthMapDetect   = (pcTexture != NULL);
@@ -731,12 +635,9 @@
   Bool depthDependent = false;
   UInt uiTexturePart = eSize;
-#if MTK_I0099_VPS_EX2
-#if LGE_FCO_I0116
+
+#if H_3D_FCO
   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag && pcTexture->getReconMark())
 #else
   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag )
-#endif
-#else
-  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC() )
 #endif
   {
@@ -1097,10 +998,6 @@
   Bool bCodeSplitFlag    = true;
 
-#if MTK_I0099_VPS_EX2
   TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
   Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
-#else
-  TComSPS *sps           = pcCU->getPic()->getSlice(0)->getSPS();
-#endif
   TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
   Bool bDepthMapDetect   = (pcTexture != NULL);
@@ -1109,12 +1006,8 @@
   Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
 
-#if MTK_I0099_VPS_EX2
-#if LGE_FCO_I0116
+#if H_3D_FCO
   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag && pcTexture->getReconMark() )
 #else
   if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag  )
-#endif
-#else
-  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC())
 #endif
   {
@@ -1167,9 +1060,5 @@
     dir[j] = pcCU->getLumaIntraDir( absPartIdx+partOffset*j );
 #if H_3D_DIM
-#if SEPARATE_FLAG_I0085
     if( pcCU->getSlice()->getVpsDepthModesFlag() ||  pcCU->getSlice()->getIVPFlag() )
-#else
-    if( pcCU->getSlice()->getVpsDepthModesFlag() )
-#endif
     {
       codeIntraDepth( pcCU, absPartIdx+partOffset*j );
@@ -1317,12 +1206,8 @@
     }
     //mode coding
-#if SEPARATE_FLAG_I0085
     if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag())
     {
       m_pcBinIf->encodeBin( uiCodeIdx == 0 ? 0 : 1, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
     }
-#else
-    m_pcBinIf->encodeBin( uiCodeIdx == 0 ? 0 : 1, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
-#endif
   }
 }
@@ -2368,24 +2253,9 @@
   }
 
-#if HS_DMM_SIGNALLING_I0120
   UInt uiNumSegments = isDimMode( pcCU->getLumaIntraDir( absPartIdx ) ) ? 2 : 1;
   UInt dimDeltaDC = 1;
-#else
-  UInt uiNumSegments = 0;
-  UInt dimDeltaDC = 0;
-#endif
-
-#if HS_DMM_SIGNALLING_I0120
+
   if( pcCU->isIntra( absPartIdx ) && pcCU->getSDCFlag( absPartIdx ))
   {
-#else
-  if( pcCU->isIntra( absPartIdx ) )
-  {
-    UInt dir     = pcCU->getLumaIntraDir( absPartIdx );
-    uiNumSegments = isDimMode( dir ) ? 2 : 1;
-
-    if( pcCU->getSDCFlag( absPartIdx ) )
-    {
-#endif
       if( uiNumSegments == 1 )
       {
@@ -2396,20 +2266,6 @@
         dimDeltaDC = ( pcCU->getSDCSegmentDCOffset( 0, absPartIdx ) || pcCU->getSDCSegmentDCOffset( 1, absPartIdx ) ) ? 1 : 0;
       }
-#if !HS_DMM_SIGNALLING_I0120
-    }
-    else
-    {
-      dimDeltaDC = isDimDeltaDC( dir );
-    }
-#endif
     m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get( 0, 0, 0 ) );
   }
-#if !HS_DMM_SIGNALLING_I0120
-  else //all-zero inter SDC is not allowed
-  {
-    uiNumSegments = 1;
-    dimDeltaDC = 1;
-  }
-#endif
 
   if( dimDeltaDC )
@@ -2447,8 +2303,6 @@
 Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
-#if SEC_DBBP_EXPLICIT_SIG_I0077
   PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
   AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
-#endif
   AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
   AOF( !pcCU->getSlice()->getIsDepth() );
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSbac.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSbac.h	(revision 1074)
@@ -130,9 +130,4 @@
   Void  xCodeDmm1WedgeIdx    ( UInt uiTabIdx, Int iNumBit );
 #endif
-#if !FIX_TICKET_76
-#if H_3D_DIM_SDC
-  Void  xCodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
-#endif
-#endif
 #endif
   
@@ -155,5 +150,5 @@
   Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx );
 #endif
@@ -224,5 +219,5 @@
   ContextModel3DBuffer m_cCUSplitFlagSCModel;
   ContextModel3DBuffer m_cCUSkipFlagSCModel;
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
   ContextModel3DBuffer m_cSingleDepthValueSCModel;
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1074)
@@ -915,5 +915,5 @@
         }
         m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
         m_pcEntropyCoder->encodeSingleDepthMode(pcCU, 0, true );
         if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
@@ -921,5 +921,5 @@
         m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
       }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
       else
       {
@@ -927,5 +927,5 @@
       }
 #endif      
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
       if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
       {
@@ -945,9 +945,9 @@
         }
       }
-#if MTK_SINGLE_DEPTH_MODE_I0095
-    }
-#endif
-    }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
+    }
+#endif
+    }
+#if H_3D_SINGLE_DEPTH
       if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
       {
@@ -995,5 +995,5 @@
     }
   }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     }
 #endif
@@ -1859,5 +1859,5 @@
   dRDCost  += dSingleCost;
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void TEncSearch::xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel *DepthNeighbor )
 {
@@ -1970,16 +1970,8 @@
       UInt dimType   = getDimType  ( uiLumaPredMode );
       UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
-#if SHARP_DMM1_I0110
       UInt uiBaseWidth = pcCU->isDMM1UpscaleMode(uiWidth) ? pcCU->getDMM1BasePatternWidth(uiWidth) : uiWidth;
       if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiBaseWidth]].size() && dimType == DMM1_IDX )
-#else
-      if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
-#endif
-      {
-#if SHARP_DMM1_I0110
+      {
         if (g_aucConvertToBit[uiBaseWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
-#else
-        if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
-#endif
         {                                    
           patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
@@ -2043,19 +2035,10 @@
     Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
 
-#if SHARP_DMM1_I0110
     WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
-#else
-    WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
-#endif
     TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
 
     uiNumSegments = 2;
-#if SHARP_DMM1_I0110
     pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern( uiWidth ) : pcWedgelet->getPattern();
     uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
-#else
-    pbMask = pcWedgelet->getPattern();
-    uiMaskStride = pcWedgelet->getStride();
-#endif
   }
   if( getDimType( uiLumaPredMode ) == DMM4_IDX )
@@ -2878,5 +2861,5 @@
   pcCU->setChromIntraDirSubParts( uiBestMode, 0, pcCU->getDepth( 0 ) );
 }
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
 Void 
 TEncSearch::estIntraPredSingleDepth( TComDataCU* pcCU, 
@@ -2900,5 +2883,5 @@
   Pel DepthNeighbours[5];
   //construction of depth candidates
-  for( Int i = 0; (i < 5)  && (index<MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE) ; i++ )
+  for( Int i = 0; (i < 5)  && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
   {
     if(!pcCU->getNeighDepth (0, 0, &testDepth, i))
@@ -2983,5 +2966,5 @@
                             UInt&       ruiDistC,
                             Bool        bLumaOnly
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
                           , Bool        bOnlyIVP
 #endif
@@ -3032,5 +3015,5 @@
     Int numModesForFullRD = g_aucIntraModeNumFast[ uiWidthBit ];
     
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
     if( bOnlyIVP )
     {
@@ -3080,5 +3063,4 @@
         UInt   iModeBits = xModeBitsIntra( pcCU, uiMode, uiPU, uiPartOffset, uiDepth, uiInitTrDepth );
 #if H_3D_VSO // M35
-#if H_3D_VSO_FIX // This fix should be enabled after verification 
         Double dLambda;
         if ( m_pcRdCost->getUseLambdaScaleVSO() )
@@ -3092,7 +3074,4 @@
 
         Double cost      = (Double)uiSad + (Double)iModeBits * dLambda;
-#else
-        Double cost      = (Double)uiSad + (Double)iModeBits * m_pcRdCost->getSqrtLambda();
-#endif
 #else
         Double cost      = (Double)uiSad + (Double)iModeBits * m_pcRdCost->getSqrtLambda();
@@ -3135,5 +3114,5 @@
       }
     }
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
     }
 #endif
@@ -3143,10 +3122,5 @@
     if( m_pcEncCfg->getIsDepth() && uiWidth >= DIM_MIN_SIZE && uiWidth <= DIM_MAX_SIZE && uiWidth == uiHeight )
     {
-#if HHI_DMM4_ENC_I0066
-#if SEPARATE_FLAG_I0085
       if( bOnlyIVP && m_pcEncCfg->getUseIVP() )
-#else
-      if( bOnlyIVP )
-#endif
       {
         TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
@@ -3158,16 +3132,9 @@
         pcCU->setDimDeltaDC( DMM4_IDX, 1, uiPartOffset, deltaDC2 );
 
-#if HS_DMM_SIGNALLING_I0120
         uiRdModeList[ numModesForFullRD++ ] = (DMM4_IDX+DIM_OFFSET);
-#else
-        uiRdModeList[ numModesForFullRD++ ] = (2*DMM4_IDX  +DIM_OFFSET);
-        if( deltaDC1 != 0 || deltaDC2 != 0 )
-          uiRdModeList[ numModesForFullRD++ ] = (2*DMM4_IDX+1+DIM_OFFSET);
-#endif
         dmm4Segmentation->destroy(); delete dmm4Segmentation;
       }
       else
       {
-#endif
 #if H_3D_FAST_DEPTH_INTRA
       Int  threshold    = max(((pcCU->getQP(0))>>3)-1,3);
@@ -3177,9 +3144,5 @@
 
 #if H_3D_DIM_DMM
-#if SEPARATE_FLAG_I0085
       if( ( m_pcEncCfg->getUseDMM() || m_pcEncCfg->getUseIVP() )
-#else
-      if( m_pcEncCfg->getUseDMM()
-#endif
 #if H_3D_FAST_DEPTH_INTRA
          && (uiRdModeList[0] != PLANAR_IDX || varCU >= varThreshold)
@@ -3187,5 +3150,4 @@
         )
       {
-#if SEPARATE_FLAG_I0085
         UInt uiStart, uiEnd;
         if( m_pcEncCfg->getUseDMM() &&  m_pcEncCfg->getUseIVP() )
@@ -3210,11 +3172,8 @@
         }
         for( UInt dmmType = uiStart; dmmType < uiEnd; dmmType++ )
-#else
-        for( UInt dmmType = 0; dmmType < DMM_NUM_TYPE; dmmType++ )
-#endif
         {
 #if H_3D_FCO
             TComPic* picTexture  = pcCU->getSlice()->getIvPic(false, pcCU->getSlice()->getViewIndex() );
-#if LGE_FCO_I0116
+#if H_3D_FCO
             if ( !picTexture->getReconMark() && (DMM4_IDX == dmmType ) )
 #else
@@ -3234,10 +3193,6 @@
               xSearchDmm1Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx );
               pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dmmType,  uiPartOffset, uiDepth + uiInitTrDepth );
-#if SHARP_DMM1_I0110
               biSegmentation = pcCU->isDMM1UpscaleMode( uiWidth ) ? 
                   &(g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])][uiTabIdx]) : &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
-#else
-              biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
-#endif
             } break;
 
@@ -3254,5 +3209,4 @@
           if( biSegmentation )
           {
-#if SHARP_DMM1_I0110
             if( dmmType == DMM1_IDX && pcCU->isDMM1UpscaleMode( uiWidth ) ){
                 xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getScaledPattern(uiWidth), uiWidth, uiWidth, uiHeight, deltaDC1, deltaDC2 );
@@ -3262,25 +3216,13 @@
                 xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 );
             }
-#else
-            xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 );
-#endif
             pcCU->setDimDeltaDC( dmmType, 0, uiPartOffset, deltaDC1 );
             pcCU->setDimDeltaDC( dmmType, 1, uiPartOffset, deltaDC2 );
 
-#if HS_DMM_SIGNALLING_I0120
             uiRdModeList[ numModesForFullRD++ ] = (dmmType  +DIM_OFFSET);
-#else
-            uiRdModeList[ numModesForFullRD++ ] = (2*dmmType  +DIM_OFFSET);
-#if HHI_DMM4_ENC_I0066
-            if( deltaDC1 != 0 || deltaDC2 != 0 )
-#endif
-            uiRdModeList[ numModesForFullRD++ ] = (2*dmmType+1+DIM_OFFSET);
-#endif
-
             if( DMM4_IDX == dmmType ) { biSegmentation->destroy(); delete biSegmentation; }
           }
         }
       }
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
       }
 #endif
@@ -3295,5 +3237,5 @@
     
     UInt    uiBestPUMode  = 0;
-#if SCU_HS_FAST_INTRA_SDC_I0123
+#if H_3D_FAST_INTRA_SDC
     UInt    uiBestPUModeConv  = 0;
     UInt    uiSecondBestPUModeConv  = 0;
@@ -3309,5 +3251,5 @@
     Double  dBestPUCost   = MAX_DOUBLE;
 
-#if SCU_HS_FAST_INTRA_SDC_I0123
+#if H_3D_FAST_INTRA_SDC
     Double  dBestPUCostConv   = MAX_DOUBLE;
     UInt varCU      = m_pcRdCost->calcVAR(piOrg, uiStride, uiWidth,uiHeight,pcCU->getDepth(0));
@@ -3319,5 +3261,5 @@
     Pel     apBestDCOffsets[2] = {0,0};
 #endif
-#if SCU_HS_FAST_INTRA_SDC_I0123
+#if H_3D_FAST_INTRA_SDC
     for( UInt uiMode = 0; uiMode < numModesForFullRD + rdSDC; uiMode++ )
 #else
@@ -3326,9 +3268,9 @@
     {
       // set luma prediction mode
-#if !SCU_HS_FAST_INTRA_SDC_I0123
+#if !H_3D_FAST_INTRA_SDC
      UInt uiOrgMode = uiRdModeList[uiMode];  
 #endif
       
-#if SCU_HS_FAST_INTRA_SDC_I0123
+#if H_3D_FAST_INTRA_SDC
       UInt uiOrgMode;
       if (uiMode < numModesForFullRD)
@@ -3356,5 +3298,5 @@
       
 #if H_3D_DIM_SDC
-#if SCU_HS_FAST_INTRA_SDC_I0123
+#if H_3D_FAST_INTRA_SDC
       Bool bTestSDC = ( m_pcEncCfg->getUseSDC() && pcCU->getSDCAvailable(uiPartOffset) && uiMode >= numModesForFullRD);
 #else
@@ -3364,16 +3306,11 @@
       for( UInt uiSDC=0; uiSDC<=(bTestSDC?1:0); uiSDC++ )
       {
-#if SCU_HS_FAST_INTRA_SDC_I0123
+#if H_3D_FAST_INTRA_SDC
         if (!uiSDC && uiMode >= numModesForFullRD) continue;
 #endif
         pcCU->setSDCFlagSubParts( (uiSDC != 0), uiPartOffset, uiDepth + uiInitTrDepth );
-#if FAST_SDC_OFFSET_DECISION_I0084
         Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE};
         for( Int iOffset = 1; iOffset <= 5; iOffset++ )
-#else
-        for( Int iSDCDeltaResi = -2; iSDCDeltaResi <= 2; iSDCDeltaResi++ )
-#endif
-        {
-#if FAST_SDC_OFFSET_DECISION_I0084
+        {
           Int iSDCDeltaResi = 0;
           if(iOffset % 2 == 0)
@@ -3385,10 +3322,8 @@
             iSDCDeltaResi = -1 * (iOffset >> 1);
           }
-#endif
           if( ( uiSDC == 0 ) && iSDCDeltaResi != 0 )
           {
             continue;
           }
-#if FAST_SDC_OFFSET_DECISION_I0084
           if( iOffset > 3)
           {
@@ -3407,5 +3342,4 @@
           }
 #endif
-#endif
       
 #if H_3D_DIM_ENC || H_3D_DIM_SDC
@@ -3452,10 +3386,8 @@
           // start encoding with SDC
           xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi );
-#if FAST_SDC_OFFSET_DECISION_I0084
           if ( testZeroResi == 0 && iOffset <= 3 )
           {
             dOffsetCost [iOffset -1] = dPUCost;
           }
-#endif
         }
         else
@@ -3465,5 +3397,5 @@
 #if H_3D_DIM_ENC
           xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost, (testZeroResi != 0) );
-#if SCU_HS_FAST_INTRA_SDC_I0123    
+#if H_3D_FAST_INTRA_SDC    
       if( dPUCost < dBestPUCostConv )
       {
@@ -4017,7 +3949,4 @@
 #if H_3D_VSP
                                  , Int* vspFlag
-#if !FIX_TICKET_79
-                                 , InheritedVSPDisInfo*  inheritedVSPDisInfo
-#endif
 #endif
 #if H_3D_SPIVMP
@@ -4079,7 +4008,4 @@
       pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand);
       pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
-#if H_3D_VSP && !FIX_TICKET_79
-                                        , inheritedVSPDisInfo
-#endif
 #if H_3D_SPIVMP
         , pcMvFieldSP, puhInterDirSP
@@ -4109,7 +4035,4 @@
     pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand);
     pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours
-#if H_3D_VSP && !FIX_TICKET_79
-                                      , inheritedVSPDisInfo
-#endif
 #if H_3D_SPIVMP
       , pcMvFieldSP, puhInterDirSP
@@ -4132,9 +4055,5 @@
 #endif
   }
-#if H_3D_VSP && !FIX_TICKET_75
-  xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours,vspFlag, numValidMergeCand );
-#else
   xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
-#endif
 
 #if H_3D_DBBP
@@ -4164,7 +4083,4 @@
 #if H_3D_VSP
     pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
-#if !FIX_TICKET_79
-    pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
-#endif
 #endif
 
@@ -4266,9 +4182,5 @@
  * \returns Void
  */
-#if H_3D_VSP && !FIX_TICKET_75
-Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int* vspFlag, Int numValidMergeCand )
-#else
 Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int numValidMergeCand )
-#endif
 {
   if ( pcCU->isBipredRestriction(puIdx) )
@@ -4276,9 +4188,5 @@
     for( UInt mergeCand = 0; mergeCand < numValidMergeCand; ++mergeCand )
     {
-#if H_3D_VSP && !FIX_TICKET_75
-      if ( (interDirNeighbours[mergeCand] == 3) && (vspFlag[mergeCand] == false) )
-#else
       if ( interDirNeighbours[mergeCand] == 3 )
-#endif
       {
         interDirNeighbours[mergeCand] = 1;
@@ -4902,7 +4810,4 @@
       Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
       memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
-#if !FIX_TICKET_79
-      InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
-#endif
       UInt uiAbsPartIdx = 0;
       Int iWidth = 0;
@@ -4922,7 +4827,4 @@
 #if H_3D_VSP
                       , vspFlag
-#if !FIX_TICKET_79
-                      , inheritedVSPDisInfo
-#endif
 #endif
 #if H_3D_SPIVMP
@@ -4938,7 +4840,4 @@
 #if H_3D_VSP
         pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
-#if !FIX_TICKET_79
-        pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
-#endif
 #endif
 #if H_3D_DDD
@@ -7388,5 +7287,5 @@
     }
     m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
     m_pcEntropyCoder->encodeSingleDepthMode ( pcCU, 0, true );
 #endif
@@ -7845,11 +7744,6 @@
 
   Pel refDC1 = 0; Pel refDC2 = 0;
-#if SHARP_DMM1_I0110
   WedgeList*     pacWedgeList     = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
   WedgeNodeList* pacWedgeNodeList = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeNodeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])];
-#else
-  WedgeList*     pacWedgeList     = &g_dmmWedgeLists    [(g_aucConvertToBit[uiWidth])];
-  WedgeNodeList* pacWedgeNodeList = &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])];
-#endif
 
   // coarse wedge search
@@ -7859,13 +7753,8 @@
   {
     TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx()));
-#if SHARP_DMM1_I0110
     Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
     UInt uiStride   = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride();
     xCalcBiSegDCs  ( piRef,  uiRefStride,  pbPattern, uiStride, refDC1, refDC2 );
     xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
-#else
-    xCalcBiSegDCs  ( piRef,  uiRefStride,  pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
-    xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
-#endif
 
     Dist uiActDist = RDO_DIST_MAX;
@@ -7903,13 +7792,8 @@
     {
       TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId )));
-#if SHARP_DMM1_I0110
       Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
       UInt uiStride   = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride();
       xCalcBiSegDCs  ( piRef,  uiRefStride,  pbPattern, uiStride, refDC1, refDC2 );
       xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
-#else
-      xCalcBiSegDCs  ( piRef,  uiRefStride,  pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
-      xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );
-#endif
       Dist uiActDist = RDO_DIST_MAX;
 #if H_3D_VSO
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSearch.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSearch.h	(revision 1074)
@@ -181,5 +181,5 @@
                                   UInt&       ruiDistC,
                                   Bool        bLumaOnly
-#if HHI_DMM4_ENC_I0066
+#if H_3D_DIM
                                 , Bool        bOnlyIVP
 #endif
@@ -191,5 +191,5 @@
                                   TComYuv*    pcRecoYuv,
                                   UInt        uiPreCalcDistC );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void  estIntraPredSingleDepth  ( TComDataCU* pcCU, 
                                   TComYuv*    pcOrgYuv, 
@@ -354,5 +354,5 @@
                                     UInt         uiAbsPartIdx,
                                     UInt         stateU0V1Both2 );
-#if MTK_SINGLE_DEPTH_MODE_I0095
+#if H_3D_SINGLE_DEPTH
   Void xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel * DepthNeighbor );
 #endif
@@ -429,7 +429,4 @@
 #if H_3D_VSP
                                   , Int* vspFlag
-#if !FIX_TICKET_79
-                                  , InheritedVSPDisInfo*  inheritedVSPDisInfo
-#endif
 #endif
 #if H_3D_SPIVMP
@@ -443,7 +440,4 @@
                                     TComMvField*    mvFieldNeighbours, 
                                     UChar*          interDirNeighbours, 
-#if H_3D_VSP && !FIX_TICKET_75
-                                    Int* vspFlag,
-#endif
                                     Int             numValidMergeCand );
 
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1074)
@@ -89,5 +89,5 @@
   m_ivPicLists = NULL;
 #endif
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
+#if H_3D_IC
   m_aICEnableCandidate = NULL;
   m_aICEnableNum = NULL;
@@ -370,5 +370,5 @@
 
   xInitPPSforTiles();
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
+#if H_3D_IC
   m_aICEnableCandidate = new Int[ 10 ];
   m_aICEnableNum = new Int[ 10 ];
@@ -828,11 +828,4 @@
 
   m_cSPS.setUseAMP ( m_useAMP );
-
-#if !MTK_I0099_VPS_EX2
-#if H_3D_QTLPC
-  m_cSPS.setUseQTL( m_bUseQTL );
-  m_cSPS.setUsePC ( m_bUsePC  );
-#endif
-#endif
 
   for (i = g_uiMaxCUDepth-g_uiAddCUDepth; i < g_uiMaxCUDepth; i++ )
Index: branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncTop.h
===================================================================
--- branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncTop.h	(revision 1073)
+++ branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncTop.h	(revision 1074)
@@ -80,5 +80,5 @@
   TComPicLists*           m_ivPicLists;                   ///< access to picture lists of other layers 
 #endif
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
+#if H_3D_IC
   Int *m_aICEnableCandidate;
   Int *m_aICEnableNum;
@@ -209,7 +209,7 @@
   TComPicLists* getIvPicLists() { return m_ivPicLists; }
 #endif
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
-  Int *getICEnableCandidate() { return m_aICEnableCandidate; }
-  Int *getICEnableNum() { return m_aICEnableNum; }
+#if H_3D_IC
+  Int*      getICEnableCandidate() { return m_aICEnableCandidate; }
+  Int*      getICEnableNum() { return m_aICEnableNum; }
 #endif
   Void      deletePicBuffer ();
@@ -272,5 +272,5 @@
   Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
 #endif
-#if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
+#if H_3D_IC
   Void                    setICEnableCandidate         ( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; }
   Void                    setICEnableNum         ( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; }
