Changeset 1496 in SHVCSoftware


Ignore:
Timestamp:
3 Dec 2015, 18:40:14 (9 years ago)
Author:
seregin
Message:

make VPS a static member instead of pointer

Location:
branches/SHM-dev/source/Lib/TLibCommon
Files:
2 edited

Legend:

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

    r1489 r1496  
    4848
    4949#if SVC_EXTENSION
    50 TComVPS* TComPicSym::m_vps = NULL;
     50TComVPS TComPicSym::m_vps;
    5151#endif
    5252
     
    8787  m_sps = sps;
    8888  m_pps = pps;
    89 
    90   if( !m_vps )
    91   {
    92     m_vps = new TComVPS(vps);
    93   }
    94   else 
    95   {
    96     *m_vps = vps;
    97   }
    98 
     89  m_vps = vps;
     90 
    9991  const ChromaFormat chromaFormatIDC = vps.getChromaFormatIdc(&sps, layerId);
    10092  const Int iPicWidth  = vps.getPicWidthInLumaSamples(&sps, layerId);
     
    223215  m_pParentARLBuffer = NULL;
    224216#endif
    225 
    226 #if SVC_EXTENSION
    227   if( m_vps )
    228   {
    229     delete m_vps;
    230     m_vps = NULL;
    231   }
    232 #endif
    233217}
    234218
     
    239223  m_apSlices.back()->setSPS(&m_sps);
    240224#if SVC_EXTENSION
    241   m_apSlices.back()->setVPS(m_vps);
     225  m_apSlices.back()->setVPS(&m_vps);
    242226#endif
    243227  if (m_apSlices.size()>=2)
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h

    r1494 r1496  
    122122#if SVC_EXTENSION
    123123  // SHM: temporal solution to keep VPS with a picture, ideally it should be picture specific, but currently sizeof(TComVPS) = 232897716
    124   static TComVPS* m_vps;
     124  static TComVPS m_vps;
    125125#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    126126  Int*           m_piTileSetIdxMap;     //the map of the tile set index relative to LCU raster scan address
     
    155155
    156156#if SVC_EXTENSION
    157   TComSlice *        swapSliceObject(TComSlice* p, UInt i)                 { p->setVPS(m_vps); p->setSPS(&m_sps); p->setPPS(&m_pps); TComSlice *pTmp=m_apSlices[i];m_apSlices[i] = p; pTmp->setVPS(0); pTmp->setSPS(0); pTmp->setPPS(0); return pTmp; }
     157  TComSlice *        swapSliceObject(TComSlice* p, UInt i)                 { p->setVPS(&m_vps); p->setSPS(&m_sps); p->setPPS(&m_pps); TComSlice *pTmp=m_apSlices[i];m_apSlices[i] = p; pTmp->setVPS(0); pTmp->setSPS(0); pTmp->setPPS(0); return pTmp; }
    158158#else
    159159  TComSlice *        swapSliceObject(TComSlice* p, UInt i)                 { p->setSPS(&m_sps); p->setPPS(&m_pps); TComSlice *pTmp=m_apSlices[i];m_apSlices[i] = p; pTmp->setSPS(0); pTmp->setPPS(0); return pTmp; }
Note: See TracChangeset for help on using the changeset viewer.