Index: branches/HTM-10.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp	(revision 882)
@@ -140,7 +140,4 @@
     AOF( m_pScaleOffsetFile ); 
   }
-#if !FIX_CAM_PARS_COLLECTOR
-  m_cCamParsCollector.init( m_pScaleOffsetFile );
-#endif
 #endif
   InputByteStream bytestream(bitstreamFile);
@@ -209,16 +206,10 @@
       read(nalu, nalUnit);
 #if H_MV      
-#if H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO
       if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) 
           || !isNaluWithinTargetDecLayerIdSet(&nalu)
           || nalu.m_layerId > MAX_NUM_LAYER_IDS-1
           || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0)           
-#if H_MV_HLS_7_MISC_P0130_EOS
           || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0)           
-#endif
          ) 
-#else
-      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 ) 
-#endif
       {
         bNewPicture = false;
@@ -248,5 +239,4 @@
           }
 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
           if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() )
           {
@@ -254,16 +244,12 @@
             exit(EXIT_FAILURE);
           }
-#endif
           m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 
         }
 
-#if FIX_CAM_PARS_COLLECTOR
 #if H_3D
         if (nalu.m_nalUnitType == NAL_UNIT_VPS )
-        {        
-          
+        {                  
           m_cCamParsCollector.init( m_pScaleOffsetFile, m_tDecTop[decIdx]->getPrefetchedVPS() );
         }       
-#endif
 #endif
         bNewPicture       = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag; 
Index: branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 882)
@@ -388,17 +388,9 @@
   ("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_HLS_7_OUTPUT_LAYERS_5_10_22_27
   ("DefaultTargetOutputLayerIdc"     , m_defaultTargetOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
-#else
-  ("DefaultOneTargetOutputLayerFlag"  , m_defaultOneTargetOutputLayerIdc  , 0, "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")  
 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set")  
   ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set")  
-#else
-  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers")  
-#endif
   ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
   
@@ -611,15 +603,9 @@
 #if H_MV
 
-  // DBP Size
-#if !H_MV_HLS_7_FIX_SET_DPB_SIZE
-  ("SubLayerFlagInfoPresentFlag",  m_subLayerFlagInfoPresentFlag , false                                           , "SubLayerFlagInfoPresentFlag")
-#endif
   // VPS VUI
   ("VpsVuiPresentFlag"           , m_vpsVuiPresentFlag           , false                                           , "VpsVuiPresentFlag           ")
   ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false                                           , "CrossLayerPicTypeAlignedFlag")  // Could actually be derived by the encoder
   ("CrossLayerIrapAlignedFlag"   , m_crossLayerIrapAlignedFlag   , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
-#if H_MV_HLS_7_MISC_P0068_21
   ("AllLayersIdrAlignedFlag"     , m_allLayersIdrAlignedFlag     , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
-#endif
   ("BitRatePresentVpsFlag"       , m_bitRatePresentVpsFlag       , false                                           , "BitRatePresentVpsFlag       ")
   ("PicRatePresentVpsFlag"       , m_picRatePresentVpsFlag       , false                                           , "PicRatePresentVpsFlag       ")
@@ -735,5 +721,4 @@
   ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
   ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
-#if H_MV_HLS_7_SEI_P0204_26
   ("SubBitstreamPropSEIEnabled",              m_subBistreamPropSEIEnabled,    false                     ,"Enable signaling of sub-bitstream property SEI message")
   ("SEISubBitstreamNumAdditionalSubStreams",  m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled")
@@ -743,5 +728,4 @@
   ("SEISubBitstreamAvgBitRate",               m_sbPropAvgBitRate,             std::vector< Int  >(1,0)  ,"Specifies average bit rate of the i-th sub-bitstream")
   ("SEISubBitstreamMaxBitRate",               m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
-#endif
 #if H_3D
   ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
@@ -1430,5 +1414,4 @@
   }
 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   xConfirmPara( m_defaultTargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." );  
 
@@ -1461,7 +1444,5 @@
     }
   }
-#else
-  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" );
 
@@ -2245,6 +2226,4 @@
   }
   }
-#endif
-#if H_MV_HLS_7_SEI_P0204_26
   // Check input parameters for Sub-bitstream property SEI message
   if( m_subBistreamPropSEIEnabled )
Index: branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 881)
+++ branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 882)
@@ -89,14 +89,8 @@
   Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
   std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds in vps of layer set 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   Int                    m_defaultTargetOutputLayerIdc;       ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
-#else
-  Int                    m_defaultOneTargetOutputLayerIdc;    ///< Output highest layer of layer sets by default when equal to 1
-#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
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
-#endif
   std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
   
@@ -104,9 +98,4 @@
   std::vector< std::vector<Int> > m_directRefLayers;          ///< LayerIds of direct reference layers
   std::vector< std::vector<Int> > m_dependencyTypes;          ///< Dependency types of direct reference layers
-
-  // DBP Size
-#if !H_MV_HLS_7_FIX_SET_DPB_SIZE
-  Bool m_subLayerFlagInfoPresentFlag;
-#endif
 
   // VPS VUI
@@ -114,7 +103,5 @@
   Bool m_crossLayerPicTypeAlignedFlag;
   Bool m_crossLayerIrapAlignedFlag;
-#if H_MV_HLS_7_MISC_P0068_21
   Bool m_allLayersIdrAlignedFlag;
-#endif
   Bool m_bitRatePresentVpsFlag;
   Bool m_picRatePresentVpsFlag;
@@ -438,5 +425,5 @@
   Int       m_log2MaxMvLengthHorizontal;                      ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units
   Int       m_log2MaxMvLengthVertical;                        ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
   Bool              m_subBistreamPropSEIEnabled;
   Int               m_sbPropNumAdditionalSubStreams;
Index: branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 882)
@@ -127,7 +127,5 @@
   xSetRepFormat            ( vps ); 
   xSetLayerSets            ( vps ); 
-#if H_MV_HLS_7_FIX_SET_DPB_SIZE
   xSetDpbSize              ( vps ); 
-#endif
   xSetVPSVUI               ( vps ); 
 #if H_3D
@@ -427,5 +425,5 @@
   m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
   m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
   m_cTEncTop.setSubBitstreamPropSEIEnabled( m_subBistreamPropSEIEnabled );
   if( m_subBistreamPropSEIEnabled )
@@ -1504,5 +1502,4 @@
 }
 
-#if H_MV_HLS_7_FIX_SET_DPB_SIZE
 Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
 {
@@ -1518,18 +1515,9 @@
     Bool subLayerFlagInfoPresentFlag = false; 
 
-#if H_MV_HLS_7_HRD_P0156_7
     for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )
-#else
-    for( Int j = 0; j  <=  vps.getMaxTLayers() - 1 ; j++ )
-#endif
     {   
       Bool subLayerDpbInfoPresentFlag = false; 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
       assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() ); 
       for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ )   
-#else
-      assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() ); 
-      for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
-#endif
       {
         Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
@@ -1574,60 +1562,5 @@
   }  
 }
-#else
-Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
-{
-  // These settings need to be verified
-
-  TComDpbSize* dpbSize = vps.getDpbSize(); 
-
-  assert ( dpbSize != 0 ); 
-
-  for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )
-  {  
-    std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 
-    dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag );
-    if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) )
-    {
-      for( Int j = 0; j  <=  vps.getMaxTLayers() - 1 ; j++ )
-      {   
-        Int maxNumReorderPics  = MIN_INT; 
-        Int maxDecPicBuffering = MIN_INT; 
-        Int maxLatencyIncrease = MIN_INT; 
-
-        Int prevMaxNumReorderPics  = MIN_INT; 
-        Int prevMaxDecPicBuffering = MIN_INT; 
-        Int prevMaxLatencyIncrease = MIN_INT; 
-
-        assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() ); 
-        for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
-        {
-          Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
-          dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );
-        }        
-
-        for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ )
-        {
-          Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] ); 
-          maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] ); 
-        }
-        assert( maxNumReorderPics != MIN_INT ); 
-        dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics );
-
-        // To Be Done !
-        // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode );
-
-        if( j > 0 )  
-        {
-          dpbSize->setSubLayerDpbInfoPresentFlag( i, j, prevMaxDecPicBuffering == maxDecPicBuffering && prevMaxLatencyIncrease == maxLatencyIncrease && prevMaxNumReorderPics == maxNumReorderPics );
-        }        
-
-        prevMaxNumReorderPics   = maxNumReorderPics; 
-        prevMaxDecPicBuffering  = maxDecPicBuffering; 
-        prevMaxLatencyIncrease  = maxLatencyIncrease; 
-      }  
-    }  
-  }  
-}
-#endif
+
 
 Void TAppEncTop::xSetLayerSets( TComVPS& vps )
@@ -1635,7 +1568,4 @@
   // Layer sets
   vps.setVpsNumLayerSetsMinus1   ( m_vpsNumLayerSets - 1 ); 
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() ); 
-#endif
     
   for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
@@ -1654,15 +1584,8 @@
   Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 
   // Additional output layer sets + profileLevelTierIdx
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   vps.setDefaultTargetOutputLayerIdc      ( m_defaultTargetOutputLayerIdc );   
   vps.setNumAddOutputLayerSets            ( numAddOuputLayerSets          ); 
   vps.initTargetLayerIdLists(); 
-#else
-  vps.setDefaultOneTargetOutputLayerIdc   ( m_defaultOneTargetOutputLayerIdc ); 
-  vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets       != 0 );   
-  vps.setNumAddOutputLayerSetsMinus1       ( numAddOuputLayerSets - 1        ); 
-#endif
-
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
+
   for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++)
   {
@@ -1714,43 +1637,5 @@
     vps.setAltOutputLayerFlag( olsIdx , false);     
   }
-#else
-  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++)
-  {
-    if ( lsIdx > 0 ) 
-    {
-      vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] ); 
-    }  
-
-    vps.setOutputLayerSetIdxMinus1( lsIdx, lsIdx - 1 ); 
-
-    for (Int i = 0; i < m_layerIdsInSets[ lsIdx ].size(); i++ )
-    { 
-      vps.setOutputLayerFlag( lsIdx, i, vps.inferOutputLayerFlag( lsIdx, i ));       
-    }
-  }
-
-  for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ )
-  {
-    vps.setProfileLevelTierIdx( m_vpsNumLayerSets + addOutLs, m_profileLevelTierIdx[ addOutLs ] ); 
-
-    Int refLayerSetIdx = m_outputLayerSetIdx[ addOutLs ];     
-    vps.setOutputLayerSetIdxMinus1( m_vpsNumLayerSets + addOutLs, refLayerSetIdx - 1 ); 
-
-    for (Int i = 0; i < m_layerIdsInSets[ refLayerSetIdx].size(); i++ )
-    {
-      Bool outputLayerFlag = false; 
-      for (Int j = 0; j < m_layerIdsInAddOutputLayerSet[ addOutLs ].size(); j++ )
-      {
-        if (  m_layerIdsInAddOutputLayerSet[addOutLs][ j ] == m_layerIdsInSets[ refLayerSetIdx][ i ] )
-        {
-          outputLayerFlag = true; 
-          break; 
-        }
-      }
-      vps.setOutputLayerFlag( m_vpsNumLayerSets + addOutLs, i, outputLayerFlag );       
-    }
-  }
-  vps.deriveTargetLayerIdLists(); 
-#endif
+
 }
 
