Changeset 212 in SHVCSoftware for branches/SHM-2.1-dev/source
- Timestamp:
- 17 May 2013, 13:38:34 (12 years ago)
- Location:
- branches/SHM-2.1-dev/source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r211 r212 634 634 ("CFM", m_bUseCbfFastMode, false, "Cbf fast mode setting") 635 635 ("ESD", m_useEarlySkipDetection, false, "Early SKIP detection setting") 636 #if FAST_INTRA_SHVC 637 ("FIS", m_useFastIntraScalable, false, "Fast Intra Decision for Scalable HEVC") 638 #endif 636 639 #if RATE_CONTROL_LAMBDA_DOMAIN 637 640 #if RC_SHVC_HARMONIZATION … … 1957 1960 printf("CFM:%d ", m_bUseCbfFastMode ); 1958 1961 printf("ESD:%d ", m_useEarlySkipDetection ); 1962 #if FAST_INTRA_SHVC 1963 printf("FIS:%d ", m_useFastIntraScalable ); 1964 #endif 1959 1965 printf("RQT:%d ", 1 ); 1960 1966 printf("TransformSkip:%d ", m_useTransformSkip ); -
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.h
r211 r212 208 208 Bool m_bUseCbfFastMode; ///< flag for using Cbf Fast PU Mode Decision 209 209 Bool m_useEarlySkipDetection; ///< flag for using Early SKIP Detection 210 #if FAST_INTRA_SHVC 211 Bool m_useFastIntraScalable; ///< flag for using Fast Intra Decision for Scalable HEVC 212 #endif 210 213 Int m_sliceMode; ///< 0: no slice limits, 1 : max number of CTBs per slice, 2: max number of bytes per slice, 211 214 ///< 3: max number of tiles per slice -
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
r211 r212 225 225 m_acTEncTop[layer].setUseCbfFastMode ( m_bUseCbfFastMode ); 226 226 m_acTEncTop[layer].setUseEarlySkipDetection ( m_useEarlySkipDetection ); 227 #if FAST_INTRA_SHVC 228 m_acTEncTop[layer].setUseFastIntraScalable ( m_useFastIntraScalable ); 229 #endif 227 230 228 231 m_acTEncTop[layer].setUseTransformSkip ( m_useTransformSkip ); … … 555 558 m_cTEncTop.setUseCbfFastMode ( m_bUseCbfFastMode ); 556 559 m_cTEncTop.setUseEarlySkipDetection ( m_useEarlySkipDetection ); 560 #if FAST_INTRA_SHVC 561 m_cTEncTop.setUseFastIntraScalable ( m_useFastIntraScalable ); 562 #endif 557 563 558 564 m_cTEncTop.setUseTransformSkip ( m_useTransformSkip ); -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComDataCU.cpp
r210 r212 1647 1647 Int iLeftIntraDir, iAboveIntraDir; 1648 1648 Int uiPredNum = 0; 1649 1649 1650 1650 // Get intra direction of left PU 1651 1651 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); … … 1738 1738 return uiPredNum; 1739 1739 } 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 */ 1748 Int 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 1740 1801 1741 1802 UInt TComDataCU::getCtxSplitFlag( UInt uiAbsPartIdx, UInt uiDepth ) -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComDataCU.h
r191 r212 533 533 #endif 534 534 535 #if FAST_INTRA_SHVC 536 Int reduceSetOfIntraModes ( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int &fullSetOfModes ); 537 #endif 538 535 539 #if REF_IDX_ME_ZEROMV 536 540 Bool xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1); -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComRom.cpp
r191 r212 99 99 UInt g_auiPUOffset[8] = { 0, 8, 4, 4, 2, 10, 1, 5}; 100 100 101 #if FAST_INTRA_SHVC 102 UInt 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 }; 103 UInt 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 101 106 Void initZscanToRaster ( Int iMaxDepth, Int iDepth, UInt uiStartVal, UInt*& rpuiCurrIdx ) 102 107 { -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComRom.h
r191 r212 132 132 133 133 extern const UChar g_aucIntraModeNumFast[7]; 134 135 #if FAST_INTRA_SHVC 136 extern UInt g_reducedSetIntraModes[NUM_INTRA_MODE-1]; 137 extern UInt g_predefSetIntraModes[NUM_INTRA_MODE-1]; 138 #endif 134 139 135 140 // ==================================================================================================================== -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h
r211 r212 115 115 #define ILP_DECODED_PICTURE 0 116 116 #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) 117 122 #endif 118 123 -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCfg.h
r191 r212 204 204 Bool m_bUseCbfFastMode; 205 205 Bool m_useEarlySkipDetection; 206 #if FAST_INTRA_SHVC 207 Bool m_useFastIntraScalable; 208 #endif 206 209 Bool m_useTransformSkip; 207 210 Bool m_useTransformSkipFast; … … 507 510 Void setUseCbfFastMode ( Bool b ) { m_bUseCbfFastMode = b; } 508 511 Void setUseEarlySkipDetection ( Bool b ) { m_useEarlySkipDetection = b; } 512 #if FAST_INTRA_SHVC 513 Void setUseFastIntraScalable ( Bool b ) { m_useFastIntraScalable = b; } 514 #endif 509 515 Void setUseConstrainedIntraPred ( Bool b ) { m_bUseConstrainedIntraPred = b; } 510 516 Void setPCMInputBitDepthFlag ( Bool b ) { m_bPCMInputBitDepthFlag = b; } … … 531 537 Bool getUseCbfFastMode () { return m_bUseCbfFastMode; } 532 538 Bool getUseEarlySkipDetection () { return m_useEarlySkipDetection; } 539 #if FAST_INTRA_SHVC 540 Bool getUseFastIntraScalable () { return m_useFastIntraScalable; } 541 #endif 533 542 Bool getUseConstrainedIntraPred () { return m_bUseConstrainedIntraPred; } 534 543 Bool getPCMInputBitDepthFlag () { return m_bPCMInputBitDepthFlag; } -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r191 r212 2506 2506 { 2507 2507 assert(numModesForFullRD < numModesAvailable); 2508 #if FAST_INTRA_SHVC 2509 Int uiPreds[3] = {-1, -1, -1}; 2510 Int iMode = -1; 2511 Bool skipFastHAD = false; 2512 Int numCand = pcCU->getIntraDirLumaPredictor( uiPartOffset, uiPreds, &iMode ); 2513 2514 if ( m_pcEncCfg->getUseFastIntraScalable() ) 2515 { 2516 if( pcCU->getLayerId() > 0 ) 2517 { 2518 numModesAvailable = pcCU->reduceSetOfIntraModes(uiPartOffset, uiPreds, iMode ); 2519 if( numModesForFullRD > numModesAvailable ) //fast HAD can be skipped 2520 { 2521 skipFastHAD = true; 2522 numModesForFullRD = numModesAvailable; 2523 for( Int i=0; i < numModesForFullRD; i++ ) 2524 uiRdModeList[ i ] = g_reducedSetIntraModes[ i ]; 2525 } 2526 } 2527 } 2528 #endif 2508 2529 2509 2530 for( Int i=0; i < numModesForFullRD; i++ ) … … 2516 2537 { 2517 2538 UInt uiMode = modeIdx; 2539 #if FAST_INTRA_SHVC 2540 if ( m_pcEncCfg->getUseFastIntraScalable() ) 2541 { 2542 if( skipFastHAD )//indicates that fast HAD can be skipped 2543 break; 2544 uiMode = ( iMode==0 ) ? g_reducedSetIntraModes[modeIdx] : uiMode; //(iMode=0) indicates reduced set of modes 2545 } 2546 #endif 2518 2547 2519 2548 predIntraLumaAng( pcCU->getPattern(), uiMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); … … 2529 2558 2530 2559 #if FAST_UDI_USE_MPM 2560 #if FAST_INTRA_SHVC == 0 2531 2561 Int uiPreds[3] = {-1, -1, -1}; 2532 2562 Int iMode = -1; 2533 2563 Int numCand = pcCU->getIntraDirLumaPredictor( uiPartOffset, uiPreds, &iMode ); 2564 #endif 2534 2565 if( iMode >= 0 ) 2535 2566 {
Note: See TracChangeset for help on using the changeset viewer.