Index: branches/HTM-DEV-0.1-dev/source/Lib/TAppCommon/program_options_lite.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TAppCommon/program_options_lite.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TAppCommon/program_options_lite.h	(revision 367)
@@ -37,13 +37,4 @@
 #include <map>
 
-#if H_MV
-#include <vector>
-#include <errno.h>
-#include <cstring>
-
-#ifdef WIN32
-#define strdup _strdup
-#endif
-#endif
 //! \ingroup TAppCommon
 //! \{
@@ -145,141 +136,4 @@
     }
 
-#if H_MV    
-    template<>
-    inline void
-      Option<char*>::parse(const std::string& arg)
-    {
-      opt_storage = arg.empty() ? NULL : strdup(arg.c_str()) ;
-    }
-
-    template<>
-    inline void
-      Option< std::vector<char*> >::parse(const std::string& arg)
-    {
-      opt_storage.clear(); 
-
-      char* pcStart = (char*) arg.data();      
-      char* pcEnd = strtok (pcStart," ");
-
-      while (pcEnd != NULL)
-      {
-        size_t uiStringLength = pcEnd - pcStart;
-        char* pcNewStr = (char*) malloc( uiStringLength + 1 );
-        strncpy( pcNewStr, pcStart, uiStringLength); 
-        pcNewStr[uiStringLength] = '\0'; 
-        pcStart = pcEnd+1; 
-        pcEnd = strtok (NULL, " ,.-");
-        opt_storage.push_back( pcNewStr ); 
-      }      
-    }
-
-
-    template<>    
-    inline void
-      Option< std::vector<double> >::parse(const std::string& arg)
-    {
-      char* pcNextStart = (char*) arg.data();
-      char* pcEnd = pcNextStart + arg.length();
-
-      char* pcOldStart = 0; 
-
-      size_t iIdx = 0; 
-
-      while (pcNextStart < pcEnd)
-      {
-        errno = 0; 
-
-        if ( iIdx < opt_storage.size() )
-        {
-          opt_storage[iIdx] = strtod(pcNextStart, &pcNextStart);
-        }
-        else
-        {
-          opt_storage.push_back( strtod(pcNextStart, &pcNextStart)) ;
-        }
-        iIdx++; 
-
-        if ( errno == ERANGE || (pcNextStart == pcOldStart) )
-        {
-          std::cerr << "Error Parsing Doubles: `" << arg << "'" << std::endl;
-          exit(EXIT_FAILURE);    
-        };   
-        while( (pcNextStart < pcEnd) && ( *pcNextStart == ' ' || *pcNextStart == '\t' || *pcNextStart == '\r' ) ) pcNextStart++;  
-        pcOldStart = pcNextStart; 
-
-      }
-    }
-
-    template<>
-    inline void
-      Option< std::vector<int> >::parse(const std::string& arg)
-    {
-      opt_storage.clear();
-
-
-      char* pcNextStart = (char*) arg.data();
-      char* pcEnd = pcNextStart + arg.length();
-
-      char* pcOldStart = 0; 
-
-      size_t iIdx = 0; 
-
-
-      while (pcNextStart < pcEnd)
-      {
-
-        if ( iIdx < opt_storage.size() )
-        {
-          opt_storage[iIdx] = (int) strtol(pcNextStart, &pcNextStart,10);
-        }
-        else
-        {
-          opt_storage.push_back( (int) strtol(pcNextStart, &pcNextStart,10)) ;
-        }
-        iIdx++; 
-        if ( errno == ERANGE || (pcNextStart == pcOldStart) )
-        {
-          std::cerr << "Error Parsing Integers: `" << arg << "'" << std::endl;
-          exit(EXIT_FAILURE);
-        };   
-        while( (pcNextStart < pcEnd) && ( *pcNextStart == ' ' || *pcNextStart == '\t' || *pcNextStart == '\r' ) ) pcNextStart++;  
-        pcOldStart = pcNextStart;
-      }
-    }
-
-
-    template<>
-    inline void
-      Option< std::vector<bool> >::parse(const std::string& arg)
-    {
-      char* pcNextStart = (char*) arg.data();
-      char* pcEnd = pcNextStart + arg.length();
-
-      char* pcOldStart = 0; 
-
-      size_t iIdx = 0; 
-
-      while (pcNextStart < pcEnd)
-      {
-        if ( iIdx < opt_storage.size() )
-        {
-          opt_storage[iIdx] = (strtol(pcNextStart, &pcNextStart,10) != 0);
-        }
-        else
-        {
-          opt_storage.push_back(strtol(pcNextStart, &pcNextStart,10) != 0) ;
-        }
-        iIdx++; 
-
-        if ( errno == ERANGE || (pcNextStart == pcOldStart) )
-        {
-          std::cerr << "Error Parsing Bools: `" << arg << "'" << std::endl;
-          exit(EXIT_FAILURE);
-        };   
-        while( (pcNextStart < pcEnd) && ( *pcNextStart == ' ' || *pcNextStart == '\t' || *pcNextStart == '\r' ) ) pcNextStart++;  
-        pcOldStart = pcNextStart;
-      }
-    }
-#endif
     /** Option class for argument handling using a user provided function */
     struct OptionFunc : public OptionBase
@@ -356,28 +210,4 @@
       }
       
-#if H_MV
-      template<typename T>
-      OptionSpecific&
-        operator()(const std::string& name, std::vector<T>& storage, T default_val, unsigned uiMaxNum, const std::string& desc = "" )
-      {
-        std::string cNameBuffer;
-        std::string cDescriptionBuffer;
-
-        cNameBuffer       .resize( name.size() + 10 );
-        cDescriptionBuffer.resize( desc.size() + 10 );
-
-        storage.resize(uiMaxNum);
-        for ( unsigned int uiK = 0; uiK < uiMaxNum; uiK++ )
-        {
-          // isn't there are sprintf function for string??
-          sprintf((char*) cNameBuffer.c_str()       ,name.c_str(),uiK,uiK);
-          sprintf((char*) cDescriptionBuffer.c_str(),desc.c_str(),uiK,uiK);
-
-          parent.addOption(new Option<T>( cNameBuffer, (storage[uiK]), default_val, cDescriptionBuffer ));
-        }
-
-        return *this;
-      }
-#endif
       /**
        * Add option described by name to the parent Options list,
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/CommonDef.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/CommonDef.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/CommonDef.h	(revision 367)
@@ -56,10 +56,5 @@
 // ====================================================================================================================
 
-#if H_MV
-#define NV_VERSION        "0.1"                 ///< Current software version
-#define HM_VERSION        "10.1"                ///< 
-#else
 #define NV_VERSION        "10.1"                 ///< Current software version
-#endif
 
 // ====================================================================================================================
@@ -157,15 +152,4 @@
 }
 
-#if H_MV
-
-#define AOF( exp )                  \
-{                                   \
-  if( !( exp ) )                    \
-{                                 \
-  assert( 0 );                    \
-}                                 \
-}
-
-#endif
 
 // ====================================================================================================================
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/NAL.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/NAL.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/NAL.h	(revision 367)
@@ -47,9 +47,5 @@
   NalUnitType m_nalUnitType; ///< nal_unit_type
   UInt        m_temporalId;  ///< temporal_id
-#if H_MV
-  Int         m_layerId;     ///< layer id
-#else
   UInt        m_reservedZero6Bits; ///< reserved_zero_6bits
-#endif
 
   /** construct an NALunit structure with given header values. */
@@ -57,16 +53,8 @@
     NalUnitType nalUnitType,
     Int         temporalId = 0,
-#if H_MV
-    Int         layerId = 0)
-#else
     Int         reservedZero6Bits = 0)
-#endif
     :m_nalUnitType (nalUnitType)
     ,m_temporalId  (temporalId)
-#if H_MV
-    ,m_layerId     (layerId)
-#else
     ,m_reservedZero6Bits(reservedZero6Bits)
-#endif
   {}
 
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.cpp	(revision 367)
@@ -64,11 +64,4 @@
 , m_pNDBFilterYuvTmp                      (NULL)
 , m_bCheckLTMSB                           (false)
-#if H_MV
-, m_layerId                               (0)
-, m_viewId                                (0)
-#if H_3D
-, m_isDepth                               (false)
-#endif
-#endif
 {
   m_apcPicYuv[0]      = NULL;
@@ -471,13 +464,4 @@
 
 }
-#if H_MV
-Void TComPic::print( Bool legend )
-{
-  if ( legend )
-    std::cout  << "LId"        << "\t" << "POC"   << "\t" << "Rec"          << "\t" << "Ref"                       << "\t" << "LT"            << std::endl;
-  else
-    std::cout  << getLayerId() << "\t" << getPOC()<< "\t" << getReconMark() << "\t" << getSlice(0)->isReferenced() << "\t" << getIsLongTerm() << std::endl;
-}
-#endif
 
 
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.h	(revision 367)
@@ -86,11 +86,4 @@
   SEIMessages  m_SEIs; ///< Any SEI messages that have been received.  If !NULL we own the object.
 
-#if H_MV
-  Int                   m_layerId;
-  Int                   m_viewId;
-#if H_3D
-  Bool                  m_isDepth;
-#endif
-#endif
 public:
   TComPic();
@@ -105,14 +98,4 @@
   Void          setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; }
 
-#if H_MV
-  Void          setLayerId            ( Int layerId )    { m_layerId      = layerId; }
-  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
   Bool          getUsedByCurr()             { return m_bUsedByCurr; }
   Void          setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; }
@@ -181,7 +164,4 @@
   std::vector<TComDataCU*>& getOneSliceCUDataForNDBFilter      (Int sliceID) { return m_vSliceCUDataLink[sliceID];}
 
-#if H_MV
-  Void          print( Bool legend );
-#endif
   /** transfer ownership of seis to this picture */
   void setSEIs(SEIMessages& seis) { m_SEIs = seis; }
@@ -199,51 +179,4 @@
 };// END CLASS DEFINITION TComPic
 