@@ -1759,17 +1644,9 @@
   vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag ); 
 
-#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
   TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  ); 
   assert( pcVPSVUI ); 
-#endif
 
   if ( m_vpsVuiPresentFlag )
   {
-#if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
-    TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  ); 
-
-    assert( pcVPSVUI ); 
-#endif
-
     // All this stuff could actually be derived by the encoder, 
     // however preliminary setting it from input parameters
@@ -1777,7 +1654,5 @@
     pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag );
     pcVPSVUI->setCrossLayerIrapAlignedFlag   ( m_crossLayerIrapAlignedFlag    );
-#if H_MV_HLS_7_MISC_P0068_21
     pcVPSVUI->setAllLayersIdrAlignedFlag     ( m_allLayersIdrAlignedFlag      );
-#endif
     pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag );
     pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag );
@@ -1785,9 +1660,5 @@
     if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
     {
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
       for( Int i = 0; i  <=  vps.getVpsNumLayerSetsMinus1(); i++ )
-#else
-      for( Int i = 0; i  <=  vps.getVpsNumberLayerSetsMinus1(); i++ )
-#endif
       {
         for( Int j = 0; j  <=  vps.getMaxTLayers(); j++ ) 
@@ -1907,10 +1778,8 @@
     pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD
   }
-#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
   else
   {
     pcVPSVUI->setCrossLayerIrapAlignedFlag   ( false   );
   }
-#endif
 }
 #endif
Index: branches/HTM-10.1-dev0/source/Lib/TLibCommon/SEI.h
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibCommon/SEI.h	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibCommon/SEI.h	(revision 882)
@@ -72,5 +72,5 @@
     SCALABLE_NESTING                     = 133,
     REGION_REFRESH_INFO                  = 134,
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
     SUB_BITSTREAM_PROPERTY               = 139,    // Final PayloadType to be defined after finalization
 #endif
@@ -366,5 +366,5 @@
 };
 
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
 class SEISubBitstreamProperty : public SEI
 {
Index: branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 882)
@@ -112,5 +112,5 @@
 , m_interLayerPredEnabledFlag     (false)
 , m_numInterLayerRefPicsMinus1    (0)
-#if H_MV_HLS_7_POC_P0041
+#if H_MV
 , m_sliceSegmentHeaderExtensionLength (0)
 , m_pocResetIdc                       (0)
@@ -1284,5 +1284,4 @@
 
 
-
 /** Function for applying picture marking based on the Reference Picture Set in pReferencePictureSet.
 */
@@ -1340,5 +1339,5 @@
 
     }
-#if H_MV_HLS_7_MISC_P0130_20
+#if H_MV
     if( isReference ) // Current picture is in the temporal RPS
     {
@@ -1727,24 +1726,8 @@
     }
   } 
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  m_vpsNumberLayerSetsMinus1     = -1; 
-#endif
   m_vpsNumProfileTierLevelMinus1 = -1; 
     
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  for ( Int i = 0; i < MAX_VPS_PROFILE_TIER_LEVEL; i++)
-  {
-#if !H_MV_HLS_7_VPS_P0048_14
-    m_profileRefMinus1[ i ] = -1; 
-#endif
-  }
-    
-  m_moreOutputLayerSetsThanDefaultFlag = false;   
-  m_numAddOutputLayerSetsMinus1        = -1;   
-  m_defaultOneTargetOutputLayerIdc     = 0; 
-#else
   m_numAddOutputLayerSets              = -1;   
   m_defaultTargetOutputLayerIdc     = 0; 
-#endif
   
   for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++)
@@ -1756,11 +1739,6 @@
       m_outputLayerFlag[i][j] = false; 
     }
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     m_altOutputLayerFlag[ i ]       = false; 
-#endif
-  }
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  m_altOutputLayerFlag       = false; 
-#endif
+  }
   m_maxOneActiveRefLayerFlag = false; 
   m_directDepTypeLenMinus2   = 0;         
@@ -1768,9 +1746,5 @@
 
   m_avcBaseLayerFlag = false;
-#if H_MV_HLS_7_VPS_P0307_23
   m_vpsNonVuiExtensionLength = 0;
-#else
-  m_vpsVuiOffset     = 0; 
-#endif
   m_splittingFlag    = false;
   
@@ -1786,7 +1760,4 @@
   {
     m_vpsProfilePresentFlag   [i] = false;
-#if !H_MV_HLS_7_VPS_P0048_14
-    m_profileRefMinus1[i] = 0;
-#endif
     m_outputLayerSetIdxMinus1       [i] = 0;
     for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ )
@@ -2099,14 +2070,5 @@
 Int    TComVPS::getNumOutputLayerSets() 
 {
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   return getNumAddOutputLayerSets() + getVpsNumLayerSetsMinus1() + 1; 
-#else
-  Int numOutputLayerSets = getVpsNumberLayerSetsMinus1( ) + 1; 
-  if ( getMoreOutputLayerSetsThanDefaultFlag( ) )
-  {      
-    numOutputLayerSets += (getNumAddOutputLayerSetsMinus1( ) + 1); 
-}
-  return numOutputLayerSets; 
-#endif
 }
 
@@ -2156,5 +2118,4 @@
 }
 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
 Void TComVPS::initTargetLayerIdLists()
 {
@@ -2176,26 +2137,32 @@
   }  
 }
-#else
-Void TComVPS::deriveTargetLayerIdLists()
-{
-  m_targetDecLayerIdLists.resize( getNumOutputLayerSets() ); 
-  m_targetOptLayerIdLists.resize( getNumOutputLayerSets() ); 
-
-  for (Int targetOptLayerSetIdx = 0; targetOptLayerSetIdx < getNumOutputLayerSets(); targetOptLayerSetIdx++ )
-  {
-    Int targetDecLayerSetIdx = getOutputLayerSetIdxMinus1( targetOptLayerSetIdx ) + 1;     
-    Int lsIdx                = targetDecLayerSetIdx;
-
-    for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ )
-    {
-      m_targetDecLayerIdLists[targetOptLayerSetIdx].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] ); 
-      if( getOutputLayerFlag( targetOptLayerSetIdx, j  )) // This seems to be wrong in draft text
-      {
-        m_targetOptLayerIdLists[targetOptLayerSetIdx].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] );
-      }
-    }  
-  }
-}
-#endif
+
+Bool TComVPS::inferOutputLayerFlag( Int i, Int j )
+{
+  Bool outputLayerFlag; 
+  switch ( getDefaultTargetOutputLayerIdc( ) )
+  {
+  case 0:
+    outputLayerFlag = true; 
+    break; 
+  case 1:
+    outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 );  
+    break;
+  case 2:
+    if ( i == 0 && j == 0)
+    {     
+      outputLayerFlag = true;  // This is a software only fix for a bug in the spec. In spec outputLayerFlag is neither present nor inferred. 
+    }
+    else
+    {
+      assert( 0 ); 
+    }
+    break; 
+  default:      
+    assert( 0 );
+    break; 
+  }
+  return outputLayerFlag;
+}
 
 #endif // H_MV
@@ -2445,7 +2412,5 @@
 , m_ppsInferScalingListFlag(false)
 , m_ppsScalingListRefLayerId(0)
-#if H_MV_HLS_7_POC_P0041
 , m_pocResetInfoPresentFlag(false)
-#endif
 #if H_3D
 , m_pcDLT(NULL)
@@ -2455,5 +2420,5 @@
   m_scalingList = new TComScalingList;
 
-#if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION  
+#if H_MV
   for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ ) 
   {
@@ -2461,5 +2426,4 @@
   }
 #endif
-
 }
 
@@ -2980,7 +2944,5 @@
     // Consider to check here: 
     // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer0 and RefPicSetInterLayer1 that is a RASL picture. "    
-#if H_MV_HLS_7_MISC_P0130_20
     assert( picRef->getSlice(0)->getDiscardableFlag() == false ); // "There shall be no picture that has discardable_flag equal to 1 in RefPicSetInterLayer0 or RefPicSetInterLayer1".        
-#endif
   }
 }
@@ -3018,5 +2980,5 @@
     {
       break; 
-  }        
+    }        
   }        
 
@@ -3028,29 +2990,29 @@
       if ( pcPic )
       {
-      if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() ) 
-      { 
-        Bool remainingInterLayerReferencesFlag = false; 
-        for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
+        if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() ) 
         { 
-          TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS(); 
-          if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) )
+          Bool remainingInterLayerReferencesFlag = false; 
+          for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
+          { 
+            TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS(); 
+            if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) )
+            {
+              for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ )
+              {
+                if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ],  k  ) )
+                {
+                  remainingInterLayerReferencesFlag = true;
+                }
+              }
+            }
+          }
+          if( !remainingInterLayerReferencesFlag )
           {
-            for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ )
-            {
-              if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ],  k  ) )
-              {
-                remainingInterLayerReferencesFlag = true;
+            pcPic->getSlice(0)->setReferenced( false );                   
           }
         }
-          }
-        }
-        if( !remainingInterLayerReferencesFlag )
-        {
-          pcPic->getSlice(0)->setReferenced( false );                   
-      }
-    }
-      }
-  }
-}
+      }
+    }
+  }
 }
 
@@ -3157,9 +3119,5 @@
   Int numActiveRefLayerPics; 
 
-#if H_MV_HLS_7_MISC_P0079_18
   if( getLayerId() == 0 || getNumRefLayerPics() ==  0 )
-#else
-  if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerId() ) ==  0 )
-#endif
   {
     numActiveRefLayerPics = 0; 
@@ -3175,9 +3133,5 @@
   else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
   {
-#if H_MV_HLS_7_MISC_P0079_18
     numActiveRefLayerPics = 1; 
-#else
-    numActiveRefLayerPics = getRefLayerPicFlag( 0 ) ? 1 : 0; 
-#endif
   }
   else
@@ -3828,7 +3782,5 @@
 {
   m_crossLayerIrapAlignedFlag = true; 
-#if H_MV_HLS_7_MISC_P0068_21
   m_allLayersIdrAlignedFlag   = false; 
-#endif
   m_bitRatePresentVpsFlag = false;
   m_picRatePresentVpsFlag = false;
@@ -3857,7 +3809,5 @@
       m_minHorizontalCtuOffsetPlus1 [i][j] = -1;
     }
-#if H_MV_HLS_7_MISC_P0182_13
     m_baseLayerParameterSetCompatibilityFlag[i] = false;
-#endif
   }
   for ( Int i = 0; i < MAX_NUM_VIDEO_SIGNAL_INFO; i++ )
