Index: trunk/source/App/TAppDecoder/TAppDecCfg.cpp
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 758)
+++ trunk/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 773)
@@ -85,9 +85,5 @@
   ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)")
 #if H_MV
-#if H_MV_6_HRD_O0217_13
   ("TargetOptLayerSetIdx,x", m_targetOptLayerSetIdx, -1, "Target output layer set index. (default: -1, determine automatically to be equal to highest layer set index") // Should actually equal to 0 as default. However, this would cause only the base layer to be decoded.  
-#else
-  ("MaxLayerId,-ls", m_maxLayerId, MAX_NUM_LAYER_IDS-1, "Maximum LayerId to be decoded.")
-#endif
 #endif
   ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers")
@@ -128,5 +124,5 @@
   if ( !cfg_TargetDecLayerIdSetFile.empty() )
   {
-#if H_MV_6_HRD_O0217_13
+#if H_MV
     m_targetDecLayerIdSetFileEmpty = false;     
 #endif
@@ -174,15 +170,5 @@
   }
 #if H_MV
-#if H_MV_6_HRD_O0217_13
   m_targetDecLayerIdSet.push_back( 0 );         // Only base layer at startup
-#else
-  else
-  {
-    for ( Int curLayerId = 0; curLayerId <= m_maxLayerId; curLayerId++ )
-    {
-      m_targetDecLayerIdSet.push_back( curLayerId );
-    }
-  }
-#endif
 #endif
 
Index: trunk/source/App/TAppDecoder/TAppDecCfg.h
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecCfg.h	(revision 758)
+++ trunk/source/App/TAppDecoder/TAppDecCfg.h	(revision 773)
@@ -59,7 +59,5 @@
   Char*         m_pchBitstreamFile;                   ///< input bitstream file name
 #if H_MV
-#if H_MV_6_HRD_O0217_13
   Int           m_targetOptLayerSetIdx;               ///< target output layer set index
-#endif
   Int           m_maxLayerId;                         ///< maximum nuh_layer_id decoded
   std::vector<Char*> m_pchReconFiles;                 ///< array of output reconstruction file name create from output reconstruction file name
@@ -77,5 +75,5 @@
 
   std::vector<Int> m_targetDecLayerIdSet;             ///< set of LayerIds to be included in the sub-bitstream extraction process.
-#if H_MV_6_HRD_O0217_13
+#if H_MV
   Bool          m_targetDecLayerIdSetFileEmpty;      ///< indication if target layers are given by file
 #endif
@@ -88,9 +86,4 @@
   TAppDecCfg()
   : m_pchBitstreamFile(NULL)
-#if H_MV
-#if !H_MV_6_HRD_O0217_13
-  , m_maxLayerId(0)
-#endif
-#endif
   , m_pchReconFile(NULL)
   , m_iSkipFrame(0)
@@ -99,5 +92,5 @@
   , m_iMaxTemporalLayer(-1)
   , m_decodedPictureHashSEIEnabled(0)
-#if H_MV_6_HRD_O0217_13
+#if H_MV
   , m_targetDecLayerIdSetFileEmpty(true)
 #endif
Index: trunk/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 758)
+++ trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 773)
@@ -61,5 +61,4 @@
 {
 #if H_MV
-#if H_MV_LAYER_WISE_STARTUP
   for (Int i = 0; i < MAX_NUM_LAYER_IDS; i++) 
   {
@@ -67,7 +66,4 @@
     m_layerInitilizedFlags[i] = false; 
   }
-#else
-  for (Int i = 0; i < MAX_NUM_LAYER_IDS; i++) m_layerIdToDecIdx[i] = -1; 
-#endif
 #endif
 #if H_3D
@@ -192,7 +188,5 @@
     Bool newSliceDiffPoc   = false;
     Bool newSliceDiffLayer = false;
-#if H_MV_FIX_SKIP_PICTURES
     Bool sliceSkippedFlag = false; 
-#endif
 #if H_3D
     Bool allLayersDecoded  = false;     
@@ -212,32 +206,17 @@
       read(nalu, nalUnit);
 #if H_MV      
-#if !H_MV_6_HRD_O0217_13
-      Int decIdx     = xGetDecoderIdx( nalu.m_layerId , true );
-#endif
-#if H_MV_6_LAYER_ID_32
       if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 ) 
-#else            
-      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) )
-#endif
       {
         bNewPicture = false;
-#if H_MV_6_LAYER_ID_32
         if ( !bitstreamFile )
         {
           decIdxLastPic     = decIdxCurrPic; 
         }
-#endif
       }
       else
       { 
-#if H_MV_6_HRD_O0217_13
         Int decIdx     = xGetDecoderIdx( nalu.m_layerId , true );      
-#endif
         newSliceDiffLayer = nalu.isSlice() && ( nalu.m_layerId != layerIdCurrPic ) && !firstSlice;
-#if H_MV_FIX_SKIP_PICTURES
         newSliceDiffPoc   = m_tDecTop[decIdx]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[decIdx], newSliceDiffLayer, sliceSkippedFlag );
