diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index 49200c0de3ec8c095807d031ce81b34424b34ed1..20705a587227273cb41582e0a99eacfbe8527d09 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -2268,9 +2268,9 @@ bool InterPrediction::xPredInterBlkRPR(const ScalingRatio scalingRatio, const SP ((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;