-#if H_MV
-class TComPicLists 
-{
-private: 
-  TComList<TComList<TComPic*>*> m_lists; 
-public: 
-  
-  Void push_back( TComList<TComPic*>* list ) { m_lists.push_back( list ); }
-  Int  size     ()                           { return (Int) m_lists.size    (); } 
-
-  TComPic* getPic( Int layerIdInNuh, Int poc )
-  { 
-    TComPic* pcPic = NULL;
-    for(TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin(); ( itL != m_lists.end() && pcPic == NULL ); itL++)
-    {    
-      for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() && pcPic == NULL ); itP++)
-      {
-        if ( ( (*itP)->getPOC() == poc ) && ( (*itP)->getLayerId() == layerIdInNuh ) )
-        {
-          pcPic = *itP ;      
-        }
-      }
-    }
-    return pcPic;
-  }
-
-  Void print( )
-  { 
-    Bool first = true;     
-    for(TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin(); ( itL != m_lists.end() ); itL++)
-    {    
-      for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() ); itP++)
-      {
-        if ( first )
-        {
-          (*itP)->print( true );       
-          first = false; 
-        }
-        (*itP)->print( false );       
-      }
-    }
-  }
-
-
-}; // END CLASS DEFINITION TComPicLists
-
-#endif 
 //! \}
 
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 367)
@@ -107,11 +107,4 @@
 , m_temporalLayerNonReferenceFlag ( false )
 , m_enableTMVPFlag                ( true )
-#if H_MV
-, m_layerId                       (0)
-, m_viewId                        (0)
-#if H_3D
-, m_isDepth                       (false)
-#endif
-#endif
 {
 #if L0034_COMBINED_LIST_CLEANUP
@@ -145,8 +138,4 @@
     m_aiRefPOCList  [0][iNumCount] = 0;
     m_aiRefPOCList  [1][iNumCount] = 0;
-#if H_MV
-    m_aiRefLayerIdList[0][iNumCount] = 0;
-    m_aiRefLayerIdList[1][iNumCount] = 0;
-#endif
   }
   resetWpScaling();
@@ -320,7 +309,4 @@
     {
       m_aiRefPOCList[iDir][iNumRefIdx] = m_apcRefPicList[iDir][iNumRefIdx]->getPOC();
-#if H_MV
-      m_aiRefLayerIdList[iDir][iNumRefIdx] = m_apcRefPicList[iDir][iNumRefIdx]->getLayerId();
-#endif
     }
   }
@@ -368,10 +354,5 @@
         for ( Int iRefIdxLC = 0; iRefIdxLC < m_aiNumRefIdx[REF_PIC_LIST_C]; iRefIdxLC++ )
         {
-#if H_MV
-          if ( m_apcRefPicList[REF_PIC_LIST_0][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() &&
-               m_apcRefPicList[REF_PIC_LIST_0][iNumRefIdx]->getLayerId() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getLayerId() )
-#else
           if ( m_apcRefPicList[REF_PIC_LIST_0][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() )
-#endif 
           {
             m_iRefIdxOfL1FromRefIdxOfL0[iNumRefIdx] = m_iRefIdxFromIdxOfLC[iRefIdxLC];
@@ -395,10 +376,5 @@
         for ( Int iRefIdxLC = 0; iRefIdxLC < m_aiNumRefIdx[REF_PIC_LIST_C]; iRefIdxLC++ )
         {
-#if H_MV
-          if ( m_apcRefPicList[REF_PIC_LIST_1][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() &&
-               m_apcRefPicList[REF_PIC_LIST_1][iNumRefIdx]->getLayerId() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getLayerId() )
-#else
           if ( m_apcRefPicList[REF_PIC_LIST_1][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() )
-#endif 
           {
             m_iRefIdxOfL0FromRefIdxOfL1[iNumRefIdx] = m_iRefIdxFromIdxOfLC[iRefIdxLC];
@@ -420,7 +396,4 @@
 #endif
 
-#if H_MV
-Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer , Bool checkNumPocTotalCurr)
-#else
 #if FIX1071
 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr )
@@ -428,5 +401,4 @@
 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic )
 #endif
-#endif
 {
 #if FIX1071
@@ -442,8 +414,6 @@
     }
     
-#if !H_MV
     m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);
     m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1);
-#endif
   }
 
@@ -455,8 +425,4 @@
   UInt NumPocStCurr1 = 0;
   UInt NumPocLtCurr = 0;
-#if H_MV
-  Int numDirectRefLayers  = getVPS()->getNumDirectRefLayers( getLayerIdInVps() );
-  assert( numDirectRefLayers == refPicSetInterLayer.size() ); 
-#endif
   Int i;
 
@@ -507,10 +473,5 @@
   TComPic*  rpsCurrList0[MAX_NUM_REF+1];
   TComPic*  rpsCurrList1[MAX_NUM_REF+1];
-#if H_MV
-  Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + numDirectRefLayers;
-  assert( numPocTotalCurr == getNumRpsCurrTempList() );
-#else
   Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;
-#endif
 #if FIX1071
   if (checkNumPocTotalCurr)
@@ -552,13 +513,4 @@
     rpsCurrList0[cIdx] = RefPicSetLtCurr[i];
   }
-#if H_MV
-  for ( i=0; i<numDirectRefLayers;  i++, cIdx++)
-  {
-    if( cIdx <= MAX_NUM_REF )
-    {
-      rpsCurrList0[cIdx] = refPicSetInterLayer[i];
-    }
-  }
-#endif
 
   if (m_eSliceType==B_SLICE)
@@ -577,13 +529,4 @@
       rpsCurrList1[cIdx] = RefPicSetLtCurr[i];
     }
-#if H_MV
-    for ( i=0; i<numDirectRefLayers;  i++, cIdx++)
-    {
-      if( cIdx <= MAX_NUM_REF )
-      {
-        rpsCurrList1[cIdx] = refPicSetInterLayer[i];
-      }
-    }
-#endif
   }
 
@@ -627,7 +570,4 @@
     }
   }
-#if H_MV
-  numRpsCurrTempList = numRpsCurrTempList + getVPS()->getNumDirectRefLayers( getLayerIdInVps() );
-#endif
   return numRpsCurrTempList;
 }
@@ -792,7 +732,4 @@
   m_iPOC                 = pSrc->m_iPOC;
   m_eNalUnitType         = pSrc->m_eNalUnitType;
-#if H_MV
-  m_layerId              = pSrc->m_layerId;
-#endif
   m_eSliceType           = pSrc->m_eSliceType;
   m_iSliceQp             = pSrc->m_iSliceQp;
@@ -847,7 +784,4 @@
       m_apcRefPicList[i][j]  = pSrc->m_apcRefPicList[i][j];
       m_aiRefPOCList[i][j]   = pSrc->m_aiRefPOCList[i][j];
-#if H_MV
-      m_aiRefLayerIdList[i][j] = pSrc->m_aiRefLayerIdList[i][j];
-#endif
     }
   }
@@ -865,7 +799,4 @@
 
   // access channel
-#if H_MV
-  m_pcVPS                = pSrc->m_pcVPS;
-#endif
   m_pcSPS                = pSrc->m_pcSPS;
   m_pcPPS                = pSrc->m_pcPPS;
@@ -1381,9 +1312,5 @@
 , m_bTemporalIdNestingFlag    (false)
 , m_numHrdParameters          (  0)
-#if H_MV
-, m_maxNuhLayerId             (  0)
-#else
 , m_maxNuhReservedZeroLayerId (  0)
-#endif
 , m_hrdParameters             (NULL)
 , m_hrdOpSetIdx               (NULL)
@@ -1400,51 +1327,4 @@
     m_uiMaxLatencyIncrease[i] = 0;
   }
-#if H_MV
-  m_avcBaseLayerFlag = false;
-  m_splittingFlag    = false;
-  
-  for( Int i = 0; i < MAX_NUM_SCALABILITY_TYPES; i++ )
-  {
-    m_scalabilityMask[i] = false;
-    m_dimensionIdLen [i]  = -1; 
-  }
-
-  m_vpsNuhLayerIdPresentFlag = false;
-  m_numOutputLayerSets       = 0;
-
-  for( Int i = 0; i < MAX_VPS_OP_SETS_PLUS1; i++ )
-  {
-    m_vpsProfilePresentFlag   [i] = false;
-    m_profileLayerSetRefMinus1[i] = 0;
-    m_outputLayerSetIdx       [i] = 0;
-    for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ )
-    {
-      m_outputLayerFlag[i][j] = false;
-    }
-  }
-
-  for( Int i = 0; i < MAX_NUM_LAYER_IDS; i++ )
-  {
-    m_layerIdInVps[i] =  (i == 0 ) ? 0 : -1;         
-  }
-
-  for( Int i = 0; i < MAX_NUM_LAYERS; i++ )
-  {
-    m_layerIdInNuh      [i] = ( i == 0 ) ? 0 : -1; 
-    m_numDirectRefLayers[i] = 0; 
-
-    for( Int j = 0; j < MAX_NUM_LAYERS; j++ )
-    {
-      m_directDependencyFlag[i][j] = false;
-      m_refLayerId[i][j]           = -1; 
-    }
-
-    for( Int j = 0; j < MAX_NUM_SCALABILITY_TYPES; j++ )
-    {
-      m_dimensionId[i][j] = 0;
-    }
-
-  }
-#endif
 }
 
@@ -1456,91 +1336,4 @@
 }
 