-#else
-        newSliceDiffPoc   = m_tDecTop[decIdx]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[decIdx], newSliceDiffLayer );
-#endif
         // decode function only returns true when all of the following conditions are true
         // - poc in particular layer changes
@@ -245,5 +224,4 @@
         // - nalu.isSlice() == true      
 
-#if H_MV_6_HRD_O0217_13
         // Update TargetDecLayerIdList only when not specified by layer id file, specification by file might actually out of conformance. 
         if (nalu.m_nalUnitType == NAL_UNIT_VPS && m_targetDecLayerIdSetFileEmpty )
@@ -258,13 +236,6 @@
           m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 
         }
-#endif
-#if H_MV_FIX_SKIP_PICTURES
         bNewPicture       = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag; 
         if ( nalu.isSlice() && firstSlice && !sliceSkippedFlag )        
-#else
-        bNewPicture       = newSliceDiffLayer || newSliceDiffPoc; 
-
-        if ( nalu.isSlice() && firstSlice )
-#endif
         {
           layerIdCurrPic = nalu.m_layerId; 
@@ -881,10 +852,8 @@
   Int decIdx = -1; 
 
-#if H_MV_6_LAYER_ID_32
   if ( layerId > MAX_NUM_LAYER_IDS-1 )  
   {
     return decIdx; 
   }
-#endif
 
   if ( m_layerIdToDecIdx[ layerId ] != -1 ) 
@@ -906,7 +875,5 @@
     m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
     m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 
-#if H_MV_LAYER_WISE_STARTUP
     m_tDecTop[ decIdx ]->setLayerInitilizedFlags( m_layerInitilizedFlags );
-#endif
 
 #if H_3D
Index: trunk/source/App/TAppDecoder/TAppDecTop.h
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecTop.h	(revision 758)
+++ trunk/source/App/TAppDecoder/TAppDecTop.h	(revision 773)
@@ -67,7 +67,5 @@
   Int                             m_numDecoders;                               ///< number of decoder instances
   TComPicLists                    m_ivPicLists;                                ///< picture buffers of decoder instances
-#if H_MV_LAYER_WISE_STARTUP
   Bool                            m_layerInitilizedFlags[ MAX_NUM_LAYER_IDS ]; ///< for layerwise startup 
-#endif
 
 #else
Index: trunk/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 758)
+++ trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 773)
@@ -378,7 +378,4 @@
 #if H_3D_DIM
   ("DMM",                   m_useDMM,           true,  "Depth intra model modes")
-#if !SEC_DMM3_RBC_F0147
-  ("RBC",                   m_useRBC,           true,  "Region boundary chain mode")
-#endif
   ("SDC",                   m_useSDC,           true,  "Simplified depth coding")
   ("DLT",                   m_useDLT,           true,  "Depth lookup table")
@@ -391,9 +388,5 @@
   ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")    
   ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set")  
-#if H_MV_6_PS_0109_25
   ("DefaultOneTargetOutputLayerFlag"  , m_defaultOneTargetOutputLayerIdc  , 0, "Output highest layer of layer sets by default")
-#else
-  ("DefaultOneTargetOutputLayerFlag", m_defaultOneTargetOutputLayerFlag,  false , "Output highest layer of layer sets by default")      
-#endif
   ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets")  
   ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers")  
@@ -451,10 +444,9 @@
   ("QuadtreeTUMaxDepthIntra", m_uiQuadtreeTUMaxDepthIntra, 1u, "Depth of TU tree for intra CUs")
   ("QuadtreeTUMaxDepthInter", m_uiQuadtreeTUMaxDepthInter, 2u, "Depth of TU tree for inter CUs")
-  
   // Coding structure parameters
-#if H_MV_LAYER_WISE_STARTUP
+#if H_MV  
   ("IntraPeriod,-ip",         m_iIntraPeriod,std::vector<Int>(1,-1), "Intra period in frames, (-1: only first frame), per layer")
 #else
-  ("IntraPeriod,-ip",         m_iIntraPeriod,              -1, "Intra period in frames, (-1: only first frame)")
+("IntraPeriod,-ip",         m_iIntraPeriod,              -1, "Intra period in frames, (-1: only first frame)")
 #endif
   ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR)")
@@ -518,19 +510,15 @@
   ("AdvMultiviewResPred",      m_uiUseAdvResPred,           (UInt)1, "Usage of Advanced Residual Prediction" )
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   ("SubPULog2Size", m_iSubPULog2Size, (Int)3, "Sub-PU size index: 2^n")
 #endif
 
 #if H_3D_IC
-#if SEC_ONLY_TEXTURE_IC_F0151
   ("IlluCompEnable",           m_abUseIC, true, "Enable illumination compensation")