Index: branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 882)
@@ -473,7 +473,5 @@
   Bool m_crossLayerPicTypeAlignedFlag;
   Bool m_crossLayerIrapAlignedFlag;
-#if H_MV_HLS_7_MISC_P0068_21
   Bool m_allLayersIdrAlignedFlag;
-#endif
   Bool m_bitRatePresentVpsFlag;
   Bool m_picRatePresentVpsFlag;
@@ -484,10 +482,8 @@
   Int  m_constantPicRateIdc          [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER];
   Int  m_avgPicRate                  [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER];
-#if H_MV_HLS_7_VPS_P0076_15
   Bool m_videoSignalInfoIdxPresentFlag;
   Int  m_vpsNumVideoSignalInfoMinus1;
   TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO];   
   Int  m_vpsVideoSignalInfoIdx       [MAX_NUM_VIDEO_SIGNAL_INFO];
-#endif
   Bool m_tilesNotInUseFlag;
   Bool m_tilesInUseFlag              [MAX_NUM_LAYERS];
@@ -500,15 +496,7 @@
   Bool m_ctuBasedOffsetEnabledFlag   [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
   Int  m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
-#if !H_MV_HLS_7_VPS_P0076_15
-  Bool m_videoSignalInfoIdxPresentFlag;
-  Int  m_vpsNumVideoSignalInfoMinus1;
-  TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO];   
-  Int  m_vpsVideoSignalInfoIdx       [MAX_NUM_VIDEO_SIGNAL_INFO];
-#endif
   Bool m_vpsVuiBspHrdPresentFlag;
   TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters; 
-#if H_MV_HLS_7_MISC_P0182_13
   Bool m_baseLayerParameterSetCompatibilityFlag[MAX_NUM_LAYERS];
-#endif
 
 public: 
@@ -521,8 +509,6 @@
   Bool getCrossLayerIrapAlignedFlag(  ) { return m_crossLayerIrapAlignedFlag; } 
 
-#if H_MV_HLS_7_MISC_P0068_21
   Void setAllLayersIdrAlignedFlag( Bool flag ) { m_allLayersIdrAlignedFlag = flag; } 
   Bool getAllLayersIdrAlignedFlag(  ) { return m_allLayersIdrAlignedFlag; } 
-#endif
 
   Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; } 
@@ -550,5 +536,4 @@
   Int  getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; } 
 
-#if H_MV_HLS_7_VPS_P0076_15
   Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } 
   Bool getVideoSignalInfoIdxPresentFlag(  ) { return m_videoSignalInfoIdxPresentFlag; } 
@@ -562,5 +547,4 @@
   Void setVpsVideoSignalInfoIdx( Int i, Int  val ) { m_vpsVideoSignalInfoIdx[i] = val; } 
   Int  getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } 
-#endif
 
   Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; } 
@@ -593,17 +577,5 @@
   Void setMinHorizontalCtuOffsetPlus1( Int i, Int j, Int  val ) { m_minHorizontalCtuOffsetPlus1[i][j] = val; } 
   Int  getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; } 
-#if !H_MV_HLS_7_VPS_P0076_15
-  Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } 
-  Bool getVideoSignalInfoIdxPresentFlag(  ) { return m_videoSignalInfoIdxPresentFlag; } 
-
-  Void    setVideoSignalInfo( Int i, TComVideoSignalInfo* val )                        { m_videoSignalInfo[i] = val;  }  
-  TComVideoSignalInfo* getVideoSignalInfo( Int i )                                     { return m_videoSignalInfo[i]; }
-
-  Void setVpsNumVideoSignalInfoMinus1( Int  val ) { m_vpsNumVideoSignalInfoMinus1 = val; } 
-  Int  getVpsNumVideoSignalInfoMinus1(  ) { return m_vpsNumVideoSignalInfoMinus1; } 
-
-  Void setVpsVideoSignalInfoIdx( Int i, Int  val ) { m_vpsVideoSignalInfoIdx[i] = val; } 
-  Int  getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } 
-#endif
+
   Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; } 
   Bool getVpsVuiBspHrdPresentFlag(  ) { return m_vpsVuiBspHrdPresentFlag; }
@@ -612,10 +584,7 @@
   TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters(  ) { return m_vpsVuiBspHrdParameters; }
 
-#if H_MV_HLS_7_MISC_P0182_13
   Void setBaseLayerParameterSetCompatibilityFlag( Int i, Bool flag ) { m_baseLayerParameterSetCompatibilityFlag[i] = flag; } 
   Bool getBaseLayerParameterSetCompatibilityFlag( Int i ) { return m_baseLayerParameterSetCompatibilityFlag[i]; } 
-#endif
-
-#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
+
   Void inferVpsVui( Bool encoderFlag )
   {
@@ -631,5 +600,4 @@
 
   }
-#endif
 };
 
@@ -768,9 +736,5 @@
   /// VPS EXTENSION SYNTAX ELEMENTS
   Bool        m_avcBaseLayerFlag;
-#if H_MV_HLS_7_VPS_P0307_23
   Int         m_vpsNonVuiExtensionLength;
-#else
-  Int         m_vpsVuiOffset;
-#endif
   Bool        m_splittingFlag;
   Bool        m_scalabilityMaskFlag          [MAX_NUM_SCALABILITY_TYPES];
@@ -788,30 +752,14 @@
   Int         m_maxTidIlRefPicsPlus1     [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
   Bool        m_allRefLayersActiveFlag;
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  Int         m_vpsNumberLayerSetsMinus1; 
-#endif
   Int         m_vpsNumProfileTierLevelMinus1;   
   Bool        m_vpsProfilePresentFlag    [MAX_VPS_OP_SETS_PLUS1];
 
-#if !H_MV_HLS_7_VPS_P0048_14
-  Int         m_profileRefMinus1         [MAX_VPS_PROFILE_TIER_LEVEL];
-#endif
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   Int         m_numAddOutputLayerSets;    
   Int         m_defaultTargetOutputLayerIdc;
-#else  
-  Bool        m_moreOutputLayerSetsThanDefaultFlag;
-  Int         m_numAddOutputLayerSetsMinus1;    
-  Int         m_defaultOneTargetOutputLayerIdc;
-#endif
 
   Int         m_outputLayerSetIdxMinus1  [MAX_VPS_OUTPUTLAYER_SETS];  
   Bool        m_outputLayerFlag          [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1];
   Int         m_profileLevelTierIdx      [MAX_VPS_OUTPUTLAYER_SETS ];
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   Bool        m_altOutputLayerFlag       [MAX_VPS_OUTPUTLAYER_SETS];
-#else
-  Bool        m_altOutputLayerFlag;
-#endif
   Bool        m_repFormatIdxPresentFlag;
   Int         m_vpsNumRepFormatsMinus1;
@@ -972,11 +920,6 @@
   Bool    getAvcBaseLayerFlag()                                            { return m_avcBaseLayerFlag; } 
 
-#if H_MV_HLS_7_VPS_P0307_23
   Void    setVpsNonVuiExtensionLength( Int  val )                          { m_vpsNonVuiExtensionLength = val; } 
   Int     getVpsNonVuiExtensionLength(  )                                  { return m_vpsNonVuiExtensionLength; } 
-#else
-  Void    setVpsVuiOffset( Int  val )                                      { m_vpsVuiOffset = val; } 
-  Int     getVpsVuiOffset(  )                                              { return m_vpsVuiOffset; } 
-#endif
 
   Void    setSplittingFlag( Bool val )                                     { m_splittingFlag = val;  }
@@ -1021,9 +964,4 @@
   Bool    getAllRefLayersActiveFlag(  )                                    { return m_allRefLayersActiveFlag; } 
   
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  Void    setVpsNumberLayerSetsMinus1( Int val )                           { m_vpsNumberLayerSetsMinus1 = val;  } 
-  Int     getVpsNumberLayerSetsMinus1( )                                   { return m_vpsNumberLayerSetsMinus1; } 
-#endif
-  
   Void    setVpsNumProfileTierLevelMinus1( Int val )                       { m_vpsNumProfileTierLevelMinus1 = val;  } 
   Int     getVpsNumProfileTierLevelMinus1( )                               { return m_vpsNumProfileTierLevelMinus1; } 
@@ -1032,31 +970,9 @@
   Bool    getVpsProfilePresentFlag( Int idx )                              { return m_vpsProfilePresentFlag[idx]; }
 
-#if !H_MV_HLS_7_VPS_P0048_14
-  Void    setProfileRefMinus1( Int profileTierLevelIdx, Int val )          { m_profileRefMinus1[ profileTierLevelIdx ] = val;  } 
-  Int     getProfileRefMinus1( Int profileTierLevelIdx )                   { return m_profileRefMinus1[ profileTierLevelIdx ]; } 
-  Void    checkProfileRefMinus1( Int i )                                   { assert( getProfileRefMinus1( i ) + 1 <= i ); };  //  The value of profile_ref_minus1[ i ] + 1 shall be less than or equal to i.
-#endif
-
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  Void    setMoreOutputLayerSetsThanDefaultFlag( Bool flag )               { m_moreOutputLayerSetsThanDefaultFlag = flag; } 
-  Bool    getMoreOutputLayerSetsThanDefaultFlag()                          { return m_moreOutputLayerSetsThanDefaultFlag; } 
-#endif
-  
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   Void    setNumAddOutputLayerSets( Int val )                              { m_numAddOutputLayerSets = val; } 
   Int     getNumAddOutputLayerSets( )                                      { return m_numAddOutputLayerSets; } 
-#else
-  Void    setNumAddOutputLayerSetsMinus1( Int val )                        { m_numAddOutputLayerSetsMinus1 = val; } 
-  Int     getNumAddOutputLayerSetsMinus1( )                                { return m_numAddOutputLayerSetsMinus1; } 
-#endif
-  
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
+  
   Void    setDefaultTargetOutputLayerIdc( Int  val )                       { m_defaultTargetOutputLayerIdc = val; } 
   Int     getDefaultTargetOutputLayerIdc(  )                               { return m_defaultTargetOutputLayerIdc; }   
-#else
-  Void    setDefaultOneTargetOutputLayerIdc( Int  val )                    { m_defaultOneTargetOutputLayerIdc = val; } 
-  Int     getDefaultOneTargetOutputLayerIdc(  )                            { return m_defaultOneTargetOutputLayerIdc; } 
-  Void    checkDefaultOneTargetOutputLayerIdc( )                           { assert( m_defaultOneTargetOutputLayerIdc >= 0 && m_defaultOneTargetOutputLayerIdc <= 1 ); }
-#endif
   
   Void    setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val )        { m_outputLayerSetIdxMinus1[ outLayerSetIdx ]  = val; } 
