Changeset 1256 in SHVCSoftware for branches/SHM-dev


Ignore:
Timestamp:
14 Jul 2015, 02:08:17 (9 years ago)
Author:
seregin
Message:

port rev 4251

File:
1 edited

Legend:

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

    r1246 r1256  
    411411  TComPic*  RefPicSetStCurr1[MAX_NUM_NEGATIVE_PICTURES];
    412412  TComPic*  RefPicSetLtCurr[MAX_NUM_NEGATIVE_PICTURES];
    413   UInt NumPocStCurr0 = 0;
    414   UInt NumPocStCurr1 = 0;
    415   UInt NumPocLtCurr = 0;
     413  UInt NumPicStCurr0 = 0;
     414  UInt NumPicStCurr1 = 0;
     415  UInt NumPicLtCurr = 0;
    416416  Int i;
    417417
     
    427427      pcRefPic->setIsLongTerm(0);
    428428      pcRefPic->getPicYuvRec()->extendPicBorder();
    429       RefPicSetStCurr0[NumPocStCurr0] = pcRefPic;
    430       NumPocStCurr0++;
     429      RefPicSetStCurr0[NumPicStCurr0] = pcRefPic;
     430      NumPicStCurr0++;
    431431      pcRefPic->setCheckLTMSBPresent(false);
    432432    }
     
    440440      pcRefPic->setIsLongTerm(0);
    441441      pcRefPic->getPicYuvRec()->extendPicBorder();
    442       RefPicSetStCurr1[NumPocStCurr1] = pcRefPic;
    443       NumPocStCurr1++;
     442      RefPicSetStCurr1[NumPicStCurr1] = pcRefPic;
     443      NumPicStCurr1++;
    444444      pcRefPic->setCheckLTMSBPresent(false);
    445445    }
     
    453453      pcRefPic->setIsLongTerm(1);
    454454      pcRefPic->getPicYuvRec()->extendPicBorder();
    455       RefPicSetLtCurr[NumPocLtCurr] = pcRefPic;
    456       NumPocLtCurr++;
     455      RefPicSetLtCurr[NumPicLtCurr] = pcRefPic;
     456      NumPicLtCurr++;
    457457    }
    458458    if(pcRefPic==NULL)
     
    552552    }
    553553  }
    554   Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_activeNumILRRefIdx;
     554  Int numPicTotalCurr = NumPicStCurr0 + NumPicStCurr1 + NumPicLtCurr + m_activeNumILRRefIdx;
    555555#else //SVC_EXTENSION
    556   Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;
     556  Int numPicTotalCurr = NumPicStCurr0 + NumPicStCurr1 + NumPicLtCurr;
    557557#endif //SVC_EXTENSION
    558558
     
    570570#endif
    571571    {
    572       assert(numPocTotalCurr == 0);
     572      assert(numPicTotalCurr == 0);
    573573    }
    574574
     
    581581    }
    582582
    583     assert(numPocTotalCurr > 0);
     583    assert(numPicTotalCurr > 0);
     584    // genral tier and level limit:
     585    assert(numPicTotalCurr <= 8);
    584586
    585587    m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);
     
    588590
    589591  Int cIdx = 0;
    590   for ( i=0; i<NumPocStCurr0; i++, cIdx++)
     592  for ( i=0; i<NumPicStCurr0; i++, cIdx++)
    591593  {
    592594    rpsCurrList0[cIdx] = RefPicSetStCurr0[i];
     
    597599    if( m_layerId > 0 )
    598600    {     
    599       for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)     
     601      for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPicTotalCurr; cIdx ++, i ++)     
    600602      {
    601603        Int refLayerIdc = m_interLayerPredLayerIdc[i];
     
    609611#endif //SVC_EXTENSION
    610612
    611   for ( i=0; i<NumPocStCurr1; i++, cIdx++)
     613  for ( i=0; i<NumPicStCurr1; i++, cIdx++)
    612614  {
    613615    rpsCurrList0[cIdx] = RefPicSetStCurr1[i];
    614616  }
    615   for ( i=0; i<NumPocLtCurr;  i++, cIdx++)
     617  for ( i=0; i<NumPicLtCurr;  i++, cIdx++)
    616618  {
    617619    rpsCurrList0[cIdx] = RefPicSetLtCurr[i];
    618620  }
    619   assert(cIdx == numPocTotalCurr);
     621  assert(cIdx == numPicTotalCurr);
    620622
    621623  if (m_eSliceType==B_SLICE)
    622624  {
    623625    cIdx = 0;
    624     for ( i=0; i<NumPocStCurr1; i++, cIdx++)
     626    for ( i=0; i<NumPicStCurr1; i++, cIdx++)
    625627    {
    626628      rpsCurrList1[cIdx] = RefPicSetStCurr1[i];
    627629    }
    628     for ( i=0; i<NumPocStCurr0; i++, cIdx++)
     630    for ( i=0; i<NumPicStCurr0; i++, cIdx++)
    629631    {
    630632      rpsCurrList1[cIdx] = RefPicSetStCurr0[i];
    631633    }
    632     for ( i=0; i<NumPocLtCurr;  i++, cIdx++)
     634    for ( i=0; i<NumPicLtCurr;  i++, cIdx++)
    633635    {
    634636      rpsCurrList1[cIdx] = RefPicSetLtCurr[i];
     
    638640    if( m_layerId > 0 )
    639641    {
    640       for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)
     642      for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPicTotalCurr; cIdx ++, i ++)
    641643      {
    642644        Int refLayerIdc = m_interLayerPredLayerIdc[i];
     
    650652#endif //SVC_EXTENSION
    651653
    652     assert(cIdx == numPocTotalCurr);
     654    assert(cIdx == numPicTotalCurr);
    653655  }
    654656
     
    657659  for (Int rIdx = 0; rIdx < m_aiNumRefIdx[REF_PIC_LIST_0]; rIdx ++)
    658660  {
    659     cIdx = m_RefPicListModification.getRefPicListModificationFlagL0() ? m_RefPicListModification.getRefPicSetIdxL0(rIdx) : rIdx % numPocTotalCurr;
    660     assert(cIdx >= 0 && cIdx < numPocTotalCurr);
     661    cIdx = m_RefPicListModification.getRefPicListModificationFlagL0() ? m_RefPicListModification.getRefPicSetIdxL0(rIdx) : rIdx % numPicTotalCurr;
     662    assert(cIdx >= 0 && cIdx < numPicTotalCurr);
    661663    m_apcRefPicList[REF_PIC_LIST_0][rIdx] = rpsCurrList0[ cIdx ];
    662664
    663665#if SVC_EXTENSION
    664     m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPocStCurr0 && cIdx < NumPocStCurr0 + m_activeNumILRRefIdx ) || ( cIdx >= NumPocStCurr0 + NumPocStCurr1 + m_activeNumILRRefIdx );
     666    m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPicStCurr0 && cIdx < NumPicStCurr0 + m_activeNumILRRefIdx ) || ( cIdx >= NumPicStCurr0 + NumPicStCurr1 + m_activeNumILRRefIdx );
    665667#else
    666     m_bIsUsedAsLongTerm[REF_PIC_LIST_0][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 );
     668    m_bIsUsedAsLongTerm[REF_PIC_LIST_0][rIdx] = ( cIdx >= NumPicStCurr0 + NumPicStCurr1 );
    667669#endif
    668670  }
     
    676678    for (Int rIdx = 0; rIdx < m_aiNumRefIdx[REF_PIC_LIST_1]; rIdx ++)
    677679    {
    678       cIdx = m_RefPicListModification.getRefPicListModificationFlagL1() ? m_RefPicListModification.getRefPicSetIdxL1(rIdx) : rIdx % numPocTotalCurr;
    679       assert(cIdx >= 0 && cIdx < numPocTotalCurr);
     680      cIdx = m_RefPicListModification.getRefPicListModificationFlagL1() ? m_RefPicListModification.getRefPicSetIdxL1(rIdx) : rIdx % numPicTotalCurr;
     681      assert(cIdx >= 0 && cIdx < numPicTotalCurr);
    680682      m_apcRefPicList[REF_PIC_LIST_1][rIdx] = rpsCurrList1[ cIdx ];
    681       m_bIsUsedAsLongTerm[REF_PIC_LIST_1][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 );
     683      m_bIsUsedAsLongTerm[REF_PIC_LIST_1][rIdx] = ( cIdx >= NumPicStCurr0 + NumPicStCurr1 );
    682684    }
    683685  }
     
    13881390        }
    13891391      }
    1390       else 
     1392      else
    13911393      {
    13921394        Int pocCycle = 1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC();
Note: See TracChangeset for help on using the changeset viewer.