-#if H_MV
-
-Bool TComVPS::checkVPSExtensionSyntax()
-{
-  // check splitting flag constraint
-  if ( getSplittingFlag() )
-  {
-    // Derive dimBitOffset[j]
-    Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1];
-    Int numScalabilityTypes = getNumScalabilityTypes();
-    dimBitOffset[0] = 0;
-
-    for (Int type = 1; type <= numScalabilityTypes; type++ )
-    {
-      dimBitOffset[ type ] = 0;
-      for (Int dimIdx = 0; dimIdx <= type - 1; dimIdx++)
-        dimBitOffset[ type ] += ( getDimensionIdLen( dimIdx ) );
-    }
-
-    for (Int type = 0; type < getNumScalabilityTypes(); type++ )
-    {
-      for( Int layer = 1; layer < getMaxLayers(); layer++ )
-      {
-        assert( getDimensionId( layer, type ) == ( ( getLayerIdInNuh( layer ) & ( (1 << dimBitOffset[ type + 1 ] ) - 1) ) >> dimBitOffset[ type ] ) );
-      }; 
-  };
-  }
-
-  for( Int layer = 1; layer < getMaxLayers(); layer++ )
-  {
-    // check layer_id_in_nuh constraint
-    assert( getLayerIdInNuh( layer ) > getLayerIdInNuh( layer -1 ) );
-  }
-  return true; 
-}
-
-Int TComVPS::getNumScalabilityTypes()
-{
-  return scalTypeToScalIdx( ScalabilityType(MAX_NUM_SCALABILITY_TYPES) );
-}
-
-Int TComVPS::scalTypeToScalIdx( ScalabilityType scalType )
-{
-  assert( scalType >= 0 && scalType <= MAX_NUM_SCALABILITY_TYPES ); 
-  assert( scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMask( scalType ) );
-
-  Int scalIdx = 0; 
-  for( Int curScalType = 0; curScalType < scalType; curScalType++ )
-  {
-    scalIdx += ( getScalabilityMask( curScalType ) ? 1 : 0 );
-  }
-
-  return scalIdx; 
-}
-
-
-
-Void TComVPS::setScalabilityMask( UInt val )
-{
-  for ( Int scalType = 0; scalType < MAX_NUM_SCALABILITY_TYPES; scalType++ ) 
-    setScalabilityMask( scalType, ( val & (1 << scalType ) ) == 1 );
-}
-
-Void TComVPS::calcIvRefLayers()
-{
-  for( Int i = 1; i <= getMaxLayers(); i++ )
-  { 
-    m_numDirectRefLayers[ i ] = 0; 
-    for( Int j = 0 ; j < i; j++ )
-      if( m_directDependencyFlag[ i ][ j ])
-        m_refLayerId[ i ][ m_numDirectRefLayers[ i ]++ ] = m_layerIdInNuh[ j ];    
-  }
-}
-
-Int TComVPS::getRefLayerId( Int layerIdInVps, Int idx )
-{
-  assert( idx >= 0 && idx < m_numDirectRefLayers[layerIdInVps] );     
-  Int layerIdInNuh = m_refLayerId[ layerIdInVps ][ idx ];    
-  assert ( layerIdInNuh >= 0 ); 
-  return layerIdInNuh;
-}
-
-Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType )
-{
-  return ( ( layerIdInVps != 0 )&& getScalabilityMask( scalType ) ) ? getDimensionId( layerIdInVps, scalTypeToScalIdx( scalType ) ) : 0;
-}
-#endif
 // ------------------------------------------------------------------------------------------------
 // Sequence parameter set (SPS)
@@ -1589,7 +1382,4 @@
 , m_vuiParametersPresentFlag  (false)
 , m_vuiParameters             ()
-#if H_MV
-, m_interViewMvVertConstraintFlag (false)
-#endif
 {
   for ( Int i = 0; i < MAX_TLAYER; i++ )
@@ -2055,91 +1845,4 @@
 }
 
