Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/NALread.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/NALread.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/NALread.cpp	(revision 367)
@@ -103,10 +103,6 @@
   assert(forbidden_zero_bit == 0);
   nalu.m_nalUnitType = (NalUnitType) bs.read(6);  // nal_unit_type
-#if H_MV
-  nalu.m_layerId = bs.read(6);                 // layerId
-#else
   nalu.m_reservedZero6Bits = bs.read(6);       // nuh_reserved_zero_6bits
   assert(nalu.m_reservedZero6Bits == 0);
-#endif
   nalu.m_temporalId = bs.read(3) - 1;             // nuh_temporal_id_plus1
 
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 367)
@@ -680,12 +680,8 @@
   if (uiCode)
   {
-#if H_MV
-    READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
-#else
     while ( xMoreRbspData() )
     {
       READ_FLAG( uiCode, "sps_extension_data_flag");
     }
-#endif
   }
 }
@@ -697,17 +693,9 @@
   READ_CODE( 4,  uiCode,  "vps_video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
   READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
-#if H_MV
-  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( uiCode + 1 );
-#else
   READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
-#endif
   READ_CODE( 3,  uiCode,  "vps_max_sub_layers_minus1" );          pcVPS->setMaxTLayers( uiCode + 1 );
   READ_FLAG(     uiCode,  "vps_temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
   assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
-#if H_MV
-  READ_CODE( 16, uiCode,  "vps_extension_offset" );               
-#else
   READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
-#endif
   parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
 #if SIGNAL_BITRATE_PICRATE_IN_VPS
@@ -739,20 +727,11 @@
 
   assert( pcVPS->getNumHrdParameters() < MAX_VPS_OP_SETS_PLUS1 );
-#if H_MV
-  assert( pcVPS->getMaxNuhLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
-  READ_CODE( 6, uiCode, "vps_max_nuh_layer_id" );   pcVPS->setMaxNuhLayerId( uiCode );
-#else
   assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
   READ_CODE( 6, uiCode, "vps_max_nuh_reserved_zero_layer_id" );   pcVPS->setMaxNuhReservedZeroLayerId( uiCode );
-#endif
   READ_UVLC(    uiCode, "vps_max_op_sets_minus1" );               pcVPS->setMaxOpSets( uiCode + 1 );
   for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getMaxOpSets() - 1 ); opsIdx ++ )
   {
     // Operation point set
-#if H_MV
-    for( UInt i = 0; i <= pcVPS->getMaxNuhLayerId(); i ++ )
-#else
     for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ )
-#endif
     {
       READ_FLAG( uiCode, "layer_id_included_flag[opsIdx][i]" );     pcVPS->setLayerIdIncludedFlag( uiCode == 1 ? true : false, opsIdx, i );
@@ -793,110 +772,8 @@
   if (uiCode)
   {
-#if H_MV
-    m_pcBitstream->readOutTrailingBits();
-
-    READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
-    READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
-
-    // Parse scalability_mask[i]    
-    for( Int sIdx = 0; sIdx < MAX_NUM_SCALABILITY_TYPES; sIdx++ )
-    {
-      READ_FLAG( uiCode,  "scalability_mask[i]" );                  pcVPS->setScalabilityMask( sIdx, uiCode == 1 ? true : false );      
-    }
-
-    Int numScalabilityTypes = pcVPS->getNumScalabilityTypes(); 
-
-    // Parse dimension_id_len_minus1[j]    
-    for( Int sIdx = 0; sIdx < numScalabilityTypes; sIdx++ )
-    {
-        READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" );       pcVPS->setDimensionIdLen( sIdx, uiCode + 1 );
-    }
-
-    // vps_nuh_layer_id_present_flag
-    READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" );           pcVPS->setVpsNuhLayerIdPresentFlag( uiCode == 1 ? true : false );
-
-    // parse layer_id_in_nuh[i] and derive LayerIdInVps
-    pcVPS->setLayerIdInNuh( 0, 0 ); pcVPS->setLayerIdInVps( 0, 0 );
-    
-    for( Int layer = 1; layer <= pcVPS->getMaxLayers() - 1; layer++ )
-    {
-      UInt layerIdInNuh; 
-      if ( pcVPS->getVpsNuhLayerIdPresentFlag() )
-      {
-        READ_CODE( 6, uiCode, "layer_id_in_nuh[i]" );                layerIdInNuh = uiCode; 
-      }
-      else
-      {
-        layerIdInNuh = layer; 
-      }      
-
-      pcVPS->setLayerIdInNuh( layer, layerIdInNuh );
-      pcVPS->setLayerIdInVps( layerIdInNuh, layer ); 
-
-      // parse dimension_id[i][j]
-      for( Int sIdx = 0; sIdx < numScalabilityTypes; sIdx++ )
-      {
-          READ_CODE( pcVPS->getDimensionIdLen( sIdx ), uiCode, "dimension_id[i][j]" );  pcVPS->setDimensionId( layer, sIdx, uiCode );
-      }
-    }
-
-    for( Int layerSet = 1; layerSet <= pcVPS->getMaxOpSets() - 1; layerSet++ )
-    {
-      READ_FLAG(  uiCode, "vps_profile_present_flag[lsIdx]" );    pcVPS->setVpsProfilePresentFlag( layerSet, uiCode == 1 ? true : false );
-      if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
-      {
-        READ_UVLC( uiCode, "profile_layer_set_ref_minus1[lsIdx]" ); pcVPS->setProfileLayerSetRefMinus1( layerSet, uiCode );
-      }
-
-      parsePTL ( pcVPS->getPTL( layerSet ), pcVPS->getVpsProfilePresentFlag( layerSet ), pcVPS->getMaxTLayers()-1);
-      if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
-      {
-        TComPTL temp = *pcVPS->getPTL( layerSet );
-        *pcVPS->getPTL( layerSet ) = *pcVPS->getPTL( pcVPS->getProfileLayerSetRefMinus1( layerSet ) + 1 );
-        pcVPS->getPTL( layerSet )->copyLevelFrom( &temp );
-      }
-    }
-
-    READ_UVLC( uiCode, "num_output_layer_sets" );                  pcVPS->setNumOutputLayerSets( uiCode );
-    
-    for( Int layerSet = 0; layerSet < pcVPS->getNumOutputLayerSets(); layerSet++ )
-    {
-      READ_UVLC( uiCode, "output_layer_set_idx[i]" );              pcVPS->setOutputLayerSetIdx( layerSet, uiCode );
-      for( Int layer = 0; layer <= pcVPS->getMaxNuhLayerId(); layer++ )
-      {
-        if( pcVPS->getLayerIdIncludedFlag( pcVPS->getOutputLayerSetIdx( layerSet ), layer ) == true )
-        {
-          READ_FLAG( uiCode, "output_layer_flag" );                 pcVPS->setOutputLayerFlag( layerSet, layer, uiCode == 1 ? true : false );
-        }
-      }
-    }
-
-    for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )
-    {
-      for( Int j = 0; j < i; j++ )
-      {
-        READ_FLAG( uiCode, "direct_dependency_flag[i][j]" );             pcVPS->setDirectDependencyFlag( i, j, uiCode );
-      }
-    }
-    
-    READ_FLAG( uiCode,  "vps_extension2_flag" );
-    if (uiCode)
-    {
-      while ( xMoreRbspData() )
-      {
-        READ_FLAG( uiCode, "vps_extension2_data_flag");
-      }
-    }
-
-    pcVPS->checkVPSExtensionSyntax(); 
-
-    pcVPS->calcIvRefLayers(); 
-
-#else
     while ( xMoreRbspData() )
     {
       READ_FLAG( uiCode, "vps_extension_data_flag");
     }
-#endif    
   }
   
@@ -914,7 +791,4 @@
   TComPPS* pps = NULL;
   TComSPS* sps = NULL;
-#if H_MV
-  TComVPS* vps = NULL;
-#endif
 
   UInt firstSliceSegmentInPic;
@@ -931,9 +805,4 @@
   //!KS: need to add error handling code here, if SPS is not available
   assert(sps!=0);
-#if H_MV
-  vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId());
-  assert(vps!=0);
-  rpcSlice->setVPS(vps);
-#endif
   rpcSlice->setSPS(sps);
   rpcSlice->setPPS(pps);