@@ -1065,46 +981,12 @@
   Void    setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag )       { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } 
   Bool    getOutputLayerFlag( Int outLayerSetIdx, Int i )                  { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; } 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  Bool    inferOutputLayerFlag( Int i, Int j )                             
-  { 
-    Bool outputLayerFlag; 
-    switch ( getDefaultTargetOutputLayerIdc( ) )
-    {
-    case 0:
-      outputLayerFlag = true; 
-      break; 
-    case 1:
-      outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 );  
-      break;
-    case 2:
-      if ( i == 0 && j == 0)
-      {     
-        outputLayerFlag = true;  // This is a software only fix for a bug in the spec. In spec outputLayerFlag neither present nor inferred. 
-      }
-      else
-      {
-        assert( 0 ); 
-      }
-      break; 
-    default:      
-      assert( 0 );
-      break; 
-    }
-    return outputLayerFlag;
-  }
-#else
-  Bool    inferOutputLayerFlag( Int layerSetIdx, Int i )                   { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1  ) ));  }
-#endif
+
+  Bool    inferOutputLayerFlag( Int i, Int j );
 
   Void    setProfileLevelTierIdx( Int outLayerSetIdx, Int val )            { m_profileLevelTierIdx[ outLayerSetIdx ] = val; }
   Int     getProfileLevelTierIdx( Int outLayerSetIdx )                     { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 
   
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   Void    setAltOutputLayerFlag( Int i, Bool flag )                        { m_altOutputLayerFlag[i] = flag; } 
   Bool    getAltOutputLayerFlag( Int i )                                   { return m_altOutputLayerFlag[i]; } 
-#else
-  Void    setAltOutputLayerFlag( Bool flag )                               { m_altOutputLayerFlag = flag; } 
-  Bool    getAltOutputLayerFlag(  )                                        { return m_altOutputLayerFlag; } 
-#endif
 
   Void    setRepFormatIdxPresentFlag( Bool flag )                          { m_repFormatIdxPresentFlag = flag; } 
@@ -1165,8 +1047,6 @@
 
   Int     getProfileLevelTierIdxLen()                                      { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); };       
-
-#if H_MV_HLS_7_VPS_P0306_22
   Int     getVpsRepFormatIdxLen()                                          { return gCeilLog2( getVpsNumRepFormatsMinus1() + 1 ); };       
-#endif
+
   Int     getNumLayersInIdList ( Int lsIdx );
 
@@ -1176,5 +1056,4 @@
   Void    deriveLayerSetLayerIdList();
 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   Int     getLayerSetIdxForOutputLayerSet( Int i )                         { return ( i <= getVpsNumLayerSetsMinus1() ) ? i  : getOutputLayerSetIdxMinus1( i ) + 1 ; };
 
@@ -1187,11 +1066,5 @@
   Int     getNumOutputLayersInOutputLayerSet( Int i )                      { return (Int) getTargetOptLayerIdList( i ).size(); }; 
   Int     getOlsHighestOutputLayerId( Int i )                              { return getTargetOptLayerIdList( i ).back(); };  
-#else
-  Void    deriveTargetLayerIdLists();
-  std::vector<Int> getTargetDecLayerIdList( Int targetOptLayerSetIdx )     { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 
-  std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx )     { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 
-#endif
-
-#if H_MV_HLS_7_HRD_P0156_7
+
   Int     getMaxSubLayersInLayerSetMinus1( Int i )
   { 
@@ -1205,5 +1078,4 @@
     return maxSLMinus1; 
   }
-#endif
 
   // inference
@@ -1230,7 +1102,5 @@
   UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
   Bool getCamParPresent      ( Int viewIndex )  { return m_bCamParPresent[viewIndex]; }
-#if FIX_CAM_PARS_COLLECTOR
   Void setCamParPresent      ( Int viewIndex, Bool val )  { m_bCamParPresent[viewIndex] = val; }
-#endif
   Bool hasCamParInSliceHeader( Int viewIndex )  { return m_bCamParInSliceHeader[viewIndex]; }
   Void setHasCamParInSliceHeader( Int viewIndex, Bool b )  { m_bCamParInSliceHeader[viewIndex] = b; }
@@ -1936,10 +1806,6 @@
   Int  m_ppsScalingListRefLayerId;
 
-#if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
   Bool m_ppsExtensionTypeFlag[PS_EX_T_MAX_NUM];
-#endif
-#if H_MV_HLS_7_POC_P0041
   Bool m_pocResetInfoPresentFlag;
-#endif
 #endif
 
@@ -2084,14 +1950,9 @@
   Int  getPpsScalingListRefLayerId(  ) { return m_ppsScalingListRefLayerId; } 
 
-#if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
   Void setPpsExtensionTypeFlag( Int i, Bool flag ) { m_ppsExtensionTypeFlag[i] = flag; } 
   Bool getPpsExtensionTypeFlag( Int i ) { return m_ppsExtensionTypeFlag[i]; } 
-#endif
-
-#if H_MV_HLS_7_POC_P0041
+
   Void setPocResetInfoPresentFlag( Bool flag ) { m_pocResetInfoPresentFlag = flag; } 
   Bool getPocResetInfoPresentFlag(  ) { return m_pocResetInfoPresentFlag; } 
-#endif
-
 #endif
 };
@@ -2239,5 +2100,4 @@
   Int        m_interLayerPredLayerIdc       [MAX_NUM_LAYERS];
 
-#if H_MV_HLS_7_POC_P0041
   Int        m_sliceSegmentHeaderExtensionLength;
   Int        m_pocResetIdc;
@@ -2248,5 +2108,4 @@
   Int        m_pocMsbVal;
   Bool       m_pocMsbValRequiredFlag;
-#endif
 
 #if H_3D
@@ -2596,5 +2455,4 @@
   Int  getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } 
 
-#if H_MV_HLS_7_POC_P0041
   Void setSliceSegmentHeaderExtensionLength( Int  val ) { m_sliceSegmentHeaderExtensionLength = val; } 
   Int  getSliceSegmentHeaderExtensionLength(  ) { return m_sliceSegmentHeaderExtensionLength; } 
@@ -2633,5 +2491,4 @@
     return getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA;
   }
-#endif
 
   // Additional variables derived in slice header semantics 
Index: branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 882)
@@ -308,9 +308,7 @@
 
 /////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////   HTM-10.1 Integrations //////////////////////////////
+///////////////////////////////////   TBD                  //////////////////////////////
 /////////////////////////////////////////////////////////////////////////////////////////
 
-
-// TBD
 // #define H_MV_HLS_7_POC_P0041_3            0 // (POC/P0041/POC reset) #3 It was remarked that we should require each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. This was agreed. Decision: Adopt (with constraint for discardable_flag as described above) 
 // #define H_MV_HLS_7_POC_P0041_FIXES        0 // (POC/P0041/Fixes) For each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. 
@@ -324,41 +322,8 @@
 // #define H_MV_HLS_7_VPS_P0300_27           0 // Output part only. (VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt. 
 
-
-#define H_MV_HLS_7_VPS_P0306_22                1 // (VPS/P0306/ue(v) coded syntax elements) #22 Several minor modifications to the VPS syntax, consistent with eliminating the previous intention to avoid ue(v) parsing in the VPS 
-#define H_MV_HLS_7_SEI_P0204_26                1 // (SEI/P0204/sub-bitstream SEI) #26 Add sub-bitstream property SEI message. Decision: Adopt
-#define H_MV_HLS_7_MISC_P0130_20               1 // (MISC/P0130/discardable not in inter-layer RPS) #20 Add constraint restricting pictures marked as discardable from being present in the temporal or inter-layer RPS,
-#define H_MV_HLS_7_VPS_P0125_24                1 // (VPS/P0125/VPS extension offset ) #24 Decision: Keep it as a reserved FFFF value. 
-#define H_MV_HLS_7_VPS_P0307_23                1 // (VPS/P0307/VPS VUI extension)  #23 Decision: Adopt modification in P0307.
-#define H_MV_HLS_7_POC_P0041                   1 // Syntax related to POC reset
-
-
-#define H_MV_HLS7_GEN                          0  // General changes (not tested)
-#define H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27    1  // Output layer sets, various
-                                                  // (VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt. 
-                                                  // (VPS/P0156/Num of output_layer_flag) #10 Proposal 3: The output_layer_flag[ i ][ j ] is signalled for j equal to 0 to NumLayersInIdList[ lsIdx ] inclusive. It was remarked that we might be able to just assume that the top layer is always output; however, this was not entirely clear , so the safe thing to do may be to also send the flag for this layer.
-                                                  // (VPS/P0295/Default output layer sets) #5 Discussion from (P0110). Decision: Three-state approach (text in P0295, decoder shall allow 3 to be present and shall treat 3 the same as the value 2). 
-
-
-#define H_MV_HLS_7_HRD_P0156_7                 1  // (HRD/P0156/MaxSubLayersInLayerSetMinus1) #7 Proposal 1: signal, in the VPS extension, the DPB parameters for an output layer set for sub-DPBs only up to the maximum temporal sub-layers in the corresponding layer set
-#define H_MV_HLS_7_VPS_P0048_14                1  // (VPS/P0048/profile_ref_minus1 rem) #14 Remove profile_ref_minus1 from the VPS extension, from JCTVC-P0048
-#define H_MV_HLS_7_VPS_P0076_15                1  // (VPS/P0076/video signal info move) #15 Move video signal information syntax structure earlier in the VPS VUI.
-#define H_MV_HLS_7_SPS_P0155_16_32             1  // (SPS/P0155/sps_sub_layer_ordering_info) #16, #32 Not signal the sps_max_num_reorder_pics[], sps_max_latency_increase_plus1[], and sps_max_dec_pic_buffering_minus1[] syntax elements in the SPS when nuh_layer_id > 0. 
-#define H_MV_HLS_7_GEN_P0166_PPS_EXTENSION     1  // (GEN/P0166/pps_extension) #17 Add PPS extension type flags for conditional presence of syntax extensions per extension type, aligned with the SPS extension type flags, from JCTVC-P0166. Further align the SPS extension type flags syntax between RExt and MV-HEVC/SHVC
-#define H_MV_HLS_7_FIX_SET_DPB_SIZE            1  // Fix derivation dpb size parameters
-#define H_MV_HLS_7_RESERVED_FLAGS              1  // Added flags
-                                                  // (SPS/P0312/SHVC reserved flag) The flag will be used for the syntax vert_phase_position_enable_flag in SHVC draft
-                                                  // (VPS/O0215/SHVC reserved flag): this flag will be used for the syntax cross_layer_phase_alignment_flag in SHVC draft.
-                                                  // (VPS VUI/O0199,P0312/SHVC reserved flags) the 3 reserved bits will be used for the syntaxes single_layer_for_non_irap_flag, higher_layer_irap_skip_flag and vert_phase_position_not_in_use_flag in SHVC draft.
-#define H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO   1  // Discard VPS with nuh_layer_Id > 0
-#define H_MV_HLS_7_MISC_P0130_EOS              1  // (MISC/P0130/EOS NAL layer id) #19 Require that end of bitstream NAL unit shall have nuh_layer_id equal to 0, from JCTVC-P0130. Decoders shall allow an end of bitstream NAL unit with nuh_layer_id > 0 to be present, and shall ignore the NAL unit.
-#define H_MV_HLS_7_MISC_P0182_13               1  // (MISC/P0182/BL PS Compatibility flag) #13 Define the flag (in VPS VUI) with the proposed semantics, without specifying an associated extraction process. Editors to select the position in the VPS VUI.
-#define H_MV_HLS_7_MISC_P0068_21               1  // (MISC/P0068/all irap idr flag) #21 Add flag in VUI to indicate that all IRAP pictures are IDRs and that all layer pictures in an AU are IDR aligned, from JCTVC-P0068 proposal 1.
-#define H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG               1  // Fix inference of cross_layer_irap_aligned_flag
-#define H_MV_HLS_7_MISC_P0079_18               1  // (MISC/P0079/NumActiveRefLayerPics) #18 Modification of derivation of variable NumActiveRefLayerPics.
-#define FIX_CAM_PARS_COLLECTOR                 1
-#define UPDATE_HM13                            1  // Only some parts in H_3D parts are marked! 
-#if H_3D
-#define H_3D_FIX_G0148_BRACE                   1 
-#endif
+#define H_MV_HLS7_GEN                        0  // General changes (not tested)
+
+
+
 /////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////   HM RELATED DEFINES ////////////////////////////////