-#if H_MV
-Void TComSlice::createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer )
-{
-  refPicSetInterLayer.clear(); 
-
-  for( Int i = 0; i < getVPS()->getNumDirectRefLayers( getLayerIdInVps() ); i++ ) 
-  {
-    Int layerIdRef = getVPS()->getRefLayerId( getLayerIdInVps(), i ); 
-    TComPic* picRef = ivPicLists->getPic( layerIdRef, getPOC() ) ; 
-    assert ( picRef != 0 ); 
-
-    picRef->getPicYuvRec()->extendPicBorder(); 
-    picRef->setIsLongTerm( true );        
-    picRef->getSlice(0)->setReferenced( true );       
-
-    refPicSetInterLayer.push_back( picRef ); 
-  }
-}
-
-Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer )
-{
-  // Mark as shortterm 
-  for ( Int i = 0; i < refPicSetInterLayer.size(); i++ ) 
-  {
-    refPicSetInterLayer[i]->setIsLongTerm( false ); 
-  }
-}
-
-Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc )
-{
-  // Fill targetDecLayerIdSet with all layers if empty. 
-  if (targetDecLayerIdSet.size() == 0 )    
-  {
-    for ( Int layerIdInVps = 0; layerIdInVps < vps->getMaxLayers(); layerIdInVps++ )
-    {
-      targetDecLayerIdSet.push_back( vps->getLayerIdInNuh( layerIdInVps ) ); 
-    }
-  }     
-
-  Int numTargetDecLayers = (Int) targetDecLayerIdSet.size(); 
-  Int latestDecIdx; 
-  for ( latestDecIdx = 0; latestDecIdx < numTargetDecLayers; latestDecIdx++)
-  {
-    if ( targetDecLayerIdSet[ latestDecIdx ] == curLayerId )
-      break; 
-  }        
-
-  for( Int i = 0; i <= latestDecIdx; i++ ) 
-  {
-    if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ i ] ) )
-    {
-      TComPic* pcPic = ivPicLists->getPic( targetDecLayerIdSet[ i ], curPoc ); 
-      if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() ) 
-      { 
-        Bool remainingInterLayerReferencesFlag = false; 
-        for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )
-        { 
-          TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS(); 
-          if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) )
-          {
-            Int targetDecLayerIdinVPS = vpsSlice->getLayerIdInVps( targetDecLayerIdSet[ j ] ); 
-            for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdinVPS ); k++ )
-              if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdinVPS,  k  ) )
-                remainingInterLayerReferencesFlag = true;
-          }
-        }
-        if( !remainingInterLayerReferencesFlag )
-          pcPic->getSlice(0)->setReferenced( false );                   
-      }
-    }
-  }
-}
-
-Void TComSlice::xPrintRefPicList()
-{  
-  for ( Int li = 0; li < 2; li++)
-  {    
-    std::cout << std::endl << "RefPicListL" <<  li << ":" << std::endl; 
-    for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[li]-1); rIdx ++)
-    {      
-      if (rIdx == 0 && li == 0) m_apcRefPicList[li][rIdx]->print( true );
-        
-      m_apcRefPicList[li][rIdx]->print( false );
-    }
-  }
-}
-#endif
 /** get scaling matrix from RefMatrixID
  * \param sizeId size index
@@ -2364,7 +2067,4 @@
   {
     Int spsId = pps->getSPSId();
-#if H_MV
-    // active parameter sets per layer should be used here
-#else
     if (!isIRAP && (spsId != m_activeSPSId))
     {
@@ -2372,5 +2072,4 @@
       return false;
     }
-#endif
     TComSPS *sps = m_spsMap.getPS(spsId);
     if (sps)
@@ -2427,15 +2126,4 @@
 }
 
-#if H_MV
-Void TComPTL::copyLevelFrom( TComPTL* source )
-{
-  getGeneralPTL()->setLevelIdc( source->getGeneralPTL()->getLevelIdc() );
-  for( Int subLayer = 0; subLayer < 6; subLayer++ )
-  {
-    setSubLayerLevelPresentFlag( subLayer, source->getSubLayerLevelPresentFlag( subLayer ) );
-    getSubLayerPTL( subLayer )->setLevelIdc( source->getSubLayerPTL( subLayer )->getLevelIdc() );
-  }
-}
-#endif
 #if SIGNAL_BITRATE_PICRATE_IN_VPS
 TComBitRatePicRateInfo::TComBitRatePicRateInfo()
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 367)
@@ -51,7 +51,4 @@
 class TComPic;
 class TComTrQuant;
-#if H_MV
-class TComPicLists; 
-#endif
 // ====================================================================================================================
 // Constants
@@ -248,7 +245,4 @@
   ProfileTierLevel* getGeneralPTL()  { return &m_generalPTL; }
   ProfileTierLevel* getSubLayerPTL(Int i)  { return &m_subLayerPTL[i]; }
-#if H_MV
-  Void copyLevelFrom( TComPTL* source );
-#endif
 };
 /// VPS class
@@ -486,24 +480,12 @@
 
   UInt        m_numHrdParameters;
-#if H_MV
-  UInt        m_maxNuhLayerId;
-#else
   UInt        m_maxNuhReservedZeroLayerId;
-#endif
   TComHRD*    m_hrdParameters;
   UInt*       m_hrdOpSetIdx;
   Bool*       m_cprmsPresentFlag;
   UInt        m_numOpSets;
-#if H_MV
-  Bool        m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1];
-#else
   Bool        m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1];
-#endif
-
-#if H_MV
-  TComPTL     m_pcPTL[MAX_VPS_OP_SETS_PLUS1];
-#else
+
   TComPTL     m_pcPTL;
-#endif
 #if SIGNAL_BITRATE_PICRATE_IN_VPS
   TComBitRatePicRateInfo    m_bitRatePicRateInfo;
@@ -513,26 +495,4 @@
 #endif
 
-#if H_MV
-  Bool        m_avcBaseLayerFlag;
-  Bool        m_splittingFlag;
-  Bool        m_scalabilityMask          [MAX_NUM_SCALABILITY_TYPES];
-  Int         m_dimensionIdLen           [MAX_NUM_SCALABILITY_TYPES];
-  Bool        m_vpsNuhLayerIdPresentFlag;
-  Int         m_layerIdInNuh             [MAX_NUM_LAYER_IDS];
-  Int         m_layerIdInVps             [MAX_NUM_LAYERS   ];
-  Int         m_dimensionId              [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES];  
-
-  
-  Bool        m_vpsProfilePresentFlag    [MAX_VPS_OP_SETS_PLUS1];
-  Int         m_profileLayerSetRefMinus1 [MAX_VPS_OP_SETS_PLUS1];
-  Int         m_numOutputLayerSets;
-  Int         m_outputLayerSetIdx        [MAX_VPS_OP_SETS_PLUS1];
-  Bool        m_outputLayerFlag          [MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1];
-  Bool        m_directDependencyFlag     [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS];
-
-  Int         m_numDirectRefLayers       [ MAX_NUM_LAYERS ];
-  Int         m_refLayerId               [ MAX_NUM_LAYERS ][MAX_NUM_LAYERS];  
-
-#endif
 public:
   TComVPS();
@@ -576,11 +536,6 @@
   Void    setNumHrdParameters(UInt v)                           { m_numHrdParameters = v;    }
 
-#if H_MV
-  UInt    getMaxNuhLayerId()                                    { return m_maxNuhLayerId; }
-  Void    setMaxNuhLayerId(UInt v)                              { m_maxNuhLayerId = v;    }
-#else
   UInt    getMaxNuhReservedZeroLayerId()                        { return m_maxNuhReservedZeroLayerId; }
   Void    setMaxNuhReservedZeroLayerId(UInt v)                  { m_maxNuhReservedZeroLayerId = v;    }
-#endif
 
   UInt    getMaxOpSets()                                        { return m_numOpSets; }
@@ -589,9 +544,5 @@
   Void    setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id)  { m_layerIdIncludedFlag[opsIdx][id] = v;    }
 
-#if H_MV
-  TComPTL* getPTL( Int layerSet = 0 ) { return &m_pcPTL[layerSet]; }
-#else
   TComPTL* getPTL() { return &m_pcPTL; }
-#endif
 #if SIGNAL_BITRATE_PICRATE_IN_VPS
   TComBitRatePicRateInfo *getBitratePicrateInfo() { return &m_bitRatePicRateInfo; }
@@ -599,69 +550,4 @@
 #if L0043_TIMING_INFO
   TimingInfo* getTimingInfo() { return &m_timingInfo; }
-#endif
-#if H_MV
-  Void    setAvcBaseLayerFlag( Bool val )                                  { m_avcBaseLayerFlag = val;  }
-  Bool    getAvcBaseLayerFlag()                                            { return m_avcBaseLayerFlag; } 
-
-  Void    setSplittingFlag( Bool val )                                     { m_splittingFlag = val;  }
-  Bool    getSplittingFlag()                                               { return m_splittingFlag; }
-
-  Void    setScalabilityMask( UInt val );
-
-  Void    setScalabilityMask( Int scalType, Bool val )              { m_scalabilityMask[scalType] = val;  }
-  Bool    getScalabilityMask( Int scalType )                        { return m_scalabilityMask[scalType]; }
-
-  Int     getNumScalabilityTypes( );
-
-  Void    setDimensionIdLen( Int sIdx, Int val )                           { m_dimensionIdLen[sIdx] = val;  }
-  Int     getDimensionIdLen( Int sIdx )                                    { assert( m_dimensionIdLen[sIdx] > 0) ; return m_dimensionIdLen[sIdx]; }  
-
-  Void    setVpsNuhLayerIdPresentFlag( Bool val )                          { m_vpsNuhLayerIdPresentFlag = val; }
-  Bool    getVpsNuhLayerIdPresentFlag()                                    { return m_vpsNuhLayerIdPresentFlag; }
-
-  Void    setLayerIdInNuh( Int layerIdInVps, Int val )                     { m_layerIdInNuh[layerIdInVps] = val;  }
-  Int     getLayerIdInNuh( Int layerIdInVps )                              { assert( m_layerIdInNuh[layerIdInVps] >= 0 ); return m_layerIdInNuh[layerIdInVps]; }
-
-  Void    setLayerIdInVps( Int layerIdInNuh, Int val )                     { m_layerIdInVps[layerIdInNuh] = val;  }
-  Int     getLayerIdInVps( Int layerIdInNuh )                              { assert( m_layerIdInVps[layerIdInNuh] >= 0 ); return m_layerIdInVps[layerIdInNuh]; }
-
-  Bool    nuhLayerIdIncluded( Int layerIdinNuh )                           { return ( m_layerIdInVps[ layerIdinNuh ] > 0 );  }
-
-  Void    setDimensionId( Int layerIdInVps, Int scalIdx, Int val )         { m_dimensionId[layerIdInVps][scalIdx] = val;  }
-  Int     getDimensionId( Int layerIdInVps, Int scalIdx )                  { return m_dimensionId[layerIdInVps][scalIdx]; }
-
-  Int     getScalabilityId ( Int layerIdInVps, ScalabilityType scalType );
-
-  Int     getViewId  ( Int layerIdInVps )                                  { return getScalabilityId( layerIdInVps, VIEW_ID  ); }
-#if H_3D  
-  Int     getDepthId ( Int layerIdInVps )                                  { return getScalabilityId( layerIdInVps, DEPTH_ID ); }
-#endif
-
-
-  Void    setVpsProfilePresentFlag( Int layerSet, Bool val )               { m_vpsProfilePresentFlag[layerSet] = val;  }
-  Bool    getVpsProfilePresentFlag( Int layerSet )                         { return m_vpsProfilePresentFlag[layerSet]; }
-
-  Void    setProfileLayerSetRefMinus1( Int layerSet, Int val )             { m_profileLayerSetRefMinus1[layerSet] = val;  }
-  Bool    getProfileLayerSetRefMinus1( Int layerSet )                      { return m_profileLayerSetRefMinus1[layerSet]; }
-
-  Void    setNumOutputLayerSets( Int val )                                 { m_numOutputLayerSets = val;  }
-  Int     getNumOutputLayerSets()                                          { return m_numOutputLayerSets; }
-
-  Void    setOutputLayerSetIdx( Int layerSet, Int val )                    { m_outputLayerSetIdx[layerSet] = val;  }
-  Int     getOutputLayerSetIdx( Int layerSet )                             { return m_outputLayerSetIdx[layerSet]; }
-
-  Void    setOutputLayerFlag( Int layerSet, Int layer, Bool val )          { m_outputLayerFlag[layerSet][layer] = val;  }
-  Bool    getOutputLayerFlag( Int layerSet, Int layer )                    { return m_outputLayerFlag[layerSet][layer]; }
-
-  Void    setDirectDependencyFlag( Int layerHigh, Int layerLow, Bool val ) { m_directDependencyFlag[layerHigh][layerLow] = val;  }
-  Bool    getDirectDependencyFlag( Int layerHigh, Int layerLow )           { return m_directDependencyFlag[layerHigh][layerLow]; }
-
-  Void    calcIvRefLayers(); 
-
-  Int     getNumDirectRefLayers( Int layerIdInVps )          { return m_numDirectRefLayers[ layerIdInVps ];  };                               
-  Int     getRefLayerId        ( Int layerIdInVps, Int idx );; 
-  
-  Bool    checkVPSExtensionSyntax(); 
-  Int     scalTypeToScalIdx   ( ScalabilityType scalType );
 #endif
 };
@@ -967,7 +853,4 @@
   static const Int   m_winUnitY[MAX_CHROMA_FORMAT_IDC+1];
   TComPTL     m_pcPTL;
-#if H_MV
-  Bool        m_interViewMvVertConstraintFlag;
-#endif
 public:
   TComSPS();
@@ -1100,8 +983,4 @@
 
   TComPTL* getPTL()     { return &m_pcPTL; }
-#if H_MV
-  Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; }
-  Bool getInterViewMvVertConstraintFlag()         { return m_interViewMvVertConstraintFlag;}
-#endif
 };
 
@@ -1130,9 +1009,4 @@
   Void       setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; }
   UInt       getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; }
-#if H_MV
-  // Why not an listIdx for all members, would avoid code duplication?? 
-  Void       setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; };
-  Void       setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0  ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1 ) = flag;  };  
-#endif
 };
 
@@ -1389,7 +1263,4 @@
   TComPic*    m_apcRefPicList [2][MAX_NUM_REF+1];
   Int         m_aiRefPOCList  [2][MAX_NUM_REF+1];
-#if H_MV
-  Int         m_aiRefLayerIdList[2][MAX_NUM_REF+1];
-#endif
   Bool        m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1];
   Int         m_iDepth;
@@ -1457,11 +1328,4 @@
 
   Bool       m_enableTMVPFlag;
-#if H_MV
-  Int        m_layerId; 
-  Int        m_viewId;
-#if H_3D
-  Bool       m_isDepth;
-#endif
-#endif
 public:
   TComSlice();
@@ -1570,16 +1434,8 @@
   Void      setDepth            ( Int iDepth )                  { m_iDepth            = iDepth; }
   
-#if H_MV
-  Int       getRefLayerId        ( RefPicList e, Int iRefIdx)    { return  m_aiRefLayerIdList[e][iRefIdx]; }
-  Void      setRefLayerId        ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefLayerIdList[e][iRefIdx] = i; }
-#endif
-#if H_MV
-  Void      setRefPicList       ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& interLayerRefPicSet , Bool checkNumPocTotalCurr = false );
-#else
 #if FIX1071
   Void      setRefPicList       ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false );
 #else
   Void      setRefPicList       ( TComList<TComPic*>& rcListPic );
-#endif
 #endif
   Void      setRefPOCList       ();
@@ -1629,12 +1485,4 @@
   Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); 
   Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList);
-#if H_MV
-  Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer );
-  static Void markIvRefPicsAsShortTerm    ( std::vector<TComPic*> refPicSetInterLayer );
-  static Void markIvRefPicsAsUnused       ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc  );
-
-
-  Void xPrintRefPicList();
-#endif
   Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic );
   Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic );
@@ -1712,22 +1560,8 @@
   Bool      getEnableTMVPFlag     ()              { return m_enableTMVPFlag;}
 
-#if H_MV
-  Void      setLayerId            ( Int layerId )    { m_layerId      = layerId; }
-  Int       getLayerId            ()                 { return m_layerId;    }
-  Int       getLayerIdInVps       ()                 { return getVPS()->getLayerIdInVps( 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:
   TComPic*  xGetRefPic  (TComList<TComPic*>& rcListPic,
                          Int                 poc);
 TComPic*  xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb);
-#if H_MV
-  TComPic*  xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId );
-#endif
 };// END CLASS DEFINITION TComSlice
 
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 367)
@@ -45,7 +45,4 @@
 
 
-#if H_MV
-#define H_3D                        0
-#endif
 
 ///// ***** HM 10.1 *********
@@ -91,11 +88,5 @@
 #define MAX_VPS_NUM_HRD_PARAMETERS                1
 #define MAX_VPS_OP_SETS_PLUS1                     1024
-#if H_MV
-#define MAX_VPS_NUH_LAYER_ID_PLUS1  64
-#define MAX_NUM_SCALABILITY_TYPES   16
-#define ENC_CFG_CONSOUT_SPACE       29           
-#else
 #define MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1  1
-#endif
 
 #define RATE_CONTROL_LAMBDA_DOMAIN                  1  ///< JCTVC-K0103, rate control by R-lambda model
@@ -104,7 +95,4 @@
 #define MAX_CPB_CNT                     32  ///< Upper bound of (cpb_cnt_minus1 + 1)
 #define MAX_NUM_LAYER_IDS               64
-#if H_MV
-#define MAX_NUM_LAYERS                  64
-#endif
 
 #define COEF_REMAIN_BIN_REDUCTION        3 ///< indicates the level at which the VLC 
@@ -521,11 +509,4 @@
     MAIN10 = 2,
     MAINSTILLPICTURE = 3,
-#if H_MV
-    MAINSTEREO = 4,
-    MAINMULTIVIEW = 5,
-#if H_3D
-    MAIN3D = 6, 
-#endif
-#endif
   };
 }
@@ -559,13 +540,3 @@
 //! \}
 
-#if H_MV
-/// scalability types
-  enum ScalabilityType
-  {
-    VIEW_ID  = 0,
-#if H_3D
-    DEPTH_ID = 1,
-#endif    
-  };
-#endif
-#endif
+#endif
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();
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/NALwrite.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/NALwrite.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/NALwrite.cpp	(revision 367)
@@ -53,9 +53,5 @@
   bsNALUHeader.write(0,1);                    // forbidden_zero_bit
   bsNALUHeader.write(nalu.m_nalUnitType, 6);  // nal_unit_type
-#if H_MV
-  bsNALUHeader.write(nalu.m_layerId, 6);      // layerId       
-#else
   bsNALUHeader.write(nalu.m_reservedZero6Bits, 6);                   // nuh_reserved_zero_6bits
-#endif
   bsNALUHeader.write(nalu.m_temporalId+1, 3); // nuh_temporal_id_plus1
 
@@ -146,9 +142,5 @@
 {
   naluDest.m_nalUnitType = naluSrc.m_nalUnitType;
-#if H_MV
-  naluDest.m_layerId  = naluSrc.m_layerId;
-#else
   naluDest.m_reservedZero6Bits  = naluSrc.m_reservedZero6Bits;
-#endif
   naluDest.m_temporalId  = naluSrc.m_temporalId;
   naluDest.m_Bitstream   = naluSrc.m_Bitstream;
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/NALwrite.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/NALwrite.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/NALwrite.h	(revision 367)
@@ -57,14 +57,6 @@
     NalUnitType nalUnitType,
     UInt temporalID = 0,
-#if H_MV
-    Int layerId = 0)
-#else
     UInt reserved_zero_6bits = 0)
-#endif
-#if H_MV
-  : NALUnit(nalUnitType, temporalID, layerId)
-#else
   : NALUnit(nalUnitType, temporalID, reserved_zero_6bits)
-#endif
   , m_Bitstream()
   {}
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncAnalyze.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncAnalyze.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncAnalyze.cpp	(revision 367)
@@ -36,7 +36,5 @@
 */
 
