Changeset 240 in SHVCSoftware for branches/SHM-2.1-dev/source
- Timestamp:
- 24 May 2013, 19:59:52 (11 years ago)
- Location:
- branches/SHM-2.1-dev/source/Lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComMv.h
r191 r240 152 152 const TComMv scaleMv( Int iScaleX, Int iScaleY ) const 153 153 { 154 Int mvx = Clip3( -32768, 32767, (iScaleX * getHor() + 127 + (iScaleX * getHor() < 0)) >> 8 );155 Int mvy = Clip3( -32768, 32767, (iScaleY * getVer() + 127 + (iScaleY * getVer() < 0)) >> 8 );154 Int mvx = iScaleX == 4096 ? getHor() : Clip3( -32768, 32767, (iScaleX * getHor() + 127 + (iScaleX * getHor() < 0)) >> 8 ); 155 Int mvy = iScaleY == 4096 ? getVer() : Clip3( -32768, 32767, (iScaleY * getVer() + 127 + (iScaleY * getVer() < 0)) >> 8 ); 156 156 return TComMv( mvx, mvy ); 157 157 } -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r239 r240 859 859 Int heightEL = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset(); 860 860 #endif 861 g_mvScalingFactor[m_layerId][0] = Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL);862 g_mvScalingFactor[m_layerId][1] = Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);861 g_mvScalingFactor[m_layerId][0] = widthEL == widthBL ? 4096 : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL); 862 g_mvScalingFactor[m_layerId][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL); 863 863 864 864 g_posScalingFactor[m_layerId][0] = ((widthBL << 16) + (widthEL >> 1)) / widthEL; -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r239 r240 561 561 Int heightEL = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset(); 562 562 #endif 563 g_mvScalingFactor[m_layerId][0] = Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL);564 g_mvScalingFactor[m_layerId][1] = Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);563 g_mvScalingFactor[m_layerId][0] = widthEL == widthBL ? 4096 : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL); 564 g_mvScalingFactor[m_layerId][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL); 565 565 566 566 g_posScalingFactor[m_layerId][0] = ((widthBL << 16) + (widthEL >> 1)) / widthEL; … … 767 767 Int heightEL = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset(); 768 768 #endif 769 g_mvScalingFactor[m_layerId][0] = Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL);770 g_mvScalingFactor[m_layerId][1] = Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);769 g_mvScalingFactor[m_layerId][0] = widthEL == widthBL ? 4096 : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL); 770 g_mvScalingFactor[m_layerId][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL); 771 771 772 772 g_posScalingFactor[m_layerId][0] = ((widthBL << 16) + (widthEL >> 1)) / widthEL;
Note: See TracChangeset for help on using the changeset viewer.