Changeset 1244 in SHVCSoftware


Ignore:
Timestamp:
13 Jul 2015, 22:58:16 (9 years ago)
Author:
seregin
Message:

port rev 4236

Location:
branches/SHM-dev/source/Lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1236 r1244  
    14341434*\returns Number of MPM
    14351435*/
    1436 Int TComDataCU::getIntraDirPredictor( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode  )
     1436Void TComDataCU::getIntraDirPredictor( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode  )
    14371437{
    14381438  TComDataCU* pcCULeft, *pcCUAbove;
     
    14401440  UInt        AbovePartIdx = MAX_UINT;
    14411441  Int         iLeftIntraDir, iAboveIntraDir;
    1442   Int         uiPredNum = 0;
    14431442
    14441443  const ChannelType chType = toChannelType(compID);
     
    14631462
    14641463  assert (2<NUM_MOST_PROBABLE_MODES);
    1465   uiPredNum = NUM_MOST_PROBABLE_MODES;
    14661464  if(iLeftIntraDir == iAboveIntraDir)
    14671465  {
     
    15021500    }
    15031501  }
    1504   for (Int i=0; i<uiPredNum; i++)
     1502  for (UInt i=0; i<NUM_MOST_PROBABLE_MODES; i++)
    15051503    assert(uiIntraDirPred[i] < 35);
    1506 
    1507   return uiPredNum;
    15081504}
    15091505
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h

    r1236 r1244  
    459459
    460460  Void          getAllowedChromaDir             ( UInt uiAbsPartIdx, UInt* uiModeList );
    461   Int           getIntraDirPredictor            ( 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 );
    462462
    463463  // -------------------------------------------------------------------------------------------------------------------
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp

    r1235 r1244  
    655655  {
    656656    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);
    658658    if (mpmPred[j])
    659659    {
     
    672672
    673673      //postponed sorting of MPMs (only in remaining branch)
    674       assert(predNum>=3); // It is currently always 3!
    675674      if (preds[0] > preds[1])
    676675      {
     
    685684        std::swap(preds[1], preds[2]);
    686685      }
    687       for ( Int i = 0; i < predNum; i++ )
     686      for ( UInt i = 0; i < NUM_MOST_PROBABLE_MODES; i++ )
    688687      {
    689688        intraPredMode += ( intraPredMode >= preds[i] );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp

    r1235 r1244  
    642642  UInt dir[4],j;
    643643  Int preds[4][NUM_MOST_PROBABLE_MODES] = {{-1, -1, -1},{-1, -1, -1},{-1, -1, -1},{-1, -1, -1}};
    644   Int predNum[4], predIdx[4] ={ -1,-1,-1,-1};
     644  Int predIdx[4] ={ -1,-1,-1,-1};
    645645  PartSize mode = pcCU->getPartitionSize( absPartIdx );
    646646  UInt partNum = isMultiple?(mode==SIZE_NxN?4:1):1;
     
    649649  {
    650650    dir[j] = pcCU->getIntraDir( CHANNEL_TYPE_LUMA, absPartIdx+partOffset*j );
    651     predNum[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++)
    653653    {
    654654      if(dir[j] == preds[j][i])
     
    671671    else
    672672    {
    673       assert(predNum[j]>=3); // It is currently always 3!
    674673      if (preds[j][0] > preds[j][1])
    675674      {
     
    684683        std::swap(preds[j][1], preds[j][2]);
    685684      }
    686       for(Int i = (predNum[j] - 1); i >= 0; i--)
     685      for(Int i = (Int(NUM_MOST_PROBABLE_MODES) - 1); i >= 0; i--)
    687686      {
    688687        dir[j] = dir[j] > preds[j][i] ? dir[j] - 1 : dir[j];
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1243 r1244  
    22182218      Int   iMode = -1;
    22192219      Bool  skipFastHAD = false;
    2220       Int numCand = pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode );
     2220      pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode );
    22212221
    22222222      if( m_pcEncCfg->getUseFastIntraScalable() && pcCU->getLayerId() > 0 )
     
    22922292
    22932293      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);     
    23002297
    23012298      for( Int j=0; j < numCand; j++)
Note: See TracChangeset for help on using the changeset viewer.