Index: branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1243)
+++ branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1244)
@@ -1434,5 +1434,5 @@
 *\returns Number of MPM
 */
-Int TComDataCU::getIntraDirPredictor( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode  )
+Void TComDataCU::getIntraDirPredictor( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode  )
 {
   TComDataCU* pcCULeft, *pcCUAbove;
@@ -1440,5 +1440,4 @@
   UInt        AbovePartIdx = MAX_UINT;
   Int         iLeftIntraDir, iAboveIntraDir;
-  Int         uiPredNum = 0;
 
   const ChannelType chType = toChannelType(compID);
@@ -1463,5 +1462,4 @@
 
   assert (2<NUM_MOST_PROBABLE_MODES);
-  uiPredNum = NUM_MOST_PROBABLE_MODES;
   if(iLeftIntraDir == iAboveIntraDir)
   {
@@ -1502,8 +1500,6 @@
     }
   }
-  for (Int i=0; i<uiPredNum; i++)
+  for (UInt i=0; i<NUM_MOST_PROBABLE_MODES; i++)
     assert(uiIntraDirPred[i] < 35);
-
-  return uiPredNum;
 }
 
Index: branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h	(revision 1243)
+++ branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h	(revision 1244)
@@ -459,5 +459,5 @@
 
   Void          getAllowedChromaDir             ( UInt uiAbsPartIdx, UInt* uiModeList );
-  Int           getIntraDirPredictor            ( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode = NULL );
+  Void          getIntraDirPredictor            ( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode = NULL );
 
   // -------------------------------------------------------------------------------------------------------------------
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1243)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1244)
@@ -655,5 +655,5 @@
   {
     Int preds[NUM_MOST_PROBABLE_MODES] = {-1, -1, -1};
-    Int predNum = pcCU->getIntraDirPredictor(absPartIdx+partOffset*j, preds, COMPONENT_Y);
+    pcCU->getIntraDirPredictor(absPartIdx+partOffset*j, preds, COMPONENT_Y);
     if (mpmPred[j])
     {
@@ -672,5 +672,4 @@
 
       //postponed sorting of MPMs (only in remaining branch)
-      assert(predNum>=3); // It is currently always 3!
       if (preds[0] > preds[1])
       {
@@ -685,5 +684,5 @@
         std::swap(preds[1], preds[2]);
       }
-      for ( Int i = 0; i < predNum; i++ )
+      for ( UInt i = 0; i < NUM_MOST_PROBABLE_MODES; i++ )
       {
         intraPredMode += ( intraPredMode >= preds[i] );
Index: branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1243)
+++ branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1244)
@@ -642,5 +642,5 @@
   UInt dir[4],j;
   Int preds[4][NUM_MOST_PROBABLE_MODES] = {{-1, -1, -1},{-1, -1, -1},{-1, -1, -1},{-1, -1, -1}};
-  Int predNum[4], predIdx[4] ={ -1,-1,-1,-1};
+  Int predIdx[4] ={ -1,-1,-1,-1};
   PartSize mode = pcCU->getPartitionSize( absPartIdx );
   UInt partNum = isMultiple?(mode==SIZE_NxN?4:1):1;
@@ -649,6 +649,6 @@
   {
     dir[j] = pcCU->getIntraDir( CHANNEL_TYPE_LUMA, absPartIdx+partOffset*j );
-    predNum[j] = pcCU->getIntraDirPredictor(absPartIdx+partOffset*j, preds[j], COMPONENT_Y);
-    for(UInt i = 0; i < predNum[j]; i++)
+    pcCU->getIntraDirPredictor(absPartIdx+partOffset*j, preds[j], COMPONENT_Y);
+    for(UInt i = 0; i < NUM_MOST_PROBABLE_MODES; i++)
     {
       if(dir[j] == preds[j][i])
@@ -671,5 +671,4 @@
     else
     {
-      assert(predNum[j]>=3); // It is currently always 3!
       if (preds[j][0] > preds[j][1])
       {
@@ -684,5 +683,5 @@
         std::swap(preds[j][1], preds[j][2]);
       }
-      for(Int i = (predNum[j] - 1); i >= 0; i--)
+      for(Int i = (Int(NUM_MOST_PROBABLE_MODES) - 1); i >= 0; i--)
       {
         dir[j] = dir[j] > preds[j][i] ? dir[j] - 1 : dir[j];
Index: branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1243)
+++ branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1244)
@@ -2218,5 +2218,5 @@
       Int   iMode = -1;
       Bool  skipFastHAD = false;
-      Int numCand = pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode );
+      pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode );
 
       if( m_pcEncCfg->getUseFastIntraScalable() && pcCU->getLayerId() > 0 )
@@ -2292,10 +2292,7 @@
 
       Int iMode = -1;
-      Int numCand = pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode );
-#endif
-      if( iMode >= 0 )
-      {
-        numCand = iMode;
-      }
+      pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode );
+#endif
+      const Int numCand = ( iMode >= 0 ) ? iMode : Int(NUM_MOST_PROBABLE_MODES);      
 
       for( Int j=0; j < numCand; j++)
