Changeset 834 in SHVCSoftware for branches/SHM-dev


Ignore:
Timestamp:
15 Jul 2014, 04:20:03 (10 years ago)
Author:
seregin
Message:

make parameter sets static

Location:
branches/SHM-dev/source/Lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r827 r834  
    4747#if SVC_EXTENSION
    4848ParameterSetMap<TComVPS> ParameterSetManager::m_vpsMap(MAX_NUM_VPS);
     49ParameterSetMap<TComSPS> ParameterSetManager::m_spsMap(MAX_NUM_SPS);
     50ParameterSetMap<TComPPS> ParameterSetManager::m_ppsMap(MAX_NUM_PPS);
    4951Int ParameterSetManager::m_activeVPSId = -1;
    5052#endif
     
    36793681ParameterSetManager::ParameterSetManager()
    36803682#if SVC_EXTENSION
    3681 : m_spsMap(MAX_NUM_SPS)
    3682 , m_ppsMap(MAX_NUM_PPS)
    3683 , m_activeSPSId(-1)
     3683: m_activeSPSId(-1)
    36843684, m_activePPSId(-1)
    36853685#else
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r825 r834  
    25142514    if ( m_paramsetMap.find(psId) != m_paramsetMap.end() )
    25152515    {
    2516 #if Q0078_ADD_LAYER_SETS
    2517       m_paramsetMap.erase(psId);
    2518 #endif
    25192516      delete m_paramsetMap[psId];
    25202517    }
     
    25422539  }
    25432540
    2544 #if Q0078_ADD_LAYER_SETS
    2545   Void removePS(Int psId)
    2546   {
    2547     assert(psId < m_maxId);
    2548     if (m_paramsetMap.find(psId) != m_paramsetMap.end())
    2549     {
    2550       m_paramsetMap.erase(psId);
    2551 #if Q0078_ADD_LAYER_SETS
    2552       delete m_paramsetMap[psId];
    2553 #endif
    2554     }
    2555   }
    2556 #endif
    2557 
    2558 
    25592541private:
    25602542  std::map<Int,T *> m_paramsetMap;
     
    25792561  TComSPS* getSPS(Int spsId)  { return m_spsMap.getPS(spsId); };
    25802562  TComSPS* getFirstSPS()      { return m_spsMap.getFirstPS(); };
    2581 #if Q0078_ADD_LAYER_SETS
    2582   Void     removeSPS(Int spsId) { m_spsMap.removePS(spsId); };
    2583 #endif
    25842563
    25852564  //! store picture parameter set and take ownership of it
     
    25882567  TComPPS* getPPS(Int ppsId)  { return m_ppsMap.getPS(ppsId); };
    25892568  TComPPS* getFirstPPS()      { return m_ppsMap.getFirstPS(); };
    2590 #if Q0078_ADD_LAYER_SETS
    2591   Void     removePPS(Int ppsId) { m_ppsMap.removePS(ppsId); };
    2592 #endif
    25932569
    25942570  //! activate a SPS from a active parameter sets SEI message
     
    26082584#if SVC_EXTENSION
    26092585  static ParameterSetMap<TComVPS> m_vpsMap;
     2586  static ParameterSetMap<TComSPS> m_spsMap;
     2587  static ParameterSetMap<TComPPS> m_ppsMap;
    26102588#else
    26112589  ParameterSetMap<TComVPS> m_vpsMap;
    2612 #endif
    26132590  ParameterSetMap<TComSPS> m_spsMap;
    26142591  ParameterSetMap<TComPPS> m_ppsMap;
     2592#endif
    26152593
    26162594#if SVC_EXTENSION
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSlice.cpp

    r644 r834  
    4242
    4343#if SVC_EXTENSION
    44   ParameterSetMap<TComVPS> ParameterSetManagerDecoder::m_vpsBuffer(MAX_NUM_VPS);
     44ParameterSetMap<TComVPS> ParameterSetManagerDecoder::m_vpsBuffer(MAX_NUM_VPS);
     45ParameterSetMap<TComSPS> ParameterSetManagerDecoder::m_spsBuffer(MAX_NUM_SPS);
     46ParameterSetMap<TComPPS> ParameterSetManagerDecoder::m_ppsBuffer(MAX_NUM_PPS);
    4547#endif
    4648
     
    397399
    398400ParameterSetManagerDecoder::ParameterSetManagerDecoder()
    399 #if SVC_EXTENSION
    400 : m_spsBuffer(MAX_NUM_SPS)
    401 , m_ppsBuffer(MAX_NUM_PPS)
    402 #else
     401#if !SVC_EXTENSION
    403402: m_vpsBuffer(MAX_NUM_VPS)
    404403, m_spsBuffer(MAX_NUM_SPS)
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSlice.h

    r644 r834  
    110110#if SVC_EXTENSION
    111111  static ParameterSetMap<TComVPS> m_vpsBuffer;
     112  static ParameterSetMap<TComSPS> m_spsBuffer;
     113  static ParameterSetMap<TComPPS> m_ppsBuffer;
    112114#else
    113115  ParameterSetMap<TComVPS> m_vpsBuffer;
    114 #endif
    115116  ParameterSetMap<TComSPS> m_spsBuffer;
    116117  ParameterSetMap<TComPPS> m_ppsBuffer;
     118#endif
    117119};
    118120
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r833 r834  
    109109TDecTop::~TDecTop()
    110110{
    111 #if Q0078_ADD_LAYER_SETS
    112   for (Int psId = 0; psId < MAX_NUM_SPS; psId++)
    113   {
    114     TComSPS* sps = m_parameterSetManagerDecoder.getSPS(psId);
    115     if (sps != NULL)
    116     {
    117       // Remove parameter set from other layers to prevent multiple deletes of the same object
    118       for (Int lId = 0; lId < m_numLayer; lId++)
    119       {
    120         if (m_ppcTDecTop[lId] != this)
    121         {
    122           m_parameterSetManagerDecoder.removeSPS(psId);
    123         }
    124       }
    125     }
    126   }
    127   for (Int psId = 0; psId < MAX_NUM_PPS; psId++)
    128   {
    129     TComPPS* pps = m_parameterSetManagerDecoder.getPPS(psId);
    130     if (pps != NULL)
    131     {
    132       // Remove parameter set from other layers to prevent multiple deletes of the same object
    133       for (Int lId = 0; lId < m_numLayer; lId++)
    134       {
    135         if (m_ppcTDecTop[lId] != this)
    136         {
    137           m_parameterSetManagerDecoder.removePPS(psId);
    138         }
    139       }
    140     }
    141   }
    142 #endif
    143111#if ENC_DEC_TRACE
    144112  fclose( g_hTrace );
     
    153121#endif
    154122#if Q0074_SEI_COLOR_MAPPING
    155   if ( m_ColorMapping )  delete m_ColorMapping;
     123  if ( m_ColorMapping )
     124  {
     125    delete m_ColorMapping;
     126    m_ColorMapping = NULL;
     127  }
    156128#endif
    157129}
     
    20332005#endif
    20342006  m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
    2035 #if Q0078_ADD_LAYER_SETS
    2036   // Store SPS for all layers
    2037   for (Int lId = 0; lId < m_numLayer; lId++)
    2038   {
    2039     if (m_ppcTDecTop[lId] != this)
    2040     {
    2041       m_ppcTDecTop[lId]->getParameterSetManager()->storePrefetchedSPS(sps);
    2042     }
    2043   }
    2044 #endif
    20452007#if !REPN_FORMAT_IN_VPS   // ILRP can only be initialized at activation 
    20462008  if(m_numLayer>0)
     
    20692031    );
    20702032  m_parameterSetManagerDecoder.storePrefetchedPPS( pps );
    2071 #if Q0078_ADD_LAYER_SETS
    2072   // Store PPS for all layers
    2073   for (Int lId = 0; lId < m_numLayer; lId++)
    2074   {
    2075     if (m_ppcTDecTop[lId] != this)
    2076     {
    2077       m_ppcTDecTop[lId]->getParameterSetManager()->storePrefetchedPPS(pps);
    2078     }
    2079   }
    2080 #endif
    20812033}
    20822034#else
Note: See TracChangeset for help on using the changeset viewer.