Index: /trunk/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1132)
+++ /trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1133)
@@ -377,15 +377,7 @@
   ("DepthFlag",             m_depthFlag          , std::vector<Int>(1,0), "Depth Flag")
 #if H_3D_DIM
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  ("DMM",                   m_useDMM,           true,  "Depth intra model modes")
-  ("IVP",                   m_useIVP,           true,  "intra-view prediction")
-  ("SDC",                   m_useSDC,           true,  "Simplified depth coding")
-#endif
   ("DLT",                   m_useDLT,           true,  "Depth lookup table")
 #endif
 #if H_3D
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  ("SingleDepthMode",    m_useSingleDepthMode, true, "Single depth mode")                         
-#endif
 #endif
 #endif
@@ -408,9 +400,5 @@
   ("ProfileTierLevelIdx_%d",  m_profileTierLevelIdx, std::vector<Int>(0), MAX_NUM_LAYERS, "Indices to profile level tier for ols")
   // Layer dependencies
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
   ("DirectRefLayers_%d",    m_directRefLayers    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIdx in VPS of direct reference layers")
-#else
-  ("DirectRefLayers_%d",    m_directRefLayers    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIds of direct reference layers")
-#endif
   ("DependencyTypes_%d",    m_dependencyTypes    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion")
 #endif
@@ -538,27 +526,7 @@
   ("DeblockingFilterMetric",         m_DeblockingFilterMetric,         false )
 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_ARP
-  ("AdvMultiviewResPred",      m_uiUseAdvResPred,           (UInt)1, "Usage of Advanced Residual Prediction" )
-#endif
-#if H_3D_SPIVMP
-  ("SubPULog2Size", m_iSubPULog2Size, (Int)3, "Sub-PU size index: 2^n")
-  ("SubPUMPILog2Size", m_iSubPUMPILog2Size, (Int)3, "Sub-PU MPI size index: 2^n")
-#endif
-#endif
 #if H_3D_IC
   ("IlluCompEnable",           m_abUseIC, true, "Enable illumination compensation")
   ("IlluCompLowLatencyEnc",    m_bUseLowLatencyICEnc, false, "Enable low-latency illumination compensation encoding")
-#endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_INTER_SDC
-  ("InterSDC",                 m_bDepthInterSDCFlag,        true, "Enable depth inter SDC")
-#endif
-#if H_3D_DBBP
-  ("DBBP",                     m_bUseDBBP,   true, "Enable depth-based block partitioning" )
-#endif
-#if H_3D_IV_MERGE
-  ("MPI",                      m_bMPIFlag,        true, "Enable MPI")
-#endif
 #endif
   // Coding tools
@@ -801,26 +769,6 @@
 
 #endif //HHI_VSO
-#if HHI_TOOL_PARAMETERS_I2_J0107
   ("QTL",                             m_bUseQTL                 , true          , "Use depth quad tree limitation (encoder only)" )
-#else
-#if H_3D_QTLPC
-  ("LimQtPredFlag",                   m_bLimQtPredFlag          , true          , "Use Predictive Coding with QTL" )
-  ("QTL",                             m_bUseQTL                 , true          , "Use depth Quadtree Limitation" )
-#endif
-#if H_3D_IV_MERGE
-  ("IvMvPred",                        m_ivMvPredFlag            , std::vector<Bool>(2, true)            , "inter view motion prediction " )
-#endif
-#if H_3D_NBDV_REF
-  ("DepthRefinement",                 m_depthRefinementFlag,    true           , "depth refinement by DoNBDV" )  
-#endif
-#if H_3D_VSP
-  ("ViewSynthesisPred",               m_viewSynthesisPredFlag,  true           , "view synthesis prediction " )  
-#endif
-#if H_3D
-  ("IvMvScaling",                     m_ivMvScalingFlag      ,  true            , "inter view motion vector scaling" )    
-#endif
-#endif
-
-#if HHI_TOOL_PARAMETERS_I2_J0107
+
   ("IvMvPredFlag"          , m_ivMvPredFlag          , std::vector< Bool >(2,true)                    , "Inter-view motion prediction"              )
   ("IvMvScalingFlag"       , m_ivMvScalingFlag       , std::vector< Bool >(2,true)                    , "Inter-view motion vector scaling"          )
@@ -838,5 +786,4 @@
   ("InterSdcFlag"          , m_interSdcFlag          , true                                           , "Inter depth DCs"                           )
   ("IntraSingleFlag"       , m_intraSingleFlag       , true                                           , "Intra single mode"                         )
-#endif
 #endif //H_3D
   ;
@@ -1680,10 +1627,6 @@
 
 #if H_3D_ARP
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  xConfirmPara( ( 0 != m_uiUseAdvResPred ) &&  ( 1 != m_uiUseAdvResPred ), "UseAdvResPred must be 0 or 1." );
-#endif
 #endif
 #if H_3D_SPIVMP
-#if HHI_TOOL_PARAMETERS_I2_J0107
   xConfirmPara( m_log2SubPbSizeMinus3 < 0,                                        "Log2SubPbSizeMinus3 must be equal to 0 or greater.");
   xConfirmPara( m_log2SubPbSizeMinus3 > 3,                                        "Log2SubPbSizeMinus3 must be equal to 3 or smaller.");
@@ -1693,13 +1636,4 @@
   xConfirmPara( m_log2MpiSubPbSizeMinus3 > 3,                                        "Log2MpiSubPbSizeMinus3 must be equal to 3 or smaller.");
   xConfirmPara( (1<< (m_log2MpiSubPbSizeMinus3 + 3)) > m_uiMaxCUWidth,               "Log2MpiSubPbSizeMinus3 must be equal to log2(maxCUSize)-3 or smaller.");
-#else
-  xConfirmPara( m_iSubPULog2Size < 3,                                        "SubPULog2Size must be 3 or greater.");
-  xConfirmPara( m_iSubPULog2Size > 6,                                        "SubPULog2Size must be 6 or smaller.");
-  xConfirmPara( (1<<m_iSubPULog2Size) > m_uiMaxCUWidth,                      "SubPULog2Size must be log2(maxCUSize) or smaller.");
- 
-  xConfirmPara( m_iSubPUMPILog2Size < 3,                                        "SubPUMPILog2Size must be 3 or greater.");
-  xConfirmPara( m_iSubPUMPILog2Size > 6,                                        "SubPUMPILog2Size must be 6 or smaller.");
-  xConfirmPara( ( 1 << m_iSubPUMPILog2Size ) > m_uiMaxCUWidth,                  "SubPUMPILog2Size must be log2(maxCUSize) or smaller.");
-#endif
 #endif
 #if ADAPTIVE_QP_SELECTION
@@ -2648,6 +2582,5 @@
   printf("WVSO:%d ", m_bUseWVSO );  
 #endif
-
-#if HHI_TOOL_PARAMETERS_I2_J0107
+#if H_3D
   printf( "QTL:%d "                  , m_bUseQTL);
   printf( "IlluCompEnable:%d "       , m_abUseIC);
@@ -2672,51 +2605,4 @@
   printf( "InterSdc:%d "               , m_interSdcFlag           ? 1 : 0 );
   printf( "IntraSingle:%d "            , m_intraSingleFlag        ? 1 : 0 );
-
-#else
-#if H_3D_QTLPC
-  printf("LimQtPredFlag:%d ", m_bLimQtPredFlag ? 1 : 0);
-  printf("QTL:%d ", m_bUseQTL);
-#endif
-#if H_3D_IV_MERGE  
-  printf("IvMvPred:%d %d", m_ivMvPredFlag[0] ? 1 : 0, m_ivMvPredFlag[1] ? 1 : 0);
-#if H_3D_SPIVMP
-  printf(" SubPULog2Size:%d  " , m_iSubPULog2Size  );
-  printf(" SubPUMPILog2Size:%d  " , m_iSubPUMPILog2Size  );
-#endif
-#endif
-#if H_3D_ARP
-  printf(" ARP:%d  ", m_uiUseAdvResPred  );
-#endif
-#if H_3D_IC
-  printf( "IlluCompEnable:%d ", m_abUseIC);
-  printf ("IlluCompLowLatencyEnc:%d ",  m_bUseLowLatencyICEnc);
-#endif
-#if H_3D_NBDV_REF
-  printf("DepthRefinement:%d ", m_depthRefinementFlag );  
-#endif
-#if H_3D_VSP
-  printf("ViewSynthesisPred:%d ", m_viewSynthesisPredFlag );
-#endif
-#if H_3D
-  printf("IvMvScaling:%d ", m_ivMvScalingFlag ? 1 : 0  );
-#endif
-#if H_3D_DIM
-  printf("DMM:%d ", m_useDMM );
-  printf("IVP:%d ", m_useIVP );
-  printf("SDC:%d ", m_useSDC );
-  printf("DLT:%d ", m_useDLT );
-#endif
-#if H_3D
-  printf("SingleDepthMode:%d ",    m_useSingleDepthMode);
-#endif
-#if H_3D_INTER_SDC
-  printf( "interSDC:%d ", m_bDepthInterSDCFlag ? 1 : 0 );
-#endif
-#if H_3D_DBBP
-  printf("DBBP:%d ", m_bUseDBBP ? 1 : 0);
-#endif
-#if H_3D_IV_MERGE
-  printf( "MPI:%d ", m_bMPIFlag ? 1 : 0 );
-#endif
 #endif
 
Index: /trunk/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 1132)
+++ /trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 1133)
@@ -132,21 +132,4 @@
   Bool m_higherLayerIrapSkipFlag;
 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_IV_MERGE
-  vector<Bool>           m_ivMvPredFlag;                      ///< Interview motion vector prediction 
-
-#if H_3D_SPIVMP
-  Int                    m_iSubPULog2Size;                    
-  Int                    m_iSubPUMPILog2Size;                    
-#endif
-#endif
-#if H_3D_QTLPC
-  Bool                   m_bLimQtPredFlag;
-#endif
-#if H_3D_ARP                                                  /// < flag and number of weighting factors in ARP
-  UInt                   m_uiUseAdvResPred;
-  UInt                   m_uiARPStepNum;
-#endif
-#endif
 
 #if H_3D_IC
@@ -155,15 +138,4 @@
 #endif
 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_NBDV_REF
-  Bool m_depthRefinementFlag;  
-#endif
-#if H_3D_VSP
-  Bool m_viewSynthesisPredFlag;
-#endif
-#if H_3D
-  Bool m_ivMvScalingFlag; 
-#endif
-#endif
 #endif
   Double    m_adLambdaModifier[ MAX_TLAYER ];                 ///< Lambda modifier array for each temporal layer
@@ -492,32 +464,10 @@
 #endif
 #if H_3D_DIM
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  Bool      m_useDMM;                                        ///< flag for using DMM
-  Bool      m_useIVP;
-  Bool      m_useSDC;                                        ///< flag for using SDC
-#endif
   Bool      m_useDLT;                                        ///< flag for using DLT
-#endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_SINGLE_DEPTH
-  Bool     m_useSingleDepthMode;                          ///< flag for using single depth mode
-#endif
 #endif
 #if H_3D_QTLPC
   Bool      m_bUseQTL;                                        ///< flag for using depth QuadTree Limitation
 #endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_INTER_SDC
-  Bool m_bDepthInterSDCFlag;                                ///< flag for inter SDC of depth map coding
-#endif
-#if H_3D_DBBP
-  Bool      m_bUseDBBP;                                     ///< flag for depth-based block partitioning
-#endif
-#if H_3D_IV_MERGE
-  Bool m_bMPIFlag;                                           ///< flag for MPI of depth map coding
-#endif
-#endif
-
-#if HHI_TOOL_PARAMETERS_I2_J0107
+
   std::vector< Bool >    m_ivMvPredFlag;
   std::vector< Bool >    m_ivMvScalingFlag;
@@ -535,5 +485,4 @@
   Bool                   m_interSdcFlag;
   Bool                   m_intraSingleFlag;
-#endif
 
 #endif
Index: /trunk/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1132)
+++ /trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1133)
@@ -140,7 +140,4 @@
   xSetVPSVUI               ( vps ); 
 #if H_3D
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  xSetVPSExtension2        ( vps ); 
-#endif
   m_ivPicLists.setVPS      ( &vps );
   xDeriveDltArray          ( vps, dlt );
@@ -176,5 +173,4 @@
   }
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
 #if H_3D
   // Set 3d tool parameters
@@ -203,5 +199,4 @@
     }
   }
-#endif
 #endif
 
@@ -248,10 +243,4 @@
     m_cTEncTop.setDWeight                      ( isDepth ? m_iDWeight             : 0     );
 #endif // H_3D_VSO
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_SPIVMP
-    m_cTEncTop.setSubPULog2Size                 (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size   );
-    m_cTEncTop.setSubPUMPILog2Size              ( !isDepth ? 0 : m_iSubPUMPILog2Size   );
-#endif
-#endif
 #if H_3D_IC
     m_cTEncTop.setUseIC                        ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC );
@@ -260,51 +249,11 @@
 
     
-#if HHI_TOOL_PARAMETERS_I2_J0107
     m_cTEncTop.setUseDMM                       ( isDepth ? m_intraWedgeFlag   : false );
     m_cTEncTop.setUseSDC                       ( isDepth ? m_intraSdcFlag     : false );
     m_cTEncTop.setUseDLT                       ( isDepth ? m_useDLT   : false );
     m_cTEncTop.setUseQTL                       ( isDepth ? m_bUseQTL  : false );
-#else
-//========== Depth intra modes ==========
-#if H_3D_DIM
-    m_cTEncTop.setUseDMM                       ( isDepth ? m_useDMM               : false );
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_FCO
-    m_cTEncTop.setUseIVP                       ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_useIVP               : false );
-#else
-    m_cTEncTop.setUseIVP                       ( isDepth ? m_useIVP               : false );
-#endif
-#endif
-    m_cTEncTop.setUseSDC                       ( isDepth ? m_useSDC               : false );
-    m_cTEncTop.setUseDLT                       ( isDepth ? m_useDLT               : false );
-#endif
-
-
-#if H_3D_SINGLE_DEPTH
-    m_cTEncTop.setUseSingleDepthMode           ( isDepth ? m_useSingleDepthMode   : false );
-#endif
-#if H_3D_QTLPC
-    m_cTEncTop.setUseQTL                       ( isDepth ? m_bUseQTL               : false );
-#endif
-    //====== Depth Inter SDC =========
-#if H_3D_INTER_SDC
-    m_cTEncTop.setInterSDCEnable               ( isDepth ? m_bDepthInterSDCFlag    : false );
-#endif
-#if H_3D_DBBP
-    m_cTEncTop.setUseDBBP                      ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_bUseDBBP );
-#endif
-#if H_3D_IV_MERGE
-#if H_3D_FCO
-    m_cTEncTop.setUseMPI                       ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_bMPIFlag    : false );
-#else
-    m_cTEncTop.setUseMPI                       ( isDepth ? m_bMPIFlag    : false );
-#endif
-#endif
-#endif
-
-
-#if HHI_TOOL_PARAMETERS_I2_J0107
+
+
   m_cTEncTop.setSps3dExtension                 ( m_sps3dExtension );
-#endif
 #endif // H_3D
 
@@ -937,11 +886,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-          m_acTEncTopList[ layer ]->getSliceEncoder()->setDDDPar( m_cCameraData.getCodedScale()[0][ m_acTEncTopList[layer]->getViewIndex() ], 
-              m_cCameraData.getCodedOffset()[0][ m_acTEncTopList[layer]->getViewIndex() ], 
-              m_cCameraData.getCamParsCodedPrecision() );
-#endif
-#endif
         Int   iNumEncoded = 0;
 
@@ -1374,7 +1316,5 @@
   }
 
-#if H_MV_FIX_NUM_VIEWS
   vps.initNumViews(); 
-#endif
   Int maxViewId = xGetMax( m_viewId ); 
 
@@ -1433,7 +1373,5 @@
   vps.setDefaultDirectDependencyType( defaultDirectDependencyFlag ? defaultDirectDependencyType : -1 );       
 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
   vps.setRefLayers(); 
-#endif
 
   // Max sub layers, + presence flag
@@ -1454,5 +1392,4 @@
   vps.setVpsSubLayersMaxMinus1PresentFlag( subLayersMaxMinus1PresentFlag ); 
 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
   // Max temporal id for inter layer reference pictures
   for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++)
@@ -1462,6 +1399,6 @@
     {
       Int curLayerIdInNuh = vps.getLayerIdInNuh( curLayerIdInVps );      
+      Int maxTid = -1; 
 #if H_3D
-      Int maxTid = -1; 
       if ( vps.getDirectDependencyFlag( curLayerIdInVps, refLayerIdInVps ) )
       {
@@ -1491,9 +1428,5 @@
         else
         {        
-#if HHI_TOOL_PARAMETERS_I2_J0107
           if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) ) 
-#else
-          if( m_depthFlag[ curLayerIdInVps ] && ( m_bMPIFlag || m_bLimQtPredFlag || m_useIVP  ) ) 
-#endif
           {          
             Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false ); 
@@ -1503,9 +1436,5 @@
             }
           }
-#if HHI_TOOL_PARAMETERS_I2_J0107
           if( !m_depthFlag[ curLayerIdInVps ] && vps.getNumRefListLayers( curLayerIdInNuh) > 0  && ( m_depthRefinementFlag || m_viewSynthesisPredFlag || m_depthBasedBlkPartFlag ) ) 
-#else
-          if( !m_depthFlag[ curLayerIdInVps ] && vps.getNumRefListLayers( curLayerIdInNuh) > 0  && ( m_depthRefinementFlag || m_viewSynthesisPredFlag || m_bUseDBBP) ) 
-#endif
           {  
             Int maxPresentTid =-1; 
@@ -1546,33 +1475,4 @@
   }
   vps.setMaxTidRefPresentFlag( maxTidRefPresentFlag );
