Changeset 1035 in SHVCSoftware
- Timestamp:
- 27 Feb 2015, 19:52:41 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1034 r1035 3235 3235 static Window win; 3236 3236 3237 for (Int i = 0; i < m_numRefLayerLocationOffsets; i++)3238 { 3239 if (layerId == m_refLocationOffsetLayerId[i])3237 for( Int i = m_numRefLayerLocationOffsets; i > 0; i-- ) 3238 { 3239 if( layerId == m_refLocationOffsetLayerId[i] ) 3240 3240 { 3241 3241 return m_scaledRefLayerWindow[i]; … … 3252 3252 static Window win; 3253 3253 3254 for (Int i = 0; i < m_numRefLayerLocationOffsets; i++)3255 { 3256 if (layerId == m_refLocationOffsetLayerId[i])3254 for( Int i = m_numRefLayerLocationOffsets; i > 0; i-- ) 3255 { 3256 if( layerId == m_refLocationOffsetLayerId[i] ) 3257 3257 { 3258 3258 return m_refLayerWindow[i]; … … 3267 3267 #if RESAMPLING_FIX 3268 3268 #if R0209_GENERIC_PHASE 3269 Bool TComPPS::hasZeroResamplingPhase(Int refLayerIdc) 3270 { 3271 Int phaseHorLuma = this->getPhaseHorLuma(refLayerIdc); 3272 Int phaseVerLuma = this->getPhaseVerLuma(refLayerIdc); 3273 Int phaseHorChroma = this->getPhaseHorChroma(refLayerIdc); 3274 Int phaseVerChroma = this->getPhaseVerChroma(refLayerIdc); 3269 Bool TComPPS::hasZeroResamplingPhase(Int refLayerId) 3270 { 3271 Bool phaseSetPresentFlag; 3272 Int phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma; 3273 3274 getResamplingPhase(refLayerId, phaseSetPresentFlag, phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma); 3275 3275 3276 return ( phaseHorLuma == 0 && phaseHorChroma == 0 && phaseVerLuma == 0 && phaseVerChroma == 0); 3277 } 3278 3279 Void TComPPS::getResamplingPhase(Int refLayerId, Bool& phaseSetPresentFlag, Int& phaseHorLuma, Int& phaseVerLuma, Int& phaseHorChroma, Int& phaseVerChroma) 3280 { 3281 phaseSetPresentFlag = false; 3282 phaseHorLuma = 0, phaseVerLuma = 0, phaseHorChroma = 0, phaseVerChroma = 0; 3283 3284 for( Int i = m_numRefLayerLocationOffsets; i > 0; i-- ) 3285 { 3286 if( refLayerId == m_refLocationOffsetLayerId[i] ) 3287 { 3288 phaseSetPresentFlag = m_resamplePhaseSetPresentFlag[i]; 3289 phaseHorLuma = m_phaseHorLuma[i]; 3290 phaseVerLuma = m_phaseVerLuma[i]; 3291 phaseHorChroma = m_phaseHorChroma[i]; 3292 phaseVerChroma = m_phaseVerChroma[i]; 3293 3294 return; 3295 } 3296 } 3276 3297 } 3277 3298 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1030 r1035 2249 2249 Void setResamplePhaseSetPresentFlag(Int x, Bool b) { m_resamplePhaseSetPresentFlag[x] = b; } 2250 2250 #if RESAMPLING_FIX 2251 Bool hasZeroResamplingPhase(Int layerId); 2251 Bool hasZeroResamplingPhase(Int refLayerId); 2252 Void getResamplingPhase(Int refLayerId, Bool& phaseSetPresentFlag, Int& phaseHorLuma, Int& phaseVerLuma, Int& phaseHorChroma, Int& phaseVerChroma); 2252 2253 #endif 2253 2254 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r1029 r1035 118 118 #endif 119 119 #if R0209_GENERIC_PHASE 120 Int phaseHorLuma = currSlice->getPPS()->getPhaseHorLuma(refLayerIdc); 121 Int phaseVerLuma = currSlice->getPPS()->getPhaseVerLuma(refLayerIdc); 122 Int phaseHorChroma = currSlice->getPPS()->getPhaseHorChroma(refLayerIdc); 123 Int phaseVerChroma; 124 if (currSlice->getPPS()->getResamplePhaseSetPresentFlag(refLayerIdc)) 125 { 126 phaseVerChroma = currSlice->getPPS()->getPhaseVerChroma(refLayerIdc); 127 } 128 else 120 Bool phaseSetPresentFlag; 121 Int phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma; 122 currSlice->getPPS()->getResamplingPhase( refLayerId, phaseSetPresentFlag, phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma ); 123 124 if( !phaseSetPresentFlag ) 129 125 { 130 126 Int refRegionHeight = heightBL - windowRL.getWindowTopOffset() - windowRL.getWindowBottomOffset(); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1029 r1035 2038 2038 #if R0209_GENERIC_PHASE 2039 2039 // conformance check: when ScaledRefRegionWidthInSamplesY is equal to RefLayerRegionWidthInSamplesY, PhaseHorY shall be equal to 0, when ScaledRefRegionWidthInSamplesC is equal to RefLayerRegionWidthInSamplesC, PhaseHorC shall be equal to 0, when ScaledRefRegionHeightInSamplesY is equal to RefLayerRegionHeightInSamplesY, PhaseVerY shall be equal to 0, and when ScaledRefRegionHeightInSamplesC is equal to RefLayerRegionHeightInSamplesC, PhaseVerC shall be equal to 0. 2040 Int phaseHorLuma = pcSlice->getPPS()->getPhaseHorLuma(refLayerIdc);2041 Int phase VerLuma = pcSlice->getPPS()->getPhaseVerLuma(refLayerIdc);2042 Int phaseHorChroma = pcSlice->getPPS()->getPhaseHorChroma(refLayerIdc);2043 Int phaseVerChroma = pcSlice->getPPS()->getPhaseVerChroma(refLayerIdc); 2040 Bool phaseSetPresentFlag; 2041 Int phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma; 2042 pcSlice->getPPS()->getResamplingPhase( refLayerId, phaseSetPresentFlag, phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma ); 2043 2044 2044 assert( ( (widthEL != widthBL) || (phaseHorLuma == 0 && phaseHorChroma == 0) ) 2045 2045 && ( (heightEL != heightBL) || (phaseVerLuma == 0 && phaseVerChroma == 0) ) ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1029 r1035 1346 1346 #if R0209_GENERIC_PHASE 1347 1347 // conformance check: when ScaledRefRegionWidthInSamplesY is equal to RefLayerRegionWidthInSamplesY, PhaseHorY shall be equal to 0, when ScaledRefRegionWidthInSamplesC is equal to RefLayerRegionWidthInSamplesC, PhaseHorC shall be equal to 0, when ScaledRefRegionHeightInSamplesY is equal to RefLayerRegionHeightInSamplesY, PhaseVerY shall be equal to 0, and when ScaledRefRegionHeightInSamplesC is equal to RefLayerRegionHeightInSamplesC, PhaseVerC shall be equal to 0. 1348 Int phaseHorLuma = pcSlice->getPPS()->getPhaseHorLuma(refLayerIdc);1349 Int phase VerLuma = pcSlice->getPPS()->getPhaseVerLuma(refLayerIdc);1350 Int phaseHorChroma = pcSlice->getPPS()->getPhaseHorChroma(refLayerIdc);1351 Int phaseVerChroma = pcSlice->getPPS()->getPhaseVerChroma(refLayerIdc); 1348 Bool phaseSetPresentFlag; 1349 Int phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma; 1350 pcSlice->getPPS()->getResamplingPhase( refLayerId, phaseSetPresentFlag, phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma ); 1351 1352 1352 assert( ( (widthEL != widthBL) || (phaseHorLuma == 0 && phaseHorChroma == 0) ) 1353 1353 && ( (heightEL != heightBL) || (phaseVerLuma == 0 && phaseVerChroma == 0) ) );
Note: See TracChangeset for help on using the changeset viewer.