Changeset 1418 in SHVCSoftware for branches/SHM-dev
- Timestamp:
- 4 Aug 2015, 20:21:46 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1395 r1418 102 102 103 103 m_bDecSubCu = false; 104 105 #if FAST_INTRA_SHVC 106 ::memset( m_reducedSetIntraModes, 0, sizeof(m_reducedSetIntraModes) ); 107 #endif 104 108 } 105 109 … … 3368 3372 { 3369 3373 return( NUM_INTRA_MODE-1 ); 3370 } 3371 3372 // compute set of enabled modes g_reducedSetIntraModes[...]3374 } 3375 3376 // compute set of enabled modes m_reducedSetIntraModes[...] 3373 3377 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}; 3374 3378 Int nbModes; 3375 3379 for (nbModes=0; nbModes<3; nbModes++) // add 3 MPMs 1st 3376 3380 { 3377 g_reducedSetIntraModes[nbModes] = uiIntraDirPred[nbModes];3381 m_reducedSetIntraModes[nbModes] = uiIntraDirPred[nbModes]; 3378 3382 authorizedMode[ uiIntraDirPred[nbModes] ] = 0; 3379 3383 } … … 3382 3386 if ( authorizedMode[iColBaseDir] ) //possibly add BL mode 3383 3387 { 3384 g_reducedSetIntraModes[nbModes++] = iColBaseDir;3388 m_reducedSetIntraModes[nbModes++] = iColBaseDir; 3385 3389 authorizedMode[ iColBaseDir ] = 0; 3386 3390 } … … 3389 3393 if ( iRefMode > 1 ) //add neighboring modes of refMode 3390 3394 { 3391 UInt Left = iRefMode;3392 UInt Right = iRefMode;3395 UInt left = iRefMode; 3396 UInt right = iRefMode; 3393 3397 while ( nbModes < NB_REMAIN_MODES+3 ) 3394 3398 { 3395 Left = ((Left + 29) % 32) + 2; 3396 Right = ((Right - 1 ) % 32) + 2; 3397 if ( authorizedMode[Left] ) g_reducedSetIntraModes[nbModes++] = Left; 3398 if ( authorizedMode[Right] ) g_reducedSetIntraModes[nbModes++] = Right; 3399 left = ((left + 29) % 32) + 2; 3400 right = ((right - 1 ) % 32) + 2; 3401 if( authorizedMode[left] ) 3402 { 3403 m_reducedSetIntraModes[nbModes++] = left; 3404 } 3405 if( authorizedMode[right] ) 3406 { 3407 m_reducedSetIntraModes[nbModes++] = right; 3408 } 3399 3409 } 3400 3410 } 3401 3411 else //add pre-defined modes 3402 3412 { 3413 const UChar 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}; 3414 3403 3415 Int idx = 0; 3404 while ( nbModes < NB_REMAIN_MODES+3 ) 3405 { 3406 UInt mode = g_predefSetIntraModes[idx++]; 3407 if ( authorizedMode[mode] ) g_reducedSetIntraModes[nbModes++] = mode; 3416 while( nbModes < NB_REMAIN_MODES+3 ) 3417 { 3418 UInt mode = predefSetIntraModes[idx++]; 3419 if( authorizedMode[mode] ) 3420 { 3421 m_reducedSetIntraModes[nbModes++] = mode; 3422 } 3408 3423 } 3409 3424 } 3410 3425 3411 3426 fullSetOfModes = 0; 3412 return ( nbModes ); 3427 3428 return nbModes; 3413 3429 } 3414 3430 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1395 r1418 89 89 #if SVC_EXTENSION 90 90 UInt m_layerId; ///< layer id 91 #if FAST_INTRA_SHVC 92 UChar m_reducedSetIntraModes[NUM_INTRA_MODE-1]; 93 #endif 91 94 #endif 92 95 … … 474 477 475 478 #if SVC_EXTENSION 476 Void setLayerId (UInt layerId) { m_layerId = layerId; }477 UInt getLayerId () { return m_layerId; }478 UInt getLayerIdx () { return m_pcSlice->getVPS()->getLayerIdxInVps(m_layerId); }479 Void setLayerId (UInt layerId) { m_layerId = layerId; } 480 UInt getLayerId () { return m_layerId; } 481 UInt getLayerIdx () { return m_pcSlice->getVPS()->getLayerIdxInVps(m_layerId); } 479 482 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 480 483 Bool isInterLayerReference(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1); 481 484 #endif 482 485 #if FAST_INTRA_SHVC 483 Int reduceSetOfIntraModes 486 Int reduceSetOfIntraModes( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int &fullSetOfModes ); 484 487 #endif 485 488 #if REF_IDX_ME_ZEROMV … … 490 493 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping = false ); 491 494 Void scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase ); 495 #if FAST_INTRA_SHVC 496 UChar getReducedSetIntraModes(UChar idx) { assert( idx < NUM_INTRA_MODE-1 ); return m_reducedSetIntraModes[idx]; } 497 #endif 492 498 #endif 493 499 }; -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1377 r1418 726 726 727 727 #if SVC_EXTENSION 728 #if FAST_INTRA_SHVC729 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 };730 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};731 #endif732 728 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 733 729 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.h
r1355 r1418 172 172 173 173 #if SVC_EXTENSION 174 #if FAST_INTRA_SHVC175 extern UInt g_reducedSetIntraModes[NUM_INTRA_MODE-1];176 extern UInt g_predefSetIntraModes[NUM_INTRA_MODE-1];177 #endif178 174 extern Int g_mvScalingFactor [MAX_LAYERS][2]; 179 175 extern Int g_posScalingFactor [MAX_LAYERS][2]; -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1407 r1418 2290 2290 for( Int i=0; i < numModesForFullRD; i++ ) 2291 2291 { 2292 uiRdModeList[ i ] = g_reducedSetIntraModes[ i ];2292 uiRdModeList[ i ] = pcCU->getReducedSetIntraModes(i); 2293 2293 } 2294 2294 } … … 2327 2327 break; 2328 2328 } 2329 uiMode = ( iMode==0 ) ? g_reducedSetIntraModes[modeIdx]: uiMode; //(iMode=0) indicates reduced set of modes2329 uiMode = ( iMode==0 ) ? pcCU->getReducedSetIntraModes(modeIdx) : uiMode; //(iMode=0) indicates reduced set of modes 2330 2330 } 2331 2331 #endif
Note: See TracChangeset for help on using the changeset viewer.