-#else
-  ("IlluCompEnable",           m_abUseIC, std::vector<Bool>(2, true), "Enable illumination compensation")
-#endif
 #endif
 #if H_3D_INTER_SDC
   ("InterSDC",                 m_bDepthInterSDCFlag,        true, "Enable depth inter SDC")
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   ("MPI",                      m_bMPIFlag,        true, "Enable MPI")
 #endif
@@ -633,14 +621,10 @@
 #if H_MV
 
-#if H_MV_6_HRD_O0217_13
   // DBP Size
   ("SubLayerFlagInfoPresentFlag",  m_subLayerFlagInfoPresentFlag , false                                           , "SubLayerFlagInfoPresentFlag")
-#endif
   // VPS VUI
   ("VpsVuiPresentFlag"           , m_vpsVuiPresentFlag           , false                                           , "VpsVuiPresentFlag           ")
-#if H_MV_6_PS_O0223_29
   ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false                                           , "CrossLayerPicTypeAlignedFlag")  // Could actually be derived by the encoder
   ("CrossLayerIrapAlignedFlag"   , m_crossLayerIrapAlignedFlag   , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
-#endif
   ("BitRatePresentVpsFlag"       , m_bitRatePresentVpsFlag       , false                                           , "BitRatePresentVpsFlag       ")
   ("PicRatePresentVpsFlag"       , m_picRatePresentVpsFlag       , false                                           , "PicRatePresentVpsFlag       ")
@@ -651,5 +635,4 @@
   ("ConstantPicRateIdc"          , m_constantPicRateIdc          , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set")
   ("AvgPicRate"                  , m_avgPicRate                  , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "AvgPicRate         per sub layer for the N-th layer set")
-#if H_MV_6_O0226_37
   ("TilesNotInUseFlag"            , m_tilesNotInUseFlag            , true                                          , "TilesNotInUseFlag            ")
   ("TilesInUseFlag"               , m_tilesInUseFlag               , std::vector< Bool >(1,false)                   , "TilesInUseFlag               ")
@@ -657,5 +640,4 @@
   ("WppNotInUseFlag"              , m_wppNotInUseFlag              , true                                          , "WppNotInUseFlag              ")
   ("WppInUseFlag"                 , m_wppInUseFlag                 , std::vector< Bool >(1,0)                      , "WppInUseFlag                 ")
-#endif
   ("TileBoundariesAlignedFlag"   , m_tileBoundariesAlignedFlag   , std::vector< Bool >(1,0)  ,MAX_NUM_LAYERS       , "TileBoundariesAlignedFlag    per direct reference for the N-th layer")
   ("IlpRestrictedRefLayersFlag"  , m_ilpRestrictedRefLayersFlag  , false                                           , "IlpRestrictedRefLayersFlag")
@@ -787,9 +769,5 @@
 #endif
 #if H_3D_IV_MERGE
-#if QC_DEPTH_IV_MRG_F0125  
   ("IvMvPred",                        m_ivMvPredFlag            , std::vector<Bool>(2, true)            , "inter view motion prediction " )
-#else
-  ("IvMvPred",                        m_ivMvPredFlag,           true            , "inter view motion prediction " )  
-#endif
 #endif
 #if H_3D_NBDV_REF
@@ -1074,12 +1052,8 @@
   xResizeVector( m_bLoopFilterDisable ); 
   xResizeVector( m_bUseSAO ); 
-#if H_MV_LAYER_WISE_STARTUP
   xResizeVector( m_iIntraPeriod ); 
-#endif
-#if H_MV_6_O0226_37
   xResizeVector( m_tilesInUseFlag ); 
   xResizeVector( m_loopFilterNotAcrossTilesFlag ); 
   xResizeVector( m_wppInUseFlag ); 
-#endif
 #else
   m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ];
@@ -1426,9 +1400,5 @@
     for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++ )
     {
-#if H_MV_6_LAYER_ID_32
       xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than MAX_NUM_LAYER_IDS" ); 
-#else
-      xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than 64" ); 
-#endif
     }
   }
@@ -1456,7 +1426,5 @@
   }
 
-#if H_MV_6_PS_0109_25
   xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" );
-#endif
   xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
 
@@ -1475,5 +1443,5 @@
   xConfirmPara( m_iGOPSize < 1 ,                                                            "GOP Size must be greater or equal to 1" );
   xConfirmPara( m_iGOPSize > 1 &&  m_iGOPSize % 2,                                          "GOP Size must be a multiple of 2, if GOP Size is greater than 1" );
