Changeset 334 in SHVCSoftware for branches/SHM-3.0-dev/source/Lib


Ignore:
Timestamp:
9 Aug 2013, 18:05:42 (11 years ago)
Author:
ericsson
Message:

Initial reference picture list construction N0316 (Ericsson), N0082(Sony)

#define RPL_INIT_N0316_N0082 N0316, N0082: initial reference picture list construction
#define FINAL_RPL_CHANGE_N0082
N0082: final ref picture list change (encoder change)

Location:
branches/SHM-3.0-dev/source/Lib
Files:
4 edited

Legend:

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

    r324 r334  
    584584      rpsCurrList0[cIdx] = RefPicSetStCurr0[i];
    585585    }
     586#if RPL_INIT_N0316_N0082
     587#if REF_IDX_FRAMEWORK
     588    if( m_layerId > 0 )
     589    {
     590#if JCTVC_M0458_INTERLAYER_RPS_SIG
     591      for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)     
     592#else
     593      for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)
     594#endif
     595      {
     596        Int refLayerIdc = m_interLayerPredLayerIdc[i];
     597#if ILR_RESTR
     598        Int maxSubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());
     599        if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )
     600#endif
     601          rpsCurrList0[cIdx] = ilpPic[refLayerIdc];
     602      }
     603    }
     604#endif
     605#endif
    586606    for ( i=0; i<NumPocStCurr1; i++, cIdx++)
    587607    {
     
    592612      rpsCurrList0[cIdx] = RefPicSetLtCurr[i];
    593613    }   
    594 
     614#if !RPL_INIT_N0316_N0082
    595615#if REF_IDX_FRAMEWORK
    596616    if( m_layerId > 0 )
     
    611631    }
    612632#endif
     633#endif
    613634  assert(cIdx == numPocTotalCurr);
    614635
     
    692713  TComRefPicListModification* refPicListModification = &m_RefPicListModification;
    693714  Int numberOfRpsCurrTempList = this->getNumRpsCurrTempList();  // total number of ref pics in listTemp0 including inter-layer ref pics
     715#if RPL_INIT_N0316_N0082
     716  Int numberOfPocBeforeCurr = this->getNumNegativeRpsCurrTempList();  // number of negative temporal ref pics
     717#endif
    694718
    695719  assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 1);
     
    697721
    698722  //set L0 inter-layer reference picture modification
     723#if RPL_INIT_N0316_N0082
     724  Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == (numberOfPocBeforeCurr + m_activeNumILRRefIdx)) ? false : true;
     725#else
    699726  Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == numberOfRpsCurrTempList) ? false : true;
     727#endif
     728#if FINAL_RPL_CHANGE_N0082
     729  hasModification = false; //modification is not necessary
     730#endif
    700731  refPicListModification->setRefPicListModificationFlagL0(hasModification);
    701732  if(hasModification)
     
    721752#endif
    722753      {
     754#if RPL_INIT_N0316_N0082
     755        if((numberOfPocBeforeCurr) >= m_aiNumRefIdx[REF_PIC_LIST_0])
     756          refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr);
     757        else
     758        {
     759          refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr);
     760          for (Int j = numberOfPocBeforeCurr; j < (m_aiNumRefIdx[REF_PIC_LIST_0] - i); j++)
     761            refPicListModification->setRefPicSetIdxL0(j, j + m_activeNumILRRefIdx);
     762        }
     763#else
    723764        refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfRpsCurrTempList - i);
     765#endif
    724766      }
    725767    }
     
    758800}
    759801#endif
    760 
     802#if RPL_INIT_N0316_N0082
     803Int TComSlice::getNumNegativeRpsCurrTempList()
     804{
     805  if( m_eSliceType == I_SLICE )
     806  {
     807    return 0;
     808  }
     809
     810  Int numPocBeforeCurr = 0;
     811  for( UInt i = 0; i < m_pcRPS->getNumberOfNegativePictures(); i++ )
     812  {
     813    if(m_pcRPS->getUsed(i))
     814    {
     815      numPocBeforeCurr++;
     816    }
     817  }
     818
     819  return numPocBeforeCurr;
     820}
     821#endif
    761822Int TComSlice::getNumRpsCurrTempList()
    762823{
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.h

    r328 r334  
    15671567  Bool      getMvdL1ZeroFlag ()                                  { return m_bLMvdL1Zero;    }
    15681568  Int       getNumRpsCurrTempList();
     1569#if RPL_INIT_N0316_N0082
     1570  Int       getNumNegativeRpsCurrTempList();
     1571#endif
    15691572  Int       getList1IdxToList0Idx ( Int list1Idx )               { return m_list1IdxToList0Idx[list1Idx]; }
    15701573  Void      setReferenced(Bool b)                               { m_bRefenced = b; }
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h

    r333 r334  
    4747#if SVC_EXTENSION
    4848#define MAX_LAYERS                       2      ///< max number of layers the codec is supposed to handle
    49 
     49#define RPL_INIT_N0316_N0082             1      ///< N0316, N0082: initial reference picture list construction
     50#define FINAL_RPL_CHANGE_N0082           1      ///< N0082: final ref picture list change (encoder)
    5051#define M0464_TILE_BOUNDARY_ALIGNED_FLAG 1      ///< VUI flag to indicate tile boundary alignment
    5152#define M0463_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
  • branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r323 r334  
    886886  for( Int i = 0; i < getGOPSize()+m_extraRPSs; i++)
    887887  {
     888#if FINAL_RPL_CHANGE_N0082
     889    GOPEntry ge = m_ppcTEncTop[m_cSPS.getLayerId()]->getGOPEntry(i);
     890#else
    888891    GOPEntry ge = getGOPEntry(i);
     892#endif
    889893    rps = rpsList->getReferencePictureSet(i);
    890894    rps->setNumberOfPictures(ge.m_numRefPics);
Note: See TracChangeset for help on using the changeset viewer.