-#else
-  // Max temporal id for inter layer reference pictures + presence flag
-  Bool maxTidRefPresentFlag = false; 
-  for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++)
-  {
-    for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++)
-    {
-        Int maxTid = -1; 
-        for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 
-        {        
-          GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
-          GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
-          for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++)
-          {
-            if ( m_directRefLayers[ curLayerIdInVps ][ geCur.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps )
-            {
-              Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 );
-              Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
-              maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId ); 
-            }
-          }
-        }
-        vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 );
-        maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 );    
-    }
-  }
-
-  vps.setMaxTidRefPresentFlag( maxTidRefPresentFlag );
-#endif  
 
 
@@ -1603,7 +1503,5 @@
   for ( Int layerIdInVps = 1; layerIdInVps < m_numberOfLayers && allRefLayersActiveFlag; layerIdInVps++)
   {    
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
     Int layerIdInNuh = vps.getLayerIdInNuh( layerIdInVps ); 
-#endif
     for( Int i = 0; i < ( getGOPSize() + 1) && allRefLayersActiveFlag; i++ ) 
     {        
@@ -1612,5 +1510,4 @@
       
       // check if all reference layers when allRefLayerActiveFlag is equal to 1 are reference layer pictures specified in the gop entry
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
       for (Int k = 0; k < vps.getNumRefListLayers( layerIdInNuh ) && allRefLayersActiveFlag; k++ )
@@ -1622,14 +1519,5 @@
         Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdDirectRefLayer( layerIdInNuh , k ) ); 
 #endif
-#else
-      for (Int k = 0; k < m_directRefLayers[ layerIdInVps].size() && allRefLayersActiveFlag; k++ )
-      {
-        Int refLayerIdInVps = vps.getLayerIdInVps( m_directRefLayers[ layerIdInVps ][ k ] ); 
-#endif
-#if H_MV_FIX_REF_LAYER_PIC_FLAG
         if ( vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId  && ( tId == 0 || vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId )  )
-#else
-        if ( vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId  && vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId )
-#endif
         {
           Bool gopEntryFoundFlag = false; 
@@ -1648,5 +1536,4 @@
       {   
         Bool referenceLayerFoundFlag = false; 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
         for (Int k = 0; k < vps.getNumRefListLayers( layerIdInNuh ); k++ )
@@ -1658,14 +1545,5 @@
           Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdDirectRefLayer( layerIdInNuh, k) );
 #endif
-#else
-        for (Int k = 0; k < m_directRefLayers[ layerIdInVps].size(); k++ )
-        {
-          Int refLayerIdInVps = vps.getLayerIdInVps( m_directRefLayers[ layerIdInVps ][ k ] ); 
-#endif
-#if H_MV_FIX_REF_LAYER_PIC_FLAG
           if ( vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId  && ( tId == 0 || vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId )  )
-#else
-          if ( vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId  && vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId )
-#endif
           {          
             referenceLayerFoundFlag = referenceLayerFoundFlag || ( ge.m_interLayerPredLayerIdc[l] == k ); 
@@ -1679,7 +1557,4 @@
 
   vps.setAllRefLayersActiveFlag( allRefLayersActiveFlag );
-#if !HHI_DEPENDENCY_SIGNALLING_I1_J0107
-  vps.setRefLayers(); 
-#endif
 }; 
 
@@ -2210,92 +2085,4 @@
 
 #if H_3D
-#if HHI_TOOL_PARAMETERS_I2_J0107
-#else
-Void TAppEncTop::xSetVPSExtension2( TComVPS& vps )
-{
-  for ( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ )
-  {
-    Bool isDepth      = ( vps.getDepthId( layer ) == 1 ) ;
-    Bool isLayerZero  = ( layer == 0 ); 
-#if H_3D_FCO
-    Bool isDepthFirst = (layer > 1 ? true : false);
-#endif
-
-#if H_3D_ARP
-    vps.setUseAdvRP        ( layer, ( isDepth || isLayerZero || !vps.getNumDirectRefLayers(layer) ) ? 0 : m_uiUseAdvResPred );
-    vps.setARPStepNum      ( layer, ( isDepth || isLayerZero || !vps.getNumDirectRefLayers(layer) ) ? 1 : H_3D_ARP_WFNR     );
-#endif  
-#if H_3D_SPIVMP
-    if( isDepth )
-    {
-      vps.setSubPULog2Size         ( layer, (layer != 1) ? 6: 0 ); 
-      vps.setSubPUMPILog2Size      ( layer, (!isLayerZero) ? m_iSubPUMPILog2Size: 0 ); 
-    }
-    else
-    {
-      vps.setSubPULog2Size         ( layer, (!isLayerZero) ? m_iSubPULog2Size: 0 ); 
-    }
-#endif
-
-#if H_3D_DIM
-    vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useSDC || m_useDLT ) );
-#if H_3D_FCO
-    vps.setIVPFlag          ( layer, isDepth && !isLayerZero && m_useIVP && !isDepthFirst );
-#else
-    vps.setIVPFlag          ( layer, isDepth && !isLayerZero && m_useIVP );
-#endif
-#endif
-
-#if H_3D_IV_MERGE
-    if( !vps.getNumDirectRefLayers(layer) )
-    {
-      vps.setIvMvPredFlag    (layer, false);
-      vps.setIvMvScalingFlag (layer, false); 
-    }
-    else
-    {
-      if( isDepth )
-      {
-        vps.setIvMvPredFlag         ( layer, (layer != 1) && m_ivMvPredFlag[1] ); 
-      }
-      else
-      {
-        vps.setIvMvPredFlag         ( layer, !isLayerZero && m_ivMvPredFlag[0] ); 
-      }
-      vps.setIvMvScalingFlag (layer, m_ivMvScalingFlag); 
-    }
-#endif
-#if H_3D_QTLPC
-#if H_3D_FCO
-    vps.setLimQtPredFlag         ( layer, isDepth && m_bLimQtPredFlag && !isDepthFirst ); 
-#else
-    vps.setLimQtPredFlag         ( layer, isDepth && m_bLimQtPredFlag ); 
-#endif
-#endif
-#if H_3D_NBDV_REF
-    vps.setDepthRefinementFlag  ( layer, !isLayerZero && !isDepth && m_depthRefinementFlag );         
-#endif
-#if H_3D_VSP
-    vps.setViewSynthesisPredFlag( layer, !isLayerZero && !isDepth && vps.getNumDirectRefLayers(layer) && m_viewSynthesisPredFlag );         
-#endif
-#if H_3D_DBBP
-    vps.setUseDBBP              ( layer, !isLayerZero && !isDepth && m_bUseDBBP );
-#endif
-#if H_3D_INTER_SDC
-    vps.setInterSDCFlag( layer, !isLayerZero && isDepth && m_bDepthInterSDCFlag );
-#endif
-#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-    vps.setSingleDepthModeFlag( layer, !isLayerZero && isDepth && m_useSingleDepthMode );         
-#endif
-#if H_3D_IV_MERGE
-#if H_3D_FCO
-    vps.setMPIFlag( layer, !isLayerZero && isDepth && m_bMPIFlag && !isDepthFirst );
-#else
-    vps.setMPIFlag( layer, !isLayerZero && isDepth && m_bMPIFlag );
-#endif
-#endif
-  }  
-}
-#endif
 
 Void TAppEncTop::xDeriveDltArray( TComVPS& vps, TComDLT& dlt )
Index: /trunk/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- /trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 1132)
+++ /trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 1133)
@@ -92,7 +92,5 @@
 #if H_3D
   TComDLT                    m_dlt;                         ///< dlt
-#if HHI_TOOL_PARAMETERS_I2_J0107
   TComSps3dExtension         m_sps3dExtension;              ///< Currently all layers share the same sps 3D Extension  
-#endif
 #endif
 
@@ -149,7 +147,4 @@
 #endif
 #if H_3D
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  Void xSetVPSExtension2( TComVPS& vps );
-#endif
   Void xDeriveDltArray( TComVPS& vps, TComDLT& dlt );
 #endif
Index: /trunk/source/Lib/TAppCommon/TAppComCamPara.cpp
===================================================================
--- /trunk/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 1132)
+++ /trunk/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 1133)
@@ -1203,9 +1203,4 @@
   m_uiCamParsCodedPrecision = uiCodedCamParsPrecision;
   m_iLog2Precision          = iLog2Precision;
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if HHI_INTERVIEW_SKIP
-  m_iCurrentFrameId         = 0 ;
-#endif
-#endif
 
   xReadCameraParameterFile( pchCfgFileName );
Index: /trunk/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1133)
@@ -154,10 +154,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  m_pucDisparityDerivedDepth = NULL;
-  m_pbUseDDD = NULL;
-#endif
-#endif
 }
 
@@ -301,10 +295,4 @@
   m_pcPattern            = (TComPattern*)xMalloc(TComPattern, 1);
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  m_pucDisparityDerivedDepth         = (UChar*  )xMalloc( UChar,  uiNumPartition);
-  m_pbUseDDD                         = (Bool*  ) xMalloc( Bool,   uiNumPartition);
-#endif 
-#endif
 
   // create motion vector fields
@@ -390,10 +378,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-    if ( m_pucDisparityDerivedDepth ) { xFree(m_pucDisparityDerivedDepth);          m_pucDisparityDerivedDepth        = NULL; }
-    if ( m_pbUseDDD                 ) { xFree(m_pbUseDDD);                          m_pbUseDDD                        = NULL; }
-#endif
-#endif
 
 #if H_3D_ARP
@@ -524,10 +506,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-    m_pucDisparityDerivedDepth[ui] = pcFrom->m_pucDisparityDerivedDepth[ui];
-    m_pbUseDDD[ui] = pcFrom->m_pbUseDDD[ui];
-#endif
-#endif
     m_puhWidth  [ui] = pcFrom->getWidth(ui);
     m_puhHeight [ui] = pcFrom->getHeight(ui);
@@ -611,10 +587,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-    memset( m_pucDisparityDerivedDepth        + firstElement, 0,           numElements * sizeof( *m_pucDisparityDerivedDepth ) );
-    memset( m_pbUseDDD                        + firstElement, 0,           numElements * sizeof( *m_pbUseDDD ) );
-#endif
-#endif
 
 #if H_3D_DIM
@@ -793,10 +763,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-      m_pucDisparityDerivedDepth[ui] = 0;
-      m_pbUseDDD[ui] = 0;
-#endif
-#endif
 
 #if H_3D_DIM
@@ -904,10 +868,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  memset( m_pucDisparityDerivedDepth,         0, iSizeInUchar );
-  memset( m_pbUseDDD,                         0, iSizeInBool );
-#endif
-#endif
 
   UChar uhWidth  = g_uiMaxCUWidth  >> uiDepth;
@@ -1003,10 +961,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-      m_pucDisparityDerivedDepth[ui] = pcCU->m_pucDisparityDerivedDepth[uiPartOffset+ui];
-      m_pbUseDDD[ui]                 = pcCU->m_pbUseDDD[uiPartOffset+ui];
-#endif
-#endif
 
 #if H_3D_DIM
@@ -1154,10 +1106,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  m_pucDisparityDerivedDepth          = pcCU->getDDDepth()        + uiPart;
-  m_pbUseDDD                          = pcCU->getUseDDD()         + uiPart;
-#endif
-#endif
 
   m_puhLumaIntraDir     = pcCU->getLumaIntraDir()     + uiPart;
@@ -1309,10 +1255,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  m_pucDisparityDerivedDepth         = pcCU->getDDDepth()              + uiAbsPartIdx;
-  m_pbUseDDD                         = pcCU->getUseDDD()              + uiAbsPartIdx;
-#endif
-#endif
     
 #if H_3D_DBBP
@@ -1380,10 +1320,4 @@
   memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar );
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  memcpy( m_pucDisparityDerivedDepth          + uiOffset, pcCU->getDDDepth(),         iSizeInUchar );
-  memcpy( m_pbUseDDD                          + uiOffset, pcCU->getUseDDD(),          iSizeInBool );
-#endif
-#endif
 
 
@@ -1485,10 +1419,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  memcpy( rpcCU->getDDDepth()          + m_uiAbsIdxInLCU, m_pucDisparityDerivedDepth,         iSizeInUchar  );
-  memcpy( rpcCU->getUseDDD()           + m_uiAbsIdxInLCU, m_pbUseDDD,                         iSizeInBool  );
-#endif
-#endif
 
   memcpy( rpcCU->getPartitionSize()  + m_uiAbsIdxInLCU, m_pePartSize, sizeof( *m_pePartSize ) * m_uiNumPartition );
@@ -1624,10 +1552,4 @@
   memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar );
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  memcpy( rpcCU->getDDDepth()          + uiPartOffset, m_pucDisparityDerivedDepth,         iSizeInUchar );
-  memcpy( rpcCU->getUseDDD()           + uiPartOffset, m_pbUseDDD,                         iSizeInBool );
-#endif
-#endif
 
 #if H_3D_DIM
@@ -1696,23 +1618,4 @@
 }
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-Void TComDataCU::setDDDepthSubParts ( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
-{
-    setSubPart<UChar>( ucDDD, m_pucDisparityDerivedDepth, uiAbsPartIdx, uiDepth, uiPartIdx );
-}
-
-Void TComDataCU::setUseDDD        ( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
-{
-    setSubPart<Bool>( bUseDDD, m_pbUseDDD, uiAbsPartIdx, uiDepth, uiPartIdx );
-}
-
-Void TComDataCU::setUseDDD( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiDepth )
-{
-    memset( m_pbUseDDD + uiAbsPartIdx, bUseDDD, (m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ))*sizeof(Bool) );
-}
-
-#endif
-#endif
 
 // --------------------------------------------------------------------------------------------------------------------
@@ -2425,9 +2328,5 @@
     Bool depthRefineFlag = false;
 #if H_3D_NBDV_REF
-#if HHI_TOOL_PARAMETERS_I2_J0107
     depthRefineFlag = m_pcSlice->getDepthRefinementFlag(  );
-#else
-    depthRefineFlag = m_pcSlice->getVPS()->getDepthRefinementFlag( m_pcSlice->getLayerIdInVps() );
-#endif
 #endif // H_3D_NBDV_REF
     
@@ -3340,9 +3239,5 @@
 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount)
 {
-#if HHI_TOOL_PARAMETERS_I2_J0107
   if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getViewSynthesisPredFlag( ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1)
-#else
-  if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1)
-#endif
   {
     return false;
@@ -3899,7 +3794,4 @@
 )
 {
-#if !SEC_A1_BASED_VSP_J0039
-  UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx;
-#endif
 #if H_3D_IV_MERGE
   ////////////////////////////
@@ -3914,9 +3806,4 @@
   UChar tmpDir;
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  m_iUseDDDCandIdx = -1;
-#endif
-#endif
 
   //////////////////////////////////
@@ -3958,9 +3845,5 @@
   deriveLeftBottomIdxGeneral  ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
 #if H_3D
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Bool bMPIFlag   = getSlice()->getMpiFlag(); 
-#else
-  Bool bMPIFlag   = getSlice()->getVPS()->getMPIFlag( getSlice()->getLayerIdInVps() );
-#endif
   Bool bIsDepth = getSlice()->getIsDepth();
 #endif 
@@ -4022,9 +3905,4 @@
 
   // above
-#if !SEC_A1_BASED_VSP_J0039
-  UInt uiAbovePartIdx = 0;
-  TComDataCU* pcCUAbove = 0;
-  pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );
-#endif
 
   if (getAvailableFlagB1())
@@ -4033,19 +3911,5 @@
 #if H_3D_VSP
     ,
-#if SEC_A1_BASED_VSP_J0039
       false
-#else
-      ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0) 
-#if H_3D_IC
-      && !bICFlag
-#endif
-#if H_3D_ARP
-      && !bARPFlag
-#endif
-#if H_3D_DBBP
-      && !bDBBPFlag
-#endif
-      )
-#endif
 #endif
       , false
@@ -4055,9 +3919,4 @@
 
   // above right
-#if !SEC_A1_BASED_VSP_J0039
-  UInt uiAboveRightPartIdx = 0;
-  TComDataCU* pcCUAboveRight = 0;
-  pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );
-#endif
 
   if (getAvailableFlagB0())
@@ -4066,19 +3925,5 @@
 #if H_3D_VSP
     ,
-#if SEC_A1_BASED_VSP_J0039
       false
-#else
-      ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0) 
-#if H_3D_IC
-      && !bICFlag
-#endif
-#if H_3D_ARP
-      && !bARPFlag
-#endif
-#if H_3D_DBBP
-      && !bDBBPFlag
-#endif
-      )
-#endif
 #endif
       , false
@@ -4088,8 +3933,4 @@
 
   // left bottom
-#if !SEC_A1_BASED_VSP_J0039
-  UInt uiLeftBottomPartIdx = 0;
-  TComDataCU* pcCULeftBottom = getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );
-#endif
 
   if (getAvailableFlagA0())
@@ -4098,19 +3939,5 @@
 #if H_3D_VSP
     ,
-#if SEC_A1_BASED_VSP_J0039
       false
-#else
-      (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 0
-#if H_3D_IC
-      && !bICFlag
-#endif
-#if H_3D_ARP
-      && !bARPFlag
-#endif
-#if H_3D_DBBP
-      && !bDBBPFlag
-#endif
-      )
-#endif
 #endif
       , false
@@ -4120,9 +3947,4 @@
 
   // above left
-#if !SEC_A1_BASED_VSP_J0039
-  UInt uiAboveLeftPartIdx = 0;
-  TComDataCU* pcCUAboveLeft = 0;
-  pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );
-#endif
 
   if (getAvailableFlagB2())
@@ -4131,19 +3953,5 @@
 #if H_3D_VSP
     ,
-#if SEC_A1_BASED_VSP_J0039
       false
-#else
-      ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0) 
-#if H_3D_IC
-      && !bICFlag
-#endif
-#if H_3D_ARP
-      && !bARPFlag
-#endif
-#if H_3D_DBBP
-      && !bDBBPFlag
-#endif
-      )
-#endif
 #endif
       , false
@@ -4343,90 +4151,4 @@
     }
   }
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  if( m_pcSlice->getIsDepth() && m_pcSlice->getViewIndex() != 0  && bMPIFlag )
-  {
-    UInt uiPartIdx;
-    TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() );
-    TComSlice *pcTextureSlice = pcTextureCU->getSlice();  
-
-
-    tmpMV[0].setMvField( cZeroMv, NOT_VALID );
-    tmpMV[1].setMvField( cZeroMv, NOT_VALID );
-    tmpDir = 0;
-
-    xDeriveCenterIdx( uiPUIdx, uiPartIdx); 
-
-    if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdx ) )
-    {
-
-      TComMvField cMVField;
-      Int iDV = 0;
-      Int iViewIdx = 0;
-      pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_0, cMVField );
-      if( cMVField.getRefIdx() >= 0 )
-      {
-        if( pcTextureSlice->getRefPOC( REF_PIC_LIST_0, cMVField.getRefIdx()) == pcTextureSlice->getPOC() )
-        {
-          iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_0, cMVField.getRefIdx())->getViewIndex();
-          iDV = cMVField.getHor();
-
-
-          Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, cMVField.getRefIdx() );
-
-          if( iValidDepRef >= 0 )
-          {
-            const TComMv cAdd( 2, 2 );
-            cMVField.getMv() += cAdd;
-            cMVField.getMv() >>= 2;
-#if !(NTT_BUG_FIX_TK54)
-            clipMv( cMVField.getMv() );
-#endif
-            tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef );
-            tmpDir = 1;
-          }
-        }
-      }
-
-      pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_1, cMVField );
-
-      if( !tmpDir && cMVField.getRefIdx() >= 0 )
-      {
-        if( pcTextureSlice->getRefPOC( REF_PIC_LIST_1, cMVField.getRefIdx()) == pcTextureSlice->getPOC() )
-        {
-          iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_1, cMVField.getRefIdx())->getViewIndex();
-          iDV = cMVField.getHor();
-
-          Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, cMVField.getRefIdx() );
-
-          if( iValidDepRef >= 0 )
-          {
-            const TComMv cAdd( 2, 2 );
-            cMVField.getMv() += cAdd;
-            cMVField.getMv() >>= 2;
-#if !(NTT_BUG_FIX_TK54)
-            clipMv( cMVField.getMv() );
-#endif
-            tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef );
-            tmpDir = 2;
-          }
-        }
-      }
-      if( tmpDir != 0 )
-      {
-        m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV,  iViewIdx );
-        m_iUseDDDCandIdx = iCount;
-
-        m_mergCands[MRG_D].setCand( tmpMV, tmpDir, false, false);
-        if ( mrgCandIdx == iCount )
-        {
-          return;
-        }
-        iCount ++;
-      }
-    }
-  }
-#endif
-#endif
   /////////////////////////////////////////////////////////////////
   //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC  Candidates /////
@@ -4441,9 +4163,5 @@
   Int    ivCandDir   [4] = {0, 0, 0, 0};
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Bool ivMvPredFlag   = getSlice()->getIvMvPredFlag();
-#else
-  Bool ivMvPredFlag   = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() );
-#endif
 
   ivMvPredFlag &= (nPSW + nPSH > 12);
@@ -4528,9 +4246,5 @@
 
 #if H_3D
-#if SEC_A1_BASED_VSP_J0039
   iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable;
-#else
-  iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable + m_mergCands[MRG_B0].m_bAvailable;
-#endif
 #else
   //left
@@ -4631,15 +4345,5 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  // early termination
-  if ( iCount >= getSlice()->getMaxNumMergeCand()) 
-  {
-      return;
-  }
-#endif
-#endif
-
-#if SEC_A1_BASED_VSP_J0039
+
 #if H_3D_VSP
   /////////////////////////////////////////////////
@@ -4680,5 +4384,4 @@
   iCount += m_mergCands[MRG_B0].m_bAvailable;
 #endif
-#endif
 
 
@@ -4736,40 +4439,4 @@
 #endif // H_3D_IV_MERGE 
 