@@ -397,7 +362,5 @@
 #define MAX_NUM_BITSTREAM_PARTITIONS    100 ///< Maximum value is actually not specified 
 #define MAX_NUM_BSP_SCHED_COMBINATION   100 ///< Maximum value is actually not specified 
-#if H_MV_HLS_7_SEI_P0204_26
 #define MAX_SUB_STREAMS                 1024
-#endif
 #else
 #define MAX_NUM_LAYER_IDS                64
@@ -890,5 +853,4 @@
 #if H_MV
 
-#if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
 enum PpsExtensionTypes
 {
@@ -902,5 +864,4 @@
 
 //Below for sps, would be good if this could be aligned
-#endif
 
   enum PsExtensionTypes
Index: branches/HTM-10.1-dev0/source/Lib/TLibDecoder/SEIread.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibDecoder/SEIread.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibDecoder/SEIread.cpp	(revision 882)
@@ -99,5 +99,5 @@
     fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
     break;
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
   case SEI::SUB_BITSTREAM_PROPERTY:
     fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n");
@@ -245,5 +245,5 @@
       xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps);
       break;
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
      case SEI::SUB_BITSTREAM_PROPERTY:
        sei = new SEISubBitstreamProperty;
@@ -777,5 +777,5 @@
 
 }
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei)
 {
Index: branches/HTM-10.1-dev0/source/Lib/TLibDecoder/SEIread.h
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibDecoder/SEIread.h	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibDecoder/SEIread.h	(revision 882)
@@ -73,5 +73,5 @@
   Void xParseSEISOPDescription        (SEISOPDescription &sei, UInt payloadSize);
   Void xParseSEIScalableNesting       (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps);
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
   Void  xParseSEISubBitstreamProperty   (SEISubBitstreamProperty &sei);
   Void  xResizeSubBitstreamPropertySeiArrays(SEISubBitstreamProperty &sei);
Index: branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 882)
@@ -366,5 +366,4 @@
 
   READ_FLAG( uiCode, "pps_extension_flag");
-#if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
   if (uiCode)
   {
@@ -383,7 +382,5 @@
     if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) )
     {
-#if H_MV_HLS_7_POC_P0041
       READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
-#endif
     }
 
@@ -406,22 +403,4 @@
 #endif
   }
-#else
-  if (uiCode)
-  {
-#if H_3D
-    parsePPSExtension( pcPPS, pcVPS );
-    READ_FLAG( uiCode, "pps_extension2_flag");
-    if ( uiCode )
-    {
-#endif
-      while ( xMoreRbspData() )
-      {
-        READ_FLAG( uiCode, "pps_extension_data_flag");
-      }
-#if H_3D
-    }
-#endif
-  }
-#endif
 }
 
@@ -849,5 +828,5 @@
   assert(uiCode <= 12);
 
-#if H_MV_HLS_7_SPS_P0155_16_32
+#if H_MV
   if ( pcSPS->getLayerId() == 0 ) 
   {  
@@ -888,5 +867,5 @@
     }
   }
-#if H_MV_HLS_7_SPS_P0155_16_32
+#if H_MV
   }
 #endif
@@ -1053,7 +1032,5 @@
     READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode );
     READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );
-#if H_MV_HLS_7_RESERVED_FLAGS
     READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" );
-#endif
   }
 }
@@ -1092,13 +1069,5 @@
   assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
 
-#if H_MV_HLS_7_VPS_P0125_24
   READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
-#else
-#if H_MV && !H_MV_HLS7_GEN
-  READ_CODE( 16, uiCode,  "vps_extension_offset" );               
-#else
-  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
-#endif
-#endif
   parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
   UInt subLayerOrderingInfoPresentFlag;
@@ -1212,12 +1181,4 @@
   READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
 
-#if !H_MV_HLS_7_VPS_P0307_23
-  READ_FLAG( uiCode, "vps_vui_present_flag" );                    pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
-  if ( pcVPS->getVpsVuiPresentFlag() )
-  {  
-  READ_CODE( 16, uiCode, "vps_vui_offset" );                      pcVPS->setVpsVuiOffset( uiCode );
-  }
-#endif
-
   READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
 
@@ -1325,37 +1286,19 @@
 
   READ_FLAG( uiCode, "all_ref_layers_active_flag" );             pcVPS->setAllRefLayersActiveFlag( uiCode == 1 );
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1"      );  pcVPS->setVpsNumberLayerSetsMinus1    ( uiCode ); 
-#endif
-
-#if !H_MV_HLS_7_VPS_P0306_22
-  READ_CODE( 6,  uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );
-#else
+
   READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );  
-#endif
+
   for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
   {
     READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
-#if !H_MV_HLS_7_VPS_P0048_14
-    if( !pcVPS->getVpsProfilePresentFlag( i ) )
-    {
-      READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );
-      pcVPS->checkProfileRefMinus1( i );      
-    }
-#endif
     parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
     if( !pcVPS->getVpsProfilePresentFlag( i ) )
     {
       TComPTL temp = *pcVPS->getPTL( i );
-#if H_MV_HLS_7_VPS_P0048_14
       *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 );
-#else
-      *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );
-#endif
       pcVPS->getPTL( i )->copyLevelFrom( &temp );
     }
   }
 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   READ_UVLC( uiCode, "num_add_output_layer_sets"      ); pcVPS->setNumAddOutputLayerSets( uiCode );
   pcVPS->initTargetLayerIdLists( ); 
@@ -1365,38 +1308,13 @@
   }  
 
-#else
-  Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 
-
-  READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );
-
-  if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
-  {
-    READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1"      ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );
-    numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1); 
-  }
-
-  if( numOutputLayerSets > 1)
-  {
-    READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode );
-    pcVPS->checkDefaultOneTargetOutputLayerIdc(); 
-  }  
-#endif
-
   pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 
   pcVPS->setOutputLayerSetIdxMinus1(0, -1); 
 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   pcVPS->deriveTargetLayerIdList( 0 ); 
   for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
   {
     if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )    
-#else
-  for( Int i = 1; i < numOutputLayerSets; i++ )
-  {
-    if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
-#endif
     {        
       READ_UVLC( uiCode,      "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode ); 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     }
 
@@ -1416,19 +1334,5 @@
     }
     pcVPS->deriveTargetLayerIdList( i ); 
-#else
-      for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
-      {
-        READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 ); 
-      }        
-    }
-    else
-    { // These inference rules would also be helpful in spec text
-      pcVPS->setOutputLayerSetIdxMinus1(i, i - 1 ); 
-      for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
-      {              
-        pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j )); 
-      }
-    }
-#endif
+
     if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
     {      
@@ -1436,5 +1340,4 @@
     }
 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
     {
@@ -1442,24 +1345,9 @@
     }
   }
-#else
-  }
-  if( pcVPS->getMaxLayersMinus1() > 0 )
-  {
-    READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );
-  }
-#endif
-
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  pcVPS->deriveTargetLayerIdLists(); 
-#endif
 
   READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
   if ( pcVPS->getRepFormatIdxPresentFlag() )
   {
-#if H_MV_HLS_7_VPS_P0306_22
     READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
-#else
-    READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
-#endif
   }
 
@@ -1479,9 +1367,5 @@
       if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
       {
-#if H_MV_HLS_7_VPS_P0306_22
         READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
-#else
-        READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
-#endif
       }
     }
@@ -1500,7 +1384,5 @@
   }
 
-#if H_MV_HLS_7_RESERVED_FLAGS
   READ_FLAG( uiCode, "vps_reserved_zero_flag" ); 
-#endif
   parseDpbSize( pcVPS ); 
 
@@ -1531,5 +1413,4 @@
   }  
 
-#if H_MV_HLS_7_VPS_P0307_23
   READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode ); 
   for ( Int i = 1; i <= pcVPS->getVpsNonVuiExtensionLength(); i++ )
@@ -1538,8 +1419,4 @@
   }
   READ_FLAG( uiCode, "vps_vui_present_flag" );  pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
-#endif
-#if !H_MV_HLS_7_RESERVED_FLAGS
-  READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" ); 
-#endif
   if( pcVPS->getVpsVuiPresentFlag() )
   {
@@ -1547,5 +1424,4 @@
     parseVPSVUI( pcVPS ); 
   }     
-#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
   {
     TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 
@@ -1553,5 +1429,4 @@
     pcVPSVUI->inferVpsVui( false ); 
   }
-#endif
 
   pcVPS->checkVPSExtensionSyntax(); 
@@ -1601,19 +1476,13 @@
     READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 );
   }
-#if H_MV_HLS_7_MISC_P0068_21
   if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) )
   {
     READ_FLAG( uiCode, "all_layers_idr_aligned_flag" ); pcVPSVUI->setAllLayersIdrAlignedFlag( uiCode == 1 );
   }
