Ticket #1253: getIntraDirLumaPredictor.patch
File getIntraDirLumaPredictor.patch, 4.1 KB (added by kolya, 11 years ago) |
---|
-
source/Lib/TLibDecoder/TDecSbac.cpp
602 602 603 603 Void TDecSbac::parseIntraDirLumaAng ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) 604 604 { 605 const int iPredNum = 3; 605 606 PartSize mode = pcCU->getPartitionSize( absPartIdx ); 606 607 UInt partNum = mode==SIZE_NxN?4:1; 607 608 UInt partOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth(absPartIdx) << 1 ) ) >> 2; … … 619 620 for (j=0;j<partNum;j++) 620 621 { 621 622 Int preds[3] = {-1, -1, -1}; 622 Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds);623 pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds); 623 624 if (mpmPred[j]) 624 625 { 625 626 m_pcTDecBinIf->decodeBinEP( symbol ); … … 648 649 { 649 650 std::swap(preds[1], preds[2]); 650 651 } 651 for ( Int i = 0; i < predNum; i++ )652 for ( Int i = 0; i < iPredNum; i++ ) 652 653 { 653 654 intraPredMode += ( intraPredMode >= preds[i] ); 654 655 } -
source/Lib/TLibEncoder/TEncSearch.cpp
2462 2462 #if FAST_UDI_USE_MPM 2463 2463 Int uiPreds[3] = {-1, -1, -1}; 2464 2464 Int iMode = -1; 2465 Int numCand = pcCU->getIntraDirLumaPredictor( uiPartOffset, uiPreds, &iMode ); 2466 if( iMode >= 0 ) 2467 { 2468 numCand = iMode; 2469 } 2465 pcCU->getIntraDirLumaPredictor( uiPartOffset, uiPreds, &iMode ); 2466 const Int iNumCand = iMode >= 0 ? iMode : 3; 2470 2467 2471 for( Int j=0; j < numCand; j++)2468 for( Int j=0; j < iNumCand; j++) 2472 2469 { 2473 2470 Bool mostProbableModeIncluded = false; 2474 2471 Int mostProbableMode = uiPreds[j]; -
source/Lib/TLibEncoder/TEncSbac.cpp
619 619 for (j=0;j<partNum;j++) 620 620 { 621 621 dir[j] = pcCU->getLumaIntraDir( absPartIdx+partOffset*j ); 622 predNum[j] = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds[j]); 622 predNum[j] = 3; 623 pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds[j]); 623 624 for(UInt i = 0; i < predNum[j]; i++) 624 625 { 625 626 if(dir[j] == preds[j][i]) -
source/Lib/TLibCommon/TComDataCU.cpp
1609 1609 *\param piMode it is set with MPM mode in case both MPM are equal. It is used to restrict RD search at encode side. 1610 1610 *\returns Number of MPM 1611 1611 */ 1612 IntTComDataCU::getIntraDirLumaPredictor( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int* piMode )1612 Void TComDataCU::getIntraDirLumaPredictor( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int* piMode ) 1613 1613 { 1614 1614 TComDataCU* pcTempCU; 1615 1615 UInt uiTempPartIdx; … … 1666 1666 } 1667 1667 } 1668 1668 1669 return uiPredNum;1669 return; 1670 1670 } 1671 1671 1672 1672 UInt TComDataCU::getCtxSplitFlag( UInt uiAbsPartIdx, UInt uiDepth ) -
source/Lib/TLibCommon/TComDataCU.h
435 435 UInt getIntraSizeIdx ( UInt uiAbsPartIdx ); 436 436 437 437 Void getAllowedChromaDir ( UInt uiAbsPartIdx, UInt* uiModeList ); 438 IntgetIntraDirLumaPredictor ( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int* piMode = NULL );438 Void getIntraDirLumaPredictor ( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int* piMode = NULL ); 439 439 440 440 // ------------------------------------------------------------------------------------------------------------------- 441 441 // member functions for SBAC context