Changeset 1287 in 3DVCSoftware for branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComSlice.cpp
- Timestamp:
- 20 Jul 2015, 14:13:33 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComSlice.cpp
r1279 r1287 56 56 , m_iAssociatedIRAP ( 0 ) 57 57 , m_iAssociatedIRAPType ( NAL_UNIT_INVALID ) 58 , m_p cRPS( 0 )59 , m_ LocalRPS ( )60 , m_ iBDidx ( 0 )58 , m_pRPS ( 0 ) 59 , m_localRPS ( ) 60 , m_rpsIdx ( 0 ) 61 61 , m_RefPicListModification ( ) 62 62 , m_eNalUnitType ( NAL_UNIT_CODED_SLICE_IDR_W_RADL ) … … 465 465 Int i; 466 466 467 for(i=0; i < m_p cRPS->getNumberOfNegativePictures(); i++)468 { 469 if(m_p cRPS->getUsed(i))470 { 471 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_p cRPS->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)); 472 472 pcRefPic->setIsLongTerm(0); 473 473 pcRefPic->getPicYuvRec()->extendPicBorder(); … … 478 478 } 479 479 480 for(; i < m_p cRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++)481 { 482 if(m_p cRPS->getUsed(i))483 { 484 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_p cRPS->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)); 485 485 pcRefPic->setIsLongTerm(0); 486 486 pcRefPic->getPicYuvRec()->extendPicBorder(); … … 491 491 } 492 492 493 for(i = m_p cRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--)494 { 495 if(m_p cRPS->getUsed(i))496 { 497 pcRefPic = xGetLongTermRefPic(rcListPic, m_p cRPS->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)); 498 498 pcRefPic->setIsLongTerm(1); 499 499 pcRefPic->getPicYuvRec()->extendPicBorder(); … … 503 503 if(pcRefPic==NULL) 504 504 { 505 pcRefPic = xGetLongTermRefPic(rcListPic, m_p cRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));506 } 507 pcRefPic->setCheckLTMSBPresent(m_p cRPS->getCheckLTMSBPresent(i));505 pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i)); 506 } 507 pcRefPic->setCheckLTMSBPresent(m_pRPS->getCheckLTMSBPresent(i)); 508 508 } 509 509 … … 620 620 m_pocsInCurrRPSs.clear(); 621 621 #endif 622 for(i=0; i < m_p cRPS->getNumberOfNegativePictures(); i++)623 { 624 if(m_p cRPS->getUsed(i))625 { 626 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_p cRPS->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)); 627 627 pcRefPic->setIsLongTerm(0); 628 628 pcRefPic->getPicYuvRec()->extendPicBorder(); … … 636 636 } 637 637 638 for(; i < m_p cRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++)639 { 640 if(m_p cRPS->getUsed(i))641 { 642 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_p cRPS->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)); 643 643 pcRefPic->setIsLongTerm(0); 644 644 pcRefPic->getPicYuvRec()->extendPicBorder(); … … 652 652 } 653 653 654 for(i = m_p cRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--)655 { 656 if(m_p cRPS->getUsed(i))657 { 658 pcRefPic = xGetLongTermRefPic(rcListPic, m_p cRPS->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)); 659 659 pcRefPic->setIsLongTerm(1); 660 660 pcRefPic->getPicYuvRec()->extendPicBorder(); … … 667 667 if(pcRefPic==NULL) 668 668 { 669 pcRefPic = xGetLongTermRefPic(rcListPic, m_p cRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));670 } 671 pcRefPic->setCheckLTMSBPresent(m_p cRPS->getCheckLTMSBPresent(i));669 pcRefPic = xGetLongTermRefPic(rcListPic, m_pRPS->getPOC(i), m_pRPS->getCheckLTMSBPresent(i)); 670 } 671 pcRefPic->setCheckLTMSBPresent(m_pRPS->getCheckLTMSBPresent(i)); 672 672 } 673 673 … … 798 798 return 0; 799 799 } 800 for(UInt i=0; i < m_p cRPS->getNumberOfNegativePictures()+ m_pcRPS->getNumberOfPositivePictures() + m_pcRPS->getNumberOfLongtermPictures(); i++)801 { 802 if(m_p cRPS->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)) 803 803 { 804 804 numRpsCurrTempList++; … … 1097 1097 m_pcVPS = pSrc->m_pcVPS; 1098 1098 #endif 1099 m_pcRPS = pSrc->m_pcRPS; 1100 m_iLastIDR = pSrc->m_iLastIDR; 1099 m_pRPS = pSrc->m_pRPS; m_iLastIDR = pSrc->m_iLastIDR; 1101 1100 1102 1101 m_pcPic = pSrc->m_pcPic; … … 1687 1686 Int nrOfNegativePictures = 0; 1688 1687 Int nrOfPositivePictures = 0; 1689 TComReferencePictureSet* pcRPS = this->getLocalRPS(); 1688 TComReferencePictureSet* pLocalRPS = this->getLocalRPS(); 1689 (*pLocalRPS)=TComReferencePictureSet(); 1690 1690 1691 Bool irapIsInRPS = false; // Used when bEfficientFieldIRAPEnabled==true 1691 1692 … … 1705 1706 // This picture exists as a reference picture 1706 1707 // and should be added to the explicit Reference Picture Set 1707 p cRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i));1708 p cRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP));1708 pLocalRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i)); 1709 pLocalRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP)); 1709 1710 if (bEfficientFieldIRAPEnabled) 1710 1711 { 1711 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) );1712 } 1713 1714 if(p cRPS->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) 1715 1716 { 1716 1717 nrOfNegativePictures++; … … 1739 1740 if(rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getAssociatedIRAPPOC() && this->getAssociatedIRAPPOC() == this->getPOC()+1) 1740 1741 { 1741 p cRPS->setDeltaPOC(k, 1);1742 p cRPS->setUsed(k, true);1742 pLocalRPS->setDeltaPOC(k, 1); 1743 pLocalRPS->setUsed(k, true); 1743 1744 nrOfPositivePictures++; 1744 1745 k ++; … … 1747 1748 } 1748 1749 } 1749 p cRPS->setNumberOfNegativePictures(nrOfNegativePictures);1750 p cRPS->setNumberOfPositivePictures(nrOfPositivePictures);1751 p cRPS->setNumberOfPictures(nrOfNegativePictures+nrOfPositivePictures);1750 pLocalRPS->setNumberOfNegativePictures(nrOfNegativePictures); 1751 pLocalRPS->setNumberOfPositivePictures(nrOfPositivePictures); 1752 pLocalRPS->setNumberOfPictures(nrOfNegativePictures+nrOfPositivePictures); 1752 1753 // This is a simplistic inter rps example. A smarter encoder will look for a better reference RPS to do the 1753 1754 // inter RPS prediction with. Here we just use the reference used by pReferencePictureSet. … … 1755 1756 if (!pReferencePictureSet->getInterRPSPrediction() || useNewRPS ) 1756 1757 { 1757 p cRPS->setInterRPSPrediction(false);1758 p cRPS->setNumRefIdc(0);1758 pLocalRPS->setInterRPSPrediction(false); 1759 pLocalRPS->setNumRefIdc(0); 1759 1760 } 1760 1761 else … … 1769 1770 Int deltaPOC = ((i != iRefPics)? pcRefRPS->getDeltaPOC(i) : 0); // check if the reference abs POC is >= 0 1770 1771 Int iRefIdc = 0; 1771 for (j=0; j < p cRPS->getNumberOfPictures(); j++) // loop through the pictures in the new RPS1772 { 1773 if ( (deltaPOC + deltaRPS) == p cRPS->getDeltaPOC(j))1774 { 1775 if (p cRPS->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)) 1776 1777 { 1777 1778 iRefIdc = 1; … … 1783 1784 } 1784 1785 } 1785 p cRPS->setRefIdc(i, iRefIdc);1786 pLocalRPS->setRefIdc(i, iRefIdc); 1786 1787 iNewIdc++; 1787 1788 } 1788 p cRPS->setInterRPSPrediction(true);1789 p cRPS->setNumRefIdc(iNewIdc);1790 p cRPS->setDeltaRPS(deltaRPS);1791 p cRPS->setDeltaRIdxMinus1(pReferencePictureSet->getDeltaRIdxMinus1() + this->getSPS()->getRPSList()->getNumberOfReferencePictureSets() - this->getRPSidx());1792 } 1793 1794 this->setRPS(p cRPS);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); 1795 1796 this->setRPSidx(-1); 1796 1797 }
Note: See TracChangeset for help on using the changeset viewer.