@@ -1523,14 +1392,8 @@
   for (Int i = 0; i < maxNumSubLayersMinus1; i++)
   {
-#if !H_MV
     if(profilePresentFlag)
     {
-#endif
       READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode);
-#if H_MV
-    rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );
-#else
-    }
-#endif
+    }
     READ_FLAG( uiCode, "sub_layer_level_present_flag[i]"   ); rpcPTL->setSubLayerLevelPresentFlag  (i, uiCode);
   }
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecGop.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecGop.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecGop.cpp	(revision 367)
@@ -205,23 +205,13 @@
   }
 
-#if !H_3D
   rpcPic->compressMotion(); 
-#endif
   Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');
   if (!pcSlice->isReferenced()) c += 32;
 
   //-- For time output for each slice
-#if H_MV
-  printf("\nLayer %2d   POC %4d TId: %1d ( %c-SLICE, QP%3d ) ", pcSlice->getLayerId(),
-                                                              pcSlice->getPOC(),
-                                                              pcSlice->getTLayer(),
-                                                              c,
-                                                              pcSlice->getSliceQp() );
-#else
   printf("\nPOC %4d TId: %1d ( %c-SLICE, QP%3d ) ", pcSlice->getPOC(),
                                                     pcSlice->getTLayer(),
                                                     c,
                                                     pcSlice->getSliceQp() );