-#endif
   READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 );
   READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 );
   if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
   {
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
-#else
-    for( Int i = 0; i  <=  pcVPS->getVpsNumberLayerSetsMinus1(); i++ )
-#endif
     {
       for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ ) 
@@ -1641,5 +1510,4 @@
   }
 
-#if H_MV_HLS_7_VPS_P0076_15
   READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
@@ -1675,5 +1543,4 @@
     }
   }
-#endif
 
   READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
@@ -1712,8 +1579,5 @@
   }
 
-#if H_MV_HLS_7_RESERVED_FLAGS
   READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" ); 
-#endif
-
   READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
 
@@ -1737,39 +1601,4 @@
   }
 
-#if !H_MV_HLS_7_VPS_P0076_15
-  READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
-  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
-  {
-    READ_CODE( 4, uiCode, "vps_num_video_signal_info_minus1" ); pcVPSVUI->setVpsNumVideoSignalInfoMinus1( uiCode );
-  }
-  else
-  {
-    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 
-  }
-
-  for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ )
-  {
-    assert( pcVPSVUI->getVideoSignalInfo( i ) == NULL ); 
-    TComVideoSignalInfo* curVideoSignalInfo = new TComVideoSignalInfo();     
-    parseVideoSignalInfo( curVideoSignalInfo ); 
-    pcVPSVUI->setVideoSignalInfo(i, curVideoSignalInfo ); 
-  }
-  
-  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
-  {
-    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
-    {
-      READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );
-      assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );
-    }
-  }
-  else
-  {
-    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
-    {
-      pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ); 
-    }
-  }
-#endif
   READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 );
   if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
@@ -1777,5 +1606,4 @@
     parseVpsVuiBspHrdParameters( pcVPS ); 
 }
-#if H_MV_HLS_7_MISC_P0182_13
   for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
   {
@@ -1785,5 +1613,4 @@
     }
   }
-#endif
 }
 
@@ -1864,9 +1691,5 @@
   {  
     READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 );
-#if H_MV_HLS_7_HRD_P0156_7
     for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )
-#else
-    for( Int j = 0; j  <=  vps->getMaxTLayers() - 1 ; j++ )
-#endif
     {  
       if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  )  
@@ -1876,9 +1699,5 @@
       if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
       {  
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
         for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ )   
-#else
-        for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
-#endif
         {
           READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
@@ -1983,8 +1802,6 @@
   for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
   {
-#if FIX_CAM_PARS_COLLECTOR
     pcVPS->setCamParPresent         ( viewIndex, false );
     pcVPS->setHasCamParInSliceHeader( viewIndex, false );
-#endif
     READ_FLAG( uiCode, "cp_present_flag[i]" );                  bCamParPresentFlag = ( uiCode == 1);
     if ( bCamParPresentFlag )
@@ -2718,13 +2535,4 @@
   if(pps->getSliceHeaderExtensionPresentFlag())
   {
-#if !H_MV_HLS_7_POC_P0041    
-    READ_UVLC(uiCode,"slice_header_extension_length");
-    for(Int i=0; i<uiCode; i++)
-    {
-      UInt ignore;
-      READ_CODE(8,ignore,"slice_header_extension_data_byte");
-    }
-  }
-#else
 #if H_MV
     READ_UVLC( uiCode, "slice_segment_header_extension_length" ); rpcSlice->setSliceSegmentHeaderExtensionLength( uiCode );
@@ -2796,5 +2604,4 @@
     }
   }
-#endif
 #endif
   }
Index: branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 882)
@@ -895,5 +895,5 @@
 #endif
   
-#if H_3D && UPDATE_HM13
+#if H_3D
   Bool useDltFlag = (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps());
 
@@ -921,9 +921,5 @@
     {
 #if H_3D
-#if UPDATE_HM13
       if ( useDltFlag )
-#else
-      if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
-#endif
       {
         pReco    [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );
Index: branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 882)
@@ -51,9 +51,4 @@
   m_aaiCodedOffset         = new Int* [ MAX_NUM_LAYERS ];
   m_aaiCodedScale          = new Int* [ MAX_NUM_LAYERS ];
-#if !FIX_CAM_PARS_COLLECTOR
-  m_aiViewId               = new Int  [ MAX_NUM_LAYERS ];
-
-  m_bViewReceived          = new Bool [ MAX_NUM_LAYERS ];
-#endif
   for( UInt uiId = 0; uiId < MAX_NUM_LAYERS; uiId++ )
   {
@@ -65,8 +60,6 @@
   m_iLog2Precision   = LOG2_DISP_PREC_LUT;
   m_uiBitDepthForLUT = 8; // fixed
-#if FIX_CAM_PARS_COLLECTOR
   m_receivedIdc = NULL; 
   m_vps         = NULL; 
-#endif
 }
 
@@ -80,18 +73,11 @@
   delete [] m_aaiCodedOffset;
   delete [] m_aaiCodedScale;
-#if !FIX_CAM_PARS_COLLECTOR
-  delete [] m_aiViewId;  
-  delete [] m_bViewReceived;
-#endif
 
   xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
   xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
-#if FIX_CAM_PARS_COLLECTOR
   xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 );
-#endif
-}
-
-
-#if FIX_CAM_PARS_COLLECTOR
+}
+
+
 Void
 CamParsCollector::init( FILE* pCodedScaleOffsetFile, TComVPS* vps)
@@ -159,18 +145,4 @@
   }
 }
-#else
-Void
-CamParsCollector::init( FILE* pCodedScaleOffsetFile )
-{
-  m_bInitialized            = true;
-  m_pCodedScaleOffsetFile   = pCodedScaleOffsetFile;
-  m_uiCamParsCodedPrecision = 0;
-  m_bCamParsVaryOverTime    = false;
-  m_iLastViewIndex             = -1;
-  m_iLastPOC                = -1;
-  m_uiMaxViewIndex             = 0;
-}
-#endif
-
 
 
@@ -206,9 +178,5 @@
   CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
 {
-#if FIX_CAM_PARS_COLLECTOR
   Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
-#else
-  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
-#endif
   Int     iLog2DivChroma = iLog2DivLuma + 1;
 
@@ -252,124 +220,4 @@
 }
 
-#if !FIX_CAM_PARS_COLLECTOR
-Void
-CamParsCollector::setSlice( TComSlice* pcSlice )
-{
-
-  if( pcSlice == 0 )
-  {
-    AOF( xIsComplete() );
-    if( m_bCamParsVaryOverTime || m_iLastPOC == 0 )
-    {
-      xOutput( m_iLastPOC );
-    }
-    return;
-  }
-  
-  if ( pcSlice->getIsDepth())
-  {
-    return;
-  }
-
-  Bool  bFirstAU          = ( pcSlice->getPOC()     == 0 );
-  Bool  bFirstSliceInAU   = ( pcSlice->getPOC()     != Int ( m_iLastPOC ) );
-  Bool  bFirstSliceInView = ( pcSlice->getViewIndex()  != UInt( m_iLastViewIndex ) || bFirstSliceInAU );
-
-  AOT(  bFirstSliceInAU  &&   pcSlice->getViewIndex()  != 0 );
-  AOT( !bFirstSliceInAU  &&   pcSlice->getViewIndex()   < UInt( m_iLastViewIndex ) );
-  
-  AOT( !bFirstSliceInAU  &&   pcSlice->getViewIndex()   > UInt( m_iLastViewIndex + 1 ) );
-  
-  AOT( !bFirstAU         &&   pcSlice->getViewIndex()   > m_uiMaxViewIndex );
-
-  if ( !bFirstSliceInView )
-  {
-    if( m_bCamParsVaryOverTime ) // check consistency of slice parameters here
-    {
-      UInt uiViewIndex = pcSlice->getViewIndex();
-      for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )
-      {
-        AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale    () [ uiBaseViewIndex ] );
-        AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset   () [ uiBaseViewIndex ] );
-        AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] );
-        AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] );
-      }
-    }
-    return;
-  }
-
-  if( bFirstSliceInAU )
-  {
-    if( !bFirstAU )
-    {
-      AOF( xIsComplete() );
-      xOutput( m_iLastPOC );
-    }
-    ::memset( m_bViewReceived, false, MAX_NUM_LAYERS * sizeof( Bool ) );
-  }
-
-  UInt uiViewIndex                       = pcSlice->getViewIndex();
-  m_bViewReceived[ uiViewIndex ]         = true;
-  if( bFirstAU )
-  {
-    m_uiMaxViewIndex                     = std::max( m_uiMaxViewIndex, uiViewIndex );
-    m_aiViewId[ uiViewIndex ]            = pcSlice->getViewId();
-
-    if( uiViewIndex == 1 )
-    {
-      m_uiCamParsCodedPrecision       = pcSlice->getVPS()->getCamParPrecision     ();
-      m_bCamParsVaryOverTime          = pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex );
-    }
-    else if( uiViewIndex > 1 )
-    {
-      AOF( m_uiCamParsCodedPrecision == pcSlice->getVPS()->getCamParPrecision     () );
-      AOF( m_bCamParsVaryOverTime    == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) );
-    }
-
-    for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
-    {
-      if( m_bCamParsVaryOverTime )
-      {
-        m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedScale    () [ uiBaseIndex ];
-        m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedOffset   () [ uiBaseIndex ];
-        m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedScale () [ uiBaseIndex ];
-        m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedOffset() [ uiBaseIndex ];
-        xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
-        xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
-      }
-      else
-      {
-        m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedScale    (uiViewIndex) [ uiBaseIndex ];
-        m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedOffset   (uiViewIndex) [ uiBaseIndex ];
-        m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ];
-        m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ];
-        xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
-        xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
-      }
-    }
-  }
-  else
-  {
-    AOF( m_aiViewId[ uiViewIndex ] == pcSlice->getViewId() );
-    if( m_bCamParsVaryOverTime )
-    {
-      for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
-      {
-        m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedScale    () [ uiBaseIndex ];
-        m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedOffset   () [ uiBaseIndex ];
-        m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedScale () [ uiBaseIndex ];
-        m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedOffset() [ uiBaseIndex ];
-
-        xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
-        xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
-      }
-    }
-  }
-  
-  m_iLastViewIndex = (Int)pcSlice->getViewIndex();  
-  m_iLastPOC       = (Int)pcSlice->getPOC();
-}
-
-#else
 Void
 CamParsCollector::setSlice( TComSlice* pcSlice )
@@ -440,5 +288,4 @@
   }
 }
-#endif
 
 
@@ -454,18 +301,4 @@
 #endif
 
-#if !FIX_CAM_PARS_COLLECTOR
-Bool
-CamParsCollector::xIsComplete()
-{
-  for( UInt uiView = 0; uiView <= m_uiMaxViewIndex; uiView++ )
-  {
-    if( m_bViewReceived[ uiView ] == 0 )
-    {
-      return false;
-    }
-  }
-  return true;
-}
-#endif
 
 Void
