Changeset 1431 in SHVCSoftware
- Timestamp:
- 10 Aug 2015, 20:28:49 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h
r1394 r1431 121 121 static const Double MAX_DOUBLE = 1.7e+308; ///< max. value of Double-type value 122 122 123 #if SVC_EXTENSION 124 static const Int POS_SCALING_FACTOR_1X = 65536; ///< position scaling factor equal to 1x 125 static const Int MV_SCALING_FACTOR_1X = 4096 ; ///< MV scaling factor equal to 1x 126 #endif 127 123 128 // ==================================================================================================================== 124 129 // Coding tool configuration -
branches/SHM-dev/source/Lib/TLibCommon/TComMv.h
r1408 r1431 167 167 const TComMv scaleMv( Int iScaleX, Int iScaleY ) const 168 168 { 169 Int mvx = iScaleX == 4096? getHor() : Clip3( -32768, 32767, (iScaleX * getHor() + 127 + (iScaleX * getHor() < 0)) >> 8 );170 Int mvy = iScaleY == 4096? getVer() : Clip3( -32768, 32767, (iScaleY * getVer() + 127 + (iScaleY * getVer() < 0)) >> 8 );169 Int mvx = iScaleX == MV_SCALING_FACTOR_1X ? getHor() : Clip3( -32768, 32767, (iScaleX * getHor() + 127 + (iScaleX * getHor() < 0)) >> 8 ); 170 Int mvy = iScaleY == MV_SCALING_FACTOR_1X ? getVer() : Clip3( -32768, 32767, (iScaleY * getVer() + 127 + (iScaleY * getVer() < 0)) >> 8 ); 171 171 return TComMv( mvx, mvy ); 172 172 } -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1419 r1431 510 510 // motion resampling constraint 511 511 // Allow maximum of one motion resampling process for direct reference layers, and use motion inter-layer prediction from the same layer as texture inter-layer prediction 512 if( !( m_pcPic->getPosScalingFactor(refLayerIdc, 0) == 65536 && m_pcPic->getPosScalingFactor(refLayerIdc, 1) == 65536) || !scalingOffset || !sameBitDepths512 if( !( m_pcPic->getPosScalingFactor(refLayerIdc, 0) == POS_SCALING_FACTOR_1X && m_pcPic->getPosScalingFactor(refLayerIdc, 1) == POS_SCALING_FACTOR_1X ) || !scalingOffset || !sameBitDepths 513 513 #if CGS_3D_ASYMLUT 514 514 || getPPS()->getCGSFlag() -
branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r1430 r1431 113 113 114 114 // non-normative software optimization for certain simple resampling cases 115 if( scaleX == 65536 && scaleY == 65536) // ratio 1x115 if( scaleX == POS_SCALING_FACTOR_1X && scaleY == POS_SCALING_FACTOR_1X ) // ratio 1x 116 116 { 117 117 piSrcY = piSrcBufY; -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
r1419 r1431 219 219 assert( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) ); 220 220 221 printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, 65536.0/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0), 65536.0/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );221 printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, (Double)POS_SCALING_FACTOR_1X/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0), (Double)POS_SCALING_FACTOR_1X/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) ); 222 222 } 223 223 else -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1428 r1431 1658 1658 1659 1659 m_pcPic->setMvScalingFactor( refLayerIdc, 1660 widthEL == widthBL ? 4096: Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL),1661 heightEL == heightBL ? 4096: Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );1660 widthEL == widthBL ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL), 1661 heightEL == heightBL ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) ); 1662 1662 1663 1663 m_pcPic->setPosScalingFactor( refLayerIdc, -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1430 r1431 1784 1784 1785 1785 pcSlice->getPic()->setMvScalingFactor( refLayerIdc, 1786 widthEL == widthBL ? 4096: Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL),1787 heightEL == heightBL ? 4096: Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );1786 widthEL == widthBL ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL), 1787 heightEL == heightBL ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) ); 1788 1788 1789 1789 pcSlice->getPic()->setPosScalingFactor( refLayerIdc, … … 1799 1799 m_Enc3DAsymLUTPicUpdate.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ); 1800 1800 1801 if( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0) < (1<<16) || pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) < (1<<16)) //if(pcPic->isSpatialEnhLayer(refLayerIdc))1801 if( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0) < POS_SCALING_FACTOR_1X || pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) < POS_SCALING_FACTOR_1X ) //if(pcPic->isSpatialEnhLayer(refLayerIdc)) 1802 1802 { 1803 1803 //downsampling … … 3312 3312 assert( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) ); 3313 3313 3314 printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, 65536.0/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0), 65536.0/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );3314 printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, (Double)POS_SCALING_FACTOR_1X/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0), (Double)POS_SCALING_FACTOR_1X/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) ); 3315 3315 } 3316 3316 else
Note: See TracChangeset for help on using the changeset viewer.