From 2624532baf7ce6ed9828806eaacd3dec84037b85 Mon Sep 17 00:00:00 2001 From: Frank Bossen <fbossen@gmail.com> Date: Fri, 15 Jan 2021 11:11:29 -0500 Subject: [PATCH] remove macro FIX_SUBPICS_W_RPR --- source/Lib/CommonLib/InterPrediction.cpp | 18 ------------------ source/Lib/CommonLib/TypeDef.h | 1 - 2 files changed, 19 deletions(-) diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index eacad8a08..5692aa147 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -2411,7 +2411,6 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, int addX = isLuma( compID ) ? 0 : int( 1 - refPic->cs->sps->getHorCollocatedChromaFlag() ) * 8 * ( scalingRatio.first - SCALE_1X.first ); int addY = isLuma( compID ) ? 0 : int( 1 - refPic->cs->sps->getVerCollocatedChromaFlag() ) * 8 * ( scalingRatio.second - SCALE_1X.second ); -#if FIX_SUBPICS_W_RPR int boundLeft = 0; int boundRight = refPicWidth >> ::getComponentScaleX( compID, chFmt ); int boundTop = 0; @@ -2427,7 +2426,6 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, boundBottom = curSubPic.getSubPicBottom() >> ::getComponentScaleY( compID, chFmt ); } } -#endif x0Int = ( ( posX << ( 4 + ::getComponentScaleX( compID, chFmt ) ) ) + mv.getHor() ) * (int64_t)scalingRatio.first + addX; x0Int = SIGN( x0Int ) * ( ( llabs( x0Int ) + ( (long long)1 << ( 7 + ::getComponentScaleX( compID, chFmt ) ) ) ) >> ( 8 + ::getComponentScaleX( compID, chFmt ) ) ) + ( ( refPic->getScalingWindow().getWindowLeftOffset() * SPS::getWinUnitX( chFmt ) ) << ( ( posShift - ::getComponentScaleX( compID, chFmt ) ) ) ); @@ -2439,18 +2437,10 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, int vFilterSize = isLuma( compID ) ? NTAPS_LUMA : NTAPS_CHROMA; int yInt0 = ( (int32_t)y0Int + offY ) >> posShift; -#if FIX_SUBPICS_W_RPR yInt0 = std::min( std::max( boundTop - (NTAPS_LUMA / 2), yInt0 ), boundBottom + (NTAPS_LUMA / 2) ); -#else - yInt0 = std::min( std::max( -(NTAPS_LUMA / 2), yInt0 ), ( refPicHeight >> ::getComponentScaleY( compID, chFmt ) ) + (NTAPS_LUMA / 2) ); -#endif int xInt0 = ( (int32_t)x0Int + offX ) >> posShift; -#if FIX_SUBPICS_W_RPR xInt0 = std::min( std::max( boundLeft - (NTAPS_LUMA / 2), xInt0 ), boundRight + (NTAPS_LUMA / 2) ); -#else - xInt0 = std::min( std::max( -(NTAPS_LUMA / 2), xInt0 ), ( refPicWidth >> ::getComponentScaleX( compID, chFmt ) ) + (NTAPS_LUMA / 2) ); -#endif int refHeight = ((((int32_t)y0Int + (height-1) * stepY) + offY ) >> posShift) - ((((int32_t)y0Int + 0 * stepY) + offY ) >> posShift) + 1; refHeight = std::max<int>( 1, refHeight ); @@ -2465,11 +2455,7 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, { int posX = (int32_t)x0Int + col * stepX; xInt = ( posX + offX ) >> posShift; -#if FIX_SUBPICS_W_RPR xInt = std::min( std::max( boundLeft - (NTAPS_LUMA / 2), xInt ), boundRight + (NTAPS_LUMA / 2) ); -#else - xInt = std::min( std::max( -(NTAPS_LUMA / 2), xInt ), ( refPicWidth >> ::getComponentScaleX( compID, chFmt ) ) + (NTAPS_LUMA / 2) ); -#endif int xFrac = ( ( posX + offX ) >> ( posShift - shiftHor ) ) & ( ( 1 << shiftHor ) - 1 ); CHECK( xInt0 > xInt, "Wrong horizontal starting point" ); @@ -2485,11 +2471,7 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio, { int posY = (int32_t)y0Int + row * stepY; yInt = ( posY + offY ) >> posShift; -#if FIX_SUBPICS_W_RPR yInt = std::min( std::max( boundTop - (NTAPS_LUMA / 2), yInt ), boundBottom + (NTAPS_LUMA / 2) ); -#else - yInt = std::min( std::max( -(NTAPS_LUMA / 2), yInt ), ( refPicHeight >> ::getComponentScaleY( compID, chFmt ) ) + (NTAPS_LUMA / 2) ); -#endif int yFrac = ( ( posY + offY ) >> ( posShift - shiftVer ) ) & ( ( 1 << shiftVer ) - 1 ); CHECK( yInt0 > yInt, "Wrong vertical starting point" ); diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 587218823..30a7c4309 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -55,7 +55,6 @@ //########### place macros to be removed in next cycle below this line ############### #define JVET_S0078_NOOUTPUTPRIORPICFLAG 0 // JVET-S0078: Handling of NoOutputOfPriorPicsFlag in output process -#define FIX_SUBPICS_W_RPR 1 // Fix handling of RPR with subpictures (via scaling windows with no resolution change) //########### place macros to be be kept below this line ############### #define JVET_S0257_DUMP_360SEI_MESSAGE 1 // Software support of 360 SEI messages -- GitLab