-#if !SEC_A1_BASED_VSP_J0039
-#if H_3D_VSP
-  /////////////////////////////////////////////////
-  //////// VIEW SYNTHESIS PREDICTION (VSP) ////////
-  /////////////////////////////////////////////////
-  if (iCount<getSlice()->getMaxNumMergeCand())
-  {
-
-  if (
-#if H_3D_IC
-      !bICFlag &&
-#endif
-#if H_3D_ARP
-      !bARPFlag &&
-#endif
-#if H_3D
-      (nPSW + nPSH > 12) &&
-#endif
-#if H_3D_DBBP
-      !bDBBPFlag &&
-#endif
-      xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) )
-  {
-    return;
-  }
-
-  // early termination
-  if (iCount == getSlice()->getMaxNumMergeCand())
-  {
-    return;
-  }
-#endif
-#if H_3D
-  }
-#endif
-#endif
 
 #if H_3D
@@ -6016,9 +5683,5 @@
     iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId );
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
     if ( iScale != 4096 && m_pcSlice->getIvMvScalingFlag( ) )
-#else
-    if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag(getSlice()->getLayerIdInVps()) ) 
-#endif
     {
       rcMv = cColMv.scaleMv( iScale );
@@ -6203,14 +5866,9 @@
 
   TComMv cMv; 
-#if LGE_DEFAULT_DV_J0046
   if ( getSlice()->getDefaultRefViewIdxAvailableFlag() )
   {
       Int iViewIdx = getSlice()->getDefaultRefViewIdx();
       pDisp->m_aVIdxCan = iViewIdx;
-#if HHI_TOOL_PARAMETERS_I2_J0107
       Int iDisp     = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ];
-#else
-      Int iDisp     = getSlice()->getDepthToDisparityB( iViewIdx )[ 1 << ( getSlice()->getSPS()->getBitDepthY() - 1 ) ];
-#endif
 
       cMv.setHor(iDisp);
@@ -6222,17 +5880,4 @@
   }
   return false;
-#else
-#if MTK_I0093
-  Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ];
-#else
-  Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ 128 ];
-#endif
-  cMv.setHor(iDisp);
-  cMv.setVer(0);
-  pDisp->m_acNBDV = cMv;
-  pDisp->m_aVIdxCan = 0;
-
-  return true;
-#endif
 }
 #endif
@@ -6266,27 +5911,4 @@
     }
     break;
-#if !SINGLE_DEPTH_SIMP_J0115
-  case 2: // Above
-    if(yP != 0)
-    {
-      *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP) ];
-      bDepAvail = true;
-    }
-    break;
-  case 3: // Left
-    if(xP != 0)
-    {
-      *pNeighDepth = pDepth[ (yP) * iDepStride + (xP-1) ];
-      bDepAvail = true;
-    }
-    break;
-  case 4: // Above_Left
-    if(xP != 0 && yP != 0)
-    {
-      *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP-1) ];
-      bDepAvail = true;
-    }
-    break;
-#endif
   default:
       break;
@@ -6327,9 +5949,5 @@
   }
 #if H_3D_NBDV_REF
-#if HHI_TOOL_PARAMETERS_I2_J0107
   if( !m_pcSlice->getDepthRefinementFlag( ) )
-#else
-  if( !m_pcSlice->getVPS()->getDepthRefinementFlag( m_pcSlice->getLayerIdInVps() ) )
-#endif
   {
     bDepthRefine = false;
@@ -6492,5 +6110,4 @@
   pDInfo->m_acNBDV = defaultDV;
 
-#if LGE_DEFAULT_DV_J0046
   if (getSlice()->getDefaultRefViewIdxAvailableFlag())
   {
@@ -6520,65 +6137,6 @@
       pDInfo->m_acDoNBDV = defaultDV;
 #endif
-#if LGE_SIMP_DISP_AVAIL_J0041
       return true;
-#endif
-  }
-#else
-  Int valid = 0;
-  Int viewIndex = 0;
-  for( UInt uiBId = 0; uiBId < getSlice()->getViewIndex() && valid==0; uiBId++ )
-  {
-    UInt        uiBaseId    = uiBId;
-    TComPic*    pcBasePic   = getSlice()->getIvPic( false, uiBaseId );
-    for( Int iRefListId = 0; ( iRefListId < (getSlice()->isInterB()? 2:1) ) && !getSlice()->isIntra() && valid==0; iRefListId++ )
-    {
-      RefPicList  eRefPicListTest = RefPicList( iRefListId );
-      Int         iNumRefPics = getSlice()->getNumRefIdx( eRefPicListTest ) ;
-      for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ )
-      { 
-        if(pcBasePic->getPOC() == getSlice()->getRefPic( eRefPicListTest, iRefIndex )->getPOC() 
-          && pcBasePic->getViewIndex() == getSlice()->getRefPic( eRefPicListTest, iRefIndex )->getViewIndex())
-        {
-          valid=1;
-          viewIndex = uiBaseId;
-          break;
-        }
-      }
-    }
-  }
-  if(valid)
-  {
-    pDInfo->m_aVIdxCan = viewIndex;
-#if H_3D_NBDV_REF
-    TComPic* picDepth = NULL;
-#if H_3D_FCO_VSP_DONBDV_E0163
-    picDepth  = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
-    if ( picDepth->getPicYuvRec() != NULL )  
-    {
-      defaultDV.setZero();
-    }
-    else // Go back with virtual depth
-    {
-      picDepth = getSlice()->getIvPic( true, viewIndex );
-    }
-
-    assert(picDepth != NULL);
-#else
-    picDepth = getSlice()->getIvPic( true, viewIndex );
-#if !BUG_FIX_TK65
-    assert(picDepth!=NULL);
-#endif
-#endif
-    if (picDepth && bDepthRefine)
-    {
-      estimateDVFromDM(viewIndex, uiPartIdx, picDepth, uiPartAddr, &defaultDV ); // from base view
-    }
-    pDInfo->m_acDoNBDV = defaultDV;
-#endif
-#if LGE_SIMP_DISP_AVAIL_J0041
-    return true;
-#endif
-  }
-#endif
+  }
   return false; 
 }
@@ -6834,9 +6392,5 @@
   Bool depthRefineFlag = false; 
 #if H_3D_NBDV_REF
-#if HHI_TOOL_PARAMETERS_I2_J0107
   depthRefineFlag = m_pcSlice->getDepthRefinementFlag( ); 
-#else
-  depthRefineFlag = m_pcSlice->getVPS()->getDepthRefinementFlag( m_pcSlice->getLayerIdInVps() ); 
-#endif
 #endif // H_3D_NBDV_REF
 
@@ -6896,25 +6450,10 @@
 Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight)
 {
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Int iSubPUSize = ( getSlice()->getIsDepth() ? getSlice()->getMpiSubPbSize() : getSlice()->getSubPbSize() );
-#else
-  Int iSubPUSize = 1<<getSlice()->getVPS()->getSubPULog2Size(getSlice()->getLayerId());
-  if( getSlice()->getIsDepth() )
-  {
-    iSubPUSize = 1<<getSlice()->getVPS()->getSubPUMPILog2Size(getSlice()->getLayerId());
-  }
-#endif
 
   iNumSPInOneLine = iPUWidth/iSubPUSize;
-#if !HS_SP_SIMP_J0066
-  iNumSPInOneLine = iNumSPInOneLine < 1 ? 1: iNumSPInOneLine;
-#endif
   Int iNumSPInOneColumn = iPUHeight/iSubPUSize;
-#if !HS_SP_SIMP_J0066
-  iNumSPInOneColumn = iNumSPInOneColumn < 1 ? 1: iNumSPInOneColumn;
-#else
   iNumSPInOneLine = (iPUHeight % iSubPUSize != 0 || iPUWidth % iSubPUSize != 0 ) ? 1 : iNumSPInOneLine;
   iNumSPInOneColumn = (iPUHeight % iSubPUSize != 0  || iPUWidth % iSubPUSize != 0 ) ? 1 : iNumSPInOneColumn;
-#endif
   iNumSP = iNumSPInOneLine * iNumSPInOneColumn;
 
@@ -6990,9 +6529,5 @@
   Bool depthRefineFlag = false; 
 #if H_3D_NBDV_REF
-#if HHI_TOOL_PARAMETERS_I2_J0107
   depthRefineFlag = m_pcSlice->getDepthRefinementFlag( ); 
-#else
-  depthRefineFlag = m_pcSlice->getVPS()->getDepthRefinementFlag( m_pcSlice->getLayerIdInVps() ); 
-#endif
 #endif // H_3D_NBDV_REF
 
Index: /trunk/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComDataCU.h	(revision 1132)
+++ /trunk/source/Lib/TLibCommon/TComDataCU.h	(revision 1133)
@@ -227,12 +227,4 @@
   DisInfo       m_cDefaultDisInfo;    ///< Default disparity information for initializing
 #endif
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  UChar*        m_pucDisparityDerivedDepth;
-  Bool*         m_pbUseDDD;
-  Int           m_iUseDDDCandIdx;
-  UChar         m_ucDDTmpDepth;
-#endif
-#endif
 #if H_3D_IV_MERGE
   TComMotionCand  m_mergCands[MRG_IVSHIFT+1];
@@ -743,23 +735,4 @@
   UInt          getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra);
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  UChar*       getDDDepth        ()                        { return m_pucDisparityDerivedDepth;        }
-  UChar        getDDDepth        ( UInt uiIdx )            { return m_pucDisparityDerivedDepth[uiIdx]; }
-  Void         setDDDepth        ( UInt uiIdx, UChar n )   { m_pucDisparityDerivedDepth[uiIdx] = n;    }
-  Void         setDDDepthSubParts( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
-
-  Bool*        getUseDDD        ()                        { return m_pbUseDDD;        }
-  Bool         getUseDDD        ( UInt uiIdx )            { return m_pbUseDDD[uiIdx]; }
-  Void         setUseDDD        ( UInt uiIdx, Bool n )     { m_pbUseDDD[uiIdx] = n;    }
-  Void         setUseDDD( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiDepth );
-
-  Void         setUseDDD        ( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
-
-  UChar        getDDTmpDepth(){ return m_ucDDTmpDepth; }
-  Int          getUseDDDCandIdx(){ return m_iUseDDDCandIdx;}
-
-#endif
-#endif
 
 #if H_3D_DIM
Index: /trunk/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1133)
@@ -1158,42 +1158,4 @@
   pcCU->clipMv(cMv);
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  if( pcCU->getUseDDD( uiPartAddr ) )
-  {
-      assert( pcCU->getSPIVMPFlag( uiPartAddr ) == 0 );
-      assert( pcCU->getSlice()->getViewIndex() != 0 );
-
-      Int dstStride = rpcYuvPred->getStride();
-      Int dstStrideC = rpcYuvPred->getCStride();
-      Pel *dst      = rpcYuvPred->getLumaAddr( uiPartAddr );
-      Pel *dstU     = rpcYuvPred->getCbAddr( uiPartAddr );
-      Pel *dstV     = rpcYuvPred->getCrAddr( uiPartAddr );
-
-      Int iWidthC  = iWidth >> 1;
-      Int iHeightC = iHeight >> 1;
-      Int DefaultC = 1 << ( g_bitDepthY - 1);
-      for ( Int i = 0; i < iHeight; i++)
-      {
-          for ( Int j = 0; j < iWidth ; j++)
-          {
-              dst[j] = pcCU->getDDDepth( uiPartAddr );
-          }
-          dst += dstStride;
-      }
-      for ( Int i = 0; i < iHeightC; i++)
-      {
-          for ( Int j = 0; j < iWidthC; j++)
-          {
-              dstU[j] = dstV[j] = DefaultC;
-          }
-          dstU += dstStrideC;
-          dstV += dstStrideC;
-      }
-
-      //return;
-  } else
-#endif
-#endif
 #if H_3D_ARP
   if(pcCU->getARPW( uiPartAddr ) > 0  && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC())
@@ -2190,13 +2152,9 @@
       x += pRef[j];
       y += pRec[j];
-#if LGE_CHROMA_IC_J0050_J0034
       if ( eType == TEXT_LUMA )
       {
-#endif
         xx += (pRef[j] * pRef[j])>>precShift;
         xy += (pRef[j] * pRec[j])>>precShift;
-#if LGE_CHROMA_IC_J0050_J0034
-      }
-#endif
+      }
     }
     iCountShift += g_aucConvertToBit[ uiWidth ] + 1;
@@ -2227,13 +2185,9 @@
       x += pRef[0];
       y += pRec[0];
-#if LGE_CHROMA_IC_J0050_J0034
       if ( eType == TEXT_LUMA )
       {
-#endif
         xx += (pRef[0] * pRef[0])>>precShift;
         xy += (pRef[0] * pRec[0])>>precShift;
-#if LGE_CHROMA_IC_J0050_J0034
-      }
-#endif      
+      }
       pRef += iRefStride*2;
       pRec += iRecStride*2;
@@ -2249,5 +2203,4 @@
   }
 
-#if LGE_CHROMA_IC_J0050_J0034
   if (  eType != TEXT_LUMA )
   {
@@ -2257,5 +2210,4 @@
   else
   {
-#endif
   xy += xx >> IC_REG_COST_SHIFT;
   xx += xx >> IC_REG_COST_SHIFT;
@@ -2299,7 +2251,5 @@
     }
   }   
-#if LGE_CHROMA_IC_J0050_J0034
-  }
-#endif
+  }
 }
 #endif
Index: /trunk/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComRom.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibCommon/TComRom.cpp	(revision 1133)
@@ -362,9 +362,5 @@
 const UChar g_dmm1TabIdxBits[6] =
 { //2x2   4x4   8x8 16x16 32x32 64x64
-#if MTK_DMM_SIM_J0035 
      0,    7,   10,   9,    9,   13 };
-#else
-     0,    7,   10,   11,   11,   13 };
-#endif
 
 const UChar g_dmm3IntraTabIdxBits[6] =
@@ -767,5 +763,4 @@
     }
 
-#if MTK_DMM_SIM_J0035
     for( Int iK = 0; iK < uiBlockSize; iK += (uiWidth>=16 ?2:1))
     {
@@ -776,14 +771,4 @@
       }
     }
-#else
-    for( Int iK = 0; iK < uiBlockSize; iK++ )
-    {
-      for( Int iL = 0; iL < uiBlockSize; iL++ )
-      {
-        cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) );
-        addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList );
-      }
-    }
-#endif
   }
 
Index: /trunk/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComSlice.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibCommon/TComSlice.cpp	(revision 1133)
@@ -179,8 +179,6 @@
   }
 #endif
-#if LGE_DEFAULT_DV_J0046
   m_iDefaultRefViewIdx = -1;
   m_bDefaultRefViewIdxAvailableFlag = false;
-#endif
 }
 
@@ -1879,7 +1877,5 @@
   m_vpsBaseLayerAvailableFlag = true; 
 
-#if  H_MV_FIX_NUM_VIEWS
   m_numViews = 0; 
-#endif
 
 #endif
@@ -1918,7 +1914,5 @@
   m_repFormatIdxPresentFlag = false; 
   m_maxOneActiveRefLayerFlag = false; 
-#if H_MV_HLS_FIX
   m_vpsPocLsbAlignedFlag  = false; 
-#endif
   m_directDepTypeLenMinus2   = 0;         
   
@@ -1956,8 +1950,6 @@
     m_layerIdInNuh      [i] = ( i == 0 ) ? 0 : -1; 
     m_numDirectRefLayers[i] = 0; 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
     m_numRefListLayers[i] = 0; 
-#endif
 #endif
     m_vpsRepFormatIdx    [i] = 0; 
@@ -1968,12 +1960,4 @@
 #if H_3D
     m_viewIndex         [i] = -1; 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-    m_vpsDepthModesFlag [i] = false;
-    m_ivMvScalingFlag[i] = true; 
-    m_bIVPFlag [i]      = false;
-#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-    m_singleDepthModeFlag[ i ] = false;
-#endif
-#endif
 #endif
 
@@ -1984,8 +1968,6 @@
       m_dependencyFlag  [i][j]    = false; 
       m_idDirectRefLayer[i][j]    = -1; 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
       m_idRefListLayer[i][j]    = -1; 
-#endif
 #endif
       m_idPredictedLayer[i][j]    = -1; 
@@ -1999,8 +1981,4 @@
     }
 #if H_3D_ARP
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-    m_uiUseAdvResPred[i]  = 0;
-    m_uiARPStepNum[i]     = 1;
-#endif
 #endif
   }
@@ -2008,38 +1986,4 @@
   m_dpbSize = new TComDpbSize; 
 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D
-  for( Int i = 0; i < MAX_NUM_LAYERS; i++ )
-  {
-#if H_3D_IV_MERGE
-    m_ivMvPredFlag         [ i ] = false;
-#if H_3D_SPIVMP
-    m_iSubPULog2Size       [ i ] = 0;
-#endif
-#endif
-#if H_3D_QTLPC
-    m_bLimQtPredFlag       [ i ] = false;
-#endif
-#if H_3D_VSP
-    m_viewSynthesisPredFlag[ i ] = false;
-#endif
-#if H_3D_NBDV_REF
-    m_depthRefinementFlag  [ i ] = false;
-#endif
-#if H_3D_INTER_SDC
-    m_bInterSDCFlag        [ i ] = false;
-#endif
-#if H_3D
-    m_bIVPFlag             [ i ] = false;
-#endif
-#if H_3D_DBBP
-    m_dbbpFlag             [ i ] = false;
-#endif
-#if H_3D_IV_MERGE
-    m_bMPIFlag             [ i ] = false;
-#endif
-  }  
-#endif
-#endif
 
 #endif
@@ -2132,9 +2076,7 @@
     Int iNuhLId = getLayerIdInNuh( i );
     Int d = 0;
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
     Int l = 0; 
 #endif
-#endif
     Int r = 0;
     Int p = 0;
@@ -2147,5 +2089,4 @@
         m_idDirectRefLayer[iNuhLId][d++] = jNuhLid;
       }
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
       if( getDirectDependencyFlag( i , j ) && ( getDepthId( iNuhLId ) == getDepthId( jNuhLid ) ))
@@ -2154,5 +2095,4 @@
       }
 #endif
-#endif
 
       if( getDependencyFlag( i , j ) )
@@ -2166,8 +2106,6 @@
     }
     m_numDirectRefLayers[ iNuhLId ] = d;
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
     m_numRefListLayers[ iNuhLId ] = l; 
-#endif
 #endif
 
@@ -2206,5 +2144,4 @@
 
 
-#if H_MV_FIX_NUM_VIEWS
 Void     TComVPS::initNumViews( )
 {
@@ -2242,5 +2179,4 @@
   }
 }
-#endif
 
 
@@ -2403,19 +2339,4 @@
 }
 
-#if !H_MV_FIX_NUM_VIEWS
-Int TComVPS::getNumViews()
-{
-  Int numViews = 1; 
-  for( Int i = 0; i <=  getMaxLayersMinus1(); i++ )
-  {
-    Int lId = getLayerIdInNuh( i ); 
-    if ( i > 0 && ( getViewIndex( lId ) != getScalabilityId( i - 1, VIEW_ORDER_INDEX ) ) )
-    {
-      numViews++; 
-    }    
-  }
-  return numViews;
-}
-#endif
 
 
@@ -2656,8 +2577,6 @@
   xPrintArray( "IdRefLayer"      , getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numRefLayers, m_idRefLayer, true );
   xPrintArray( "IdDirectRefLayer", getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numDirectRefLayers, m_idDirectRefLayer, true );
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   xPrintArray( "IdRefListLayer", getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numRefListLayers, m_idRefListLayer, true );
-#endif
 #endif
 
@@ -3084,24 +3003,5 @@
       i++;
     }
-#if SHARP_DLT_SIMP_J0029
     iIdxUp = bFound ?  iIdxDown + 1 : iNumDepthValues-1;