-#if !H_MV
 #include "TEncAnalyze.h"
-#endif
 
 //! \ingroup TLibEncoder
@@ -47,10 +45,8 @@
 //////////////////////////////////////////////////////////////////////
 
-#if !H_MV
 TEncAnalyze             m_gcAnalyzeAll;
 TEncAnalyze             m_gcAnalyzeI;
 TEncAnalyze             m_gcAnalyzeP;
 TEncAnalyze             m_gcAnalyzeB;
-#endif
 
 //! \}
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncAnalyze.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncAnalyze.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncAnalyze.h	(revision 367)
@@ -150,10 +150,8 @@
 };
 
-#if !H_MV
 extern TEncAnalyze             m_gcAnalyzeAll;
 extern TEncAnalyze             m_gcAnalyzeI;
 extern TEncAnalyze             m_gcAnalyzeP;
 extern TEncAnalyze             m_gcAnalyzeB;
-#endif
 
 //! \}
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 367)
@@ -549,11 +549,5 @@
   }
 
-#if H_MV
-  WRITE_FLAG( 1, "sps_extension_flag" );
-
-  WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" );
-#else
   WRITE_FLAG( 0, "sps_extension_flag" );
-#endif
 }
 
@@ -562,17 +556,9 @@
   WRITE_CODE( pcVPS->getVPSId(),                    4,        "vps_video_parameter_set_id" );
   WRITE_CODE( 3,                                    2,        "vps_reserved_three_2bits" );
-#if H_MV
-  WRITE_CODE( pcVPS->getMaxLayers() - 1,            6,        "vps_max_layers_minus1" );
-#else
   WRITE_CODE( 0,                                    6,        "vps_reserved_zero_6bits" );
-#endif
   WRITE_CODE( pcVPS->getMaxTLayers() - 1,           3,        "vps_max_sub_layers_minus1" );
   WRITE_FLAG( pcVPS->getTemporalNestingFlag(),                "vps_temporal_id_nesting_flag" );
   assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
-#if H_MV
-  WRITE_CODE( 0xffff,                              16,        "vps_extension_offset" );
-#else
   WRITE_CODE( 0xffff,                              16,        "vps_reserved_ffff_16bits" );
-#endif
   codePTL( pcVPS->getPTL(), true, pcVPS->getMaxTLayers() - 1 );
 #if SIGNAL_BITRATE_PICRATE_IN_VPS
@@ -597,11 +583,6 @@
 
   assert( pcVPS->getNumHrdParameters() <= MAX_VPS_NUM_HRD_PARAMETERS );
-#if H_MV
-  assert( pcVPS->getMaxNuhLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
-  WRITE_CODE( pcVPS->getMaxNuhLayerId(), 6,                 "vps_max_nuh_layer_id" );
-#else
   assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
   WRITE_CODE( pcVPS->getMaxNuhReservedZeroLayerId(), 6,     "vps_max_nuh_reserved_zero_layer_id" );
-#endif
   pcVPS->setMaxOpSets(1);
   WRITE_UVLC( pcVPS->getMaxOpSets() - 1,                    "vps_max_op_sets_minus1" );
@@ -609,9 +590,5 @@
   {
     // Operation point set
-#if H_MV
-    for( UInt i = 0; i <= pcVPS->getMaxNuhLayerId(); i ++ )
-#else
     for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ )
-#endif
     {
       // Only applicable for version 1
@@ -654,69 +631,5 @@
   }
 #endif
-#if H_MV
-  WRITE_FLAG( 1,                                             "vps_extension_flag" );
-
-  m_pcBitIf->writeAlignOne();                        
-
-  WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0,          "avc_base_layer_flag" );
-  WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0,             "splitting_flag" );
-  
-  for( Int type = 0; type < MAX_NUM_SCALABILITY_TYPES; type++ )
-  {
-    WRITE_FLAG( pcVPS->getScalabilityMask( type ) ? 1 : 0,   "scalability_mask[i]" );
-  }
-
-  for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ); sIdx++ )
-  {
-    WRITE_CODE( pcVPS->getDimensionIdLen( sIdx ) - 1 , 3,    "dimension_id_len_minus1[j]");    
-  }
-
-  WRITE_FLAG( pcVPS->getVpsNuhLayerIdPresentFlag() ? 1 : 0,  "vps_nuh_layer_id_present_flag");
-
-  for( Int layer = 1; layer <= pcVPS->getMaxLayers() - 1; layer++ )
-  {
-    if (pcVPS->getVpsNuhLayerIdPresentFlag() )
-      WRITE_CODE( pcVPS->getLayerIdInNuh( layer ), 6,          "layer_id_in_nuh[i]");
-    for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes() ; sIdx++ )
-    {      
-      WRITE_CODE( pcVPS->getDimensionId( layer, sIdx ), pcVPS->getDimensionIdLen( sIdx ), "dimension_id[i][j]");      
-    }
-  }
-
-  for( Int layerSet = 1; layerSet <= pcVPS->getMaxOpSets() - 1; layerSet++ )
-  {
-    WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( layerSet ) ? 1 : 0, "vps_profile_present_flag[lsIdx]" );
-    if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
-    {
-      WRITE_UVLC( pcVPS->getProfileLayerSetRefMinus1( layerSet ), "profile_layer_set_ref_minus1[lsIdx]" );
-    }
-    codePTL( pcVPS->getPTL( layerSet ), pcVPS->getVpsProfilePresentFlag( layerSet ), pcVPS->getMaxTLayers() - 1 );
-  }
-
-  WRITE_UVLC( pcVPS->getNumOutputLayerSets(),                "num_output_layer_sets" );
-
-  for( Int layerSet = 0; layerSet < pcVPS->getNumOutputLayerSets(); layerSet++ )
-  {
-    WRITE_UVLC( pcVPS->getOutputLayerSetIdx( layerSet ),      "output_layer_set_idx[i]" );
-    for( Int layer = 0; layer <= pcVPS->getMaxNuhLayerId(); layer++ )
-    {
-      if( pcVPS->getLayerIdIncludedFlag( pcVPS->getOutputLayerSetIdx( layerSet ), layer ) == true )
-      {
-        WRITE_FLAG( pcVPS->getOutputLayerFlag( layerSet, layer ) ? 1 : 0, "output_layer_flag" );
-      }
-    }
-  }
-
-  for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )
-  {
-    for( Int j = 0; j < i; j++ )
-    {
-      WRITE_FLAG( pcVPS->getDirectDependencyFlag( i, j ),    "direct_dependency_flag[i][j]" );
-    }
-  }
-  WRITE_FLAG( 0,                                             "vps_extension2_flag" );
-#else
   WRITE_FLAG( 0,                     "vps_extension_flag" );
-#endif
   
   //future extensions here..
@@ -1091,12 +1004,8 @@
   for (Int i = 0; i < maxNumSubLayersMinus1; i++)
   {
-#if !H_MV
     if(profilePresentFlag)
     {
-#endif
       WRITE_FLAG( pcPTL->getSubLayerProfilePresentFlag(i), "sub_layer_profile_present_flag[i]" );
-#if !H_MV
-    }
-#endif
+    }
     
     WRITE_FLAG( pcPTL->getSubLayerLevelPresentFlag(i),   "sub_layer_level_present_flag[i]" );
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCfg.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCfg.h	(revision 367)
@@ -69,9 +69,4 @@
   Int m_numRefIdc;
   Int m_refIdc[MAX_NUM_REF_PICS+1];
-#if H_MV
-  Int m_numInterViewRefPics;
-  Int m_interViewRefs    [MAX_NUM_REF_PICS];
-  Int m_interViewRefPosL[2][MAX_NUM_REF_PICS];  
-#endif
   GOPEntry()
   : m_POC(-1)
@@ -88,15 +83,8 @@
   , m_deltaRPS(0)
   , m_numRefIdc(0)
-#if H_MV
-  , m_numInterViewRefPics(0)
-#endif
   {
     ::memset( m_referencePics, 0, sizeof(m_referencePics) );
     ::memset( m_usedByCurrPic, 0, sizeof(m_usedByCurrPic) );
     ::memset( m_refIdc,        0, sizeof(m_refIdc) );
-#if H_MV
-    ::memset( m_interViewRefs,   0, sizeof(m_interViewRefs) );
-    ::memset( m_interViewRefPosL[0], -1, sizeof(m_interViewRefPosL[0]) );    ::memset( m_interViewRefPosL[1], -1, sizeof(m_interViewRefPosL[1]) );
-#endif
   }
 };
@@ -139,9 +127,5 @@
   UInt      m_uiDecodingRefreshType;            ///< the type of decoding refresh employed for the random access.
   Int       m_iGOPSize;
-#if H_MV
-  GOPEntry  m_GOPList[MAX_GOP+1];
-#else
   GOPEntry  m_GOPList[MAX_GOP];
-#endif
   Int       m_extraRPSs;
   Int       m_maxDecPicBuffering[MAX_TLAYER];
@@ -353,24 +337,8 @@
   Bool      m_useStrongIntraSmoothing;                        ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat.
 
