Changeset 1428 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon


Ignore:
Timestamp:
5 Aug 2015, 20:23:53 (10 years ago)
Author:
seregin
Message:

fix memory allocation

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

Legend:

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

    r1420 r1428  
    239239Void TComPic::createMvScalingFactor(UInt numOfILRPs)
    240240{
    241   assert(m_mvScalingFactor[0] == NULL);
     241  // picture object might be reused and hence m_mvScalingFactor[0] can be already allocated
     242  if(m_mvScalingFactor[0])
     243  {
     244    delete m_mvScalingFactor[0];
     245  }
    242246  m_mvScalingFactor[0] = new Int[numOfILRPs];
    243247
    244   assert(m_mvScalingFactor[1] == NULL);
     248  // picture object might be reused and hence m_mvScalingFactor[1] can be already allocated
     249  if(m_mvScalingFactor[1])
     250  {
     251    delete m_mvScalingFactor[1];
     252  }
    245253  m_mvScalingFactor[1] = new Int[numOfILRPs];
    246254}
     
    248256Void TComPic::createPosScalingFactor(UInt numOfILRPs)
    249257{
    250   assert(m_posScalingFactor[0] == NULL);
     258  // picture object might be reused and hence m_posScalingFactor[0] can be already allocated
     259  if(m_posScalingFactor[0])
     260  {
     261    delete m_posScalingFactor[0];
     262  }
    251263  m_posScalingFactor[0] = new Int[numOfILRPs];
    252264
    253   assert(m_posScalingFactor[1] == NULL);
     265  // picture object might be reused and hence m_posScalingFactor[1] can be already allocated
     266  if(m_posScalingFactor[1])
     267  {
     268    delete m_posScalingFactor[1];
     269  }
    254270  m_posScalingFactor[1] = new Int[numOfILRPs];
    255271}
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h

    r1427 r1428  
    186186 
    187187#if SVC_EXTENSION
    188   Void          setHeight   ( Int picHeight )                    { m_picHeight = picHeight;                 }
     188  Void          setHeight( Int picHeight )                       { m_picHeight = picHeight;                 }
    189189  Window&       getConformanceWindow()                           { return  m_conformanceWindow;             }
    190190  Void          setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; }
Note: See TracChangeset for help on using the changeset viewer.