Changeset 507 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibCommon
- Timestamp:
- 25 Nov 2013, 17:32:16 (11 years ago)
- Location:
- branches/SHM-4.1-dev/source/Lib/TLibCommon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComDataCU.cpp
r494 r507 4028 4028 #endif 4029 4029 4030 #if O0098_SCALED_REF_LAYER_ID 4031 Int leftStartL = getSlice()->getSPS()->getScaledRefLayerWindowForLayer(getSlice()->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset(); 4032 Int topStartL = getSlice()->getSPS()->getScaledRefLayerWindowForLayer(getSlice()->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowTopOffset(); 4033 #else 4030 4034 Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset(); 4031 4035 Int topStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset(); 4036 #endif 4032 4037 Int iBX = ((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16; 4033 4038 Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16; -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r504 r507 522 522 memset( refResamplingLayer, 0, sizeof( refResamplingLayer ) ); 523 523 #endif 524 #if !RESAMPLING_CONSTRAINT_BUG_FIX 524 525 const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 525 526 Int scalingOffset = ((scalEL.getWindowLeftOffset() == 0 ) && … … 528 529 (scalEL.getWindowBottomOffset() == 0 ) 529 530 ); 531 #endif 530 532 531 533 for( i=0; i < m_activeNumILRRefIdx; i++ ) 532 534 { 533 535 UInt refLayerIdc = m_interLayerPredLayerIdc[i]; 536 #if RESAMPLING_CONSTRAINT_BUG_FIX 537 #if O0098_SCALED_REF_LAYER_ID 538 const Window &scalEL = getSPS()->getScaledRefLayerWindowForLayer(m_pcVPS->getRefLayerId( m_layerId, m_interLayerPredLayerIdc[i] )); 539 #else 540 const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 541 #endif 542 Int scalingOffset = ((scalEL.getWindowLeftOffset() == 0 ) && 543 (scalEL.getWindowRightOffset() == 0 ) && 544 (scalEL.getWindowTopOffset() == 0 ) && 545 (scalEL.getWindowBottomOffset() == 0 ) 546 ); 547 #endif 534 548 if(!( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || (!scalingOffset)) // ratio 1x 535 549 { … … 2470 2484 const Int TComSPS::m_winUnitY[]={1,2,1,1}; 2471 2485 2486 #if O0098_SCALED_REF_LAYER_ID 2487 Window& TComSPS::getScaledRefLayerWindowForLayer(Int layerId) 2488 { 2489 static Window win; 2490 2491 for (Int i = 0; i < m_numScaledRefLayerOffsets; i++) 2492 { 2493 if (layerId == m_scaledRefLayerId[i]) 2494 { 2495 return m_scaledRefLayerWindow[i]; 2496 } 2497 } 2498 2499 win.resetWindow(); // scaled reference layer offsets are inferred to be zero when not present 2500 return win; 2501 } 2502 #endif 2503 2472 2504 TComPPS::TComPPS() 2473 2505 : m_PPSId (0) -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
r504 r507 1227 1227 #endif 1228 1228 UInt m_numScaledRefLayerOffsets; 1229 #if O0098_SCALED_REF_LAYER_ID 1230 UInt m_scaledRefLayerId[MAX_LAYERS]; 1231 #endif 1229 1232 Window m_scaledRefLayerWindow[MAX_LAYERS]; 1230 1233 #if REPN_FORMAT_IN_VPS … … 1412 1415 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1413 1416 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 1417 #if O0098_SCALED_REF_LAYER_ID 1418 UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } 1419 Void setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; } 1420 Window& getScaledRefLayerWindowForLayer( Int layerId ); 1421 #endif 1414 1422 Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } 1415 1423 #if REPN_FORMAT_IN_VPS -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r504 r507 175 175 #define O0096_REP_FORMAT_INDEX 1 ///< JCTVC-O0096: identify SPS rep_format() with an index into the lists of formats in VPS extension. 176 176 #define O0096_DEFAULT_DEPENDENCY_TYPE 1 ///< JCTVC-O0096: specify default dependency type for all direct reference layers 177 178 #define RESAMPLING_CONSTRAINT_BUG_FIX 1 179 #define O0098_SCALED_REF_LAYER_ID 1 ///< JCTVC-O0098: signal scaled reference id 177 180 178 181 #else
Note: See TracChangeset for help on using the changeset viewer.