-#if H_MV_LAYER_WISE_STARTUP
+#if H_MV
   for( Int layer = 0; layer < m_numberOfLayers; layer++ )
   {
@@ -1508,5 +1476,5 @@
   if (m_iDecodingRefreshType == 2)
   {
-#if H_MV_LAYER_WISE_STARTUP
+#if H_MV
     for (Int i = 0; i < m_numberOfLayers; i++ )
     {
@@ -1544,5 +1512,5 @@
   xConfirmPara( ( 0 != m_uiUseAdvResPred ) &&  ( 1 != m_uiUseAdvResPred ), "UseAdvResPred must be 0 or 1." );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   xConfirmPara( m_iSubPULog2Size < 2,                                        "SubPULog2Size must be 2 or greater.");
   xConfirmPara( m_iSubPULog2Size > 6,                                        "SubPULog2Size must be 6 or smaller.");
@@ -1774,5 +1742,5 @@
   /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure
    * This permits the ability to omit a GOP structure specification */
-#if H_MV_LAYER_WISE_STARTUP
+#if H_MV
   if (m_iIntraPeriod[layer] == 1 && m_GOPList[0].m_POC == -1) {
 #else
@@ -1803,8 +1771,8 @@
   }
   Int numOK=0;
-#if H_MV_LAYER_WISE_STARTUP
+#if H_MV
   xConfirmPara( m_iIntraPeriod[layer] >=0&&(m_iIntraPeriod[layer]%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" ); 
 #else
-  xConfirmPara( m_iIntraPeriod >=0&&(m_iIntraPeriod%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" );
+xConfirmPara( m_iIntraPeriod >=0&&(m_iIntraPeriod%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" );
 #endif
 
@@ -1818,9 +1786,5 @@
   
 #if H_MV
-#if H_MV_LAYER_WISE_STARTUP
   if ( (m_iIntraPeriod[layer] != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable[layer]) )
-#else
-  if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable[layer]) )
-#endif
 #else
   if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable) )
@@ -2347,5 +2311,5 @@
   printf("Min PCM size                 : %d\n", 1 << m_uiPCMLog2MinSize);
   printf("Motion search range          : %d\n", m_iSearchRange );
-#if H_MV_LAYER_WISE_STARTUP
+#if H_MV
   xPrintParaVector( "Intra period", m_iIntraPeriod );
 #else
@@ -2505,10 +2469,6 @@
 #endif
 #if H_3D_IV_MERGE
-#if QC_DEPTH_IV_MRG_F0125
   printf("IvMvPred:%d %d", m_ivMvPredFlag[0] ? 1 : 0, m_ivMvPredFlag[1] ? 1 : 0);
-#else
-  printf("IvMvPred:%d ", m_ivMvPredFlag );
-#endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   printf(" SubPULog2Size:%d  " , m_iSubPULog2Size  );
 #endif
@@ -2518,9 +2478,5 @@
 #endif
 #if H_3D_IC
-#if SEC_ONLY_TEXTURE_IC_F0151
   printf( "IlluCompEnable: %d ", m_abUseIC);
-#else
-  printf( "IlluCompEnable: %d %d ", m_abUseIC[0] ? 1 : 0, m_abUseIC[1] ? 1 : 0 );
-#endif
 #endif
 #if H_3D_NBDV_REF
@@ -2535,7 +2491,4 @@
 #if H_3D_DIM
   printf("DMM:%d ", m_useDMM );
-#if !SEC_DMM3_RBC_F0147
-  printf("RBC:%d ", m_useRBC );
-#endif
   printf("SDC:%d ", m_useSDC );
   printf("DLT:%d ", m_useDLT );
@@ -2544,5 +2497,5 @@
   printf( "interSDC: %d ", m_bDepthInterSDCFlag ? 1 : 0 );
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   printf( "MPI: %d ", m_bMPIFlag ? 1 : 0 );
 #endif
Index: trunk/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 758)
+++ trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 773)
@@ -89,9 +89,5 @@
   Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
   std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds in vps of layer set 
-#if H_MV_6_PS_0109_25
   Int                    m_defaultOneTargetOutputLayerIdc;    ///< Output highest layer of layer sets by default when equal to 1
-#else
-  Bool                   m_defaultOneTargetOutputLayerFlag;   ///< Output highest layer of layer sets by default  
-#endif
   std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets  
   std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
@@ -102,15 +98,11 @@
   std::vector< std::vector<Int> > m_dependencyTypes;          ///< Dependency types of direct reference layers
 
-#if H_MV_6_HRD_O0217_13
   // DBP Size
   Bool m_subLayerFlagInfoPresentFlag;
-#endif
 
   // VPS VUI
   Bool m_vpsVuiPresentFlag;
-#if H_MV_6_PS_O0223_29
   Bool m_crossLayerPicTypeAlignedFlag;
   Bool m_crossLayerIrapAlignedFlag;
-#endif
   Bool m_bitRatePresentVpsFlag;
   Bool m_picRatePresentVpsFlag;
@@ -121,5 +113,4 @@
   std::vector< std::vector<Int  > > m_constantPicRateIdc;
   std::vector< std::vector<Int  > > m_avgPicRate;
-#if H_MV_6_O0226_37
   Bool                              m_tilesNotInUseFlag; 
   std::vector< Bool >               m_tilesInUseFlag;
@@ -128,5 +119,4 @@
   std::vector< Bool >               m_wppInUseFlag;
 
-#endif
   std::vector< std::vector<Bool > > m_tileBoundariesAlignedFlag;  
   Bool m_ilpRestrictedRefLayersFlag;
@@ -136,10 +126,6 @@
 
 #if H_3D_IV_MERGE
-#if QC_DEPTH_IV_MRG_F0125
   vector<Bool>           m_ivMvPredFlag;                      ///< Interview motion vector prediction 
-#else
-  Bool                   m_ivMvPredFlag;                      ///< Interview motion vector prediction 
-#endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
   Int                    m_iSubPULog2Size;                    
 #endif
@@ -150,9 +136,5 @@
 #endif
 #if H_3D_IC
-#if SEC_ONLY_TEXTURE_IC_F0151
   Bool   m_abUseIC;
-#else
-  vector<Bool> m_abUseIC;                                    ///< flag for using illumination compensation for inter-view prediction
-#endif
 #endif
 #if H_3D_NBDV_REF
@@ -196,5 +178,5 @@
   
   // coding structure
-#if H_MV_LAYER_WISE_STARTUP
+#if H_MV
   std::vector<Int> m_iIntraPeriod;                            ///< period of I-slice (random access period)
 #else
@@ -497,7 +479,4 @@
 #if H_3D_DIM
   Bool      m_useDMM;                                        ///< flag for using DMM
-#if !SEC_DMM3_RBC_F0147
-  Bool      m_useRBC;                                        ///< flag for using RBC
-#endif
   Bool      m_useSDC;                                        ///< flag for using SDC
   Bool      m_useDLT;                                        ///< flag for using DLT
@@ -510,5 +489,5 @@
   Bool m_bDepthInterSDCFlag;                                ///< flag for inter SDC of depth map coding
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
   Bool m_bMPIFlag;                                           ///< flag for MPI of depth map coding
 #endif
Index: trunk/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 758)
+++ trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 773)
@@ -76,9 +76,6 @@
 #endif
   
-#if CAM_HLS_F0136_F0045_F0082
+#if H_3D
   vps.createCamPars(m_iNumberOfViews);
-#endif
-
-#if DLT_DIFF_CODING_IN_PPS
   TComDLT& dlt = m_dlt;
 #endif
@@ -134,7 +131,5 @@
   xSetVPSExtension2        ( vps ); 
   m_ivPicLists.setVPS      ( &vps );
-#if DLT_DIFF_CODING_IN_PPS
   xDeriveDltArray          ( vps, dlt );
-#endif
 #endif
 
@@ -160,15 +155,8 @@
     //====== Camera Parameters =========
     m_cTEncTop.setCameraParameters             ( &m_cCameraData );     
-#if QC_DEPTH_IV_MRG_F0125
     m_cTEncTop.setCamParPrecision              ( m_cCameraData.getCamParsCodedPrecision  () );
     m_cTEncTop.setCamParInSliceHeader          ( m_cCameraData.getVaryingCameraParameters() );
     m_cTEncTop.setCodedScale                   ( m_cCameraData.getCodedScale             () );
     m_cTEncTop.setCodedOffset                  ( m_cCameraData.getCodedOffset            () );
-#else
-    m_cTEncTop.setCamParPrecision              ( isDepth ? false : m_cCameraData.getCamParsCodedPrecision  () );
-    m_cTEncTop.setCamParInSliceHeader          ( isDepth ? 0     : m_cCameraData.getVaryingCameraParameters() );
-    m_cTEncTop.setCodedScale                   ( isDepth ? 0     : m_cCameraData.getCodedScale             () );
-    m_cTEncTop.setCodedOffset                  ( isDepth ? 0     : m_cCameraData.getCodedOffset            () );
-#endif
 #if H_3D_VSO
     //====== VSO =========
@@ -194,20 +182,13 @@
     m_cTEncTop.setARPStepNum                   ( ( isDepth || 0==layerIdInVps ) ? 1 : H_3D_ARP_WFNR     );
 #endif
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     m_cTEncTop.setSubPULog2Size                 (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size   );
 #endif
 #if H_3D_IC
-#if SEC_ONLY_TEXTURE_IC_F0151
     m_cTEncTop.setUseIC                        ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC );
