diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index 094d56115af44855994ae39d33497c9a30842488..42029042b1a9e2a99a793c832f1fb29ca1496542 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -685,7 +685,7 @@ void InterPrediction::xPredInterBlk(const ComponentID compID, const PredictionUn bool useAltHpelIf = pu.cu->imv == IMV_HPEL; if (!isIBC - && xPredInterBlkRPR(scalingRatio, *pu.cs->pps, CompArea(compID, chFmt, pu.blocks[compID], dstPic.bufs[compID]), + && xPredInterBlkRPR(scalingRatio, *pu.cs->sps, *pu.cs->pps, CompArea(compID, chFmt, pu.blocks[compID], dstPic.bufs[compID]), refPic, mv, dstPic.bufs[compID].buf, dstPic.bufs[compID].stride, bi, wrapRef, clpRng, InterpolationFilter::Filter::DEFAULT, useAltHpelIf)) { @@ -1074,7 +1074,7 @@ void InterPrediction::xPredAffineBlk(const ComponentID &compID, const Prediction if( isRefScaled ) { CHECK(enableProf, "PROF should be disabled with RPR"); - xPredInterBlkRPR(scalingRatio, pps, + xPredInterBlkRPR(scalingRatio, sps, pps, CompArea(compID, chFmt, pu.blocks[compID].offset(w, h), Size(sbWidth, sbHeight)), refPic, curMv, dstBuf.buf + w + h * dstBuf.stride, dstBuf.stride, bi, wrapRef, clpRng, filterIdx); } @@ -2169,7 +2169,7 @@ bool InterPrediction::isLumaBvValid(const int ctuSize, const int xCb, const int return true; } -bool InterPrediction::xPredInterBlkRPR(const ScalingRatio scalingRatio, const PPS &pps, const CompArea &blk, +bool InterPrediction::xPredInterBlkRPR(const ScalingRatio scalingRatio,const SPS &sps, const PPS &pps, const CompArea &blk, const Picture *refPic, const Mv &mv, Pel *dst, const ptrdiff_t dstStride, const bool bi, const bool wrapRef, const ClpRng &clpRng, const InterpolationFilter::Filter filterIndex, const bool useAltHpelIf) @@ -2268,9 +2268,9 @@ bool InterPrediction::xPredInterBlkRPR(const ScalingRatio scalingRatio, const PP ((blk.pos().y << scaleY) - (pps.getScalingWindow().getWindowTopOffset() * SPS::getWinUnitY(chFmt))) >> scaleY; int addX = - isLuma(compID) ? 0 : int(1 - refPic->cs->sps->getHorCollocatedChromaFlag()) * 8 * (scalingRatio.x - SCALE_1X.x); + isLuma(compID) ? 0 : int(1 - sps.getHorCollocatedChromaFlag()) * 8 * (scalingRatio.x - SCALE_1X.x); int addY = - isLuma(compID) ? 0 : int(1 - refPic->cs->sps->getVerCollocatedChromaFlag()) * 8 * (scalingRatio.y - SCALE_1X.y); + isLuma(compID) ? 0 : int(1 - sps.getVerCollocatedChromaFlag()) * 8 * (scalingRatio.y - SCALE_1X.y); int boundLeft = 0; int boundRight = refPicWidth >> scaleX; diff --git a/source/Lib/CommonLib/InterPrediction.h b/source/Lib/CommonLib/InterPrediction.h index 209040e1e028abde72d3e3d905ce5f35ea660794..bb59a9a9f976d323cc8b073ed39fd8ddde4cd79e 100644 --- a/source/Lib/CommonLib/InterPrediction.h +++ b/source/Lib/CommonLib/InterPrediction.h @@ -297,7 +297,7 @@ public: const int yPos); bool isLumaBvValid(const int ctuSize, const int xCb, const int yCb, const int width, const int height, const int xBv, const int yBv); - bool xPredInterBlkRPR(const ScalingRatio scalingRatio, const PPS &pps, const CompArea &blk, + bool xPredInterBlkRPR(const ScalingRatio scalingRatio, const SPS& sps, const PPS& pps, const CompArea& blk, const Picture *refPic, const Mv &mv, Pel *dst, const ptrdiff_t dstStride, const bool bi, const bool wrapRef, const ClpRng &clpRng, const InterpolationFilter::Filter filterIndex, const bool useAltHpelIf = false);