-#else
-    // iterate over indices to find upper closest depth
-    i = iNumDepthValues-2;
-    bFound = false;
-    while(!bFound && i>=0)
-    {
-      if( m_iIdx2DepthValue[layerIdInVps][i] < p )
-      {
-        iIdxUp  = i+1;
-        bFound    = true;
-      }
-
-      i--;
-    }
-
-    // assert monotony
-    assert(iIdxDown<=iIdxUp);
-#endif
 
     // assign closer depth value/idx
@@ -3684,5 +3584,4 @@
 {
   TComVPS* vps = getVPS(); 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   Int refLayerIdx = vps->getLayerIdInVps( vps->getIdRefListLayer( getLayerId(), i ) ); 
@@ -3690,15 +3589,7 @@
   Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) ); 
 #endif
-#else
-  Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) ); 
-#endif
-
-#if H_MV_FIX_REF_LAYER_PIC_FLAG
+
   Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer()  && ( getTLayer() == 0   ||
     vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() )); 
-#else
-  Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  && ( getTLayer() == 0  ) &&
-    ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() ); 
-#endif
   return refLayerPicFlag;       
 }    
@@ -3708,5 +3599,4 @@
   Int refLayerPicIdc = -1; 
   Int curj = 0; 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   for( Int i = 0;  i < getVPS()->getNumRefListLayers( getLayerId()) ; i++ )
@@ -3714,7 +3604,4 @@
   for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
 #endif
-#else
-  for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
-#endif
   {
     if( getRefLayerPicFlag( i ) )
@@ -3737,5 +3624,4 @@
 {  
   Int numRefLayerPics = 0; 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   for( Int i = 0;  i < getVPS()->getNumRefListLayers( getLayerId()) ; i++ )
@@ -3743,7 +3629,4 @@
   for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
 #endif
-#else
-  for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
-#endif
   {
     numRefLayerPics += getRefLayerPicFlag( i ); 
@@ -3770,5 +3653,4 @@
     numActiveRefLayerPics = 0; 
   }
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumRefListLayers( getLayerId() ) == 1 )
@@ -3776,7 +3658,4 @@
   else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
 #endif
-#else
-  else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
-#endif  
   {
     numActiveRefLayerPics = 1; 
@@ -3791,5 +3670,4 @@
 Int TComSlice::getRefPicLayerId( Int i )
 {
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   return getVPS()->getIdRefListLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
@@ -3797,10 +3675,6 @@
   return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
 #endif
-#else
-  return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
-#endif
-}
-
-#if SEC_ARP_VIEW_REF_CHECK_J0037 || SEC_DBBP_VIEW_REF_CHECK_J0037
+}
+#if H_3D
 Void TComSlice::setDefaultRefView( )
 {
@@ -3839,9 +3713,5 @@
 {
   Bool tempRefPicInListsFlag = false;
-#if HHI_TOOL_PARAMETERS_I2_J0107
   if( !getIvResPredFlag() || this->isIRAP())
-#else
-  if(!getVPS()->getUseAdvRP(getLayerId()) || this->isIRAP())
-#endif
   {
     m_nARPStepNum = 0;
@@ -3871,14 +3741,6 @@
       }
     }
-#if SEC_ARP_VIEW_REF_CHECK_J0037
     tempRefPicInListsFlag = (getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0) && getDefaultRefViewIdxAvailableFlag();
-#else
-    tempRefPicInListsFlag = getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0;
-#endif
-#if HHI_TOOL_PARAMETERS_I2_J0107
     m_nARPStepNum = tempRefPicInListsFlag ?  H_3D_ARP_WFNR : 0;
-#else
-    m_nARPStepNum = tempRefPicInListsFlag ? getVPS()->getARPStepNum(getLayerId()) : 0;
-#endif
   }
 
@@ -4063,44 +3925,14 @@
   Bool setupLUT = false; 
   
-#if HHI_TOOL_PARAMETERS_I2_J0107
   setupLUT = setupLUT || getViewSynthesisPredFlag( ); 
-#else
-  Int layerIdInVPS = getVPS()->getLayerIdInNuh( m_layerId ); 
-#if H_3D_VSP
-  setupLUT = setupLUT || getVPS()->getViewSynthesisPredFlag( layerIdInVPS); 
-#endif
-#endif
 
 #if H_3D_NBDV_REF
-#if HHI_TOOL_PARAMETERS_I2_J0107
   setupLUT = setupLUT || getDepthRefinementFlag( );
-#else
-  setupLUT = setupLUT || getVPS()->getDepthRefinementFlag( layerIdInVPS );
-#endif
 #endif 
 
 #if H_3D_IV_MERGE
-#if HHI_TOOL_PARAMETERS_I2_J0107
   setupLUT = setupLUT || ( getIvMvPredFlag() && getIsDepth() );
-#else
-  setupLUT = setupLUT || ( getVPS()->getIvMvPredFlag(layerIdInVPS ) && getIsDepth() );
-#endif
-#endif
-
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-#if H_3D_FCO
-  if( getIsDepth() && getViewIndex() > 0 && getVPS()->getMPIFlag(layerIdInVPS))
-#else
-  if( getIsDepth() && getViewIndex() > 0 )
-#endif
-  {
-      TComSlice *pcTextSlice = getTexturePic()->getSlice( 0 );
-      memcpy( m_aiDDDInvScale, pcTextSlice->m_aiDDDInvScale, sizeof( Int ) * getViewIndex() );
-      memcpy( m_aiDDDInvOffset, pcTextSlice->m_aiDDDInvOffset, sizeof( Int ) * getViewIndex() );
-      memcpy( m_aiDDDShift, pcTextSlice->m_aiDDDShift, sizeof( Int ) * getViewIndex() );             
-  }  
-#endif 
-#endif
+#endif
+
 
   if( !setupLUT )
@@ -4151,78 +3983,9 @@
       m_depthToDisparityF[ i ][ d ] = ( invCodScale[ i ] * d + invOffset ) >> log2Div; 
     }
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-    initializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i );
-#endif
-#endif
-  }
-}
-#endif
-#endif
-
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-Void TComSlice::initializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx )
-{
-    UInt uiViewId     = getViewIndex();
-
-    if( uiViewId == 0 )
-    {
-        m_aiDDDInvScale[ iBaseViewIdx ] = m_aiDDDInvOffset[ iBaseViewIdx ] = m_aiDDDShift[ iBaseViewIdx ] = 0;
-        return;
-    }
-
-
-    Int iSign = iCodedScale >= 0 ? 1 : -1;
-    iCodedScale = abs( iCodedScale );
-
-    Int iBitWidth = 0;
-
-    const Int iInvPres = 9;
-
-    while( ((( 1 << iBitWidth ) << 1 ) <= iCodedScale ) )
-    {
-        iBitWidth ++;
-    }
-    iBitWidth += iInvPres;
-    Int iTargetValue =  1 << iBitWidth;
-
-    Int iMinError = MAX_INT;
-    Int iBestD = 1 << ( iInvPres - 1 );
-    for( Int d = 1 << ( iInvPres - 1 ); d < ( 1 << iInvPres ); d++ )
-    {
-        Int iError = abs( iCodedScale * d - iTargetValue );
-        if( iError < iMinError )
-        {
-            iMinError = iError;
-            iBestD = d;
-        }
-        if( iMinError == 0 )
-        {
-            break;
-        }
-    }
-    Int iRoundingDir = 0;
-    if( iCodedScale * iBestD > iTargetValue )
-    {
-        iRoundingDir = -1;
-    }
-    else if( iCodedScale * iBestD < iTargetValue )
-    {
-        iRoundingDir = 1;
-    }
-    Int iCamPres = uiCamParsCodedPrecision - 1;
-    m_aiDDDInvScale [ iBaseViewIdx ] = ( iBestD << ( iCamPres + g_bitDepthY )) * iSign;
-    m_aiDDDInvOffset[ iBaseViewIdx ] = -iSign * iBestD * ( iCodedOffset << g_bitDepthY );
-    m_aiDDDShift    [ iBaseViewIdx ] = iBitWidth;
-    m_aiDDDInvOffset[ iBaseViewIdx ] += 1 << ( m_aiDDDShift[ iBaseViewIdx ] - 1 );
-    m_aiDDDInvOffset[ iBaseViewIdx ] += ( 1 << ( m_aiDDDShift[ iBaseViewIdx ] - 4 ) ) * iRoundingDir;
-
-    return;
-}
-
-
-#endif
-#endif
+  }
+}
+#endif
+#endif
+
 
 #if H_MV
@@ -4258,14 +4021,5 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DBBP
-Int TComSlice::getDepthFromDV( Int iDV, Int iBaseViewIdx )
-{
-  return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]);
-}
-#endif
-#endif
-
-#if HHI_TOOL_PARAMETERS_I2_J0107
+
 #if H_3D
 
@@ -4364,5 +4118,4 @@
 }
 #endif
-#endif
 
 
Index: /trunk/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComSlice.h	(revision 1132)
+++ /trunk/source/Lib/TLibCommon/TComSlice.h	(revision 1133)
@@ -861,7 +861,5 @@
   TComRepFormat* m_repFormat             [MAX_NUM_LAYERS]; 
   Bool        m_maxOneActiveRefLayerFlag;       
-#if H_MV_HLS7_GEN || H_MV_HLS_FIX
   Bool        m_vpsPocLsbAlignedFlag;
-#endif
   Bool        m_pocLsbNotPresentFlag     [MAX_NUM_LAYERS];
 
@@ -884,14 +882,10 @@
   Int         m_dependencyFlag           [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 
 
-#if H_MV_FIX_NUM_VIEWS
   Int         m_numViews; 
-#endif
   Int         m_numDirectRefLayers       [MAX_NUM_LAYERS];
   Int         m_idDirectRefLayer         [MAX_NUM_LAYERS][MAX_NUM_LAYERS];  
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   Int         m_numRefListLayers         [MAX_NUM_LAYERS];
   Int         m_idRefListLayer           [MAX_NUM_LAYERS][MAX_NUM_LAYERS];  
-#endif
 #endif
 
@@ -919,31 +913,4 @@
   Void        xSetRefLayerFlags( Int currLayerId );
   // VPS EXTENSION 2 SYNTAX ELEMENTS
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_ARP
-  UInt        m_uiUseAdvResPred          [MAX_NUM_LAYERS   ];
-  UInt        m_uiARPStepNum             [MAX_NUM_LAYERS   ];
-#endif
-#if H_3D_IV_MERGE
-  Bool        m_ivMvPredFlag             [ MAX_NUM_LAYERS ]; 
-  Bool        m_ivMvScalingFlag          [ MAX_NUM_LAYERS ]; 
-#if H_3D_SPIVMP
-  Int         m_iSubPULog2Size           [MAX_NUM_LAYERS   ];
-  Int         m_iSubPUMPILog2Size        [MAX_NUM_LAYERS   ];
-#endif
-#endif
-#if H_3D_QTLPC
-  Bool        m_bLimQtPredFlag           [ MAX_NUM_LAYERS ];
-#endif
-#if H_3D_VSP
-  Bool        m_viewSynthesisPredFlag    [ MAX_NUM_LAYERS ];
-#endif
-#if H_3D_NBDV_REF
-  Bool        m_depthRefinementFlag      [ MAX_NUM_LAYERS ]; 
-#endif
-  Bool        m_vpsDepthModesFlag        [MAX_NUM_LAYERS   ];
-#if H_3D
-  Bool        m_bIVPFlag                 [MAX_NUM_LAYERS   ];
-#endif
-#endif
 #if H_3D
   UInt        m_uiCamParPrecision;
@@ -953,24 +920,8 @@
   Int         ***m_aaaiCodedOffset;
 
-#if H_MV_FIX_NUM_VIEWS
 #if HHI_VIEW_ID_LIST_I5_J0107
   std::vector<Int>  m_viewOIdxList;
 #endif
-#endif
-
-#endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_INTER_SDC
-  Bool        m_bInterSDCFlag[MAX_NUM_LAYERS   ];
-#endif
-#if H_3D_DBBP
-  Bool        m_dbbpFlag[MAX_NUM_LAYERS];
-#endif
-#if H_3D_IV_MERGE
-  Bool        m_bMPIFlag[MAX_NUM_LAYERS   ];
-#endif
-#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-  Bool        m_singleDepthModeFlag    [ MAX_NUM_LAYERS ];
-#endif
+
 #endif
 
@@ -1159,8 +1110,6 @@
   Bool    getMaxOneActiveRefLayerFlag( )                                   { return m_maxOneActiveRefLayerFlag; } 
 
-#if H_MV_HLS7_GEN || H_MV_HLS_FIX
   Void    setVpsPocLsbAlignedFlag( Bool flag )                             { m_vpsPocLsbAlignedFlag = flag; } 
   Bool    getVpsPocLsbAlignedFlag(  )                                      { return m_vpsPocLsbAlignedFlag; } 
-#endif
 
   Void    setDpbSize( TComDpbSize* val )                                   { assert( m_dpbSize != 0 ); m_dpbSize = val; } 
@@ -1196,14 +1145,9 @@
   Void    setRefLayers(); 
 
-#if H_MV_FIX_NUM_VIEWS
   // To be aligned with spec naming, getViewIndex will be removed in future versions
   Int     getViewOrderIdx ( Int layerIdInNuh )                             { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX  ); }    
   Int     getViewIndex    ( Int layerIdInNuh )                             { return getViewOrderIdx( layerIdInNuh ); }    
-#else
-  Int     getViewIndex    ( Int layerIdInNuh )                             { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX  ); }    
-#endif
   Int     getAuxId        ( Int layerIdInNuh )                             { return getScalabilityId( getLayerIdInVps(layerIdInNuh), AUX_ID  ); }    
   Int     getDependencyId ( Int layerIdInNuh )                             { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPENDENCY_ID  ); }    
-#if H_MV_FIX_NUM_VIEWS
   Int     getNumViews()                                                    { return m_numViews; }
   Void    initNumViews();
@@ -1211,14 +1155,9 @@
   Int     getViewOIdxList( Int i )                                         { return m_viewOIdxList[i]; }
 #endif
-#else
-  Int     getNumViews();
-#endif
 
   Bool    getDependencyFlag( Int i, Int j )                                { return m_dependencyFlag[i][j]; }
   Int     getNumDirectRefLayers( Int layerIdInNuh )                        { return m_numDirectRefLayers[ layerIdInNuh ];  };                               
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   Int     getNumRefListLayers( Int layerIdInNuh )                         { return m_numRefListLayers[ layerIdInNuh ];  };                               
-#endif
 #endif
 
@@ -1230,8 +1169,6 @@
   Int     getIdPredictedLayer        ( Int i, Int j ) { assert( j >= 0 && j < getNumPredictedLayers( i )); return m_idPredictedLayer[i][j]; } 
   Int     getIdDirectRefLayer        ( Int i, Int j ) { assert( j >= 0 && j < getNumDirectRefLayers( i )); return m_idDirectRefLayer[i][j]; } 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   Int     getIdRefListLayer          ( Int i, Int j ) { assert( j >= 0 && j < getNumRefListLayers   ( i )); return m_idRefListLayer[i][j]; } 
-#endif
 #endif
   Int     getNumIndependentLayers    (  )             { return m_numIndependentLayers; } 
@@ -1333,17 +1270,7 @@
 #if H_3D  
   Int     getDepthId      ( Int layerIdInNuh)                             { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPTH_ID ); }
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Bool    getVpsDepthFlag( Int layerIdInNuh)                              { return (getDepthId( layerIdInNuh ) > 0);  }
-#endif
   Int     getLayerIdInNuh( Int viewIndex, Bool depthFlag );   
 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_ARP
-  UInt    getUseAdvRP  ( Int layerIdInVps )                                { return m_uiUseAdvResPred[layerIdInVps];    }
-  UInt    getARPStepNum( Int layerIdInVps )                                { return m_uiARPStepNum[layerIdInVps];       }
-  Void    setUseAdvRP  ( Int layerIdInVps, UInt val )                      { m_uiUseAdvResPred[layerIdInVps] = val;     }
-  Void    setARPStepNum( Int layerIdInVps, UInt val )                      { m_uiARPStepNum[layerIdInVps]    = val;     }
-#endif
-#endif
 
   Void createCamPars(Int iNumViews);
@@ -1360,53 +1287,4 @@
   Int* getInvCodedOffset     ( Int viewIndex )  { return m_aaaiCodedOffset[viewIndex][1]; }
 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_IV_MERGE
-  Void    setIvMvPredFlag     ( Int layerIdInVps, Bool val )  { m_ivMvPredFlag[ layerIdInVps ] = val; }
-  Bool    getIvMvPredFlag     ( Int layerIdInVps )            { return m_ivMvPredFlag[ layerIdInVps ]; }; 
-#if H_3D_SPIVMP
-  Int     getSubPULog2Size(Int layerIdInVps)           { return m_iSubPULog2Size[layerIdInVps]; }
-  Void    setSubPULog2Size(Int layerIdInVps, Int u)    { m_iSubPULog2Size[layerIdInVps] = u;}
-  Int     getSubPUMPILog2Size(Int layerIdInVps)           { return m_iSubPUMPILog2Size[layerIdInVps]; }
-  Void    setSubPUMPILog2Size(Int layerIdInVps, Int u)    { m_iSubPUMPILog2Size[layerIdInVps] = u;}
-#endif
-#endif
-#if H_3D_QTLPC
-  Void    setLimQtPredFlag    ( Int layerIdInVps, Bool val )  { m_bLimQtPredFlag[ layerIdInVps ] = val; }
-  Bool    getLimQtPredFlag    ( Int layerIdInVps ) { return m_bLimQtPredFlag[layerIdInVps];}
-#endif
-#if H_3D_VSP
-  Void    setViewSynthesisPredFlag  ( Int layerIdInVps, Bool val )  { m_viewSynthesisPredFlag[ layerIdInVps ] = val; }
-  Bool    getViewSynthesisPredFlag  ( Int layerIdInVps )            { return m_viewSynthesisPredFlag[ layerIdInVps ]; }; 
-#endif
-#if H_3D_NBDV_REF
-  Void    setDepthRefinementFlag  ( Int layerIdInVps, Bool val )  { m_depthRefinementFlag[ layerIdInVps ] = val; }
-  Bool    getDepthRefinementFlag  ( Int layerIdInVps )            { return m_depthRefinementFlag[ layerIdInVps ]; }; 
-#endif
-  Void    setVpsDepthModesFlag( Int layerIdInVps, Bool val )               { m_vpsDepthModesFlag[ layerIdInVps ] = val; }
-  Bool    getVpsDepthModesFlag( Int layerIdInVps )                         { return m_vpsDepthModesFlag[ layerIdInVps ]; }
-
-  Void    setIVPFlag( Int layerIdInVps, Bool val )                    { m_bIVPFlag[ layerIdInVps ] = val; }
-  Bool    getIVPFlag( Int layerIdInVps )                              { return m_bIVPFlag[ layerIdInVps ]; }
-
-  Bool    getIvMvScalingFlag   ( Int layerIdInVps )                        { return m_ivMvScalingFlag[ layerIdInVps ]; }
-  Void    setIvMvScalingFlag   (Int layerIdInVps, Bool b )                 { m_ivMvScalingFlag[ layerIdInVps ] = b;    }  
-
-#if H_3D_INTER_SDC
-  Bool    getInterSDCFlag      ( Int layerIdInVps )           { return m_bInterSDCFlag[layerIdInVps]; }
-  Void    setInterSDCFlag      ( Int layerIdInVps, Bool bval ){ m_bInterSDCFlag[layerIdInVps] = bval; }
-#endif
-#if H_3D_DBBP
-  Bool getUseDBBP              ( Int layerIdInVps )         { return m_dbbpFlag[layerIdInVps]; }
-  Void setUseDBBP              ( Int layerIdInVps, Bool bval ){ m_dbbpFlag[layerIdInVps] = bval; }
-#endif
-#if H_3D_IV_MERGE
-  Bool    getMPIFlag      ( Int layerIdInVps )           { return m_bMPIFlag[layerIdInVps]; }
-  Void    setMPIFlag      ( Int layerIdInVps, Bool bval ){ m_bMPIFlag[layerIdInVps] = bval; }
-#endif
-#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-  Void    setSingleDepthModeFlag  ( Int layerIdInVps, Bool val )  { m_singleDepthModeFlag[ layerIdInVps ] = val; }
-  Bool    getSingleDepthModeFlag  ( Int layerIdInVps )            { return m_singleDepthModeFlag[ layerIdInVps ]; }; 
-#endif
-#endif  
 #endif
 #endif