-#else
-    m_cTEncTop.setUseIC                        ( vps.getViewIndex( layerId ) == 0 ? false : m_abUseIC[isDepth ? 1 : 0] );
-#endif
 #endif
   //========== Depth intra modes ==========
 #if H_3D_DIM
     m_cTEncTop.setUseDMM                       ( isDepth ? m_useDMM               : false );
-#if !SEC_DMM3_RBC_F0147
-    m_cTEncTop.setUseRBC                       ( isDepth ? m_useRBC               : false );
-#endif
     m_cTEncTop.setUseSDC                       ( isDepth ? m_useSDC               : false );
     m_cTEncTop.setUseDLT                       ( isDepth ? m_useDLT               : false );
@@ -221,5 +202,5 @@
     m_cTEncTop.setInterSDCEnable               ( isDepth ? m_bDepthInterSDCFlag    : false );
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
     m_cTEncTop.setUseMPI               ( isDepth ? m_bMPIFlag    : false );
 #endif
@@ -227,8 +208,8 @@
 
     m_cTEncTop.setIvPicLists                   ( &m_ivPicLists ); 
-  // H_MV
+#endif  // H_MV
   m_cTEncTop.setVPS(&vps);
 
-#if DLT_DIFF_CODING_IN_PPS
+#if H_3D
   m_cTEncTop.setDLT(&dlt);
 #endif
