Changeset 1244 in SHVCSoftware
- Timestamp:
- 13 Jul 2015, 22:58:16 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1236 r1244 1434 1434 *\returns Number of MPM 1435 1435 */ 1436 IntTComDataCU::getIntraDirPredictor( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode )1436 Void TComDataCU::getIntraDirPredictor( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode ) 1437 1437 { 1438 1438 TComDataCU* pcCULeft, *pcCUAbove; … … 1440 1440 UInt AbovePartIdx = MAX_UINT; 1441 1441 Int iLeftIntraDir, iAboveIntraDir; 1442 Int uiPredNum = 0;1443 1442 1444 1443 const ChannelType chType = toChannelType(compID); … … 1463 1462 1464 1463 assert (2<NUM_MOST_PROBABLE_MODES); 1465 uiPredNum = NUM_MOST_PROBABLE_MODES;1466 1464 if(iLeftIntraDir == iAboveIntraDir) 1467 1465 { … … 1502 1500 } 1503 1501 } 1504 for ( Int i=0; i<uiPredNum; i++)1502 for (UInt i=0; i<NUM_MOST_PROBABLE_MODES; i++) 1505 1503 assert(uiIntraDirPred[i] < 35); 1506 1507 return uiPredNum;1508 1504 } 1509 1505 -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1236 r1244 459 459 460 460 Void getAllowedChromaDir ( UInt uiAbsPartIdx, UInt* uiModeList ); 461 IntgetIntraDirPredictor ( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode = NULL );461 Void getIntraDirPredictor ( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode = NULL ); 462 462 463 463 // ------------------------------------------------------------------------------------------------------------------- -
branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp
r1235 r1244 655 655 { 656 656 Int preds[NUM_MOST_PROBABLE_MODES] = {-1, -1, -1}; 657 Int predNum =pcCU->getIntraDirPredictor(absPartIdx+partOffset*j, preds, COMPONENT_Y);657 pcCU->getIntraDirPredictor(absPartIdx+partOffset*j, preds, COMPONENT_Y); 658 658 if (mpmPred[j]) 659 659 { … … 672 672 673 673 //postponed sorting of MPMs (only in remaining branch) 674 assert(predNum>=3); // It is currently always 3!675 674 if (preds[0] > preds[1]) 676 675 { … … 685 684 std::swap(preds[1], preds[2]); 686 685 } 687 for ( Int i = 0; i < predNum; i++ )686 for ( UInt i = 0; i < NUM_MOST_PROBABLE_MODES; i++ ) 688 687 { 689 688 intraPredMode += ( intraPredMode >= preds[i] ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp
r1235 r1244 642 642 UInt dir[4],j; 643 643 Int preds[4][NUM_MOST_PROBABLE_MODES] = {{-1, -1, -1},{-1, -1, -1},{-1, -1, -1},{-1, -1, -1}}; 644 Int pred Num[4], predIdx[4] ={ -1,-1,-1,-1};644 Int predIdx[4] ={ -1,-1,-1,-1}; 645 645 PartSize mode = pcCU->getPartitionSize( absPartIdx ); 646 646 UInt partNum = isMultiple?(mode==SIZE_NxN?4:1):1; … … 649 649 { 650 650 dir[j] = pcCU->getIntraDir( CHANNEL_TYPE_LUMA, absPartIdx+partOffset*j ); 651 p redNum[j] = pcCU->getIntraDirPredictor(absPartIdx+partOffset*j, preds[j], COMPONENT_Y);652 for(UInt i = 0; i < predNum[j]; i++)651 pcCU->getIntraDirPredictor(absPartIdx+partOffset*j, preds[j], COMPONENT_Y); 652 for(UInt i = 0; i < NUM_MOST_PROBABLE_MODES; i++) 653 653 { 654 654 if(dir[j] == preds[j][i]) … … 671 671 else 672 672 { 673 assert(predNum[j]>=3); // It is currently always 3!674 673 if (preds[j][0] > preds[j][1]) 675 674 { … … 684 683 std::swap(preds[j][1], preds[j][2]); 685 684 } 686 for(Int i = ( predNum[j]- 1); i >= 0; i--)685 for(Int i = (Int(NUM_MOST_PROBABLE_MODES) - 1); i >= 0; i--) 687 686 { 688 687 dir[j] = dir[j] > preds[j][i] ? dir[j] - 1 : dir[j]; -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1243 r1244 2218 2218 Int iMode = -1; 2219 2219 Bool skipFastHAD = false; 2220 Int numCand =pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode );2220 pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode ); 2221 2221 2222 2222 if( m_pcEncCfg->getUseFastIntraScalable() && pcCU->getLayerId() > 0 ) … … 2292 2292 2293 2293 Int iMode = -1; 2294 Int numCand = pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode ); 2295 #endif 2296 if( iMode >= 0 ) 2297 { 2298 numCand = iMode; 2299 } 2294 pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode ); 2295 #endif 2296 const Int numCand = ( iMode >= 0 ) ? iMode : Int(NUM_MOST_PROBABLE_MODES); 2300 2297 2301 2298 for( Int j=0; j < numCand; j++)
Note: See TracChangeset for help on using the changeset viewer.