-#if H_MV
-  Int       m_layerId;
-  Int       m_layerIdInVps;
-  Int       m_viewId;
-#if H_3D
-  Bool      m_isDepth;
-#endif
-#endif
 public:
   TEncCfg()
   : m_puiColumnWidth()
   , m_puiRowHeight()
-#if H_MV
-  , m_layerId(-1)
-  , m_layerIdInVps(-1)
-  , m_viewId(-1)
-#if H_3D
-  , m_isDepth(false)
-#endif
-#endif
   {}
 
@@ -394,25 +362,9 @@
   Void      setFramesToBeEncoded            ( Int   i )      { m_framesToBeEncoded = i; }
   
-#if H_MV
-  Void      setLayerId                       ( Int layerId )      { m_layerId = layerId; }
-  Int       getLayerId                       ()                   { return m_layerId;    }
-  Int       getLayerIdInVps                  ()                   { return m_layerIdInVps; }
-  Void      setLayerIdInVps                  ( Int layerIdInVps)  { m_layerIdInVps = layerIdInVps; }
-  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
   //====== Coding Structure ========
   Void      setIntraPeriod                  ( Int   i )      { m_uiIntraPeriod = (UInt)i; }
   Void      setDecodingRefreshType          ( Int   i )      { m_uiDecodingRefreshType = (UInt)i; }
   Void      setGOPSize                      ( Int   i )      { m_iGOPSize = i; }
-#if H_MV
-  Void      setGopList                      ( GOPEntry*  GOPList ) {  for ( Int i = 0; i < MAX_GOP+1; i++ ) m_GOPList[i] = GOPList[i]; }
-#else
   Void      setGopList                      ( GOPEntry*  GOPList ) {  for ( Int i = 0; i < MAX_GOP; i++ ) m_GOPList[i] = GOPList[i]; }
-#endif
   Void      setExtraRPSs                    ( Int   i )      { m_extraRPSs = i; }
   GOPEntry  getGOPEntry                     ( Int   i )      { return m_GOPList[i]; }
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 367)
@@ -100,12 +100,4 @@
 #endif
 #endif
-#if H_MV
-  m_layerId      = 0;
-  m_viewId       = 0;
-  m_pocLastCoded = -1; 
-#if H_3D
-  m_isDepth = false;
-#endif
-#endif
   return;
 }
@@ -147,12 +139,4 @@
   m_totalCoded         = 0;
 
-#if H_MV
-  m_ivPicLists           = pcTEncTop->getIvPicLists(); 
-  m_layerId              = pcTEncTop->getLayerId();
-  m_viewId               = pcTEncTop->getViewId();
-#if H_3D
-  m_isDepth              = pcTEncTop->getIsDepth();
-#endif
-#endif
 }
 
@@ -358,16 +342,5 @@
 // Public member functions
 // ====================================================================================================================
-#if H_MV
-Void TEncGOP::initGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP)
-{
-  xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut );
-  m_iNumPicCoded = 0;
-}
-#endif
-#if H_MV
-Void TEncGOP::compressPicInGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP, Int iGOPid)
-#else
 Void TEncGOP::compressGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP)
-#endif
 {
   TComPic*        pcPic;
@@ -381,9 +354,7 @@
   TComOutputBitstream* pcSubstreamsOut = NULL;
 
-#if !H_MV
   xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut );
   
   m_iNumPicCoded = 0;
-#endif
   SEIPictureTiming pictureTimingSEI;
 #if L0208_SOP_DESCRIPTION_SEI
@@ -408,7 +379,5 @@
   UInt *accumNalsDU = NULL;
   SEIDecodingUnitInfo decodingUnitInfoSEI;
-#if !H_MV
   for ( Int iGOPid=0; iGOPid < m_iGopSize; iGOPid++ )
-#endif
   {
     UInt uiColDir = 1;
@@ -469,10 +438,5 @@
     if(pocCurr>=m_pcCfg->getFramesToBeEncoded())
     {
-#if H_MV
-      delete pcBitstreamRedirect;
-      return;
-#else
       continue;
-#endif
     }
 
@@ -495,15 +459,4 @@
     pcSlice->setLastIDR(m_iLastIDR);
     pcSlice->setSliceIdx(0);
-#if H_MV
-    pcPic  ->setLayerId     ( getLayerId() );
-    pcPic  ->setViewId      ( getViewId()  );
-    pcSlice->setLayerId     ( getLayerId() );
-    pcSlice->setViewId      ( getViewId()  );
-    pcSlice->setVPS         ( m_pcEncTop->getVPS() );
-#if H_3D
-    pcPic  ->setIsDepth( getIsDepth() );
-    pcSlice->setIsDepth( getIsDepth() );
-#endif
-#endif
     //set default slice level flag to the same as SPS level flag
     pcSlice->setLFCrossSliceBoundaryFlag(  pcSlice->getPPS()->getLoopFilterAcrossSlicesEnabledFlag()  );
@@ -543,22 +496,10 @@
     }
 
-#if H_MV
+    if(pcSlice->getSliceType()==B_SLICE&&m_pcCfg->getGOPEntry(iGOPid).m_sliceType=='P')
+    {
+      pcSlice->setSliceType(P_SLICE);
+    }
     // Set the nal unit type
     pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR));
-    if( pcSlice->getSliceType() == B_SLICE )
-    {
-      if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) 
-      { 
-        pcSlice->setSliceType( P_SLICE );
-      }
-    }
-#else
-    if(pcSlice->getSliceType()==B_SLICE&&m_pcCfg->getGOPEntry(iGOPid).m_sliceType=='P')
-    {
-      pcSlice->setSliceType(P_SLICE);
-    }
-    // Set the nal unit type
-    pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR));
-#endif
     if(pcSlice->getTemporalLayerNonReferenceFlag())
     {
@@ -648,13 +589,6 @@
     refPicListModification->setRefPicListModificationFlagL0(0);
     refPicListModification->setRefPicListModificationFlagL1(0);
-#if H_MV
-    pcSlice->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer ); 
-    pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
-    pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
-    xSetRefPicListModificationsMvc( pcSlice, pocCurr, iGOPid );    
-#else
     pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures()));
     pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures()));
-#endif
 
 #if ADAPTIVE_QP_SELECTION
@@ -663,25 +597,11 @@
 
     //  Set reference list
-#if H_MV    
-    pcSlice->setRefPicList( rcListPic, m_refPicSetInterLayer );
-#else
     pcSlice->setRefPicList ( rcListPic );
-#endif
 
     //  Slice info. refinement
-#if H_MV
-    if ( pcSlice->getSliceType() == B_SLICE )
-    {
-      if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() == true && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) 
-      { 
-        pcSlice->setSliceType( P_SLICE ); 
-      }
-    }
-#else
     if ( (pcSlice->getSliceType() == B_SLICE) && (pcSlice->getNumRefIdx(REF_PIC_LIST_1) == 0) )
     {
       pcSlice->setSliceType ( P_SLICE );
     }
-#endif
 #if !L0034_COMBINED_LIST_CLEANUP
     if (pcSlice->getSliceType() != B_SLICE || !pcSlice->getSPS()->getUseLComb())
@@ -1100,8 +1020,4 @@
     {
       OutputNALUnit nalu(NAL_UNIT_VPS);
-#if H_MV
-      if( getLayerId() == 0 )
-      {
-#endif
       m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
       m_pcEntropyCoder->encodeVPS(m_pcEncTop->getVPS());
@@ -1112,10 +1028,5 @@
 #endif
 
-#if H_MV
-      }
-      nalu = NALUnit(NAL_UNIT_SPS, 0, getLayerId());
-#else
       nalu = NALUnit(NAL_UNIT_SPS);
-#endif
       m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
       if (m_bSeqFirst)
@@ -1150,9 +1061,5 @@
 #endif
 
-#if H_MV
-      nalu = NALUnit(NAL_UNIT_PPS, 0, getLayerId());
-#else
       nalu = NALUnit(NAL_UNIT_PPS);
-#endif
       m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
       m_pcEntropyCoder->encodePPS(pcSlice->getPPS());
@@ -1476,9 +1383,5 @@
           m_pcEntropyCoder->resetEntropy      ();
           /* start slice NALunit */
-#if H_MV
-          OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->getTLayer(), getLayerId() );
-#else
           OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->getTLayer() );
-#endif
           Bool sliceSegment = (!pcSlice->isNextSlice());
           if (!sliceSegment)
@@ -1707,10 +1610,5 @@
       }
 
-#if !H_3D
       pcPic->compressMotion(); 
-#endif
-#if H_MV
-      m_pocLastCoded = pcPic->getPOC();
-#endif
       //-- For time output for each slice
       Double dEncTime = (Double)(clock()-iBeforeTime) / CLOCKS_PER_SEC;
@@ -2023,9 +1921,4 @@
 
       pcPic->setReconMark   ( true );
-#if H_MV
-      TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer );  
-      std::vector<Int> temp; 
-      TComSlice::markIvRefPicsAsUnused   ( m_ivPicLists, temp, pcPic->getSlice(0)->getVPS(), m_layerId, pcPic->getPOC() ); 
-#endif
       m_bFirst = false;
       m_iNumPicCoded++;
@@ -2048,10 +1941,7 @@
   if( accumNalsDU != NULL) delete accumNalsDU;
 
-#if !H_MV
   assert ( m_iNumPicCoded == iNumPicRcvd );
-#endif
 }
 
-#if !H_MV
 Void TEncGOP::printOutSummary(UInt uiNumAllPicCoded)
 {
@@ -2089,5 +1979,4 @@
   printf("\nRVM: %.3lf\n" , xCalculateRVM());
 }
-#endif
 
 Void TEncGOP::preLoopFilterPicAll( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits )
@@ -2365,33 +2254,17 @@
 
   //===== add PSNR =====
-#if H_MV
-  m_pcEncTop->getAnalyzeAll()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
-#else
   m_gcAnalyzeAll.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
-#endif
   TComSlice*  pcSlice = pcPic->getSlice(0);
   if (pcSlice->isIntra())
   {
-#if H_MV
-    m_pcEncTop->getAnalyzeI()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
-#else
     m_gcAnalyzeI.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
-#endif
   }
   if (pcSlice->isInterP())
   {
-#if H_MV
-    m_pcEncTop->getAnalyzeP()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
-#else
     m_gcAnalyzeP.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
-#endif
   }
   if (pcSlice->isInterB())
   {
-#if H_MV
-    m_pcEncTop->getAnalyzeB()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
-#else
     m_gcAnalyzeB.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
-#endif
   }
 