@@ -249,5 +230,5 @@
   
   //====== Coding Structure ========
-#if H_MV_LAYER_WISE_STARTUP
+#if H_MV
   m_cTEncTop.setIntraPeriod                  ( m_iIntraPeriod[ layerIdInVps ] );
 #else
@@ -796,5 +777,5 @@
 Void TAppEncTop::xInitLib(Bool isFieldCoding)
 {
-#if CAM_HLS_F0136_F0045_F0082
+#if H_3D
   for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ )
   {
@@ -1270,9 +1251,5 @@
 
 #if H_3D_DIM_DLT
-#if DLT_DIFF_CODING_IN_PPS
 Void TAppEncTop::xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt)
-#else
-Void TAppEncTop::xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps)
-#endif
 {
   TComPicYuv*       pcDepthPicYuvOrg = new TComPicYuv;
@@ -1334,20 +1311,12 @@
   if( uiNumFrames == 0 || numBitsForValue(iNumDepthValues) == g_bitDepthY )
   {
-#if DLT_DIFF_CODING_IN_PPS
     dlt->setUseDLTFlag(layer, false);
-#else
-    // don't use DLT
-    vps->setUseDLTFlag(layer, false);
-#endif
   }
   
   // assign LUT
-#if DLT_DIFF_CODING_IN_PPS
   if( dlt->getUseDLTFlag(layer) )
+  {
     dlt->setDepthLUTs(layer, aiIdx2DepthValue, iNumDepthValues);
-#else
-  if( vps->getUseDLTFlag(layer) )
-    vps->setDepthLUTs(layer, aiIdx2DepthValue, iNumDepthValues);
-#endif
+  }
   
   // free temporary memory
@@ -1372,15 +1341,8 @@
   Int maxViewId = xGetMax( m_viewId ); 
 
-#if H_MV_6_PS_O0109_22
   Int viewIdLen = gCeilLog2( maxViewId + 1 ); 
   const Int maxViewIdLen = ( 1 << 4 ) - 1; 
   assert( viewIdLen <= maxViewIdLen ); 
   vps.setViewIdLen( viewIdLen ); 
-#else
-  Int viewIdLenMinus1 = std::max( gCeilLog2( maxViewId + 1 ) - 1, 0 ) ; 
-  const Int maxViewIdLenMinus1 = ( 1 << 4 ) - 1; 
-  assert( viewIdLenMinus1 <= maxViewIdLenMinus1  ); 
-  vps.setViewIdLenMinus1( viewIdLenMinus1 ); 
-#endif
   for (Int i = 0; i < m_iNumberOfViews; i++)
   {
@@ -1403,8 +1365,6 @@
     }
 
-#if H_MV_6_PS_O0096_21
   Int  defaultDirectDependencyType = -1; 
   Bool defaultDirectDependencyFlag = true; 
-#endif
   for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ )
   {
@@ -1415,5 +1375,4 @@
       Int refLayer = m_directRefLayers[depLayer][i]; 
       vps.setDirectDependencyFlag( depLayer, refLayer, true); 
-#if H_MV_6_PS_O0096_21
       Int curDirectDependencyType = m_dependencyTypes[depLayer][i]; 
 
@@ -1428,16 +1387,10 @@
       
       vps.setDirectDependencyType( depLayer, refLayer, curDirectDependencyType);       
-#else
-      vps.setDirectDependencyType( depLayer, refLayer,m_dependencyTypes[depLayer][i]); 
-#endif
-    }
-  }
-
-#if H_MV_6_PS_O0096_21
+    }
+  }
+
   vps.setDefaultDirectDependencyFlag( defaultDirectDependencyFlag );       
   vps.setDefaultDirectDependencyType( defaultDirectDependencyFlag ? defaultDirectDependencyType : -1 );       
-#endif
-
-#if H_MV_6_ILDSD_O0120_26
+
   // Max sub layers, + presence flag
   Bool subLayersMaxMinus1PresentFlag = false; 
@@ -1464,5 +1417,4 @@
 
   vps.setVpsSubLayersMaxMinus1PresentFlag( subLayersMaxMinus1PresentFlag ); 