-#endif
 
   m_dDecTime += (Double)(clock()-iBeforeTime) / CLOCKS_PER_SEC;
@@ -234,16 +224,5 @@
     for (Int iRefIndex = 0; iRefIndex < pcSlice->getNumRefIdx(RefPicList(iRefList)); iRefIndex++)
     {
-#if H_MV
-      if( pcSlice->getLayerId() != pcSlice->getRefLayerId( RefPicList(iRefList), iRefIndex ) )
-      {
-        printf( "V%d ", pcSlice->getRefLayerId( RefPicList(iRefList), iRefIndex ) );
-      }
-      else
-      {
-#endif
       printf ("%d ", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex));
-#if H_MV
-      }
-#endif
     }
     printf ("] ");
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 367)
@@ -39,7 +39,4 @@
 #include "TDecTop.h"
 
-#if H_MV
-ParameterSetManagerDecoder TDecTop::m_parameterSetManagerDecoder;
-#endif
 //! \ingroup TLibDecoder
 //! \{
@@ -60,11 +57,4 @@
   m_bFirstSliceInPicture    = true;
   m_bFirstSliceInSequence   = true;
-#if H_MV
-  m_layerId = 0;
-  m_viewId = 0;
-#if H_3D
-  m_isDepth = false;
-#endif
-#endif
 }
 
@@ -96,7 +86,5 @@
 {
   // initialize ROM
-#if !H_MV
   initROM();
-#endif
   m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO);
   m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder );
@@ -112,15 +100,8 @@
   {
     TComPic* pcPic = *(iterPic++);
-#if H_MV
-    if( pcPic )
-    {
-#endif
     pcPic->destroy();
     
     delete pcPic;
     pcPic = NULL;
-#if H_MV
-    }
-#endif
   }
   
@@ -129,8 +110,6 @@
   m_cLoopFilter.        destroy();
   
-#if !H_MV
   // destroy ROM
   destroyROM();
-#endif
 }
 
@@ -198,9 +177,5 @@
 }
 
-#if H_MV
-Void TDecTop::endPicDecoding(Int& poc, TComList<TComPic*>*& rpcListPic, std::vector<Int>& targetDecLayerIdSet )
-#else
 Void TDecTop::executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic)
-#endif
 {
   if (!m_pcPic)
@@ -220,8 +195,4 @@
   rpcListPic          = &m_cListPic;  
   m_cCuDecoder.destroy();        
-#if H_MV 
-  TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer );  
-  TComSlice::markIvRefPicsAsUnused   ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); 
-#endif
   m_bFirstSliceInPicture  = true;
 
@@ -340,13 +311,6 @@
 }
 
-#if H_MV
-Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag )
-{
-  assert( nalu.m_layerId == m_layerId ); 
-
-#else
 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay )
 {
-#endif
   TComPic*&   pcPic         = m_pcPic;
   m_apcSlicePilot->initSlice();
@@ -373,20 +337,6 @@
   m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
 
-#if H_MV
-  m_apcSlicePilot->setLayerId( nalu.m_layerId );
-#endif
   m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder);
 
-#if H_MV  
-  TComVPS* vps     = m_apcSlicePilot->getVPS();
-  Int layerIdInVps = vps->getLayerIdInVps( nalu.m_layerId );
-  
-  setViewId(  vps->getViewId( layerIdInVps  ) );
-  m_apcSlicePilot->setViewId( getViewId() );
-#if H_3D
-  setIsDepth( vps->getDepthId( layerIdInVps ) == 1 );
-  m_apcSlicePilot->setIsDepth( getIsDepth() );
-#endif
-#endif
     // Skip pictures due to random access
     if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
@@ -415,10 +365,4 @@
     m_prevPOC = m_apcSlicePilot->getPOC();
   }
-#if H_MV
-  if ( newLayerFlag )
-  {
-    return false; 
-  }
-#endif
   // actual decoding starts here
   xActivateParameterSets();
@@ -440,7 +384,4 @@
     m_cPrediction.initTempBuff();
     m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS());