@@ -2400,14 +2273,4 @@
 
 #if ADAPTIVE_QP_SELECTION
-#if H_MV
-  printf("Layer %3d   POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d bits",
-    pcSlice->getLayerId(),
-    pcSlice->getPOC(),
-    pcSlice->getTLayer(),
-    c,
-    pcSlice->getSliceQpBase(),
-    pcSlice->getSliceQp(),
-    uibits );
-#else
   printf("POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d bits",
          pcSlice->getPOC(),
@@ -2417,14 +2280,4 @@
          pcSlice->getSliceQp(),
          uibits );
-#endif
-#else
-#if H_MV
-  printf("Layer %3d   POC %4d TId: %1d ( %c-SLICE, QP %d ) %10d bits",
-    pcSlice->getLayerId(),
-    pcSlice->getPOC()-pcSlice->getLastIDR(),
-    pcSlice->getTLayer(),
-    c,
-    pcSlice->getSliceQp(),
-    uibits );
 #else
   printf("POC %4d TId: %1d ( %c-SLICE, QP %d ) %10d bits",
@@ -2434,5 +2287,4 @@
          pcSlice->getSliceQp(),
          uibits );
-#endif
 
 #endif
@@ -2445,16 +2297,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)-pcSlice->getLastIDR());
-#if H_MV
-      }
-#endif
     }
     printf("]");
@@ -2822,82 +2663,3 @@
 }
 #endif
-#if H_MV
-Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid )
-{ 
-  TComVPS* vps = pcSlice->getVPS(); 
-  Int layer    = pcSlice->getLayerIdInVps( ); 
-  
-  if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || vps->getNumDirectRefLayers( layer ) == 0 )
-  {
-    return;
-  }
-
-  // analyze inter-view modifications
-  GOPEntry ge = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && ( layer > 0) ) ? MAX_GOP : iGOPid );
-
-  TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification();
-  
-  Int maxRefListSize  = pcSlice->getNumRpsCurrTempList();
-  Int numTemporalRefs = maxRefListSize - vps->getNumDirectRefLayers( layer );
-
-
-  for (Int li = 0; li < 2; li ++) // Loop over lists L0 and L1
-  {
-    Int numModifications = 0;
-    
-    for( Int k = 0; k < ge.m_numInterViewRefPics; k++ ) 
-    {
-      numModifications +=  ( ge.m_interViewRefPosL[li][k] >= 0 ) ? 1 : 0; 
-    }
-
-    // set inter-view modifications
-    if( (maxRefListSize > 1) && (numModifications > 0) )
-    {
-      refPicListModification->setRefPicListModificationFlagL( li, true );
-      Int tempList[16];
-      for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; }
-
-      Bool isModified = false;
-      for( Int k = 0; k < ge.m_numInterViewRefPics; k++ )
-      {
-        if( ge.m_interViewRefPosL[li][k] >= 0 )
-        {
-          Int orgIdx    = numTemporalRefs;
-          Int targetIdx = ge.m_interViewRefPosL[ li ][ k ];
-          for( Int idx = 0; idx < vps->getNumDirectRefLayers( layer ); idx++ )
-          {            
-            Int refLayer  = vps->getLayerIdInVps( vps->getRefLayerId( layer, idx ) );          
-            if( ( layer + ge.m_interViewRefs[ k ]) == refLayer )
-            {
-              tempList[ targetIdx ] = orgIdx;              
-              isModified = ( targetIdx != orgIdx  );
-            }
-            orgIdx++;
-          }
-        }
-      }
-      if( isModified )
-      {
-        Int temporalRefIdx = 0;
-        for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ )
-        {
-          if( tempList[i] >= 0 ) 
-          {
-            refPicListModification->setRefPicSetIdxL( li, i, tempList[i] );
-          }
-          else
-          {
-            refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx );
-            temporalRefIdx++;
-          }
-        }
-      }
-      else
-      {
-        refPicListModification->setRefPicListModificationFlagL( li, false );
-      }
-    }
-  }
-}
-#endif
 //! \}
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.h	(revision 367)
@@ -97,15 +97,4 @@
   SEIWriter               m_seiWriter;
   
-#if H_MV
-  TComPicLists*           m_ivPicLists;
-  std::vector<TComPic*>   m_refPicSetInterLayer; 
-
-  Int                     m_pocLastCoded;
-  Int                     m_layerId;  
-  Int                     m_viewId;
-#if H_3D
-  Bool                    m_isDepth;
-#endif
-#endif
   //--Adaptive Loop filter
   TEncSampleAdaptiveOffset*  m_pcSAO;
@@ -144,20 +133,7 @@
   
   Void  init        ( TEncTop* pcTEncTop );
-#if H_MV
-  Void  initGOP     ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP);
-  Void  compressPicInGOP ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP, Int iGOPid );
-#else
   Void  compressGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRec, std::list<AccessUnit>& accessUnitsInGOP );
-#endif
   Void  xAttachSliceDataToNalUnit (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect);
 
-#if H_MV
-  Int       getPocLastCoded  ()                 { return m_pocLastCoded; }  
-  Int       getLayerId       ()                 { return m_layerId;    }  
-  Int       getViewId        ()                 { return m_viewId;    }
-#if H_3D
-  Bool      getIsDepth       ()                 { return m_isDepth; }
-#endif
-#endif
 
   Int   getGOPSize()          { return  m_iGopSize;  }
@@ -165,7 +141,5 @@
   TComList<TComPic*>*   getListPic()      { return m_pcListPic; }
   
-#if !H_MV
   Void  printOutSummary      ( UInt uiNumAllPicCoded );
-#endif
   Void  preLoopFilterPicAll  ( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits );
   
@@ -211,7 +185,4 @@
 #endif
 #endif
-#if H_MV
-   Void  xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid );
-#endif
 #if L0386_DB_METRIC
   Void dblMetric( TComPic* pcPic, UInt uiNumSlices );
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 367)
@@ -219,20 +219,4 @@
   
   // slice type
-#if H_MV
-  SliceType eSliceTypeBaseView;
-  if( pocLast == 0 || pocCurr % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0 )
-  {
-    eSliceTypeBaseView = I_SLICE;
-  }
-  else
-  {
-    eSliceTypeBaseView = B_SLICE;
-  }
-  SliceType eSliceType = eSliceTypeBaseView;
-  if( eSliceTypeBaseView == I_SLICE && m_pcCfg->getGOPEntry(MAX_GOP).m_POC == 0 && m_pcCfg->getGOPEntry(MAX_GOP).m_sliceType != 'I' )
-  {
-    eSliceType = B_SLICE; 
-  }
-#else
   SliceType eSliceType;
   
@@ -241,5 +225,4 @@
   
   rpcSlice->setSliceType    ( eSliceType );
-#endif
 
   // ------------------------------------------------------------------------------------------------------------------
@@ -270,9 +253,5 @@
     if (!(( m_pcCfg->getMaxDeltaQP() == 0 ) && (dQP == -rpcSlice->getSPS()->getQpBDOffsetY() ) && (rpcSlice->getSPS()->getUseLossless()))) 
     {
-#if H_MV
-      dQP += m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_QPOffset;
-#else
       dQP += m_pcCfg->getGOPEntry(iGOPid).m_QPOffset;
-#endif
     }
   }
@@ -317,15 +296,6 @@
 #endif
     // Case #1: I or P-slices (key-frame)
-#if H_MV
-    Double dQPFactor;
-    if( eSliceType != I_SLICE ) 
-    {
-      dQPFactor = m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_QPFactor;
-    }
-    else
-#else
     Double dQPFactor = m_pcCfg->getGOPEntry(iGOPid).m_QPFactor;
     if ( eSliceType==I_SLICE )