-#endif
 
 
@@ -1471,12 +1423,7 @@
   for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++)
     {
-#if !H_MV_6_ILDDS_O0225_30
-    Int maxTid = -1; 
-#endif
     for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++)
       {
-#if H_MV_6_ILDDS_O0225_30
       Int maxTid = -1; 
-#endif
       for( Int i = 0; i < getGOPSize(); i++ ) 
       {        
@@ -1492,13 +1439,7 @@
         }
       }
-#if H_MV_6_ILDDS_O0225_30    
       vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 );
       maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 );    
     }
-#else
-    }
-    vps.setMaxTidIlRefPicPlus1( refLayerIdInVps, maxTid + 1 );
-    maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 );    
-#endif
   }
 
@@ -1518,5 +1459,4 @@
   
   // Poc Lsb Not Present Flag
-#if H_MV_6_MISC_O0062_31
   for ( Int layerIdInVps = 1; layerIdInVps < m_numberOfLayers; layerIdInVps++)
   {
@@ -1526,5 +1466,4 @@
     }
   }
-#endif
   
   // All Ref layers active flag
@@ -1535,5 +1474,4 @@
     {        
       GOPEntry ge =  m_GOPListMvc[layerIdInVps][ ( i < getGOPSize()  ? i : MAX_GOP ) ]; 
-#if H_MV_6_ILDDS_ILREFPICS_27_34
       Int tId = ge.m_temporalId;  // Should be equal for all layers. 
       
@@ -1571,7 +1509,4 @@
       }
       assert ( maxTidIlRefAndSubLayerMaxVaildFlag ); // Something wrong with MaxTidIlRefPicsPlus1 or SubLayersVpsMaxMinus1
-#else
-      allRefLayersActiveFlag = allRefLayersActiveFlag && (ge.m_numActiveRefLayerPics == m_directRefLayers[ layerIdInVps ].size() ); 
-#endif
     }            
   }
@@ -1579,8 +1514,4 @@
   vps.setAllRefLayersActiveFlag( allRefLayersActiveFlag );
 
-#if !H_MV_6_PS_O0223_29
-  // Currently cross layer irap aligned is always true.   
-  vps.setCrossLayerIrapAlignedFlag( true ); 
-#endif
   vps.setRefLayers(); 
 }; 
@@ -1652,7 +1583,5 @@
   repFormat->setPicHeightVpsInLumaSamples ( m_iSourceHeight );
   repFormat->setPicWidthVpsInLumaSamples  ( m_iSourceWidth  );    
-#if H_MV_6_PS_REP_FORM_18_19_20
   repFormat->setChromaAndBitDepthVpsPresentFlag( true );    
-#endif
   // ToDo not supported yet. 
   //repFormat->setSeparateColourPlaneVpsFlag( );
@@ -1667,5 +1596,4 @@
 }
 
-#if H_MV_6_HRD_O0217_13
 Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
 {
@@ -1723,5 +1651,4 @@
   }  
 }
-#endif
 
 
@@ -1743,15 +1670,9 @@
     } 
   }
-#if H_MV_6_HRD_O0217_13
   vps.deriveLayerSetLayerIdList(); 
-#endif
 
   Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 
   // Additional output layer sets + profileLevelTierIdx
-#if H_MV_6_PS_0109_25
   vps.setDefaultOneTargetOutputLayerIdc   ( m_defaultOneTargetOutputLayerIdc ); 
-#else
-  vps.setDefaultOneTargetOutputLayerFlag   ( m_defaultOneTargetOutputLayerFlag ); 
-#endif
   vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets       != 0 );   
   vps.setNumAddOutputLayerSetsMinus1       ( numAddOuputLayerSets - 1        ); 
@@ -1759,5 +1680,4 @@
 
 
-#if H_MV_6_HRD_O0217_13
   for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++)
   {
@@ -1774,10 +1694,4 @@
     }
   }
-#else
-  for (Int lsIdx = 1; lsIdx < m_vpsNumLayerSets; lsIdx++)
-  {
-    vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] ); 
-  }
-#endif
 
   for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ )
@@ -1802,7 +1716,5 @@
     }
   }
-#if H_MV_6_HRD_O0217_13
   vps.deriveTargetLayerIdLists(); 
-#endif
 }
 
@@ -1821,8 +1733,6 @@
     // however preliminary setting it from input parameters
 
-#if H_MV_6_PS_O0223_29
     pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag );
     pcVPSVUI->setCrossLayerIrapAlignedFlag   ( m_crossLayerIrapAlignedFlag    );
-#endif
 
     pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag );
@@ -1863,5 +1773,4 @@
     }
 
-#if H_MV_6_O0226_37
     pcVPSVUI->setTilesNotInUseFlag( m_tilesNotInUseFlag );
 
@@ -1899,16 +1808,4 @@
       }
     }
