Changeset 212 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibCommon
- Timestamp:
- 17 May 2013, 13:38:34 (12 years ago)
- 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 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
Note: See TracChangeset for help on using the changeset viewer.