-#endif
     {
       dQPFactor=0.57*dLambda_scale;
@@ -362,9 +332,5 @@
   if( rpcSlice->getSliceType( ) != I_SLICE )
   {
-#if H_MV
-    dLambda *= m_pcCfg->getLambdaModifier( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_temporalId );
-#else
     dLambda *= m_pcCfg->getLambdaModifier( m_pcCfg->getGOPEntry(iGOPid).m_temporalId );
-#endif
   }
 
@@ -405,13 +371,5 @@
 #if HB_LAMBDA_FOR_LDC
   // restore original slice type
-#if H_MV
-  eSliceType = eSliceTypeBaseView;
-  if( eSliceTypeBaseView == I_SLICE && m_pcCfg->getGOPEntry(MAX_GOP).m_POC == 0 && m_pcCfg->getGOPEntry(MAX_GOP).m_sliceType != 'I' )
-  {
-    eSliceType = B_SLICE;
-  }
-#else
   eSliceType = (pocLast == 0 || pocCurr % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType;
-#endif
 
   rpcSlice->setSliceType        ( eSliceType );
@@ -431,11 +389,6 @@
   rpcSlice->setSliceQpDeltaCb   ( 0 );
   rpcSlice->setSliceQpDeltaCr   ( 0 );
-#if H_MV
-  rpcSlice->setNumRefIdx(REF_PIC_LIST_0,m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_numRefPicsActive);
-  rpcSlice->setNumRefIdx(REF_PIC_LIST_1,m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_numRefPicsActive);
-#else
   rpcSlice->setNumRefIdx(REF_PIC_LIST_0,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive);
   rpcSlice->setNumRefIdx(REF_PIC_LIST_1,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive);
-#endif
 
 #if L0386_DB_METRIC
@@ -458,15 +411,8 @@
       if ( !m_pcCfg->getLoopFilterOffsetInPPS() && eSliceType!=I_SLICE)
       {
-#if H_MV
-        rpcSlice->getPPS()->setDeblockingFilterBetaOffsetDiv2( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_betaOffsetDiv2 + m_pcCfg->getLoopFilterBetaOffset() );
-        rpcSlice->getPPS()->setDeblockingFilterTcOffsetDiv2( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_tcOffsetDiv2 + m_pcCfg->getLoopFilterTcOffset() );
-        rpcSlice->setDeblockingFilterBetaOffsetDiv2( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_betaOffsetDiv2 + m_pcCfg->getLoopFilterBetaOffset()  );
-        rpcSlice->setDeblockingFilterTcOffsetDiv2( m_pcCfg->getGOPEntry((eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid).m_tcOffsetDiv2 + m_pcCfg->getLoopFilterTcOffset() );
-#else
         rpcSlice->getPPS()->setDeblockingFilterBetaOffsetDiv2( m_pcCfg->getGOPEntry(iGOPid).m_betaOffsetDiv2 + m_pcCfg->getLoopFilterBetaOffset() );
         rpcSlice->getPPS()->setDeblockingFilterTcOffsetDiv2( m_pcCfg->getGOPEntry(iGOPid).m_tcOffsetDiv2 + m_pcCfg->getLoopFilterTcOffset() );
         rpcSlice->setDeblockingFilterBetaOffsetDiv2( m_pcCfg->getGOPEntry(iGOPid).m_betaOffsetDiv2 + m_pcCfg->getLoopFilterBetaOffset()  );
         rpcSlice->setDeblockingFilterTcOffsetDiv2( m_pcCfg->getGOPEntry(iGOPid).m_tcOffsetDiv2 + m_pcCfg->getLoopFilterTcOffset() );
-#endif
       }
       else
@@ -489,9 +435,5 @@
   rpcSlice->setDepth            ( depth );
   
-#if H_MV
-  pcPic->setTLayer( m_pcCfg->getGOPEntry( (eSliceTypeBaseView == I_SLICE) ? MAX_GOP : iGOPid ).m_temporalId );
-#else
   pcPic->setTLayer( m_pcCfg->getGOPEntry(iGOPid).m_temporalId );
-#endif
   if(eSliceType==I_SLICE)
   {
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncTop.cpp	(revision 367)
@@ -42,7 +42,4 @@
 #include "TLibCommon/ContextModel.h"
 #endif
-#if H_MV
-#include "../../App/TAppEncoder/TAppEncTop.h"
-#endif
 
 //! \ingroup TLibEncoder
@@ -81,7 +78,4 @@
   m_pcBitCounters          = NULL;
   m_pcRdCosts              = NULL;
-#if H_MV
-  m_ivPicLists = NULL;
-#endif
 }
 
@@ -95,8 +89,6 @@
 Void TEncTop::create ()
 {
-#if !H_MV
   // initialize global variables
   initROM();
-#endif
   
   // create processing unit classes
@@ -276,8 +268,6 @@
   delete[] m_pcRdCosts;
   
-#if !H_MV
     // destroy ROM
   destroyROM();
-#endif
 
   return;
@@ -329,20 +319,4 @@
 // ====================================================================================================================
 
-#if H_MV
-Void TEncTop::initNewPic( TComPicYuv* pcPicYuvOrg )
-{
-  TComPic* pcPicCurr = NULL;
-
-  // get original YUV
-  xGetNewPicBuffer( pcPicCurr );
-  pcPicYuvOrg->copyToPic( pcPicCurr->getPicYuvOrg() );
-
-  // compute image characteristics
-  if ( getUseAdaptiveQP() )
-  {
-    m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcPicCurr ) );
-  }
-}
-#endif
 Void TEncTop::deletePicBuffer()
 {
@@ -371,23 +345,6 @@
  \retval  iNumEncoded         number of encoded pictures
  */
-#if H_MV
-Void TEncTop::encode(Bool flush, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded , Int gopId )
-{
-#else
 Void TEncTop::encode(Bool flush, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded )
 {
-#endif
-#if H_3D
-  TComPic* picLastCoded = getPic( getGOPEncoder()->getPocLastCoded() );
-  if( picLastCoded )
-  {
-    picLastCoded->compressMotion(); 
-  }
-#endif
-#if H_MV
-  if( gopId == 0)
-  {
-    m_cGOPEncoder.initGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut);  
-#else
   if (pcPicYuvOrg) {
     // get original YUV
@@ -408,5 +365,4 @@
     return;
   }
-#endif
   
 #if RATE_CONTROL_LAMBDA_DOMAIN
@@ -417,14 +373,6 @@
 #endif
 
-#if H_MV
-  }
-  m_cGOPEncoder.compressPicInGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut, gopId );
-
-  if( gopId + 1 == m_cGOPEncoder.getGOPSize() )
-  {
-#else
   // compress GOP
   m_cGOPEncoder.compressGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut);
-#endif
 
 #if RATE_CONTROL_LAMBDA_DOMAIN
@@ -438,7 +386,4 @@
   m_iNumPicRcvd       = 0;
   m_uiNumAllPicCoded += iNumEncoded;
-#if H_MV
-}
-#endif
 }
 
@@ -505,7 +450,4 @@
 Void TEncTop::xInitSPS()
 {
-#if H_MV
-  m_cSPS.setSPSId( getLayerIdInVps() );
-#endif
   ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL();
   profileTierLevel.setLevelIdc(m_level);
@@ -652,12 +594,4 @@
 Void TEncTop::xInitPPS()
 {
-#if H_MV
-  if( m_cVPS.getNumDirectRefLayers( getLayerIdInVps() ) > 0 )
-  {
-    m_cPPS.setListsModificationPresentFlag( true );
-  }
-  m_cPPS.setPPSId( getLayerIdInVps() );
-  m_cPPS.setSPSId( getLayerIdInVps() );
-#endif
   m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred );
   Bool bUseDQP = (getMaxCuDQPDepth() > 0)? true : false;
@@ -963,17 +897,4 @@
 Void TEncTop::selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid )
 {
-#if H_MV
-  if( slice->getRapPicFlag() == true && getLayerId() > 0 && POCCurr == 0 )
-  {
-    TComReferencePictureSet* rps = slice->getLocalRPS();
-    rps->setNumberOfNegativePictures(0);
-    rps->setNumberOfPositivePictures(0);
-    rps->setNumberOfLongtermPictures(0);
-    rps->setNumberOfPictures(0);
-    slice->setRPS(rps);
-  }
-  else
-  {
-#endif
   slice->setRPSidx(GOPid);
 
@@ -1003,7 +924,4 @@
   slice->setRPS(getSPS()->getRPSList()->getReferencePictureSet(slice->getRPSidx()));
   slice->getRPS()->setNumberOfPictures(slice->getRPS()->getNumberOfNegativePictures()+slice->getRPS()->getNumberOfPositivePictures());
-#if H_MV
-  }
-#endif
 
 }
@@ -1120,65 +1038,3 @@
   }
 }
-#if H_MV
-Void TEncTop::printSummary( Int numAllPicCoded )
-{
-  assert (numAllPicCoded == m_cAnalyzeAll.getNumPic());
-
-  //--CFG_KDY
-  m_cAnalyzeAll.setFrmRate( getFrameRate() );
-  m_cAnalyzeI.setFrmRate( getFrameRate() );
-  m_cAnalyzeP.setFrmRate( getFrameRate() );
-  m_cAnalyzeB.setFrmRate( getFrameRate() );
-
-  //-- all
-  printf( "\n\nSUMMARY ------------------------------------------- LayerId %2d\n", m_layerId );
-
-  m_cAnalyzeAll.printOut('a');
-
-  printf( "\n\nI Slices--------------------------------------------------------\n" );
-  m_cAnalyzeI.printOut('i');
-
-  printf( "\n\nP Slices--------------------------------------------------------\n" );
-  m_cAnalyzeP.printOut('p');
-
-  printf( "\n\nB Slices--------------------------------------------------------\n" );
-  m_cAnalyzeB.printOut('b');
-
-#if _SUMMARY_OUT_
-  m_cAnalyzeAll.printSummaryOut();
-#endif
-#if _SUMMARY_PIC_
-  m_cAnalyzeI.printSummary('I');
-  m_cAnalyzeP.printSummary('P');
-  m_cAnalyzeB.printSummary('B');
-#endif
-}
-
-Int TEncTop::getFrameId(Int iGOPid)  
-{
-  if(m_iPOCLast == 0)
-  {
-    return(0 );
-  }
-  else
-  {
-    return m_iPOCLast -m_iNumPicRcvd+ getGOPEntry(iGOPid).m_POC ;
-  }
-}
-
-TComPic* TEncTop::getPic( Int 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;
-}
-#endif
 //! \}
Index: branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncTop.h
===================================================================
--- branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncTop.h	(revision 366)
+++ branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncTop.h	(revision 367)
@@ -74,7 +74,4 @@
   TComList<TComPic*>      m_cListPic;                     ///< dynamic list of pictures
   
-#if H_MV
-  TComPicLists*           m_ivPicLists;                   ///< access to picture lists of other layers 
-#endif
   // encoder search
   TEncSearch              m_cSearch;                      ///< encoder search class
@@ -125,10 +122,4 @@
   TEncRateCtrl            m_cRateCtrl;                    ///< Rate control class
   
-#if H_MV
-  TEncAnalyze             m_cAnalyzeAll;
-  TEncAnalyze             m_cAnalyzeI;
-  TEncAnalyze             m_cAnalyzeP;
-  TEncAnalyze             m_cAnalyzeB;  
-#endif
 protected:
   Void  xGetNewPicBuffer  ( TComPic*& rpcPic );           ///< get picture buffer which will be processed
@@ -146,14 +137,8 @@
   Void      destroy         ();
   Void      init            ();
-#if H_MV  
-  TComPicLists* getIvPicLists() { return m_ivPicLists; }
-#endif
   Void      deletePicBuffer ();
 
   Void      createWPPCoders(Int iNumSubstreams);
   
-#if H_MV
-  Void      initNewPic(TComPicYuv* pcPicYuvOrg);
-#endif
   // -------------------------------------------------------------------------------------------------------------------
   // member access functions
@@ -192,17 +177,4 @@
 #endif
   TComScalingList*        getScalingList        () { return  &m_scalingList;         }
-#if H_MV
-  TEncAnalyze*            getAnalyzeAll         () { return &m_cAnalyzeAll; }
-  TEncAnalyze*            getAnalyzeI           () { return &m_cAnalyzeI;   }
-  TEncAnalyze*            getAnalyzeP           () { return &m_cAnalyzeP;   }
-  TEncAnalyze*            getAnalyzeB           () { return &m_cAnalyzeB;   }
-
-  Int                     getNumAllPicCoded     () { return m_uiNumAllPicCoded; }
- 
-  Int                     getFrameId            (Int iGOPid);
-  
-  TComPic*                getPic                ( Int poc );
-  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
-#endif
   // -------------------------------------------------------------------------------------------------------------------
   // encoder function
@@ -210,16 +182,8 @@
 
   /// encode several number of pictures until end-of-sequence
-#if H_MV
-  Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded  , Int gopId  );  
-#else
   Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut,
               std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded );  
-#endif
 
-#if H_MV
-  Void printSummary      ( Int numAllPicCoded ); 
-#else
   void printSummary() { m_cGOPEncoder.printOutSummary (m_uiNumAllPicCoded); }
-#endif
 };
 