-#else
-    for( Int i = 1; i  <=  vps.getMaxLayersMinus1(); i++ )
-    {
-      for( Int  j = 0; j < vps.getNumDirectRefLayers( vps.getLayerIdInNuh( i ) ); j++ ) 
-      {
-        if ( m_tileBoundariesAlignedFlag[i].size() > j )
-        {
-          pcVPSVUI->setTileBoundariesAlignedFlag( i, j, m_tileBoundariesAlignedFlag[i][j]);
-        }
-      }
-    }
-#endif
 
     pcVPSVUI->setIlpRestrictedRefLayersFlag( m_ilpRestrictedRefLayersFlag );
@@ -1941,5 +1838,4 @@
       }
     }      
-#if H_MV_6_PS_O0118_33
     pcVPSVUI->setVideoSignalInfoIdxPresentFlag( true ); 
     pcVPSVUI->setVpsNumVideoSignalInfoMinus1  ( 0    ); 
@@ -1961,8 +1857,5 @@
       pcVPSVUI->setVpsVideoSignalInfoIdx( i, 0 ); 
     }
-#endif
-#if H_MV_6_HRD_O0164_15
     pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD
-#endif
   }
 }
@@ -1971,5 +1864,4 @@
 Void TAppEncTop::xSetVPSExtension2( TComVPS& vps )
 {
-
   for ( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ )
   {
@@ -1981,12 +1873,8 @@
     vps.setARPStepNum      ( layer, ( isDepth || isLayerZero ) ? 1 : H_3D_ARP_WFNR     );
 #endif  
-#if MTK_SPIVMP_F0110
+#if H_3D_SPIVMP
     if( isDepth )
     {
-#if MTK_F0110_FIX
       vps.setSubPULog2Size         ( layer, (layer != 1) ? 6: 0 ); 
-#else
-      vps.setSubPULog2Size         ( layer, (layer != 1) ? m_iSubPULog2Size: 0 ); 
-#endif
     }
     else
@@ -1997,26 +1885,8 @@
 
 #if H_3D_DIM
-#if SEC_DMM3_RBC_F0147
     vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useSDC || m_useDLT ) );
-#else
-    vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useRBC || m_useSDC || m_useDLT ) );
-#endif
-#if H_3D_DIM_DLT
-#if !DLT_DIFF_CODING_IN_PPS
-    vps.setUseDLTFlag( layer , isDepth && m_useDLT );
-    if( vps.getUseDLTFlag( layer ) )
-    {
-#if H_MV_LAYER_WISE_STARTUP
-      xAnalyzeInputBaseDepth(layer, max(  m_iIntraPeriod[layer], 24), &vps);
-#else
-      xAnalyzeInputBaseDepth(layer, max(m_iIntraPeriod, 24), &vps);
-#endif
-    }
-#endif
-#endif
 #endif
 
 #if H_3D_IV_MERGE
-#if QC_DEPTH_IV_MRG_F0125
     if( isDepth )
     {
@@ -2027,7 +1897,4 @@
       vps.setIvMvPredFlag         ( layer, !isLayerZero && m_ivMvPredFlag[0] ); 
     }
-#else
-    vps.setIvMvPredFlag         ( layer, !isLayerZero && !isDepth && m_ivMvPredFlag ); 
-#endif
 #endif
 #if H_3D_NBDV_REF
@@ -2040,5 +1907,5 @@
     vps.setInterSDCFlag( layer, !isLayerZero && isDepth && m_bDepthInterSDCFlag );
 #endif
-#if SEC_MPI_ENABLING_MERGE_F0150
+#if H_3D_IV_MERGE
     vps.setMPIFlag( layer, !isLayerZero && isDepth && m_bMPIFlag );
 #endif
@@ -2048,7 +1915,5 @@
 #endif
 }
-#endif
-
-#if DLT_DIFF_CODING_IN_PPS
+
 Void TAppEncTop::xDeriveDltArray( TComVPS& vps, TComDLT& dlt )
 {
@@ -2080,4 +1945,4 @@
 }
 #endif
-#endif
+
 //! \}
Index: trunk/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 758)
+++ trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 773)
@@ -86,5 +86,5 @@
 #endif
 
-#if DLT_DIFF_CODING_IN_PPS
+#if H_3D
   TComDLT                    m_dlt;                         ///< dlt
 #endif
@@ -129,7 +129,5 @@
   Void xSetProfileTierLevel       ( TComVPS& vps );
   Void xSetRepFormat              ( TComVPS& vps );
-#if H_MV_6_HRD_O0217_13
   Void xSetDpbSize                ( TComVPS& vps );
-#endif
   Void xSetVPSVUI                 ( TComVPS& vps );
   GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc );
@@ -138,14 +136,8 @@
 #if H_3D
   Void xSetVPSExtension2( TComVPS& vps );
-#endif
-#if DLT_DIFF_CODING_IN_PPS
   Void xDeriveDltArray( TComVPS& vps, TComDLT& dlt );
 #endif
 #if H_3D_DIM_DLT
-#if DLT_DIFF_CODING_IN_PPS
   Void  xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt);
-#else
-  Void  xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps);
-#endif
 #endif
 public:
