Changeset 1244 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder


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

port rev 4236

Location:
branches/SHM-dev/source/Lib/TLibEncoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.