@@ -1675,5 +1553,4 @@
 };
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
 #if H_3D
 class TComSps3dExtension
@@ -1762,5 +1639,4 @@
 
 #endif
-#endif
 
 /// SPS class
@@ -1863,7 +1739,5 @@
 #endif
 #if H_3D
-#if HHI_TOOL_PARAMETERS_I2_J0107
   TComSps3dExtension m_sps3dExtension; 
-#endif
   UInt        m_uiCamParPrecision;
   Bool        m_bCamParInSliceHeader;
@@ -2044,9 +1918,7 @@
   Bool getInterViewMvVertConstraintFlag()         { return m_interViewMvVertConstraintFlag;}
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
 #if H_3D
   Void setSps3dExtension ( TComSps3dExtension& sps3dExtension ) { m_sps3dExtension = sps3dExtension; }
   TComSps3dExtension* getSps3dExtension ( )                     { return &m_sps3dExtension; }
-#endif
 #endif
 
@@ -2505,11 +2377,4 @@
 #endif
 #endif
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  Int          m_aiDDDInvScale [MAX_NUM_LAYERS];
-  Int          m_aiDDDInvOffset[MAX_NUM_LAYERS];
-  UInt         m_aiDDDShift    [MAX_NUM_LAYERS];
-#endif
-#endif
 #if H_3D_SINGLE_DEPTH
   Bool      m_bApplySingleDepthMode;
@@ -2519,10 +2384,7 @@
   Int *m_aICEnableNum;
 #endif
-#if LGE_DEFAULT_DV_J0046
   Int       m_iDefaultRefViewIdx;
   Bool      m_bDefaultRefViewIdxAvailableFlag;
-#endif
-
-#if HHI_TOOL_PARAMETERS_I2_J0107
+
   Bool m_ivMvPredFlag         ;
   Bool m_ivMvScalingFlag      ;
@@ -2540,5 +2402,4 @@
   Int  m_mpiSubPbSize         ; 
   Int  m_subPbSize            ; 
-#endif
 public:
   TComSlice();
@@ -2610,10 +2471,4 @@
 #if H_3D
   TComPic*  getTexturePic       ()                              { return  m_ivPicsCurrPoc[0][ m_viewIndex ]; }
-#endif
-#if !MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-#if H_3D_SINGLE_DEPTH
-  Void      setApplySingleDepthMode( Bool b )                                { m_bApplySingleDepthMode = b; }
-  Bool      getApplySingleDepthMode()                                        { return m_bApplySingleDepthMode; }
-#endif
 #endif
 #if H_3D_IC
@@ -2853,8 +2708,4 @@
   Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ refViewIdx ]; }; 
   Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; }; 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  Bool getVpsDepthModesFlag  ()  { return getVPS()->getVpsDepthModesFlag( getVPS()->getLayerIdInVps( m_layerId ) ); }
-  Bool getIVPFlag       ()  { return getVPS()->getIVPFlag( getVPS()->getLayerIdInVps( m_layerId ) ); }
-#endif
 #endif
 #if H_3D_IC
@@ -2914,11 +2765,6 @@
   Int  getPocMsbVal(  ) { return m_pocMsbVal; } 
 
-#if H_MV_HLS_FIX
   Bool getCraOrBlaPicFlag() { return ( getCraPicFlag() || getBlaPicFlag() ); } 
   Bool getPocMsbValRequiredFlag() { return ( getCraOrBlaPicFlag() && ( getVPS()->getVpsPocLsbAlignedFlag() || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 0 ) );  }
-#else
-  Bool getPocMsbValRequiredFlag() { return m_pocMsbValRequiredFlag; }
-  Void setPocMsbValRequiredFlag(Bool x) { m_pocMsbValRequiredFlag = x; }
-#endif
 
 
@@ -2938,5 +2784,4 @@
   // Additional variables derived in slice header semantics 
 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   Int  getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2(  getVPS()->getNumRefListLayers( getLayerId() )); }
@@ -2947,8 +2792,4 @@
 #endif
 
-#else
-  Int  getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2(  getVPS()->getNumDirectRefLayers( getLayerId() )); }
-  Int  getInterLayerPredLayerIdcLen    ( ) { return gCeilLog2(  getVPS()->getNumDirectRefLayers( getLayerId() )); }
-#endif
 
   Int  getRefLayerPicFlag( Int i ); 
@@ -2967,5 +2808,4 @@
 
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
 #if H_3D
   // 3D-HEVC tool parameters
@@ -2987,5 +2827,4 @@
   Int  getSubPbSize              ( ) { return m_subPbSize              ; }; 
 #endif
-#endif
 
 
@@ -2993,11 +2832,5 @@
   Bool inferPocMsbValPresentFlag();  
 #endif
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  Void initializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx );
-  Int  getDepthFromDV( Int iDV, Int iBaseViewIdx );
-#endif
-#endif
-#if LGE_DEFAULT_DV_J0046
+#if H_3D
   Int  getDefaultRefViewIdx() { return m_iDefaultRefViewIdx; }
   Void setDefaultRefViewIdx(Int iViewIdx) { m_iDefaultRefViewIdx = iViewIdx; }
@@ -3005,9 +2838,6 @@
   Bool getDefaultRefViewIdxAvailableFlag() { return m_bDefaultRefViewIdxAvailableFlag; }
   Void setDefaultRefViewIdxAvailableFlag(Bool bViewIdx) { m_bDefaultRefViewIdxAvailableFlag = bViewIdx; }
-#endif
-#if SEC_ARP_VIEW_REF_CHECK_J0037 || SEC_DBBP_VIEW_REF_CHECK_J0037
   Void setDefaultRefView( );
 #endif
-
 protected:
   TComPic*  xGetRefPic  (TComList<TComPic*>& rcListPic,
Index: /trunk/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TypeDef.h	(revision 1132)
+++ /trunk/source/Lib/TLibCommon/TypeDef.h	(revision 1133)
@@ -103,5 +103,5 @@
                                               // MTK_NBDV_TN_FIX_E0172     fix the issue of DV derivation from the temporal neighboring blocks, issue 7 in JCT3V-E0172
                                               // MTK_TEXTURE_MRGCAND_BUGFIX_E0182  Bug fix for TEXTURE MERGING CANDIDATE     , JCT3V-E0182
-#define LGE_SIMP_DISP_AVAIL_J0041    1   // Use 2 status for disparity availability - DISP_AVAILABLE and DISP_NONE
+                                              // LGE_SIMP_DISP_AVAIL_J0041    // Use 2 status for disparity availability - DISP_AVAILABLE and DISP_NONE
 
 #define H_3D_ARP                          1   // Advanced residual prediction (ARP), JCT3V-D0177
@@ -129,4 +129,5 @@
                                               // 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
+                                              // LGE_CHROMA_IC_J0050_J0034
 
 #if H_3D_NBDV
@@ -156,5 +157,7 @@
                                               // NTT_STORE_SPDV_VSP_G0148 Storing Sub-PU based DV for VSP
                                               // Restricted bi-prediction for VSP
-#define SEC_A1_BASED_VSP_J0039            1   // Removal of redundant VSP in Merge list
+                                              // MTK_MRG_LIST_SIZE_CLEANUP_J0059   1   // Include VSP for deriving merge candidate list size, JCT3V-J0059
+                                              // SEC_A1_BASED_VSP_J0039            1   // Removal of redundant VSP in Merge list
+
 
 
@@ -182,5 +185,5 @@
                                               // SEC_SIMP_SHIFTED_DV_I0086     Simplification of Shifted DV candidate, JCT3V-I0086
 
-#define MTK_MRG_LIST_SIZE_CLEANUP_J0059   1   // Include VSP for deriving merge candidate list size, JCT3V-J0059
+
 
 
@@ -231,15 +234,13 @@
                                               // SEPARATE_FLAG_I0085
                                               // H_3D_DELTA_DLT
-                                              // RWTH_DLT_CLIP_I0057               1
-
-
+                                              // RWTH_DLT_CLIP_I0057
+                                              // MTK_DMM_SIM_J0035
+                                              // MTK_J0033
+                                              // SHARP_DLT_SIMP_J0029              1   // DLT(DepthValue2Idx[]) table derivation cleanup
 
 #define H_3D_SINGLE_DEPTH                 1   // Single depth mode proposed in JCT3V-I0095
-#define MTK_SINGLE_DEPTH_VPS_FLAG_J0060   1   // Add VPS control flags and remove slice header control flag for single depth, JCT3V-J0060
-#define ALIGN_J0060_J0107                 1   // Alignment of changed tool parameters
-#define ALGIN_J0107_J0059                 1   // Alignment of changed tool parameters                
-
-#define MTK_J0033                         1
-#define SHARP_DLT_SIMP_J0029              1   // DLT(DepthValue2Idx[]) table derivation cleanup
+                                              // HS_SP_SIMP_J0066
+                                              // SINGLE_DEPTH_SIMP_J0115           1 
+                                              // MTK_SINGLE_DEPTH_VPS_FLAG_J0060   1   // Add VPS control flags and remove slice header control flag for single depth, JCT3V-J0060
 
 #define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
@@ -263,8 +264,8 @@
                                               // 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
-#define SEC_DBBP_VIEW_REF_CHECK_J0037     1   // Signaling dbbp_flag when the current slice has view reference picture(s), JCT3V-J0037 item4
+                                              // SEC_DBBP_VIEW_REF_CHECK_J0037     1   // Signaling dbbp_flag when the current slice has view reference picture(s), JCT3V-J0037 item4
 
 #define H_3D_DDD                          1   // Disparity derived depth coding
-#define LGE_DDD_REMOVAL_J0042_J0030       1   // DDD removal
+                                              // LGE_DDD_REMOVAL_J0042_J0030 DDD removal
 
 #define H_3D_FCO                          0   // Flexible coding order for 3D
@@ -283,6 +284,10 @@
 #define H_3D_FAST_DEPTH_INTRA             1   // Fast DMM and RBC Mode Selection
                                               // SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX
-#define MTK_DMM_SIM_J0035                 1
-#endif
+#endif
+
+//HLS
+//HHI_DEPENDENCY_SIGNALLING_I1_J0107
+//HHI_TOOL_PARAMETERS_I2_J0107
+//HHI_VPS_3D_EXTENSION_I3_J0107
 
 // Rate Control
@@ -302,7 +307,4 @@
 
 #if H_3D
-#define HHI_DEPENDENCY_SIGNALLING_I1_J0107     1
-#define HHI_TOOL_PARAMETERS_I2_J0107           1
-#define HHI_VPS_3D_EXTENSION_I3_J0107          1
 #define HHI_VIEW_ID_LIST_I5_J0107              0
 #endif
@@ -314,5 +316,5 @@
 #if H_3D_SINGLE_DEPTH
 #define SINGLE_DEPTH_MODE_CAND_LIST_SIZE            2 // size of the sample candidate list
-#define SINGLE_DEPTH_SIMP_J0115           1 
+
 #endif
 
@@ -331,5 +333,4 @@
 #define DVFROM_ABOVE                      1
 #define IDV_CANDS                         2
-#define LGE_DEFAULT_DV_J0046              1
 #endif
 
@@ -349,4 +350,6 @@
                                               // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
                                               // LG_ZEROINTRADEPTHRESI_A0087
+
+#define TICKET083_IVPFLAG_FIX             1
 #endif
 ///// ***** VIEW SYNTHESIS PREDICTION *********
@@ -367,5 +370,4 @@
 #define IC_SHIFT_DIFF                     12
 #define IC_LOW_LATENCY_ENCODING_THRESHOLD 0.1 // Threshold for low-latency IC encoding in JCT3V-H0086
-#define LGE_CHROMA_IC_J0050_J0034         1
 #endif
 
@@ -389,8 +391,4 @@
 #endif
 
-
-#if H_3D_SPIVMP
-#define HS_SP_SIMP_J0066                        1
-#endif
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -935,5 +933,4 @@
 enum DefaultMergCandOrder
 {
-#if SEC_A1_BASED_VSP_J0039
   MRG_T = 0,            ///< MPI
   MRG_D,                ///< DDD
@@ -948,18 +945,4 @@
   MRG_IVSHIFT,          ///< Shifted IVMC of Shifted IVDC. (These are mutually exclusive)
   MRG_COL               ///< Temporal co-located
-#else
-  MRG_T = 0,            ///< MPI
-  MRG_D,                ///< DDD
-  MRG_IVMC,             ///< Temporal inter-view
-  MRG_A1,               ///< Left
-  MRG_B1,               ///< Above
-  MRG_B0,               ///< Above right
-  MRG_IVDC,             ///< Disparity inter-view
-  MRG_VSP,              ///< VSP
-  MRG_A0,               ///< Left bottom
-  MRG_B2,               ///< Above left
-  MRG_IVSHIFT,          ///< Shifted IVMC of Shifted IVDC. (These are mutually exclusive)
-  MRG_COL               ///< Temporal co-located
-#endif
 };
 #endif
Index: /trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1133)
@@ -721,13 +721,5 @@
 }
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
 Void TDecCavlc::parseSPS(TComSPS* pcSPS)
-#else
-#if H_3D
-Void TDecCavlc::parseSPS(TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
-#else
-Void TDecCavlc::parseSPS(TComSPS* pcSPS)
-#endif
-#endif
 {
 #if ENC_DEC_TRACE  
@@ -997,9 +989,5 @@
   if ( pcSPS->getSps3dExtensionFlag() )
   {
-#if HHI_TOOL_PARAMETERS_I2_J0107
     parseSPS3dExtension( pcSPS ); 
-#else
-    parseSPSExtension2( pcSPS, viewIndex, depthFlag  ); 
-#endif
   }
 
@@ -1028,5 +1016,4 @@
 
 #if H_3D
-#if HHI_TOOL_PARAMETERS_I2_J0107
 Void TDecCavlc::parseSPS3dExtension( TComSPS* pcSPS )
 { 
@@ -1057,10 +1044,4 @@
   }
 }
-#else
-Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
-{ 
-
-}
-#endif
 #endif
 
@@ -1071,5 +1052,4 @@
   READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );
   READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
-#if H_MV_HLS_FIX
 
   UInt numRefLocOffsets;; 
@@ -1112,7 +1092,4 @@
   // This is required to equal to 0 for Multiview Main profile. 
   assert( uiCode == 0 ); 
-#else
-  READ_UVLC( uiCode, "num_ref_loc_offsets" ); assert( uiCode == 0 );
-#endif
 }
 
@@ -1237,5 +1214,4 @@
     {
 #if H_3D
-#if HHI_VPS_3D_EXTENSION_I3_J0107
       READ_FLAG( uiCode,  "vps_3d_extension_flag" );
       if ( uiCode )
@@ -1248,12 +1224,4 @@
       if (uiCode)
       {      
-#else
-      m_pcBitstream->readOutTrailingBits();
-      pcVPS->createCamPars(pcVPS->getNumViews());
-      parseVPSExtension2( pcVPS );   
-      READ_FLAG( uiCode,  "vps_extension3_flag" );
-      if (uiCode)
-      {      
-#endif
 #endif
 #endif  
@@ -1330,7 +1298,5 @@
   }
 
-#if H_MV_FIX_NUM_VIEWS
   pcVPS->initNumViews(); 
-#endif
 
   READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode );
@@ -1441,9 +1407,5 @@
   for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
   {
-#if H_MV_HLS_FIX
     if( pcVPS->getNumLayerSets() > 2 && i >= pcVPS->getNumLayerSets( ) )    
-#else
-    if( i >= pcVPS->getNumLayerSets( ) )    
-#endif
     {        
       READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 
@@ -1517,7 +1479,5 @@
   READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 
 
-#if H_MV_HLS7_GEN || H_MV_HLS_FIX
   READ_FLAG( uiCode, "vps_poc_lsb_aligned_flag" ); pcVPS->setVpsPocLsbAlignedFlag( uiCode == 1 );
-#endif
   for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
   {
@@ -1567,7 +1527,5 @@
     parseVPSVUI( pcVPS ); 
   }     
-#if H_MV_HLS_FIX
   else
-#endif
   {
     TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 
@@ -1945,82 +1903,8 @@
 
 #if H_3D
-#if HHI_VPS_3D_EXTENSION_I3_J0107
 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS )
-#else
-Void TDecCavlc::parseVPSExtension2( TComVPS* pcVPS )
-#endif
 {
   UInt uiCode; 
 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
-  {
-#if H_3D_ARP
-    pcVPS->setUseAdvRP  ( i, 0 );
-    pcVPS->setARPStepNum( i, 1 );
-#endif  
-#if H_3D_SPIVMP
-    pcVPS->setSubPULog2Size(i, 0);
-#endif
-    {
-#if H_3D_IV_MERGE
-      READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
-      READ_FLAG( uiCode, "iv_mv_scaling_flag[i]");       pcVPS->setIvMvScalingFlag         ( i, uiCode == 1 ? true : false );
-#endif
-      if( !( pcVPS->getDepthId( i ) == 1 ) )
-      {
-#if H_3D_IV_MERGE
-        if( !pcVPS->getNumDirectRefLayers(i) )
-        {
-          assert( !uiCode );         
-        }
-#if H_3D_SPIVMP
-        READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]");     pcVPS->setSubPULog2Size(i, uiCode+3); 
-#endif
-#endif
-#if H_3D_ARP
-        READ_FLAG( uiCode, "iv_res_pred_flag[i]"  );       pcVPS->setUseAdvRP  ( i, uiCode ); pcVPS->setARPStepNum( i, uiCode ? H_3D_ARP_WFNR : 1 );
-        if( !pcVPS->getNumDirectRefLayers(i) )
-        {
-          assert( !uiCode );         
-        }
-#endif
-#if H_3D_NBDV_REF
-        READ_FLAG( uiCode, "depth_refinement_flag[i]");    pcVPS->setDepthRefinementFlag  ( i, uiCode == 1 ? true : false );
-#endif
-#if H_3D_VSP
-        READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false );
-        if( !pcVPS->getNumDirectRefLayers(i) )
-        {
-          assert( !uiCode );         
-        }
-#endif
-#if H_3D_DBBP
-          READ_FLAG( uiCode, "use_dbbp_flag[i]" ); pcVPS->setUseDBBP( i, uiCode == 1 ? true : false );
-#endif
-      }
-      else
-      {
-#if H_3D_IV_MERGE
-        READ_FLAG( uiCode, "mpi_flag[i]" );             pcVPS->setMPIFlag( i, uiCode == 1 ? true : false );
-        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 H_3D
-        READ_FLAG( uiCode, "ivp_flag[i]" );                   pcVPS->setIVPFlag( i, uiCode == 1 ? true : false );
-#endif
-#if H_3D_QTLPC
-        READ_FLAG( uiCode, "lim_qt_pred_flag[i]");                  pcVPS->setLimQtPredFlag     ( i, uiCode == 1 ? true : false ); 
-#endif
-#if H_3D_INTER_SDC
-            READ_FLAG( uiCode, "depth_inter_SDC_flag" );              pcVPS->setInterSDCFlag( i, uiCode ? true : false );
-#endif
-#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-        READ_FLAG( uiCode, "single_depth_mode_flag[i]"); pcVPS->setSingleDepthModeFlag( i, uiCode == 1 ? true : false );        
-#endif
-      }
-    }
-  }
-#endif
 
   UInt uiCamParPrecision = 0; 
@@ -2131,8 +2015,6 @@
 #endif
   rpcSlice->setSPS(sps);
-#if HHI_TOOL_PARAMETERS_I2_J0107
 #if H_3D
   rpcSlice->init3dToolParameters();
-#endif
 #endif
   rpcSlice->setPPS(pps);
@@ -2207,11 +2089,4 @@
     rpcSlice->checkCrossLayerBlaFlag( ); 
 
-#if !H_MV_HLS7_GEN && !H_MV_HLS_FIX
-    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
-    {
-      esb++; 
-      READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );
-    }
-#endif
 
     for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++)    
