Changeset 212 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibCommon


Ignore:
Timestamp:
17 May 2013, 13:38:34 (12 years ago)
Author:
canon
Message:

integration M0115 - Fast Intra Decision - cfg parameter: FIS (off by default)
edouard.francois@…

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

Legend:

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

    r210 r212  
    16471647  Int         iLeftIntraDir, iAboveIntraDir;
    16481648  Int         uiPredNum = 0;
    1649  
     1649
    16501650  // Get intra direction of left PU
    16511651  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
     
    17381738  return uiPredNum;
    17391739}
     1740
     1741
     1742#if FAST_INTRA_SHVC
     1743/** generate limited set of remaining modes
     1744*\param   uiAbsPartIdx
     1745*\param   uiIntraDirPred  pointer to the array for MPM storage
     1746*\returns Number of intra coding modes (nb of remaining modes + 3 MPMs)
     1747*/
     1748Int TComDataCU::reduceSetOfIntraModes( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int &fullSetOfModes )
     1749{
     1750  // check BL mode
     1751  UInt          uiCUAddrBase, uiAbsPartAddrBase;
     1752  TComDataCU*   pcTempCU = getBaseColCU( uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase );
     1753
     1754  if( pcTempCU->getPredictionMode( uiAbsPartAddrBase ) != MODE_INTRA )
     1755    return( NUM_INTRA_MODE-1 );
     1756
     1757  // compute set of enabled modes g_reducedSetIntraModes[...]
     1758  Int authorizedMode[NUM_INTRA_MODE-1]={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
     1759  Int nbModes;
     1760  for (nbModes=0; nbModes<3; nbModes++)  // add 3 MPMs 1st
     1761  {
     1762    g_reducedSetIntraModes[nbModes] = uiIntraDirPred[nbModes];
     1763    authorizedMode[ uiIntraDirPred[nbModes] ] = 0;
     1764  }
     1765
     1766  Int iColBaseDir = pcTempCU->getLumaIntraDir( uiAbsPartAddrBase );
     1767  if ( authorizedMode[iColBaseDir] )  //possibly add BL mode
     1768  {
     1769    g_reducedSetIntraModes[nbModes++] = iColBaseDir;
     1770    authorizedMode[ iColBaseDir ] = 0;
     1771  }
     1772
     1773  Int iRefMode = ( iColBaseDir > 1 ) ? iColBaseDir : uiIntraDirPred[0];
     1774  if ( iRefMode > 1 )    //add neighboring modes of refMode
     1775  {
     1776    UInt Left  = iRefMode;
     1777    UInt Right = iRefMode;
     1778    while ( nbModes < NB_REMAIN_MODES+3 )
     1779    {
     1780      Left = ((Left + 29) % 32) + 2;
     1781      Right = ((Right - 1 ) % 32) + 2;
     1782      if ( authorizedMode[Left] )   g_reducedSetIntraModes[nbModes++] = Left;
     1783      if ( authorizedMode[Right] )  g_reducedSetIntraModes[nbModes++] = Right;
     1784    }
     1785  }
     1786  else      //add pre-defined modes
     1787  {
     1788    Int  idx = 0;
     1789    while ( nbModes < NB_REMAIN_MODES+3 )
     1790    {
     1791      UInt mode = g_predefSetIntraModes[idx++];
     1792      if ( authorizedMode[mode] )   g_reducedSetIntraModes[nbModes++] = mode;
     1793    }
     1794  }
     1795
     1796  fullSetOfModes = 0;
     1797  return ( nbModes );
     1798}
     1799#endif
     1800
    17401801
    17411802UInt TComDataCU::getCtxSplitFlag( UInt uiAbsPartIdx, UInt uiDepth )
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComDataCU.h

    r191 r212  
    533533#endif 
    534534
     535#if FAST_INTRA_SHVC
     536  Int           reduceSetOfIntraModes              (  UInt   uiAbsPartIdx, Int* uiIntraDirPred, Int &fullSetOfModes );
     537#endif
     538
    535539#if REF_IDX_ME_ZEROMV
    536540  Bool xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1);
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComRom.cpp

    r191 r212  
    9999UInt g_auiPUOffset[8] = { 0, 8, 4, 4, 2, 10, 1, 5};
    100100
     101#if FAST_INTRA_SHVC
     102UInt g_reducedSetIntraModes[NUM_INTRA_MODE-1] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
     103UInt g_predefSetIntraModes[NUM_INTRA_MODE-1] = {26,10,18,34,2,22,14,30,6,24,12,28,8,20,16,32,4,17,19,15,21,13,23,11,25,9,27,7,29,5,31,3,33,0,2};
     104#endif
     105
    101106Void initZscanToRaster ( Int iMaxDepth, Int iDepth, UInt uiStartVal, UInt*& rpuiCurrIdx )
    102107{
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComRom.h

    r191 r212  
    132132
    133133extern const UChar  g_aucIntraModeNumFast[7];
     134
     135#if FAST_INTRA_SHVC
     136extern       UInt  g_reducedSetIntraModes[NUM_INTRA_MODE-1];
     137extern       UInt  g_predefSetIntraModes[NUM_INTRA_MODE-1];
     138#endif
    134139
    135140// ====================================================================================================================
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h

    r211 r212  
    115115#define ILP_DECODED_PICTURE              0
    116116#define SYNTAX_OUTPUT                    0
     117#endif
     118
     119#define FAST_INTRA_SHVC                  1      ///< M0115: reduction number of intra modes in the EL (encoder only)
     120#if FAST_INTRA_SHVC
     121  #define NB_REMAIN_MODES                2      ///< nb of remaining modes (M0115)
    117122#endif
    118123
Note: See TracChangeset for help on using the changeset viewer.