Ticket #599: MSBCYCLE_BUGFIX_r2479.patch
File MSBCYCLE_BUGFIX_r2479.patch, 4.2 KB (added by adarsh, 11 years ago) |
---|
-
TComSlice.cpp
271 271 return pcPic; 272 272 } 273 273 274 274 #if MSBCYCLE_BUGFIX 275 275 TComPic* TComSlice::xGetLongTermRefPic (TComList<TComPic*>& rcListPic, 276 UInt uiPOC, Bool msbPresent) 277 #else 278 TComPic* TComSlice::xGetLongTermRefPic (TComList<TComPic*>& rcListPic, 276 279 UInt uiPOC) 280 #endif 277 281 { 278 282 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 279 283 TComPic* pcPic = *(iterPic); … … 281 285 while ( iterPic != rcListPic.end() ) 282 286 { 283 287 pcPic = *(iterPic); 288 #if MSBCYCLE_BUGFIX 289 if(pcPic && 290 ( ((pcPic->getPOC()%(1<<getSPS()->getBitsForPOC())) == (uiPOC%(1<<getSPS()->getBitsForPOC())) && !msbPresent ) || 291 ((pcPic->getPOC() == uiPOC) && msbPresent ) 292 ) 293 ) 294 #else 284 295 if(pcPic && (pcPic->getPOC()%(1<<getSPS()->getBitsForPOC())) == (uiPOC%(1<<getSPS()->getBitsForPOC()))) 296 #endif 285 297 { 286 298 if(pcPic->getIsLongTerm()) 287 299 return pcPic; … … 426 438 { 427 439 if(m_pcRPS->getUsed(i)) 428 440 { 441 #if MSBCYCLE_BUGFIX 442 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i)); 443 #else 429 444 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i)); 445 #endif 430 446 pcRefPic->setIsLongTerm(1); 431 447 #if NO_MV_SCALING_IF_LONG_TERM_REF 432 448 pcRefPic->setIsUsedAsLongTerm(1); … … 437 453 } 438 454 if(pcRefPic==NULL) 439 455 { 456 #if MSBCYCLE_BUGFIX 457 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i)); 458 #else 440 459 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i)); 460 #endif 441 461 } 442 462 pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i)); 443 463 } … … 980 1000 { 981 1001 j++; 982 1002 rpcPic = *(iterPic++); 983 1003 #if MSBCYCLE_BUGFIX 1004 Int maxPicOrderCntLsb = (1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC()); 1005 Int currPOC = rpcPic->getPicSym()->getSlice(0)->getPOC(); 1006 Int currLSB = currPOC % maxPicOrderCntLsb; 1007 Int refPOC = pReferencePictureSet->getPOC(i); 1008 Int refLSB = refPOC % maxPicOrderCntLsb; 1009 if(rpcPic->getSlice(0)->isReferenced() && 1010 ( 1011 ( (currLSB == refLSB) && !pReferencePictureSet->getCheckLTMSBPresent(i)) || 1012 ( (currPOC == refPOC) && pReferencePictureSet->getCheckLTMSBPresent(i)) 1013 ) 1014 ) 1015 1016 #else 984 1017 if((rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == (this->getPOC() + pReferencePictureSet->getDeltaPOC(i))%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC()) && rpcPic->getSlice(0)->isReferenced()) 1018 #endif 985 1019 { 986 1020 isAvailable = 1; 987 1021 rpcPic->setIsLongTerm(1); -
TComSlice.h
1425 1425 protected: 1426 1426 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, 1427 1427 UInt uiPOC); 1428 #if MSBCYCLE_BUGFIX 1429 TComPic* xGetLongTermRefPic (TComList<TComPic*>& rcListPic, 1430 UInt uiPOC, Bool msbPresent); 1431 #else 1428 1432 TComPic* xGetLongTermRefPic (TComList<TComPic*>& rcListPic, 1429 1433 UInt uiPOC); 1434 #endif 1430 1435 };// END CLASS DEFINITION TComSlice 1431 1436 1432 1437 -
TypeDef.h
40 40 41 41 //! \ingroup TLibCommon 42 42 //! \{ 43 #define MSBCYCLE_BUGFIX 1 ////< Bug fix: MSB presence check while accessing LTRPs. 43 44 #define TEMPORAL_ID_RESTRICTION 1 ///< I0600: Semantics of temporal_id changed 44 45 #define PREVREFPIC_DEFN 1 ///< I0345: prevRefPic defined as previous reference picture that is at same or lower 45 46 ///< temporal layer.