@@ -2492,5 +2367,4 @@
     Bool interLayerPredLayerIdcPresentFlag = false; 
     Int layerId       = rpcSlice->getLayerId(); 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
     if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumRefListLayers( layerId ) > 0 )
@@ -2498,10 +2372,6 @@
     if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
 #endif
-#else
-    if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
-#endif
     {   
       READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 );
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
       if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumRefListLayers( layerId ) > 1 )
@@ -2509,7 +2379,4 @@
       if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
 #endif
-#else
-      if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
-#endif
       {            
         if( !vps->getMaxOneActiveRefLayerFlag())  
@@ -2517,10 +2384,6 @@
           READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode );
         }
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
         if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumRefListLayers( layerId ) )
-#else
-        if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
-#endif
 #else
         if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
@@ -2711,9 +2574,5 @@
     }
 #if H_3D_IC
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
     else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
-#else
-    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
-#endif
     {
       UInt uiCodeTmp = 0;
@@ -2729,42 +2588,9 @@
     }
 #endif
-#if !MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-#if H_3D_SINGLE_DEPTH
-    if(rpcSlice->getIsDepth())
-    {
-      UInt uiCodeTmp = 0;
-      READ_FLAG( uiCodeTmp, "slice_enable_single_depth_mode" );
-      rpcSlice->setApplySingleDepthMode(uiCodeTmp);
-    }
-#endif
-#endif
     if (!rpcSlice->isIntra())
     {
       READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
 #if H_3D_IV_MERGE
-#if HHI_TOOL_PARAMETERS_I2_J0107
-#if ALGIN_J0107_J0059
       rpcSlice->setMaxNumMergeCand(( ( rpcSlice->getMpiFlag() || rpcSlice->getIvMvPredFlag() || rpcSlice->getViewSynthesisPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
-#else
-      rpcSlice->setMaxNumMergeCand(( ( rpcSlice->getMpiFlag() || rpcSlice->getIvMvPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
-#endif
-#else
-      if(rpcSlice->getIsDepth())
-      {
-        Bool bMPIFlag = rpcSlice->getVPS()->getMPIFlag( rpcSlice->getLayerIdInVps() ) ;
-        Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;
-        rpcSlice->setMaxNumMergeCand(( ( bMPIFlag || ivMvPredFlag ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
-      }
-      else
-      {
-        Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;
-#if MTK_MRG_LIST_SIZE_CLEANUP_J0059
-        Bool vspFlag = rpcSlice->getVPS()->getViewSynthesisPredFlag( rpcSlice->getLayerIdInVps() ) ;
-        rpcSlice->setMaxNumMergeCand(( ivMvPredFlag || vspFlag? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
-#else
-        rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
-#endif
-      }
-#endif
 #else
       rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode);
@@ -2926,15 +2752,6 @@
 
     // Derive the value of PocMs8bValRequiredFlag
-#if !H_MV_HLS_FIX
-    rpcSlice->setPocMsbValRequiredFlag( rpcSlice->getCraPicFlag() || rpcSlice->getBlaPicFlag()
-                                          /* || TODO related to vps_poc_lsb_aligned_flag */
-                                          );
-#endif
-
-#if H_MV_HLS_FIX
+
     if( !rpcSlice->getPocMsbValRequiredFlag() && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() )
-#else
-    if( !rpcSlice->getPocMsbValRequiredFlag() /* TODO &&  rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ )
-#endif
     {
       READ_FLAG( uiCode, "poc_msb_val_present_flag" ); rpcSlice->setPocMsbValPresentFlag( uiCode == 1 );
Index: /trunk/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1133)
@@ -90,16 +90,7 @@
 #endif
 #if H_3D
-#if HHI_VPS_3D_EXTENSION_I3_J0107
   Void  parseVPS3dExtension  ( TComVPS* pcVPS ); 
-#else
-  Void  parseVPSExtension2  ( TComVPS* pcVPS ); 
-#endif
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Void  parseSPS3dExtension ( TComSPS* pcSPS );
   Void  parseSPS            ( TComSPS* pcSPS );
-#else
-  Void  parseSPSExtension2  ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag );
-  Void  parseSPS            ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag );
-#endif  
 #else
   Void  parseSPS            ( TComSPS* pcSPS );
Index: /trunk/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1133)
@@ -291,9 +291,4 @@
   DTRACE_CU_S("=========== coding_unit ===========\n")
 #endif
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-      pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth );
-#endif
-#endif
 
   if( (g_uiMaxCUWidth>>uiDepth) >= pcCU->getSlice()->getPPS()->getMinCuDQPSize() && pcCU->getSlice()->getPPS()->getUseDQP())
@@ -315,9 +310,5 @@
   {
 #if H_3D_ARP && H_3D_IV_MERGE
-#if HHI_TOOL_PARAMETERS_I2_J0107
     if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() )
-#else
-    if( pcCU->getSlice()->getVPS()->getUseAdvRP( pcCU->getSlice()->getLayerId() ) || pcCU->getSlice()->getVPS()->getIvMvPredFlag( pcCU->getSlice()->getLayerId() ))
-#endif
 #else 
 #if H_3D_ARP
@@ -349,9 +340,5 @@
 #endif
 #if H_3D_NBDV_REF
-#if HHI_TOOL_PARAMETERS_I2_J0107
       if( pcCU->getSlice()->getDepthBasedBlkPartFlag() )  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
-#else
-      if(pcCU->getSlice()->getVPS()->getDepthRefinementFlag( pcCU->getSlice()->getLayerIdInVps() ))  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
-#endif
       {
         DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
@@ -460,14 +447,4 @@
 #endif
     pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-    if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() )
-    {
-        assert( pcCU->getSlice()->getViewIndex() != 0 );
-        pcCU->setUseDDD( true, uiAbsPartIdx, 0, uiDepth );
-        pcCU->setDDDepthSubParts( m_ppcCU[uiDepth]->getDDTmpDepth(),uiAbsPartIdx, 0, uiDepth );
-    }
-#endif
-#endif
 
     TComMv cTmpMv( 0, 0 );
@@ -744,15 +721,7 @@
   //construction of depth candidates
   Pel testDepth;
-#if SINGLE_DEPTH_SIMP_J0115
   Pel DepthNeighbours[2];
-#else
-  Pel DepthNeighbours[5];
-#endif
   Int index =0;
-#if SINGLE_DEPTH_SIMP_J0115
   for( Int i = 0; (i < 2) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
-#else
-  for( Int i = 0; (i < 5) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
-#endif
   {
     if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i))
@@ -762,14 +731,4 @@
     DepthNeighbours[index]=testDepth;
     index++;
-#if !SINGLE_DEPTH_SIMP_J0115
-    for(Int j=0;j<index-1;j++)
-    {
-     if( (DepthNeighbours[index-1]==DepthNeighbours[j]) )
-     {
-       index--;
-       break;
-     }
-    }
-#endif
   }
 
Index: /trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1133)
@@ -59,22 +59,4 @@
     return;
   }  
-#if ALIGN_J0060_J0107
-#else
-  if ( !pcCU->getSlice()->getIsDepth() )
-  {
-    return;
-  }
-#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-  if(!pcCU->getSlice()->getVPS()->getSingleDepthModeFlag(pcCU->getSlice()->getLayerIdInVps()))
-  {
-     return;
-  }
-#else
-  if(!pcCU->getSlice()->getApplySingleDepthMode())
-  {
-     return;
-  }
-#endif
-#endif
 
   m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
@@ -167,13 +149,5 @@
   
 #if H_3D_DBBP
-#if SEC_DBBP_VIEW_REF_CHECK_J0037
-  #if HHI_TOOL_PARAMETERS_I2_J0107
 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
-#else
-if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
-#endif
-#else
-  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
-#endif
   {
     decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
@@ -360,18 +334,4 @@
       }
       pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-      if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() )
-      {
-          assert( pcCU->getSlice()->getViewIndex() != 0 );
-          pcCU->setUseDDD( true, uiSubPartIdx, uiPartIdx, uiDepth );
-          pcCU->setDDDepthSubParts( pcSubCU->getDDTmpDepth(),uiSubPartIdx, uiPartIdx, uiDepth );
-      }
-      else
-      {
-          pcCU->setUseDDD( false, uiSubPartIdx, uiPartIdx, uiDepth );
-      }
-#endif
-#endif
 
       TComMv cTmpMv( 0, 0 );
@@ -852,11 +812,6 @@
   pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
   if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) || 
     ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getIntraSdcWedgeFlag() ) )
-#else
-  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) || 
-    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) )
-#endif
   {
     return;
Index: /trunk/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1133)
@@ -66,13 +66,5 @@
 
   virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
-#if HHI_TOOL_PARAMETERS_I2_J0107
   virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
-#else
-#if H_3D
-  virtual Void  parseSPS                  ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag  )                    = 0;
-#else
-  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
-#endif
-#endif
 #if H_3D
   virtual Void  parsePPS                  ( TComPPS* pcPPS, TComVPS* pcVPS )                      = 0;
@@ -161,13 +153,5 @@
   Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
   Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
-#else
-#if H_3D
-  Void    decodeSPS                   ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )    { m_pcEntropyDecoderIf->parseSPS(pcSPS, viewIndex, depthFlag );                    }
-#else
-  Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
-#endif
-#endif
 #if H_3D
   Void    decodePPS                   ( TComPPS* pcPPS, TComVPS* pcVPS )    { m_pcEntropyDecoderIf->parsePPS(pcPPS, pcVPS);                    }
Index: /trunk/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1133)
@@ -703,10 +703,5 @@
 
   
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
-#else
-  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
-  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
-#endif
   TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
   Bool bDepthMapDetect    = (pcTexture != NULL);
@@ -762,10 +757,5 @@
   Bool bParsePartSize    = true;
   
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
-#else
-  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
-  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
-#endif
   TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
   Bool bDepthMapDetect   = (pcTexture != NULL);
@@ -992,9 +982,5 @@
   {
 #if H_3D_DIM
-#if HHI_TOOL_PARAMETERS_I2_J0107
     if( pcCU->getSlice()->getIntraSdcWedgeFlag() || pcCU->getSlice()->getIntraContourFlag() )
-#else
-    if( pcCU->getSlice()->getVpsDepthModesFlag() || pcCU->getSlice()->getIVPFlag() )
-#endif
     {
       parseIntraDepth( pcCU, absPartIdx+partOffset*j, depth );
@@ -1111,7 +1097,5 @@
       xParseDmm1WedgeIdx( uiTabIdx, g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] );
 
-#if MTK_J0033
       assert( uiTabIdx < g_dmmWedgeLists[ g_aucConvertToBit[ pcCU->getDMM1BasePatternWidth( pcCU->getWidth( absPartIdx ) )]].size());
-#endif
 
       pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth );
@@ -1143,9 +1127,5 @@
   if( uiIsDimMode )
   {
-#if HHI_TOOL_PARAMETERS_I2_J0107
     if( pcCU->getSlice()->getIntraSdcWedgeFlag() && pcCU->getSlice()->getIntraContourFlag() )
-#else
-    if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag() )
-#endif
     {
       m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
@@ -1159,17 +1139,9 @@
       }
     }
-#if HHI_TOOL_PARAMETERS_I2_J0107
     else if ( pcCU->getSlice()->getIntraSdcWedgeFlag() )
-#else
-    else if ( pcCU->getSlice()->getVpsDepthModesFlag() )
-#endif
     {
       pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
     }
-#if HHI_TOOL_PARAMETERS_I2_J0107
     else if( pcCU->getSlice()->getIntraContourFlag() )
-#else
-    else if( pcCU->getSlice()->getIVPFlag() )
-#endif
     {
       pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
@@ -2151,9 +2123,5 @@
 Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
-#if HHI_TOOL_PARAMETERS_I2_J0107
   AOF( pcCU->getSlice()->getDepthBasedBlkPartFlag() );
-#else
-  AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
-#endif
   AOF( !pcCU->getSlice()->getIsDepth() );
   
Index: /trunk/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 1133)
@@ -76,13 +76,5 @@
   Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
   Void  parseVPS                  ( TComVPS* /*pcVPS*/ ) {}
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Void  parseSPS                  ( TComSPS* /*pcSPS*/ ) {}
-#else
-#if H_3D
-  Void  parseSPS                  ( TComSPS* /*pcSPS*/ , Int /*viewIndex*/, Bool /*depthFlag*/ ) {}
-#else
-  Void  parseSPS                  ( TComSPS* /*pcSPS*/ ) {}
-#endif
-#endif
 #if H_3D
   Void  parsePPS                  ( TComPPS* /*pcPPS*/, TComVPS* /*pcVPS*/ ) {}
Index: /trunk/source/Lib/TLibDecoder/TDecSlice.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 1133)
@@ -280,36 +280,4 @@
       iNumSubstreamsPerTile = 1;
     }
-#if LGE_DEFAULT_DV_J0046 && !SEC_ARP_VIEW_REF_CHECK_J0037 && !SEC_DBBP_VIEW_REF_CHECK_J0037
-    pcSlice->setDefaultRefViewIdx( -1 );
-    pcSlice->setDefaultRefViewIdxAvailableFlag( false ); 
-
-    Int valid = 0;
-    Int viewIndex = 0;
-    for( UInt uiBId = 0; uiBId < pcSlice->getViewIndex() && valid==0; uiBId++ )
-    {
-        UInt        uiBaseId    = uiBId;
-        TComPic*    pcBasePic   = pcSlice->getIvPic( false, uiBaseId );
-        for( Int iRefListId = 0; ( iRefListId < (pcSlice->isInterB()? 2:1) ) && !pcSlice->isIntra() && valid==0; iRefListId++ )
-        {
-            RefPicList  eRefPicListTest = RefPicList( iRefListId );
-            Int         iNumRefPics = pcSlice->getNumRefIdx( eRefPicListTest ) ;
-            for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ )
-            { 
-                if(pcBasePic->getPOC() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getPOC() 
-                    && pcBasePic->getViewIndex() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getViewIndex())
-                {
-                    valid=1;
-                    viewIndex = uiBaseId;
-                    break;
-                }
-            }
-        }
-    }
-    if( valid )
-    {
-        pcSlice->setDefaultRefViewIdx( viewIndex );
-        pcSlice->setDefaultRefViewIdxAvailableFlag( true );   
-    }
-#endif
 
     if ( (iCUAddr == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr()) && // 1st in tile.
Index: /trunk/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1133)
@@ -726,8 +726,6 @@
 
 #endif
-#if HHI_TOOL_PARAMETERS_I2_J0107
 #if H_3D
   m_apcSlicePilot->init3dToolParameters();
-#endif
 #endif
   pps->setSPS(sps);
@@ -1087,9 +1085,7 @@
     pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr);
     pcSlice->setRefPicList     ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 
-
-#if SEC_ARP_VIEW_REF_CHECK_J0037 || SEC_DBBP_VIEW_REF_CHECK_J0037
+#if H_3D
     pcSlice->setDefaultRefView();
 #endif
-
 #if H_3D_ARP
     pcSlice->setARPStepNum(m_ivPicLists);
@@ -1244,9 +1240,5 @@
   TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 
   assert( vps != 0 );
-#if HHI_TOOL_PARAMETERS_I2_J0107
   m_cEntropyDecoder.decodeSPS( sps );
-#else
-  m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) );
-#endif
 #else
   m_cEntropyDecoder.decodeSPS( sps );
Index: /trunk/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 1132)
+++ /trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 1133)
@@ -83,11 +83,4 @@
 #endif
 
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];}
-  Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];}
-  UInt getCamParsCodedPrecision(){ return m_vps->getCamParPrecision(); }
-#endif
-#endif
 
 private:
Index: /trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1133)
@@ -638,13 +638,5 @@
 }
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
 Void TEncCavlc::codeSPS( TComSPS* pcSPS )
-#else
-#if H_3D
-Void TEncCavlc::codeSPS( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
-#else
-Void TEncCavlc::codeSPS( TComSPS* pcSPS )
-#endif
-#endif
 {
 #if ENC_DEC_TRACE  
@@ -846,9 +838,5 @@
   if ( pcSPS->getSps3dExtensionFlag() )
   {
-#if HHI_TOOL_PARAMETERS_I2_J0107
     codeSPS3dExtension( pcSPS ); 
-#else
-    codeSPSExtension2( pcSPS, viewIndex, depthFlag  ); 
-#endif
   }
 
@@ -871,7 +859,5 @@
   WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" );
   WRITE_UVLC( 0, "num_ref_loc_offsets" );
-#if H_MV_HLS_FIX
   WRITE_FLAG( 0 , "colour_mapping_enabled_flag" );
-#endif
 
 }
@@ -880,5 +866,4 @@
 
 #if H_3D
-#if HHI_TOOL_PARAMETERS_I2_J0107
 Void TEncCavlc::codeSPS3dExtension( TComSPS* pcSPS )
 {
@@ -908,10 +893,4 @@
   }
 }
-#else
-Void TEncCavlc::codeSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
-{
-
-}
-#endif
 #endif
 
@@ -1012,12 +991,7 @@
 #if H_3D
   WRITE_FLAG( 1,                     "vps_extension2_flag" );  
-#if HHI_VPS_3D_EXTENSION_I3_J0107
   WRITE_FLAG( 1,                     "vps_3d_extension_flag" );
   m_pcBitIf->writeAlignOne();      
   codeVPS3dExtension( pcVPS ); 
-#else
-  m_pcBitIf->writeAlignOne();      
-  codeVPSExtension2( pcVPS ); 
-#endif
   WRITE_FLAG( 0,                     "vps_extension3_flag" );
 #else
