Ignore:
Timestamp:
20 Jul 2015, 14:13:33 (9 years ago)
Author:
tech
Message:

Upgrade to HM-16.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComSlice.cpp

    r1279 r1287  
    5656, m_iAssociatedIRAP               ( 0 )
    5757, m_iAssociatedIRAPType           ( NAL_UNIT_INVALID )
    58 , m_pcRPS                         ( 0 )
    59 , m_LocalRPS                      ( )
    60 , m_iBDidx                        ( 0 )
     58, m_pRPS                          ( 0 )
     59, m_localRPS                      ( )
     60, m_rpsIdx                        ( 0 )
    6161, m_RefPicListModification        ( )
    6262, m_eNalUnitType                  ( NAL_UNIT_CODED_SLICE_IDR_W_RADL )
     
    465465  Int i;
    466466
    467   for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)
    468   {
    469     if(m_pcRPS->getUsed(i))
    470     {
    471       pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));
     467  for(i=0; i < m_pRPS->getNumberOfNegativePictures(); i++)
     468  {
     469    if(m_pRPS->getUsed(i))
     470    {
     471      pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pRPS->getDeltaPOC(i));
    472472      pcRefPic->setIsLongTerm(0);
    473473      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    478478  }
    479479
    480   for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++)
    481   {
    482     if(m_pcRPS->getUsed(i))
    483     {
    484       pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));
     480  for(; i < m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures(); i++)
     481  {
     482    if(m_pRPS->getUsed(i))
     483    {
     484      pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pRPS->getDeltaPOC(i));
    485485      pcRefPic->setIsLongTerm(0);
    486486      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    491491  }
    492492
    493   for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--)
    494   {
    495     if(m_pcRPS->getUsed(i))
    496     {
    497       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
     493  for(i = m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures()+m_pRPS->getNumberOfLongtermPictures()-1; i > m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures()-1 ; i--)
     494  {
     495    if(m_pRPS->getUsed(i))
     496    {
     497      pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i));
    498498      pcRefPic->setIsLongTerm(1);
    499499      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    503503    if(pcRefPic==NULL)
    504504    {
    505       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
    506     }
    507     pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i));
     505      pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i));
     506    }
     507    pcRefPic->setCheckLTMSBPresent(m_pRPS->getCheckLTMSBPresent(i));
    508508  }
    509509
     
    620620  m_pocsInCurrRPSs.clear();
    621621#endif
    622   for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)
    623   {
    624     if(m_pcRPS->getUsed(i))
    625     {
    626       pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));
     622  for(i=0; i < m_pRPS->getNumberOfNegativePictures(); i++)
     623  {
     624    if(m_pRPS->getUsed(i))
     625    {
     626      pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pRPS->getDeltaPOC(i));
    627627      pcRefPic->setIsLongTerm(0);
    628628      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    636636  }
    637637 
    638   for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++)
    639   {
    640     if(m_pcRPS->getUsed(i))
    641     {
    642       pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));
     638  for(; i < m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures(); i++)
     639  {
     640    if(m_pRPS->getUsed(i))
     641    {
     642      pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pRPS->getDeltaPOC(i));
    643643      pcRefPic->setIsLongTerm(0);
    644644      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    652652  }
    653653 
    654   for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--)
    655   {
    656     if(m_pcRPS->getUsed(i))
    657     {
    658       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
     654  for(i = m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures()+m_pRPS->getNumberOfLongtermPictures()-1; i > m_pRPS->getNumberOfNegativePictures()+m_pRPS->getNumberOfPositivePictures()-1 ; i--)
     655  {
     656    if(m_pRPS->getUsed(i))
     657    {
     658      pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i));
    659659      pcRefPic->setIsLongTerm(1);
    660660      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    667667    if(pcRefPic==NULL)
    668668    {
    669       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
    670     }
    671     pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i)); 
     669      pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i));
     670    }
     671    pcRefPic->setCheckLTMSBPresent(m_pRPS->getCheckLTMSBPresent(i)); 
    672672  }
    673673
     
    798798    return 0;
    799799  }
    800   for(UInt i=0; i < m_pcRPS->getNumberOfNegativePictures()+ m_pcRPS->getNumberOfPositivePictures() + m_pcRPS->getNumberOfLongtermPictures(); i++)
    801   {
    802     if(m_pcRPS->getUsed(i))
     800  for(UInt i=0; i < m_pRPS->getNumberOfNegativePictures()+ m_pRPS->getNumberOfPositivePictures() + m_pRPS->getNumberOfLongtermPictures(); i++)
     801  {
     802    if(m_pRPS->getUsed(i))
    803803    {
    804804      numRpsCurrTempList++;
     
    10971097  m_pcVPS                = pSrc->m_pcVPS;
    10981098#endif
    1099   m_pcRPS                = pSrc->m_pcRPS;
    1100   m_iLastIDR             = pSrc->m_iLastIDR;
     1099  m_pRPS                = pSrc->m_pRPS;  m_iLastIDR             = pSrc->m_iLastIDR;
    11011100
    11021101  m_pcPic                = pSrc->m_pcPic;
     
    16871686  Int nrOfNegativePictures = 0;
    16881687  Int nrOfPositivePictures = 0;
    1689   TComReferencePictureSet* pcRPS = this->getLocalRPS();
     1688  TComReferencePictureSet* pLocalRPS = this->getLocalRPS();
     1689  (*pLocalRPS)=TComReferencePictureSet();
     1690
    16901691  Bool irapIsInRPS = false; // Used when bEfficientFieldIRAPEnabled==true
    16911692
     
    17051706        // This picture exists as a reference picture
    17061707        // and should be added to the explicit Reference Picture Set
    1707         pcRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i));
    1708         pcRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP));
     1708        pLocalRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i));
     1709        pLocalRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP));
    17091710        if (bEfficientFieldIRAPEnabled)
    17101711        {
    1711         pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) );
    1712         }
    1713 
    1714         if(pcRPS->getDeltaPOC(k) < 0)
     1712          pLocalRPS->setUsed(k, pLocalRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) );
     1713        }
     1714
     1715        if(pLocalRPS->getDeltaPOC(k) < 0)
    17151716        {
    17161717          nrOfNegativePictures++;
     
    17391740      if(rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getAssociatedIRAPPOC() && this->getAssociatedIRAPPOC() == this->getPOC()+1)
    17401741      {
    1741         pcRPS->setDeltaPOC(k, 1);
    1742         pcRPS->setUsed(k, true);
     1742        pLocalRPS->setDeltaPOC(k, 1);
     1743        pLocalRPS->setUsed(k, true);
    17431744        nrOfPositivePictures++;
    17441745        k ++;
     
    17471748    }
    17481749  }
    1749   pcRPS->setNumberOfNegativePictures(nrOfNegativePictures);
    1750   pcRPS->setNumberOfPositivePictures(nrOfPositivePictures);
    1751   pcRPS->setNumberOfPictures(nrOfNegativePictures+nrOfPositivePictures);
     1750  pLocalRPS->setNumberOfNegativePictures(nrOfNegativePictures);
     1751  pLocalRPS->setNumberOfPositivePictures(nrOfPositivePictures);
     1752  pLocalRPS->setNumberOfPictures(nrOfNegativePictures+nrOfPositivePictures);
    17521753  // This is a simplistic inter rps example. A smarter encoder will look for a better reference RPS to do the
    17531754  // inter RPS prediction with.  Here we just use the reference used by pReferencePictureSet.
     
    17551756  if (!pReferencePictureSet->getInterRPSPrediction() || useNewRPS )
    17561757  {
    1757     pcRPS->setInterRPSPrediction(false);
    1758     pcRPS->setNumRefIdc(0);
     1758    pLocalRPS->setInterRPSPrediction(false);
     1759    pLocalRPS->setNumRefIdc(0);
    17591760  }
    17601761  else
     
    17691770      Int deltaPOC = ((i != iRefPics)? pcRefRPS->getDeltaPOC(i) : 0);  // check if the reference abs POC is >= 0
    17701771      Int iRefIdc = 0;
    1771       for (j=0; j < pcRPS->getNumberOfPictures(); j++) // loop through the  pictures in the new RPS
    1772       {
    1773         if ( (deltaPOC + deltaRPS) == pcRPS->getDeltaPOC(j))
    1774         {
    1775           if (pcRPS->getUsed(j))
     1772      for (j=0; j < pLocalRPS->getNumberOfPictures(); j++) // loop through the  pictures in the new RPS
     1773      {
     1774        if ( (deltaPOC + deltaRPS) == pLocalRPS->getDeltaPOC(j))
     1775        {
     1776          if (pLocalRPS->getUsed(j))
    17761777          {
    17771778            iRefIdc = 1;
     
    17831784        }
    17841785      }
    1785       pcRPS->setRefIdc(i, iRefIdc);
     1786      pLocalRPS->setRefIdc(i, iRefIdc);
    17861787      iNewIdc++;
    17871788    }
    1788     pcRPS->setInterRPSPrediction(true);
    1789     pcRPS->setNumRefIdc(iNewIdc);
    1790     pcRPS->setDeltaRPS(deltaRPS);
    1791     pcRPS->setDeltaRIdxMinus1(pReferencePictureSet->getDeltaRIdxMinus1() + this->getSPS()->getRPSList()->getNumberOfReferencePictureSets() - this->getRPSidx());
    1792   }
    1793 
    1794   this->setRPS(pcRPS);
     1789    pLocalRPS->setInterRPSPrediction(true);
     1790    pLocalRPS->setNumRefIdc(iNewIdc);
     1791    pLocalRPS->setDeltaRPS(deltaRPS);
     1792    pLocalRPS->setDeltaRIdxMinus1(pReferencePictureSet->getDeltaRIdxMinus1() + this->getSPS()->getRPSList()->getNumberOfReferencePictureSets() - this->getRPSidx());
     1793  }
     1794
     1795  this->setRPS(pLocalRPS);
    17951796  this->setRPSidx(-1);
    17961797}
Note: See TracChangeset for help on using the changeset viewer.