-#if H_MV
-    m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer ); 
-#endif
     //  Get a new picture buffer
     xGetNewPicBuffer (m_apcSlicePilot, pcPic);
@@ -574,18 +515,8 @@
   pcPic->setTLayer(nalu.m_temporalId);
 
-#if H_MV
-  pcPic->setLayerId( nalu.m_layerId );
-  pcPic->setViewId ( getViewId() );
-#if H_3D
-  pcPic->setIsDepth( getIsDepth() );
-#endif
-#endif
   if (bNextSlice)
   {
     pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic );
     // Set reference list
-#if H_MV    
-    pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );    
-#else
 #if FIX1071
     pcSlice->setRefPicList( m_cListPic, true );
@@ -594,5 +525,4 @@
 #endif
 
-#endif
     // For generalized B
     // note: maybe not existed case (always L0 is copied to L1 if L1 is empty)
@@ -732,9 +662,5 @@
 }
 
-#if H_MV
-Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag)
-#else
 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay)
-#endif
 {
   // Initialize entropy decoder
@@ -777,9 +703,5 @@
     case NAL_UNIT_CODED_SLICE_RASL_N:
     case NAL_UNIT_CODED_SLICE_RASL_R:
-#if H_MV
-      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag);
-#else
       return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay);
-#endif
       break;
     default:
@@ -861,26 +783,3 @@
 }
 
-#if H_MV
-TComPic* TDecTop::getPic( Int poc )
-{
-  xGetPic( m_layerId, poc ); 
-  TComList<TComPic*>* listPic = getListPic();
-  TComPic* pcPic = NULL;
-  for(TComList<TComPic*>::iterator it=listPic->begin(); it!=listPic->end(); it++)
-  {
-    if( (*it)->getPOC() == poc )
-    {
-      pcPic = *it ;
-      break ;
-    }
-  }
-  return pcPic;
-}
-
-TComPic* TDecTop::xGetPic( Int layerId, Int poc )
-{ 
-  return m_ivPicLists->getPic( layerId, poc ) ;
-}
-
-#endif
 //! \}
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 367)
@@ -61,7 +61,4 @@
 // ====================================================================================================================
 
-#if H_MV
-class TAppDecTop;
-#endif
 /// decoder class
 class TDecTop
@@ -75,9 +72,5 @@
 
   TComList<TComPic*>      m_cListPic;         //  Dynamic buffer
-#if H_MV
-  static ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets 
-#else
   ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets 
-#endif
   TComSlice*              m_apcSlicePilot;
   
@@ -105,14 +98,4 @@
   Bool                    m_bFirstSliceInPicture;
   Bool                    m_bFirstSliceInSequence;
-#if H_MV
-  // For H_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer  
-  Int                     m_layerId;
-  Int                     m_viewId;
-  TComPicLists*           m_ivPicLists;
-  std::vector<TComPic*>   m_refPicSetInterLayer; 
-#if H_3D
-  Bool                    m_isDepth;
-#endif
-#endif
 
 public:
@@ -126,33 +109,10 @@
 
   Void  init();
-#if H_MV  
-  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );
-#else  
   Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay);
-#endif
   
   Void  deletePicBuffer();
 
-#if H_MV
-  Void endPicDecoding(Int& poc, TComList<TComPic*>*& rpcListPic,  std::vector<Int>& targetDecLayerIdSet);  
-#else
   Void executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic);
-#endif
   
-#if H_MV    
-  TComPic*                getPic                ( Int poc );
-  TComList<TComPic*>*     getListPic            ()               { return &m_cListPic;  }  
-  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
-  
-  Int                     getCurrPoc            ()               { return m_apcSlicePilot->getPOC(); }
-  Void                    setLayerId            ( Int layer)     { m_layerId = layer;   }
-  Int                     getLayerId            ()               { return m_layerId;    }
-  Void                    setViewId             ( Int viewId  )  { m_viewId  = viewId;  }
-  Int                     getViewId             ()               { return m_viewId;     }  
-#if H_3D    
-  Void                    setIsDepth            ( Bool isDepth ) { m_isDepth = isDepth; }
-  Bool                    getIsDepth            ()               { return m_isDepth;    }
-#endif
-#endif
 protected:
   Void  xGetNewPicBuffer  (TComSlice* pcSlice, TComPic*& rpcPic);
@@ -160,10 +120,5 @@
 
   Void      xActivateParameterSets();
-#if H_MV  
-  TComPic*  xGetPic( Int layerId, Int poc ); 
-  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag );  
-#else
   Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
-#endif
   Void      xDecodeVPS();
   Void      xDecodeSPS();