@@ -1189,9 +1163,5 @@
   for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
   {
-#if H_MV_HLS_FIX
     if( pcVPS->getNumLayerSets() > 2 && i >= pcVPS->getNumLayerSets( ) )    
-#else
-    if( i >= pcVPS->getNumLayerSets( ) )    
-#endif
     {      
       WRITE_CODE( pcVPS->getLayerSetIdxForOlsMinus1( i ), pcVPS->getLayerSetIdxForOlsMinus1Len( i ) ,      "layer_set_idx_for_ols_minus1[i]" );
@@ -1263,7 +1233,5 @@
 
   WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" );
-#if H_MV_HLS7_GEN || H_MV_HLS_FIX
   WRITE_FLAG( pcVPS->getVpsPocLsbAlignedFlag( ) ? 1 : 0 , "vps_poc_lsb_aligned_flag" );
-#endif
   for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
   {
@@ -1313,7 +1281,5 @@
     codeVPSVUI( pcVPS ); 
   }     
-#if H_MV_HLS_FIX
   else
-#endif
   {
     TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 
@@ -1630,60 +1596,6 @@
 
 #if H_3D
-#if HHI_VPS_3D_EXTENSION_I3_J0107
 Void TEncCavlc::codeVPS3dExtension( TComVPS* pcVPS )
-#else
-Void TEncCavlc::codeVPSExtension2( TComVPS* pcVPS )
-#endif
 { 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
-  {
-    {
-      WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
-      WRITE_FLAG( pcVPS->getIvMvScalingFlag( i ) ? 1 : 0 ,       "iv_mv_scaling_flag[i]" );
-
-      if ( !( pcVPS->getDepthId( i ) == 1 ) )
-      {
-#if H_3D_IV_MERGE
-#if H_3D_SPIVMP
-        WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]");
-#endif
-#endif
-#if H_3D_ARP
-        WRITE_FLAG( pcVPS->getUseAdvRP             ( i ) ? 1 : 0,  "iv_res_pred_flag[i]"  );
-#endif
-#if H_3D_NBDV_REF
-        WRITE_FLAG( pcVPS->getDepthRefinementFlag  ( i ) ? 1 : 0 , "depth_refinement_flag[i]");
-#endif
-#if H_3D_VSP
-        WRITE_FLAG( pcVPS->getViewSynthesisPredFlag( i ) ? 1 : 0 , "view_synthesis_pred_flag[i]");
-#endif
-#if H_3D_DBBP
-        WRITE_FLAG( pcVPS->getUseDBBP( i ) ? 1 : 0, "use_dbbp_flag[i]" );
-#endif
-      }          
-      else
-      {
-#if H_3D_IV_MERGE
-        WRITE_FLAG( pcVPS->getMPIFlag( i ) ? 1 : 0 ,          "mpi_flag[i]" );
-#endif
-        WRITE_UVLC( pcVPS->getSubPUMPILog2Size(i)-3, "log2_mpi_sub_PU_size_minus3[i]");
-
-        WRITE_FLAG( pcVPS->getVpsDepthModesFlag( i ) ? 1 : 0 ,          "vps_depth_modes_flag[i]" );
-#if H_3D
-        WRITE_FLAG( pcVPS->getIVPFlag( i ) ? 1 : 0 ,               "IVP_flag[i]" );
-#endif
-        WRITE_FLAG( pcVPS->getLimQtPredFlag    ( i ) ? 1 : 0 ,          "lim_qt_pred_flag[i]"     ); 
-
-#if H_3D_INTER_SDC
-        WRITE_FLAG( pcVPS->getInterSDCFlag( i ) ? 1 : 0, "depth_inter_SDC_flag" );
-#endif
-#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-        WRITE_FLAG( pcVPS->getSingleDepthModeFlag( i ) ? 1 : 0, "single_depth_mode_flag" );
-#endif
-      }
-    }  
-  }
-#endif
   WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" );
   for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)
@@ -1789,11 +1701,4 @@
     }
     pcSlice->checkCrossLayerBlaFlag( ); 
-#if !H_MV_HLS7_GEN && !H_MV_HLS_FIX
-    if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
-    {
-      esb++; 
-      WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" );
-    }
-#endif
 
 
@@ -1951,5 +1856,4 @@
     Bool interLayerPredLayerIdcPresentFlag = false; 
     Int layerId = pcSlice->getLayerId(); 
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
     if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumRefListLayers( layerId ) > 0 )
@@ -1957,10 +1861,6 @@
     if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
 #endif
-#else
-    if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
-#endif
     {   
       WRITE_FLAG( pcSlice->getInterLayerPredEnabledFlag( ) ? 1 : 0 , "inter_layer_pred_enabled_flag" );
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
       if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumRefListLayers( layerId ) > 1 )
@@ -1968,7 +1868,4 @@
       if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
 #endif
-#else
-      if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
-#endif
       {            
         if( !vps->getMaxOneActiveRefLayerFlag())  
@@ -1976,10 +1873,6 @@
           WRITE_CODE( pcSlice->getNumInterLayerRefPicsMinus1( ), pcSlice->getNumInterLayerRefPicsMinus1Len( ), "num_inter_layer_ref_pics_minus1" );
         }
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
         if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumRefListLayers( layerId ) )
-#else
-        if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
-#endif
 #else
         if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
@@ -2125,9 +2018,5 @@
     }
 #if H_3D_IC
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
     else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
-#else
-    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
-#endif
     {
       WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" );
@@ -2137,12 +2026,4 @@
       }
     }
-#endif
-#if !MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-#if H_3D_SINGLE_DEPTH
-    if(pcSlice->getIsDepth())
-    {
-      WRITE_FLAG( pcSlice->getApplySingleDepthMode() ? 1 : 0, "slice_enable_single_depth_mode" );
-    }
-#endif
 #endif
 #if H_3D_IV_MERGE
