Ticket #928: colref_fix.patch
File colref_fix.patch, 5.8 KB (added by mcoban, 12 years ago) |
---|
-
Lib/TLibCommon/TComDataCU.cpp
3549 3549 3550 3550 iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC(); 3551 3551 Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm(); 3552 Bool bIsColRefLongTerm = pColCU->getSlice()->get RefPic(eColRefPicList, iColRefIdx)->getIsUsedAsLongTerm();3552 Bool bIsColRefLongTerm = pColCU->getSlice()->getIsUsedAsLongTerm(eColRefPicList, iColRefIdx); 3553 3553 3554 3554 if ( bIsCurrRefLongTerm != bIsColRefLongTerm ) 3555 3555 { … … 3701 3701 3702 3702 Int iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, iRefIdx)->getPOC(); 3703 3703 Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, iRefIdx)->getIsLongTerm(); 3704 Bool bIsColRefLongTerm = pColCU->getSlice()->get RefPic(eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiPartIdxCenter))->getIsUsedAsLongTerm();3704 Bool bIsColRefLongTerm = pColCU->getSlice()->getIsUsedAsLongTerm(eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiPartIdxCenter)); 3705 3705 3706 3706 if ( bIsCurrRefLongTerm != bIsColRefLongTerm ) 3707 3707 { -
Lib/TLibCommon/TComPic.h
101 101 Void setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; } 102 102 Bool getIsLongTerm() { return m_bIsLongTerm; } 103 103 Void setIsLongTerm( Bool lt ) { m_bIsLongTerm = lt; } 104 Bool getIsUsedAsLongTerm() { return m_bIsUsedAsLongTerm; }105 Void setIsUsedAsLongTerm( Bool lt ) { m_bIsUsedAsLongTerm = lt; }106 104 Void setCheckLTMSBPresent (Bool b ) {m_bCheckLTMSB=b;} 107 105 Bool getCheckLTMSBPresent () { return m_bCheckLTMSB;} 108 106 -
Lib/TLibCommon/TComSlice.cpp
370 370 { 371 371 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i)); 372 372 pcRefPic->setIsLongTerm(0); 373 pcRefPic->setIsUsedAsLongTerm(0);374 373 pcRefPic->getPicYuvRec()->extendPicBorder(); 375 374 RefPicSetStCurr0[NumPocStCurr0] = pcRefPic; 376 375 NumPocStCurr0++; … … 383 382 { 384 383 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i)); 385 384 pcRefPic->setIsLongTerm(0); 386 pcRefPic->setIsUsedAsLongTerm(0);387 385 pcRefPic->getPicYuvRec()->extendPicBorder(); 388 386 RefPicSetStCurr1[NumPocStCurr1] = pcRefPic; 389 387 NumPocStCurr1++; … … 396 394 { 397 395 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i)); 398 396 pcRefPic->setIsLongTerm(1); 399 pcRefPic->setIsUsedAsLongTerm(1);400 397 pcRefPic->getPicYuvRec()->extendPicBorder(); 401 398 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic; 402 399 NumPocLtCurr++; … … 447 444 } 448 445 } 449 446 447 ::memset(m_bIsUsedAsLongTerm, 0, sizeof(m_bIsUsedAsLongTerm)); 448 450 449 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[0]-1); rIdx ++) 451 450 { 452 451 m_apcRefPicList[0][rIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? rpsCurrList0[ m_RefPicListModification.getRefPicSetIdxL0(rIdx) ] : rpsCurrList0[rIdx % numPocTotalCurr]; 452 m_bIsUsedAsLongTerm[0][rIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? (m_RefPicListModification.getRefPicSetIdxL0(rIdx) >= (NumPocStCurr0 + NumPocStCurr1)) 453 : ((rIdx % numPocTotalCurr) >= (NumPocStCurr0 + NumPocStCurr1)); 453 454 } 454 455 if ( m_eSliceType == P_SLICE ) 455 456 { … … 461 462 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[1]-1); rIdx ++) 462 463 { 463 464 m_apcRefPicList[1][rIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? rpsCurrList1[ m_RefPicListModification.getRefPicSetIdxL1(rIdx) ] : rpsCurrList1[rIdx % numPocTotalCurr]; 465 m_bIsUsedAsLongTerm[1][rIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? 466 (m_RefPicListModification.getRefPicSetIdxL1(rIdx) >= (NumPocStCurr0 + NumPocStCurr1)): ((rIdx % numPocTotalCurr) >= (NumPocStCurr0 + NumPocStCurr1)); 464 467 } 465 468 } 466 469 #else … … 886 889 isReference = 1; 887 890 rpcPic->setUsedByCurr(pReferencePictureSet->getUsed(i)); 888 891 rpcPic->setIsLongTerm(0); 889 rpcPic->setIsUsedAsLongTerm(0);890 892 } 891 893 } 892 894 for(;i<pReferencePictureSet->getNumberOfPictures();i++) … … 981 983 { 982 984 isAvailable = 1; 983 985 rpcPic->setIsLongTerm(1); 984 rpcPic->setIsUsedAsLongTerm(1);985 986 break; 986 987 } 987 988 } -
Lib/TLibCommon/TComSlice.h
1171 1171 Int m_iSliceQpDeltaCr; 1172 1172 TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; 1173 1173 Int m_aiRefPOCList [2][MAX_NUM_REF+1]; 1174 Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; 1174 1175 Int m_iDepth; 1175 1176 1176 1177 // referenced slice? … … 1298 1299 UInt getColFromL0Flag () { return m_colFromL0Flag; } 1299 1300 UInt getColRefIdx () { return m_colRefIdx; } 1300 1301 Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); 1302 Bool getIsUsedAsLongTerm (Int i, Int j) { return m_bIsUsedAsLongTerm[i][j]; } 1301 1303 Bool getCheckLDC () { return m_bCheckLDC; } 1302 1304 Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } 1303 1305 Int getNumRpsCurrTempList();