@@ -474,21 +307,11 @@
   if( m_pCodedScaleOffsetFile )
   {
-#if FIX_CAM_PARS_COLLECTOR
     if( iPOC == m_firstReceivedPoc )
-#else
-    if( iPOC == 0 )
-#endif
     {
       fprintf( m_pCodedScaleOffsetFile, "#  ViewIndex       ViewId\n" );
       fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );
-#if FIX_CAM_PARS_COLLECTOR
       for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
       {
         fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) );
-#else        
-      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
-      {
-        fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_aiViewId[ uiViewIndex ] );
-#endif
       }
       fprintf( m_pCodedScaleOffsetFile, "\n\n");
@@ -496,9 +319,5 @@
       fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );
     }
-#if FIX_CAM_PARS_COLLECTOR
     if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime  )
-#else
-    if( iPOC == 0 || m_bCamParsVaryOverTime )
-#endif
     {
       Int iS = iPOC;
@@ -510,5 +329,4 @@
           if( uiViewIndex != uiBaseIndex )
           {
-#if FIX_CAM_PARS_COLLECTOR
             if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 )
             {            
@@ -516,9 +334,4 @@
                 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() );
             }            
-#else
-            fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
-              iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_uiCamParsCodedPrecision );
-#endif
-
           }
         }
@@ -641,5 +454,5 @@
   for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) 
   {
-#if H_MV_HLS_7_SPS_P0155_16_32
+#if H_MV
     numReorderPics[temporalLayer] = ( getLayerId() == 0 ) ? pcSlice->getSPS()->getNumReorderPics(temporalLayer) : pcSlice->getVPS()->getNumReorderPics(temporalLayer);
 #else
@@ -647,5 +460,5 @@
 #endif
   }
-#if H_MV_HLS_7_SPS_P0155_16_32
+#if H_MV
   if ( getLayerId() == 0 )
   {  
Index: branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecTop.h	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecTop.h	(revision 882)
@@ -71,9 +71,5 @@
   ~CamParsCollector ();
 
-#if FIX_CAM_PARS_COLLECTOR
   Void  init        ( FILE* pCodedScaleOffsetFile, TComVPS* vps );
-#else
-  Void  init        ( FILE* pCodedScaleOffsetFile );
-#endif
 
   Void  uninit      ();
@@ -94,9 +90,5 @@
 
 private:
-#if FIX_CAM_PARS_COLLECTOR
   Void xResetReceivedIdc( Bool overWriteFlag ); 
-#else
-  Bool  xIsComplete ();
-#endif
   Void  xOutput     ( Int iPOC );
 
@@ -108,7 +100,4 @@
   Int**   m_aaiCodedScale;
   
-#if !FIX_CAM_PARS_COLLECTOR
-  Int*    m_aiViewId;  
-#else
   TComVPS* m_vps; 
   Int**    m_receivedIdc; 
@@ -116,18 +105,7 @@
   Int      m_lastPoc; 
   Int      m_firstReceivedPoc; 
-#endif
-
-  
-#if !FIX_CAM_PARS_COLLECTOR
-  Bool*   m_bViewReceived;
-  UInt    m_uiCamParsCodedPrecision;
-#endif
+
+  
   Bool    m_bCamParsVaryOverTime;
-#if !FIX_CAM_PARS_COLLECTOR
-  Int     m_iLastViewIndex;
-  Int     m_iLastPOC;
-  UInt    m_uiMaxViewIndex;
-#endif
-
 
   UInt    m_uiBitDepthForLUT;
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/NALwrite.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/NALwrite.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/NALwrite.cpp	(revision 882)
@@ -91,5 +91,5 @@
   vector<uint8_t>& rbsp   = nalu.m_Bitstream.getFIFO();
 
-#if H_MV_HLS_7_MISC_P0130_EOS  // This will handle situation when writing NAL with zero payload
+#if H_MV  // This will handle situation when writing NAL with zero payload
   if (rbsp.size() == 0) return;
 #endif
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/SEIwrite.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 882)
@@ -93,5 +93,5 @@
     fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
     break;
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
     case SEI::SUB_BITSTREAM_PROPERTY:
     fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n");
@@ -151,5 +151,5 @@
     xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps);
     break;
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
    case SEI::SUB_BITSTREAM_PROPERTY:
    xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei));
@@ -589,5 +589,5 @@
 }
 
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
 Void SEIWriter::xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei)
 {
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/SEIwrite.h
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/SEIwrite.h	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/SEIwrite.h	(revision 882)
@@ -66,5 +66,5 @@
   Void xWriteSEISOPDescription(const SEISOPDescription& sei);
   Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps);
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
   Void xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei);
 #endif
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 882)
@@ -272,5 +272,4 @@
   WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag");
 
-#if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
 #if !H_MV
   WRITE_FLAG( 0, "pps_extension_flag" );
@@ -290,7 +289,5 @@
   if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) )
   {
-#if H_MV_HLS_7_POC_P0041
     WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );
-#endif
   }
 
@@ -303,13 +300,5 @@
 
 #endif
-#else
-#if !H_3D
-  WRITE_FLAG( 0, "pps_extension_flag" );
-#else
-  WRITE_FLAG( 1, "pps_extension_flag" );
-  codePPSExtension( pcPPS ); 
-  WRITE_FLAG( 0, "pps_extension2_flag" );
-#endif
-#endif
+
 }
 
@@ -725,5 +714,5 @@
 #endif
   WRITE_UVLC( pcSPS->getBitsForPOC()-4,                 "log2_max_pic_order_cnt_lsb_minus4" );
-#if H_MV_HLS_7_SPS_P0155_16_32
+#if H_MV
   if ( pcSPS->getLayerId() == 0 ) 
   {  
@@ -741,5 +730,5 @@
     }
   }
-#if H_MV_HLS_7_SPS_P0155_16_32
+#if H_MV
   }
 #endif
@@ -871,7 +860,5 @@
     WRITE_SVLC( pcSPS->getScaledRefLayerRightOffset( j ), "scaled_ref_layer_right_offset" );
     WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" );
-#if H_MV_HLS_7_RESERVED_FLAGS
     WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" );
-#endif
   }
 }
@@ -904,13 +891,5 @@
   WRITE_FLAG( pcVPS->getTemporalNestingFlag(),                "vps_temporal_id_nesting_flag" );
   assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
-#if H_MV_HLS_7_VPS_P0125_24
   WRITE_CODE( 0xffff,                              16,        "vps_reserved_ffff_16bits" );
-#else
-#if H_MV && !H_MV_HLS7_GEN
-  WRITE_CODE( 0xffff,                              16,        "vps_extension_offset" );
-#else
-  WRITE_CODE( 0xffff,                              16,        "vps_reserved_ffff_16bits" );
-#endif
-#endif
   codePTL( pcVPS->getPTL(), true, pcVPS->getMaxTLayers() - 1 );
   const Bool subLayerOrderingInfoPresentFlag = 1;
@@ -1010,14 +989,6 @@
 {
   WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0,          "avc_base_layer_flag" );
-#if !H_MV_HLS_7_VPS_P0307_23
-  WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );
-  if ( pcVPS->getVpsVuiPresentFlag() )
-  {  
-  WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16,                 "vps_vui_offset" );  // TBD
-  }
-#endif
-
   WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0,             "splitting_flag" );
-  
+
   for( Int type = 0; type < MAX_NUM_SCALABILITY_TYPES; type++ )
   {
@@ -1042,9 +1013,9 @@
     {      
       WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6,          "layer_id_in_nuh[i]");
-  }
+    }
     else
     {
       assert( pcVPS->getLayerIdInNuh( i ) == i ); 
-  }
+    }
 
     assert(  pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i ); 
@@ -1064,20 +1035,20 @@
 
 
-    WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" );
-    
-    if ( pcVPS->getViewIdLen( ) > 0 )
-    {    
-      for( Int i = 0; i < pcVPS->getNumViews(); i++ )
-      {
-        WRITE_CODE( pcVPS->getViewIdVal( i ), pcVPS->getViewIdLen( ), "view_id_val[i]" );
-      }
-    }
-    else
-    {
-      for( Int i = 0; i < pcVPS->getNumViews(); i++ )
-      {
-        assert( pcVPS->getViewIdVal( i ) == 0 ); 
-      }
-    }
+  WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" );
+
+  if ( pcVPS->getViewIdLen( ) > 0 )
+  {    
+    for( Int i = 0; i < pcVPS->getNumViews(); i++ )
+    {
+      WRITE_CODE( pcVPS->getViewIdVal( i ), pcVPS->getViewIdLen( ), "view_id_val[i]" );
+    }
+  }
+  else
+  {
+    for( Int i = 0; i < pcVPS->getNumViews(); i++ )
+    {
+      assert( pcVPS->getViewIdVal( i ) == 0 ); 
+    }
+  }
 
 
@@ -1122,33 +1093,12 @@
 
   WRITE_FLAG( pcVPS->getAllRefLayersActiveFlag( ) ? 1 : 0 , "all_ref_layers_active_flag" );
-#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-  WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( )    , 10,    "vps_number_layer_sets_minus1"      );
-#endif
-
-#if !H_MV_HLS_7_VPS_P0306_22
-  WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6,     "vps_num_profile_tier_level_minus1" );
-#else
   WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" );
-#endif
 
   for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
   {
     WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" );
-#if !H_MV_HLS_7_VPS_P0048_14
-    if( !pcVPS->getVpsProfilePresentFlag( i ) )
-    {    
-      WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" );
-      pcVPS->checkProfileRefMinus1( i );      
-    }
-#endif
     codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 );
   }
 
-
-
-
-
-
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
   WRITE_UVLC( pcVPS->getNumAddOutputLayerSets( ), "num_add_output_layer_sets" );
 
@@ -1157,38 +1107,14 @@
     WRITE_CODE( pcVPS->getDefaultTargetOutputLayerIdc( ), 2, "default_target_output_layer_idc" );
   }  
-#else
-  Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 
-
-  WRITE_FLAG( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" );
-
-  if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
-  {
-    WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( )    , 10,    "num_add_output_layer_sets_minus1"      );
-    numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1 ); 
-  }
-
-  if( numOutputLayerSets > 1)
-  {
-    WRITE_CODE( pcVPS->getDefaultOneTargetOutputLayerIdc( ), 2, "default_one_target_output_layer_idc" );
-    pcVPS->checkDefaultOneTargetOutputLayerIdc(); 
-  }  
-#endif
+
 
   assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 )); 
   assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 ); 
 
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
-
   for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
   {
     if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )    
