Index: trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1124)
+++ 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 1124)
+++ 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 1124)
+++ 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 1124)
+++ 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 1124)
+++ 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 1124)
+++ 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 1124)
+++ 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 1124)
+++ 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 1124)
+++ 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 1124)
+++ 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:
