- Timestamp:
- 28 Aug 2013, 04:07:11 (11 years ago)
- Location:
- branches/SHM-3.1-dev/source/Lib
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComDataCU.cpp
r345 r370 4006 4006 TComPic* cBaseColPic = m_pcSlice->getBaseColPic(refLayerIdc); 4007 4007 4008 #if !SIMPLIFIED_MV_POS_SCALING4009 #if SVC_UPSAMPLING && !ILP_DECODED_PICTURE4010 const Window &confBL = cBaseColPic->getPicYuvRec()->getConformanceWindow();4011 const Window &confEL = m_pcPic->getPicYuvRec()->getConformanceWindow();4012 4013 Int widthBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();4014 Int heightBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();4015 4016 Int widthEL = m_pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();4017 Int heightEL = m_pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();4018 #else4019 Int widthBL = cBaseColPic->getPicYuvRec()->getWidth();4020 Int heightBL = cBaseColPic->getPicYuvRec()->getHeight();4021 4022 Int widthEL = m_pcPic->getPicYuvRec()->getWidth();4023 Int heightEL = m_pcPic->getPicYuvRec()->getHeight();4024 #endif4025 #endif4026 4027 4008 uiPelX = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getWidth() - 1, uiPelX); 4028 4009 uiPelY = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getHeight() - 1, uiPelY); … … 4030 4011 UInt uiMinUnitSize = m_pcPic->getMinCUWidth(); 4031 4012 4032 #if SIMPLIFIED_MV_POS_SCALING4033 4013 #if SCALED_REF_LAYER_OFFSETS 4034 4014 Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset(); … … 4040 4020 Int iBY = (uiPelY*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16; 4041 4021 #endif 4042 #else4043 Int iBX = (uiPelX*widthBL + widthEL/2)/widthEL;4044 Int iBY = (uiPelY*heightBL+ heightEL/2)/heightEL;4045 #endif4046 4022 4047 4023 #if N0139_POSITION_ROUNDING_OFFSET … … 4090 4066 TComMvField cMvFieldBase; 4091 4067 TComMv cMv; 4092 #if SIMPLIFIED_MV_POS_SCALING 4068 4093 4069 cMv = rcMvFieldBase.getMv().scaleMv( g_mvScalingFactor[refLayerIdc][0], g_mvScalingFactor[refLayerIdc][1] ); 4094 #else4095 const Window &confBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getConformanceWindow();4096 const Window &confEL = m_pcPic->getPicYuvRec()->getConformanceWindow();4097 4098 Int widthBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();4099 Int heightBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();4100 4101 Int widthEL = m_pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();4102 Int heightEL = m_pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();4103 4104 Int iMvX = (rcMvFieldBase.getHor()*widthEL + (widthBL/2 -1) * (rcMvFieldBase.getHor() > 0 ? 1: -1) )/widthBL;4105 Int iMvY = (rcMvFieldBase.getVer()*heightEL + (heightBL/2 -1) * (rcMvFieldBase.getVer() > 0 ? 1: -1) )/heightBL;4106 4107 cMv.set(iMvX, iMvY);4108 #endif4109 4070 4110 4071 rcMvFieldEnhance.setMvField( cMv, rcMvFieldBase.getRefIdx() ); -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComMv.h
r313 r370 149 149 return TComMv( mvx, mvy ); 150 150 } 151 #if S IMPLIFIED_MV_POS_SCALING151 #if SVC_EXTENSION 152 152 const TComMv scaleMv( Int iScaleX, Int iScaleY ) const 153 153 { -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComRom.cpp
r313 r370 523 523 Int g_eTTable[4] = {0,3,1,2}; 524 524 525 #if S IMPLIFIED_MV_POS_SCALING525 #if SVC_EXTENSION 526 526 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 527 527 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComRom.h
r313 r370 279 279 extern Int g_eTTable[4]; 280 280 281 #if S IMPLIFIED_MV_POS_SCALING281 #if SVC_EXTENSION 282 282 extern Int g_mvScalingFactor [MAX_LAYERS][2]; 283 283 extern Int g_posScalingFactor [MAX_LAYERS][2]; -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r361 r370 499 499 m_activeNumILRRefIdx = numInterLayerRPSPics; 500 500 } 501 #if MAX_ONE_RESAMPLING_DIRECT_LAYERS && SIMPLIFIED_MV_POS_SCALING501 #if MAX_ONE_RESAMPLING_DIRECT_LAYERS 502 502 if( m_pcVPS->getScalabilityMask(1) ) 503 503 { -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r345 r370 151 151 Pel* piDstV; 152 152 153 #if SIMPLIFIED_MV_POS_SCALING154 153 Int scaleX = g_posScalingFactor[refLayerIdc][0]; 155 154 Int scaleY = g_posScalingFactor[refLayerIdc][1]; 156 #else157 Int scaleX = ( ( widthBL << shiftX ) + ( widthEL >> 1 ) ) / widthEL;158 Int scaleY = ( ( heightBL << shiftY ) + ( heightEL >> 1 ) ) / heightEL;159 #endif160 155 161 156 if( scaleX == 65536 && scaleY == 65536 ) // ratio 1x … … 451 446 shiftYM4 = shiftY - 4; 452 447 453 #if !SIMPLIFIED_MV_POS_SCALING454 scaleX = ( ( widthBL << shiftX ) + ( widthEL >> 1 ) ) / widthEL;455 scaleY = ( ( heightBL << shiftY ) + ( heightEL >> 1 ) ) / heightEL;456 #endif457 458 448 #if ILP_DECODED_PICTURE 459 449 widthEL = pcUsPic->getWidth () >> 1; -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h
r369 r370 90 90 #define BUGFIX_RESAMPLE 1 ///< JCTVC-N0055: resampling bug fix for positive left scalled offset 91 91 92 #define SIMPLIFIED_MV_POS_SCALING 1 ///< M0133/M0449: inter-layer MV scaling and pixel mapping position calculation93 92 #define ILP_DECODED_PICTURE 1 ///< M0274: use decoded picture for inter-layer prediction 94 93 #define JCTVC_M0259_LAMBDAREFINEMENT 1 ///< JCTVC-M0259: lambda refinement (encoder only optimization) -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r368 r370 871 871 #endif 872 872 873 #if SIMPLIFIED_MV_POS_SCALING874 873 #if SCALED_REF_LAYER_OFFSETS 875 874 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); … … 895 894 g_posScalingFactor[refLayerIdc][0] = ((widthBL << 16) + (widthEL >> 1)) / widthEL; 896 895 g_posScalingFactor[refLayerIdc][1] = ((heightBL << 16) + (heightEL >> 1)) / heightEL; 897 #endif898 896 899 897 #if SVC_UPSAMPLING -
branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r356 r370 588 588 pcSlice->setBaseColPic( *cListPic, refLayerIdc ); 589 589 590 #if SIMPLIFIED_MV_POS_SCALING591 590 #if SCALED_REF_LAYER_OFFSETS 592 591 const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc); … … 612 611 g_posScalingFactor[refLayerIdc][0] = ((widthBL << 16) + (widthEL >> 1)) / widthEL; 613 612 g_posScalingFactor[refLayerIdc][1] = ((heightBL << 16) + (heightEL >> 1)) / heightEL; 614 #endif615 613 616 614 #if SVC_UPSAMPLING
Note: See TracChangeset for help on using the changeset viewer.