-#else
-  for( Int i = 1; i < numOutputLayerSets; i++ )
-  {
-    if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
-#endif
     {      
       WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ),      "output_layer_set_idx_minus1[i]" );
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     }
 
@@ -1208,24 +1134,8 @@
     }        
 
-#else
-      for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ )
-      {
-        WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" );
-      }      
-    }
-    else
-    { // These inference rules would also be helpful in spec text
-      assert( pcVPS->getOutputLayerSetIdxMinus1(i ) ==  i - 1 ); 
-      for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
-      {              
-        assert( pcVPS->getOutputLayerFlag( i , j ) == pcVPS->inferOutputLayerFlag( i, j )); 
-      }
-    }
-#endif
     if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
     {      
       WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" );   
     }
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
     {
@@ -1233,25 +1143,9 @@
     }
   }
-#else
-  }
-
-  if( pcVPS->getMaxLayersMinus1() > 0 )
-  {
-    WRITE_FLAG( pcVPS->getAltOutputLayerFlag( ) ? 1 : 0 , "alt_output_layer_flag" );
-  }
-#endif
-
-
-
-
 
   WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" );
   if ( pcVPS->getRepFormatIdxPresentFlag() )
   {
-#if H_MV_HLS_7_VPS_P0306_22
     WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" );
-#else
-    WRITE_CODE( pcVPS->getVpsNumRepFormatsMinus1( ), 4, "vps_num_rep_formats_minus1" );
-#endif
   }
 
@@ -1269,9 +1163,5 @@
       if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
       {
-#if H_MV_HLS_7_VPS_P0306_22
         WRITE_CODE( pcVPS->getVpsRepFormatIdx(i), pcVPS->getVpsRepFormatIdxLen(), "vps_rep_format_idx[i]" );
-#else
-        WRITE_CODE( pcVPS->getVpsRepFormatIdx( i ), 8, "vps_rep_format_idx" );
-#endif
       }
     }
@@ -1289,7 +1179,5 @@
     }
   }
-#if H_MV_HLS_7_RESERVED_FLAGS
   WRITE_FLAG( 0, "vps_reserved_zero_flag" );
-#endif
   codeDpbSize( pcVPS ); 
 
@@ -1321,24 +1209,18 @@
     }
   }  
-#if H_MV_HLS_7_VPS_P0307_23
   WRITE_UVLC( 0, "vps_non_vui_extension_length" );
   WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );
-#endif
-#if !H_MV_HLS_7_RESERVED_FLAGS  
-    WRITE_FLAG ( 0,                                      "vps_shvc_reserved_zero_flag" ); 
-#endif
-    if( pcVPS->getVpsVuiPresentFlag() )
-    {
-      m_pcBitIf->writeAlignOne();  // vps_vui_alignment_bit_equal_to_one
-      codeVPSVUI( pcVPS ); 
-    }     
-#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
-    {
-      TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 
-      assert( pcVPSVUI ); 
-      pcVPSVUI->inferVpsVui( true ); 
-    }
-#endif
-}
+  if( pcVPS->getVpsVuiPresentFlag() )
+  {
+    m_pcBitIf->writeAlignOne();  // vps_vui_alignment_bit_equal_to_one
+    codeVPSVUI( pcVPS ); 
+  }     
+  {
+    TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 
+    assert( pcVPSVUI ); 
+    pcVPSVUI->inferVpsVui( true ); 
+  }
+}
+
 Void TEncCavlc::codeVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo )
 {
@@ -1359,9 +1241,5 @@
   {  
     WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" );
-#if H_MV_HLS_7_HRD_P0156_7
     for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )
-#else
-    for( Int j = 0; j  <=  vps->getMaxTLayers() - 1 ; j++ )
-#endif
     {  
       if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  )  
@@ -1371,9 +1249,5 @@
       if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
       {  
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
         for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ )   
-#else
-        for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   // Preliminary fix does not match with spec
-#endif
         {
           WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );
@@ -1395,9 +1269,5 @@
         if ( j > 0 )
         {
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
           for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ )   
-#else
-          for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
-#endif
           {
             assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
@@ -1451,19 +1321,13 @@
     WRITE_FLAG( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" );
   }
-#if H_MV_HLS_7_MISC_P0068_21
   if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) )
   {
     WRITE_FLAG( pcVPSVUI->getAllLayersIdrAlignedFlag( ) ? 1 : 0 , "all_layers_idr_aligned_flag" );
   }
-#endif
   WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" );
   WRITE_FLAG( pcVPSVUI->getPicRatePresentVpsFlag( ) ? 1 : 0 , "pic_rate_present_vps_flag" );
   if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
   {
-#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
-#else
-    for( Int i = 0; i  <=  pcVPS->getVpsNumberLayerSetsMinus1(); i++ )
-#endif
     {
       for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ ) 
@@ -1491,5 +1355,4 @@
   }
 
-#if H_MV_HLS_7_VPS_P0076_15
   WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" );
   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
@@ -1525,5 +1388,4 @@
     }
   }
-#endif
   WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" );
   if( !pcVPSVUI->getTilesNotInUseFlag() ) 
@@ -1560,7 +1422,5 @@
     }
   }
-#if H_MV_HLS_7_RESERVED_FLAGS
   WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" );
-#endif
   WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" );
 
@@ -1584,38 +1444,5 @@
   }
 
-#if !H_MV_HLS_7_VPS_P0076_15
-  WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" );
-  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
-  {
-    WRITE_CODE( pcVPSVUI->getVpsNumVideoSignalInfoMinus1( ), 4, "vps_num_video_signal_info_minus1" );
-  }
-  else
-  {
-    pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 
-  }
-
-  for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ )
-  {
-    assert( pcVPSVUI->getVideoSignalInfo( i ) != NULL ); 
-    TComVideoSignalInfo* curVideoSignalInfo = pcVPSVUI->getVideoSignalInfo( i ); 
-    codeVideoSignalInfo( curVideoSignalInfo );     
-  }
-
-  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
-  {
-    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
-    {
-      WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" );
-      assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );
-    }
-}
-  else
-  {
-    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
-    {
-      assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i  ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) ); 
-    }
-  }
-#endif
+
   WRITE_FLAG( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ? 1 : 0 , "vps_vui_bsp_hrd_present_flag" );
   if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
@@ -1623,5 +1450,4 @@
     codeVpsVuiBspHrdParameters( pcVPS ); 
   }
-#if H_MV_HLS_7_MISC_P0182_13
   for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
   {
@@ -1630,6 +1456,5 @@
       WRITE_FLAG( pcVPSVUI->getBaseLayerParameterSetCompatibilityFlag( i ) ? 1 : 0 , "base_layer_parameter_set_compatibility_flag" );
     }
-}
-#endif
+  }
 }
 
@@ -2225,16 +2050,5 @@
 #endif
 
-#if !H_MV_HLS_7_POC_P0041
-#if PPS_FIX_DEPTH
-  if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag() || pcSlice->getIsDepth() )
-#else
-  if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag())
-#endif
-  {
-    WRITE_UVLC(0,"slice_header_extension_length");
-  }
-#endif
-
-#if H_MV_HLS_7_POC_P0041
+
 #if !H_MV
   if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag())
@@ -2344,5 +2158,4 @@
   }
 #endif 
-#endif
 }
 
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 882)
@@ -347,5 +347,5 @@
 
   Bool      m_useStrongIntraSmoothing;                        ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat.
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
   Bool              m_subBistreamPropSEIEnabled;
   Int               m_numAdditionalSubStreams;
@@ -785,5 +785,5 @@
   Int   getScalableNestingSEIEnabled()                     { return m_scalableNestingSEIEnabled; }
 
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
   Bool   getSubBitstreamPropSEIEnabled()        { return m_subBistreamPropSEIEnabled;}
   Void   setSubBitstreamPropSEIEnabled(Bool x)  { m_subBistreamPropSEIEnabled = x;}
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 882)
@@ -1794,7 +1794,4 @@
     memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM*sizeof(Int) );
     rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
-#if !UPDATE_HM13
-    rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uhDepth );
-#endif
     rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
 #if H_3D_IC
@@ -2085,8 +2082,6 @@
 {
 
-#if UPDATE_HM13
 #if H_3D
   const Bool bTransquantBypassFlag = rpcTempCU->getCUTransquantBypass(0);
-#endif
 #endif
 #if  H_3D_FAST_TEXTURE_ENCODING
@@ -2109,9 +2104,5 @@
     if( bFirstTime == false && rpcTempCU->getSlice()->getVPS()->getUseAdvRP( iLayerId ) )
     {
-#if UPDATE_HM13
       rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0),bTransquantBypassFlag );      
-#else
-      rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0) );
-#endif
     }
 #endif
@@ -2222,9 +2213,5 @@
       {
         Int orgQP = rpcBestCU->getQP( 0 );
-#if UPDATE_HM13
         rpcTempCU->initEstData( uhDepth, orgQP ,bTransquantBypassFlag );      
-#else
-        rpcTempCU->initEstData( uhDepth, orgQP );
-#endif
         rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth );
       }
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 882)
@@ -296,5 +296,5 @@
 }
 
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
 SEISubBitstreamProperty *TEncGOP::xCreateSEISubBitstreamProperty( TComSPS *sps)
 {
@@ -365,5 +365,5 @@
     delete sei;
   }
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
   if( m_pcCfg->getSubBitstreamPropSEIEnabled() )
   {
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncGOP.h
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncGOP.h	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncGOP.h	(revision 882)
@@ -212,5 +212,5 @@
 
   SEIToneMappingInfo*     xCreateSEIToneMappingInfo();
-#if H_MV_HLS_7_SEI_P0204_26
+#if H_MV
   SEISubBitstreamProperty *xCreateSEISubBitstreamProperty( TComSPS *sps);
 #endif
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 882)
@@ -4601,12 +4601,10 @@
         }
         else
-#if H_3D_FIX_G0148_BRACE
           {
-#endif
 #endif
           pcCU->setInterDirSubParts  ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
             pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx );
             pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
-#if H_3D_FIX_G0148_BRACE
+#if H_3D
           }
 #endif
Index: branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 881)
+++ branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 882)
@@ -667,6 +667,4 @@
   m_cSPS.setSPSId( getLayerIdInVps() );
   m_cSPS.setLayerId( getLayerId() );
-#endif
-#if H_MV_HLS_7_VPS_P0048_14
  // Code below needs to be moved to VPS
 #endif
@@ -832,11 +830,7 @@
   m_cPPS.setSPSId( getLayerIdInVps() );
 
-#if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
-#if H_MV  
   m_cPPS.setPpsExtensionTypeFlag          ( PPS_EX_T_MV ,true ); 
 #if H_3D
   m_cPPS.setPpsExtensionTypeFlag          ( PPS_EX_T_3D ,true ); 
-#endif
-#endif
 #endif
 #endif
