diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index 42306fb5126616e1b88d79f06c0752b46ea20619..5ed8333002d80b4ae4e400646f4d59b200351e67 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -297,6 +297,9 @@ void InterPrediction::xSubPuMC( PredictionUnit& pu, PelUnitBuf& predBuf, const R int fstStep = (!verMC ? puHeight : puWidth); int secStep = (!verMC ? puWidth : puHeight); + pu.refIdx[0] = 0; pu.refIdx[1] = pu.cs->slice->getSliceType() == B_SLICE ? 0 : -1; + bool scaled = !PU::isRefPicSameSize( pu ); + m_subPuMC = true; for (int fstDim = fstStart; fstDim < fstEnd; fstDim += fstStep) @@ -313,7 +316,7 @@ void InterPrediction::xSubPuMC( PredictionUnit& pu, PelUnitBuf& predBuf, const R while (later < secEnd) { const MotionInfo &laterMi = !verMC ? pu.getMotionInfo(Position{ later, fstDim }) : pu.getMotionInfo(Position{ fstDim, later }); - if (laterMi == curMi) + if (!scaled && laterMi == curMi) { length += secStep; }