@@ -2154,28 +2035,5 @@
     {
 #if H_3D_IV_MERGE
-#if HHI_TOOL_PARAMETERS_I2_J0107      
-#if ALGIN_J0107_J0059
       WRITE_UVLC( ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( ) ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
-#else
-      WRITE_UVLC( ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
-#endif
-#else
-      if(pcSlice->getIsDepth())
-      {
-        Bool bMPIFlag = pcSlice->getVPS()->getMPIFlag( pcSlice->getLayerIdInVps() ) ;
-        Bool ivMvPredFlag = pcSlice->getVPS()->getIvMvPredFlag( pcSlice->getLayerIdInVps() ) ;
-        WRITE_UVLC( ( ( bMPIFlag || ivMvPredFlag ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
-      }
-      else
-      {
-        Bool ivMvPredFlag = pcSlice->getVPS()->getIvMvPredFlag( pcSlice->getLayerIdInVps() ) ;
-#if MTK_MRG_LIST_SIZE_CLEANUP_J0059
-        Bool vspFlag = pcSlice->getVPS()->getViewSynthesisPredFlag( pcSlice->getLayerIdInVps() ) ;
-        WRITE_UVLC( ( ivMvPredFlag || vspFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
-#else
-        WRITE_UVLC( ( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
-#endif
-      }
-#endif
 #else
       WRITE_UVLC(MRG_MAX_NUM_CANDS - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
@@ -2243,9 +2101,4 @@
   {
     // Derive the value of PocMsbValRequiredFlag
-#if !H_MV_HLS_FIX
-    pcSlice->setPocMsbValRequiredFlag( pcSlice->getCraPicFlag() || pcSlice->getBlaPicFlag()
-                                          /* || related to vps_poc_lsb_aligned_flag */
-                                          );
-#endif
 
     // Determine value of SH extension length.
@@ -2265,9 +2118,5 @@
 
 
-#if H_MV_HLS_FIX
     if( !pcSlice->getPocMsbValRequiredFlag() &&  pcSlice->getVPS()->getVpsPocLsbAlignedFlag() )
-#else
-    if( !pcSlice->getPocMsbValRequiredFlag() /* TODO &&  pcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ )
-#endif
     {
       shExtnLengthInBit++;    // For poc_msb_val_present_flag
@@ -2332,9 +2181,5 @@
     pcSlice->checkPocLsbVal(); 
 
-#if H_MV_HLS_FIX
     if( !pcSlice->getPocMsbValRequiredFlag() &&  pcSlice->getVPS()->getVpsPocLsbAlignedFlag()  )
-#else
-    if( !pcSlice->getPocMsbValRequiredFlag() /* TODO &&  pcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ )
-#endif
     {
       WRITE_FLAG( pcSlice->getPocMsbValPresentFlag( ) ? 1 : 0 , "poc_msb_val_present_flag" );
Index: /trunk/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1133)
@@ -99,16 +99,7 @@
 #endif
 #if H_3D
-#if HHI_VPS_3D_EXTENSION_I3_J0107
   Void  codeVPS3dExtension       ( TComVPS* pcVPS ); 
-#else
-  Void  codeVPSExtension2       ( TComVPS* pcVPS ); 
-#endif
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Void  codeSPS3dExtension      ( TComSPS* pcSPS );
   Void  codeSPS                 ( TComSPS* pcSPS );
-#else
-  Void  codeSPSExtension2       ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag  ); 
-  Void  codeSPS                 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag );
-#endif
 #else
   Void  codeSPS                 ( TComSPS* pcSPS );
Index: /trunk/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 1133)
@@ -392,43 +392,13 @@
   Double    m_dDispCoeff;
 #endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_ARP
-  UInt      m_uiUseAdvResPred;
-  UInt      m_uiARPStepNum;
-#endif
-#if H_3D_SPIVMP
-  Int      m_iSubPULog2Size;
-  Int      m_iSubPUMPILog2Size;
-#endif
-#endif
 #if H_3D_IC
   Bool      m_bUseIC;
   Bool      m_bUseICLowLatencyEnc;
 #endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_INTER_SDC
-  bool      m_bInterSDC;
-#endif
-#if H_3D_DBBP
-  Bool      m_bUseDBBP;
-#endif
-#endif
   //====== Depth Intra Modes ======
 #if H_3D_DIM
   Bool      m_useDMM;
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  Bool      m_useIVP;
-#endif
   Bool      m_useSDC;
   Bool      m_useDLT;
-#endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_SINGLE_DEPTH
-  Bool      m_useSingleDepthMode;
-#endif
-
-#if H_3D_IV_MERGE
-  Bool      m_useMPI;
-#endif
 #endif
 #if H_3D_QTLPC
@@ -506,19 +476,4 @@
   Void      setMaxTempLayer                 ( Int maxTempLayer )            { m_maxTempLayer = maxTempLayer;      }
 
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_ARP
-  UInt       getUseAdvRP                    ( )              { return m_uiUseAdvResPred; }
-  Void       setUseAdvRP                    ( UInt  u )      { m_uiUseAdvResPred = u;    }
-
-  UInt       getARPStepNum                  ()               { return m_uiARPStepNum;    }
-  Void       setARPStepNum                  ( UInt  u )      { m_uiARPStepNum = u;       }
-#endif
-#if H_3D_SPIVMP
-  Int        getSubPULog2Size                   ()                   { return m_iSubPULog2Size;}
-  Void       setSubPULog2Size                   (Int u)              { m_iSubPULog2Size = u; }     
-  Int        getSubPUMPILog2Size            ()               { return m_iSubPUMPILog2Size;}
-  Void       setSubPUMPILog2Size            (Int u)          { m_iSubPUMPILog2Size = u;   }     
-#endif
-#endif
 #if H_3D_IC
   Void       setUseIC                       ( Bool bVal )    { m_bUseIC = bVal; }
@@ -526,14 +481,4 @@
   Void       setUseICLowLatencyEnc          ( Bool bVal )    { m_bUseICLowLatencyEnc = bVal; }
   Bool       getUseICLowLatencyEnc          ()               { return m_bUseICLowLatencyEnc; }
-#endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_INTER_SDC
-  Void       setInterSDCEnable              ( Bool bVal )    { m_bInterSDC = bVal; }
-  Bool       getInterSDCEnable              ()               { return m_bInterSDC; }
-#endif
-#if H_3D_DBBP
-  Void       setUseDBBP                     ( Bool  b )      { m_bUseDBBP   = b; }
-  Bool       getUseDBBP()                                    { return m_bUseDBBP;     }
-#endif
 #endif
   //======== Transform =============
@@ -991,8 +936,4 @@
   Bool      getUseDMM                       ()        { return m_useDMM; }
   Void      setUseDMM                       ( Bool b) { m_useDMM = b;    }
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  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;    }
@@ -1000,10 +941,4 @@
   Bool      getUseDLT                       ()        { return m_useDLT; }
   Void      setUseDLT                       ( Bool b) { m_useDLT = b;    }
-#endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_SINGLE_DEPTH
-  Void       setUseSingleDepthMode          ( Bool bVal )    { m_useSingleDepthMode = bVal; }
-  Bool       getUseSingleDepthMode          ()               { return m_useSingleDepthMode; }
-#endif
 #endif
 #if H_3D_QTLPC
@@ -1011,10 +946,4 @@
   Bool      getUseQTL                       ()         { return m_bUseQTL; }
 #endif
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-#if H_3D_IV_MERGE
-  Void      setUseMPI                       ( Bool b ) { m_useMPI = b;    }
-  Bool      getUseMPI                       ()         { return m_useMPI; }
-#endif
-#endif
 #endif // H_3D
 };
Index: /trunk/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1133)
@@ -409,10 +409,5 @@
 
 #if H_3D_QTLPC
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Bool  bLimQtPredFalg    = pcPic->getSlice(0)->getQtPredFlag(); 
-#else
-    TComVPS *vps            = pcPic->getSlice(0)->getVPS();
-  Bool  bLimQtPredFalg    = vps->getLimQtPredFlag(pcPic->getSlice(0)->getLayerId()); 
-#endif
   TComPic *pcTexture      = rpcBestCU->getSlice()->getTexturePic();
 
@@ -570,9 +565,5 @@
       {
 #if H_3D_ARP && H_3D_IV_MERGE
-#if HHI_TOOL_PARAMETERS_I2_J0107
         if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() )
-#else
-        if( rpcTempCU->getSlice()->getVPS()->getUseAdvRP(rpcTempCU->getSlice()->getLayerId()) || rpcTempCU->getSlice()->getVPS()->getIvMvPredFlag(rpcTempCU->getSlice()->getLayerId()) )
-#endif
 #else 
 #if H_3D_ARP
@@ -598,9 +589,5 @@
 #endif 
 #if H_3D_NBDV_REF
-#if HHI_TOOL_PARAMETERS_I2_J0107
           if( rpcTempCU->getSlice()->getDepthRefinementFlag() )
-#else
-          if(rpcTempCU->getSlice()->getVPS()->getDepthRefinementFlag( rpcTempCU->getSlice()->getLayerIdInVps()))
-#endif
             DvInfo.bDV = rpcTempCU->getDisMvpCandNBDV(&DvInfo, true);
           else
@@ -617,9 +604,5 @@
       }
 #if  H_3D_FAST_TEXTURE_ENCODING
-#if SEC_ARP_VIEW_REF_CHECK_J0037 || SEC_DBBP_VIEW_REF_CHECK_J0037
       if(rpcTempCU->getSlice()->getViewIndex() && !rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
-#else
-      if(rpcTempCU->getSlice()->getViewIndex() && !rpcTempCU->getSlice()->getIsDepth())
-#endif
       {
         PartSize ePartTemp = rpcTempCU->getPartitionSize(0);
@@ -684,13 +667,5 @@
           
 #if H_3D_DBBP
-#if SEC_DBBP_VIEW_REF_CHECK_J0037
-#if HHI_TOOL_PARAMETERS_I2_J0107
           if( rpcTempCU->getSlice()->getDepthBasedBlkPartFlag() && rpcTempCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
-#else
-          if( m_pcEncCfg->getUseDBBP() && rpcTempCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
-#endif
-#else
-          if( m_pcEncCfg->getUseDBBP() )
-#endif
           {
             xCheckRDCostInterDBBP( rpcBestCU, rpcTempCU, false );
@@ -739,13 +714,5 @@
 #if H_3D_SINGLE_DEPTH
     rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
-#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-#if ALIGN_J0060_J0107
     if( rpcBestCU->getSlice()->getIntraSingleFlag() )
-#else
-    if(rpcBestCU->getSlice()->getVPS()->getSingleDepthModeFlag(rpcBestCU->getSlice()->getLayerIdInVps()))
-#endif
-#else
-    if(rpcBestCU->getSlice()->getApplySingleDepthMode())
-#endif
     {
       xCheckRDCostSingleDepth( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
@@ -1074,4 +1041,7 @@
 #if H_3D_DIM
             Bool bOnlyIVP = false;
+#if TICKET083_IVPFLAG_FIX
+            Bool bUseIVP = true;
+#endif
             if( rpcBestCU->getSlice()->getIsDepth() && !(rpcBestCU->getSlice()->isIRAP()) && 
                 rpcBestCU->getSlice()->getSliceType() != I_SLICE && 
@@ -1082,5 +1052,12 @@
             { 
               bOnlyIVP = true;
+#if TICKET083_IVPFLAG_FIX
+              bUseIVP = rpcBestCU->getSlice()->getIntraContourFlag();
+#endif
             }
+#if TICKET083_IVPFLAG_FIX
+            if( bUseIVP )
+            {
+#endif
             xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bOnlyIVP );
 #else
@@ -1116,4 +1093,7 @@
 #endif
             }
+#if TICKET083_IVPFLAG_FIX
+          }
+#endif
           }
         // test PCM
@@ -1901,11 +1881,4 @@
 
 #endif
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-    Int iDDDCand = rpcTempCU->getUseDDDCandIdx(); 
-    UChar ucDDDepth = rpcTempCU->getDDTmpDepth();
-    rpcTempCU->setUseDDD( false, 0, uhDepth );
-#endif
-#endif
 
   for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual )
@@ -1940,17 +1913,4 @@
 #if H_3D_VSP
           rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
-#endif
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-          if( rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewIndex() != 0 && iDDDCand == uiMergeCand )
-          {
-              rpcTempCU->setUseDDD( true, 0, 0, uhDepth );
-              rpcTempCU->setDDDepthSubParts( ucDDDepth, 0, 0, uhDepth );
-          }
-          else
-          {
-              rpcTempCU->setUseDDD( false, 0, 0, uhDepth );
-          }
-#endif
 #endif
 #if H_3D_SPIVMP
@@ -2056,9 +2016,5 @@
           xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
 #if H_3D_INTER_SDC
-#if HHI_TOOL_PARAMETERS_I2_J0107
           if( rpcTempCU->getSlice()->getInterSdcFlag() && !uiNoResidual )
-#else
-          if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual )
-#endif
           {
             Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE};
@@ -2132,9 +2088,5 @@
       {
 #if H_3D_INTER_SDC
-#if HHI_TOOL_PARAMETERS_I2_J0107
         if( rpcTempCU->getSlice()->getInterSdcFlag() )
-#else
-        if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) )
-#endif
         {
           bestIsSkip = !rpcBestCU->getSDCFlag( 0 ) && ( rpcBestCU->getQtRootCbf(0) == 0 );
@@ -2212,7 +2164,4 @@
   UChar uhDepth = rpcTempCU->getDepth( 0 );
 #if H_3D_ARP
-#if !HHI_TOOL_PARAMETERS_I2_J0107
-  Int iLayerId    = rpcTempCU->getSlice()->getLayerId();
-#endif
   Bool bFirstTime = true;
   Int nARPWMax    = rpcTempCU->getSlice()->getARPStepNum() - 1;
@@ -2225,9 +2174,5 @@
   for( Int nARPW = 0; nARPW <= nARPWMax; nARPW++ )
   {
-#if HHI_TOOL_PARAMETERS_I2_J0107
     if( !bFirstTime && rpcTempCU->getSlice()->getIvResPredFlag() )
-#else
-    if( bFirstTime == false && rpcTempCU->getSlice()->getVPS()->getUseAdvRP( iLayerId ) )
-#endif
     {
       rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0),bTransquantBypassFlag );      
@@ -2253,9 +2198,4 @@
   rpcTempCU->setPartSizeSubParts  ( ePartSize,  0, uhDepth );
   rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  rpcTempCU->setUseDDD( false, 0, uhDepth );
-#endif
-#endif
 
 #if H_3D_ARP
@@ -2335,9 +2275,5 @@
   xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
 #if H_3D_INTER_SDC
-#if HHI_TOOL_PARAMETERS_I2_J0107
   if( rpcTempCU->getSlice()->getInterSdcFlag() && ePartSize == SIZE_2Nx2N)
-#else
-  if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && ePartSize == SIZE_2Nx2N)
-#endif
   {
     Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE};
Index: /trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1133)
@@ -78,5 +78,4 @@
 }
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
 Void TEncEntropy::encodeSPS( TComSPS* pcSPS )
 {
@@ -84,19 +83,4 @@
   return;
 }
-#else
-#if H_3D
-Void TEncEntropy::encodeSPS( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
-{
-  m_pcEntropyCoderIf->codeSPS( pcSPS, viewIndex, depthFlag );
-  return;
-}
-#else
-Void TEncEntropy::encodeSPS( TComSPS* pcSPS )
-{
-  m_pcEntropyCoderIf->codeSPS( pcSPS );
-  return;
-}
-#endif
-#endif
 
 Void TEncEntropy::encodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
@@ -130,26 +114,8 @@
 Void TEncEntropy::encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
-#if ALIGN_J0060_J0107
   if(!pcCU->getSlice()->getIntraSingleFlag() )
   {
     return;
   }
-#else
-  if ( !pcCU->getSlice()->getIsDepth() )
-  {
-    return;
-  }
-#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-  if(!pcCU->getSlice()->getVPS()->getSingleDepthModeFlag(pcCU->getSlice()->getLayerIdInVps()))
-  {
-     return;
-  }
-#else
-  if(!pcCU->getSlice()->getApplySingleDepthMode())
-  {
-     return;
-  }
-#endif
-#endif
   if( bRD )
   {
@@ -289,13 +255,5 @@
   
 #if H_3D_DBBP
-#if SEC_DBBP_VIEW_REF_CHECK_J0037
-#if HHI_TOOL_PARAMETERS_I2_J0107
   if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
-#else
-  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
-#endif
-#else
-  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
-#endif
   {
     encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD);
@@ -809,11 +767,6 @@
 Void TEncEntropy::encodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
-#if HHI_TOOL_PARAMETERS_I2_J0107
   if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) || 
     ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getIntraSdcWedgeFlag() ) )
-#else
-  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) || 
-    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) )
-#endif
   {
     return;
Index: /trunk/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncEntropy.h	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncEntropy.h	(revision 1133)
@@ -69,13 +69,5 @@
 
   virtual Void  codeVPS                 ( TComVPS* pcVPS )                                      = 0;
-#if HHI_TOOL_PARAMETERS_I2_J0107
   virtual Void  codeSPS                 ( TComSPS* pcSPS )                                      = 0;
-#else
-#if !H_3D
-  virtual Void  codeSPS                 ( TComSPS* pcSPS )                                      = 0;
-#else
-  virtual Void  codeSPS                 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )       = 0;
-#endif
-#endif
   virtual Void  codePPS                 ( TComPPS* pcPPS )                                      = 0;
   virtual Void  codeSliceHeader         ( TComSlice* pcSlice )                                  = 0;
@@ -169,13 +161,5 @@
   Void encodeVPS               ( TComVPS* pcVPS);
   // SPS
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Void encodeSPS               ( TComSPS* pcSPS );
-#else
-#if H_3D
-  Void encodeSPS               ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag );
-#else
-  Void encodeSPS               ( TComSPS* pcSPS );
-#endif
-#endif
   Void encodePPS               ( TComPPS* pcPPS );
   Void encodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
Index: /trunk/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1133)
@@ -880,10 +880,6 @@
 
     TComVPS*           vps = pcSlice->getVPS();     
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
     Int numDirectRefLayers = vps    ->getNumRefListLayers( getLayerId() ); 
-#else
-    Int numDirectRefLayers = vps    ->getNumDirectRefLayers( getLayerId() ); 
-#endif
 #else
     Int numDirectRefLayers = vps    ->getNumDirectRefLayers( getLayerId() ); 
@@ -901,10 +897,6 @@
           pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 ); 
         }
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
         if ( gopEntry.m_numActiveRefLayerPics != vps->getNumRefListLayers( getLayerId() ) )
-#else
-        if ( gopEntry.m_numActiveRefLayerPics != vps->getNumDirectRefLayers( getLayerId() ) )
-#endif
 #else
         if ( gopEntry.m_numActiveRefLayerPics != vps->getNumDirectRefLayers( getLayerId() ) )
@@ -957,23 +949,5 @@
     pcSlice->setRefPicList ( rcListPic );
 #endif
-#if !MTK_SINGLE_DEPTH_VPS_FLAG_J0060
-#if H_3D_SINGLE_DEPTH
-#if HHI_TOOL_PARAMETERS_I2_J0107
-    pcSlice->setApplySingleDepthMode( pcSlice->getIntraSingleFlag() );
-#else
-    TEncTop* pcEncTop = (TEncTop*) m_pcCfg;
-    bool enableSingleDepthMode=false;
-    if(pcEncTop->getUseSingleDepthMode())
-    {
-      if(pcSlice->getIsDepth())
-      {
-        enableSingleDepthMode=true;
-      }
-    }
-    pcSlice->setApplySingleDepthMode(enableSingleDepthMode);
-#endif
-#endif   
-#endif 
-#if SEC_ARP_VIEW_REF_CHECK_J0037 || SEC_DBBP_VIEW_REF_CHECK_J0037
+#if H_3D
     pcSlice->setDefaultRefView();
 #endif
@@ -1439,13 +1413,5 @@
         pcSlice->getSPS()->getVuiParameters()->setHrdParametersPresentFlag( true );
       }
-#if HHI_TOOL_PARAMETERS_I2_J0107
       m_pcEntropyCoder->encodeSPS(pcSlice->getSPS());
-#else
-#if !H_3D
-      m_pcEntropyCoder->encodeSPS(pcSlice->getSPS());
-#else
-      m_pcEntropyCoder->encodeSPS(pcSlice->getSPS(), pcSlice->getViewIndex(), pcSlice->getIsDepth() );
-#endif
-#endif
       writeRBSPTrailingBits(nalu.m_Bitstream);
       accessUnit.push_back(new NALUnitEBSP(nalu));
Index: /trunk/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1133)
@@ -255,9 +255,5 @@
       curCost += m_CUTransquantBypassFlagSCModel.calcCost( curSliceType, qp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG );
 #if H_3D_DIM
-#if HHI_TOOL_PARAMETERS_I2_J0107
     if( m_pcSlice->getIntraSdcWedgeFlag() || m_pcSlice->getIntraContourFlag() )
-#else
-    if( m_pcSlice->getVpsDepthModesFlag() || m_pcSlice->getIVPFlag() )
-#endif
     {
       curCost += m_cDepthIntraModeSCModel.calcCost    ( curSliceType, qp, (UChar*)INIT_DEPTH_INTRA_MODE );
@@ -350,13 +346,5 @@
 }
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
 Void TEncSbac::codeSPS( TComSPS* pcSPS )
-#else
-#if H_3D
-Void TEncSbac::codeSPS( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
-#else
-Void TEncSbac::codeSPS( TComSPS* pcSPS )
-#endif
-#endif
 {
   assert (0);
@@ -633,10 +621,5 @@
   PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
 #if H_3D_QTLPC
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
-#else
-  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
-  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
-#endif
   TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
   Bool bDepthMapDetect   = (pcTexture != NULL);
@@ -1011,10 +994,5 @@
 
   
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); 
-#else
-  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
-  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
-#endif
   TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
   Bool bDepthMapDetect   = (pcTexture != NULL);
@@ -1077,9 +1055,5 @@
     dir[j] = pcCU->getLumaIntraDir( absPartIdx+partOffset*j );
 #if H_3D_DIM
-#if HHI_TOOL_PARAMETERS_I2_J0107
     if( pcCU->getSlice()->getIntraSdcWedgeFlag() ||  pcCU->getSlice()->getIntraContourFlag() )
-#else
-    if( pcCU->getSlice()->getVpsDepthModesFlag() ||  pcCU->getSlice()->getIVPFlag() )
-#endif
     {
       codeIntraDepth( pcCU, absPartIdx+partOffset*j );
@@ -1227,9 +1201,5 @@
     }
     //mode coding
-#if HHI_TOOL_PARAMETERS_I2_J0107
     if( pcCU->getSlice()->getIntraSdcWedgeFlag() && pcCU->getSlice()->getIntraContourFlag())
-#else
-    if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag())
-#endif
     {
       m_pcBinIf->encodeBin( uiCodeIdx == 0 ? 0 : 1, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
@@ -2330,9 +2300,5 @@
   PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
   AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
-#if HHI_TOOL_PARAMETERS_I2_J0107
   AOF( pcCU->getSlice()->getDepthBasedBlkPartFlag() ); 
-#else
-  AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
-#endif
   AOF( !pcCU->getSlice()->getIsDepth() );
   
Index: /trunk/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSbac.h	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncSbac.h	(revision 1133)
@@ -94,13 +94,5 @@
 
   Void  codeVPS                 ( TComVPS* pcVPS );
-#if HHI_TOOL_PARAMETERS_I2_J0107
   Void  codeSPS                 ( TComSPS* pcSPS     );
-#else
-#if !H_3D
-  Void  codeSPS                 ( TComSPS* pcSPS     );
-#else
-  Void  codeSPS                 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag );
-#endif
-#endif
   Void  codePPS                 ( TComPPS* pcPPS     );
   Void  codeSliceHeader         ( TComSlice* pcSlice );
Index: /trunk/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1133)
@@ -2881,15 +2881,7 @@
   Int index=0;
   Pel testDepth;
-#if SINGLE_DEPTH_SIMP_J0115
   Pel DepthNeighbours[2];
-#else
-  Pel DepthNeighbours[5];
-#endif
   //construction of depth candidates
-#if SINGLE_DEPTH_SIMP_J0115
   for( Int i = 0; (i < 2)  && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
-#else
-  for( Int i = 0; (i < 5)  && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
-#endif
   {
     if(!pcCU->getNeighDepth (0, 0, &testDepth, i))
@@ -2899,14 +2891,4 @@
     DepthNeighbours[index]=testDepth;
     index++;
-#if !SINGLE_DEPTH_SIMP_J0115
-    for(Int j=0;j<index-1;j++)
-    {
-      if( (DepthNeighbours[index-1]==DepthNeighbours[j]))
-      {
-        index--;
-        break;
-      }
-    }
-#endif
   }
 
@@ -3132,8 +3114,8 @@
     if( m_pcEncCfg->getIsDepth() && uiWidth >= DIM_MIN_SIZE && uiWidth <= DIM_MAX_SIZE && uiWidth == uiHeight )
     {
-#if HHI_TOOL_PARAMETERS_I2_J0107
+#if TICKET083_IVPFLAG_FIX
+      if( bOnlyIVP )
+#else
       if( bOnlyIVP && pcCU->getSlice()->getIntraContourFlag() )
-#else
-      if( bOnlyIVP && m_pcEncCfg->getUseIVP() )
 #endif
       {
@@ -3158,9 +3140,5 @@
 
 #if H_3D_DIM_DMM
-#if HHI_TOOL_PARAMETERS_I2_J0107
       if( ( ( m_pcEncCfg->getUseDMM() &&  pcCU->getSlice()->getIntraSdcWedgeFlag() )  || pcCU->getSlice()->getIntraContourFlag() )
-#else
-      if( ( m_pcEncCfg->getUseDMM() || m_pcEncCfg->getUseIVP() )
-#endif
 #if H_3D_FAST_DEPTH_INTRA
          && (uiRdModeList[0] != PLANAR_IDX || varCU >= varThreshold)
@@ -3169,27 +3147,15 @@
       {
         UInt uiStart, uiEnd;
-#if HHI_TOOL_PARAMETERS_I2_J0107
         if( ( m_pcEncCfg->getUseDMM() &&  pcCU->getSlice()->getIntraSdcWedgeFlag() ) &&  pcCU->getSlice()->getIntraContourFlag() )
-#else
-        if( m_pcEncCfg->getUseDMM() &&  m_pcEncCfg->getUseIVP() )
-#endif
         {
           uiStart = 0;
           uiEnd   = 2;
         }
-#if HHI_TOOL_PARAMETERS_I2_J0107
         else if( ( m_pcEncCfg->getUseDMM() &&  pcCU->getSlice()->getIntraSdcWedgeFlag() ) )
-#else
-        else if( m_pcEncCfg->getUseDMM() )
-#endif
         {
           uiStart = 0;
           uiEnd   = 1;
         }
-#if HHI_TOOL_PARAMETERS_I2_J0107
         else if( pcCU->getSlice()->getIntraContourFlag() )
-#else
-        else if( m_pcEncCfg->getUseIVP() )
-#endif
         {
           uiStart = 1;
@@ -3329,9 +3295,5 @@
 #if H_3D_DIM_SDC
 #if H_3D_FAST_INTRA_SDC
-#if HHI_TOOL_PARAMETERS_I2_J0107
       Bool bTestSDC = ( ( m_pcEncCfg->getUseSDC() &&  pcCU->getSlice()->getIntraSdcWedgeFlag() ) && pcCU->getSDCAvailable(uiPartOffset) && uiMode >= numModesForFullRD);
-#else
-      Bool bTestSDC = ( m_pcEncCfg->getUseSDC() && pcCU->getSDCAvailable(uiPartOffset) && uiMode >= numModesForFullRD);
-#endif
 #else
       Bool bTestSDC = ( m_pcEncCfg->getUseSDC() && pcCU->getSDCAvailable(uiPartOffset) );
@@ -4177,17 +4139,4 @@
       }
 #endif
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-      if( uiMergeCand == pcCU->getUseDDDCandIdx() )
-      {
-        pcCU->setUseDDD( true, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
-        pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
-      }
-      else
-      {
-        pcCU->setUseDDD( false, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
-      }
-#endif
-#endif
 
       xGetInterPredictionError( pcCU, pcYuvOrg, iPUIdx, uiCostCand, m_pcEncCfg->getUseHADME() );
@@ -4875,19 +4824,4 @@
 #if H_3D_VSP
         pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
-#endif
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-        if( uiMRGIndex == pcCU->getUseDDDCandIdx() )
-        {
-            assert( vspFlag[uiMRGIndex]     == 0 );
-            assert( bSPIVMPFlag[uiMRGIndex] == 0 );
-            pcCU->setUseDDD( true, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
-            pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
-        }
-        else
-        {
-            pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
-        }
-#endif
 #endif
 #if H_3D_SPIVMP
@@ -4967,9 +4901,4 @@
         pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 
 #endif
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-        pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
-#endif
-#endif
         // set ME result
         pcCU->setMergeFlagSubParts( false,        uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
@@ -5353,16 +5282,5 @@
 #endif
 #if H_3D_INTER_SDC
-#if HHI_TOOL_PARAMETERS_I2_J0107  
    pcPatternKey->setSDCMRSADFlag( pcCU->getSlice()->getInterSdcFlag() );
-#else
-  if ( pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )
-  {
-    pcPatternKey->setSDCMRSADFlag( true );
-  } 
-  else
-  {
-    pcPatternKey->setSDCMRSADFlag( false );
-  }
-#endif
 #endif
 
Index: /trunk/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1133)
@@ -215,8 +215,6 @@
   rpcSlice->setPicOutputFlag( true );
   rpcSlice->setPOC( pocCurr );
-#if HHI_TOOL_PARAMETERS_I2_J0107
 #if H_3D
   rpcSlice->init3dToolParameters(); 
-#endif
 #endif
 #if H_3D_IC
@@ -613,24 +611,5 @@
   rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
 #if H_3D_IV_MERGE
-#if HHI_TOOL_PARAMETERS_I2_J0107
-#if ALGIN_J0107_J0059
   rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( rpcSlice->getMpiFlag( ) || rpcSlice->getIvMvPredFlag( ) || rpcSlice->getViewSynthesisPredFlag( )   ) ? 1 : 0 ));
-#else
-  rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( rpcSlice->getMpiFlag( ) || rpcSlice->getIvMvPredFlag( ) ) ? 1 : 0 ));
-#endif
-#else
-  if(rpcSlice->getIsDepth())
-  {
-    rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( rpcSlice->getVPS()->getMPIFlag( rpcSlice->getLayerIdInVps() ) || rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ) ? 1 : 0 ) );
-  }
-  else
-  {
-#if MTK_MRG_LIST_SIZE_CLEANUP_J0059
-    rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() )  || rpcSlice->getVPS()->getViewSynthesisPredFlag( rpcSlice->getLayerIdInVps() ) ? 1 : 0 ) );
-#else
-    rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ? 1 : 0 ) );
-#endif
-  }
-#endif
 #else
   rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
@@ -1028,36 +1007,4 @@
     }
   }
-#if LGE_DEFAULT_DV_J0046 && !SEC_ARP_VIEW_REF_CHECK_J0037 && !SEC_DBBP_VIEW_REF_CHECK_J0037
-  pcSlice->setDefaultRefViewIdx( -1 );
-  pcSlice->setDefaultRefViewIdxAvailableFlag( false ); 
-
-  Int valid = 0;
-  Int viewIndex = 0;
-  for( UInt uiBId = 0; uiBId < pcSlice->getViewIndex() && valid==0; uiBId++ )
-  {
-      UInt        uiBaseId    = uiBId;
-      TComPic*    pcBasePic   = pcSlice->getIvPic( false, uiBaseId );
-      for( Int iRefListId = 0; ( iRefListId < (pcSlice->isInterB()? 2:1) ) && !pcSlice->isIntra() && valid==0; iRefListId++ )
-      {
-          RefPicList  eRefPicListTest = RefPicList( iRefListId );
-          Int         iNumRefPics = pcSlice->getNumRefIdx( eRefPicListTest ) ;
-          for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ )
-          { 
-              if(pcBasePic->getPOC() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getPOC() 
-                  && pcBasePic->getViewIndex() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getViewIndex())
-              {
-                  valid=1;
-                  viewIndex = uiBaseId;
-                  break;
-              }
-          }
-      }
-  }
-  if( valid )
-  {
-      pcSlice->setDefaultRefViewIdx( viewIndex );
-      pcSlice->setDefaultRefViewIdxAvailableFlag( true );   
-  }
-#endif
 
   // for every CU in slice
Index: /trunk/source/Lib/TLibEncoder/TEncSlice.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSlice.h	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncSlice.h	(revision 1133)
@@ -107,11 +107,4 @@
   UInt                    m_uiSliceIdx;
   std::vector<TEncSbac*> CTXMem;
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  Int          m_iDDDScale;
-  Int          m_iDDDOffset;
-  UInt         m_uiDDDPrecision;
-#endif
-#endif
 public:
   TEncSlice();
@@ -147,9 +140,4 @@
   Void      initCtxMem( UInt i );
   Void      setCtxMem( TEncSbac* sb, Int b )   { CTXMem[b] = sb; }
-#if !LGE_DDD_REMOVAL_J0042_J0030
-#if H_3D_DDD
-  Void setDDDPar( Int iScale, Int iOffset, UInt uiPrecision ){ m_iDDDScale = iScale; m_iDDDOffset = iOffset; m_uiDDDPrecision = uiPrecision; }
-#endif
-#endif
 
 private:
Index: /trunk/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1133)
@@ -896,11 +896,7 @@
 #if H_MV
   m_cPPS.setLayerId( getLayerId() );
-#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
 #if H_3D
   // Check if this condition is still correct
   if( getVPS()->getNumRefListLayers( getLayerId() ) > 0 )
-#else
-  if( getVPS()->getNumDirectRefLayers( getLayerId() ) > 0 )
-#endif
 #else
   if( getVPS()->getNumDirectRefLayers( getLayerId() ) > 0 )
Index: /trunk/source/Lib/TLibEncoder/TEncTop.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncTop.h	(revision 1132)
+++ /trunk/source/Lib/TLibEncoder/TEncTop.h	(revision 1133)
@@ -270,8 +270,6 @@
   Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
 #endif
-#if HHI_TOOL_PARAMETERS_I2_J0107
 #if H_3D
   Void                    setSps3dExtension     ( TComSps3dExtension sps3dExtension ) { m_cSPS.setSps3dExtension( sps3dExtension );  };
-#endif
 #endif
 #if H_3D_IC
Index: /trunk/source/Lib/TLibExtractor/TExtrTop.cpp
===================================================================
--- /trunk/source/Lib/TLibExtractor/TExtrTop.cpp	(revision 1132)
+++ /trunk/source/Lib/TLibExtractor/TExtrTop.cpp	(revision 1133)
@@ -74,10 +74,5 @@
 #if H_3D
 
-#if HHI_TOOL_PARAMETERS_I2_J0107
      m_cEntropyDecoder   .decodeSPS( &cSPS );
-#else
-      Int layerIdInVPS = m_cVPS.getLayerIdInVps( uiLayerId ); 
-     m_cEntropyDecoder   .decodeSPS( &cSPS, m_cVPS.getViewIndex( layerIdInVPS ), ( m_cVPS.getDepthId( layerIdInVPS ) == 1 ) );
-#endif
 #else
      m_cEntropyDecoder   .decodeSPS( &cSPS );
