diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index 60c741b7eca58862c000f37a712cd519945e5e51..aef39c5117b603b56de5a99171dbbf94d3d19426 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -2045,7 +2045,11 @@ void PU::getIBCMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx, const const uint32_t maxNumMergeCand = pu.cs->sps->getMaxNumIBCMergeCand(); #endif #if JVET_Z0084_IBC_TM +#if TM_MRG const uint32_t mvdSimilarityThresh = pu.tmMergeFlag ? PU::getTMMvdThreshold(pu) : 1; +#else + const uint32_t mvdSimilarityThresh = 1; +#endif #endif for (uint32_t ui = 0; ui < maxNumMergeCand; ++ui) @@ -2222,7 +2226,7 @@ void PU::getIBCMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx, const } // above left -#if JVET_Z0084_IBC_TM && JVET_Z0075_IBC_HMVP_ENLARGE +#if JVET_Z0084_IBC_TM && JVET_Z0075_IBC_HMVP_ENLARGE && JVET_W0090_ARMC_TM if ((cnt < 4) && pu.cs->sps->getUseAML() && (mrgCandIdx >= 0)) //Only for AMVP case #elif !JVET_Z0075_IBC_HMVP_ENLARGE if (cnt < 4) diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index dce145c2f6566af574b670c0002587f4e0e44fc0..f428f1532d5b109da04c21251cc4428be0cf9aaa 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -9691,7 +9691,7 @@ void EncCu::xCheckRDCostIBCModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct m_pcRdCost->setDistParam(distParam, tempCS->getOrgBuf().Y(), refBuf, sps.getBitDepth(CHANNEL_TYPE_LUMA), COMPONENT_Y, bUseHadamard); int refStride = refBuf.stride; -#if !JVET_Y0058_IBC_LIST_MODIFY || !JVET_Z0084_IBC_TM +#if !JVET_Y0058_IBC_LIST_MODIFY const UnitArea localUnitArea(tempCS->area.chromaFormat, Area(0, 0, tempCS->area.Y().width, tempCS->area.Y().height)); const int cuPelX = pu.Y().x; const int cuPelY = pu.Y().y; @@ -9713,17 +9713,19 @@ void EncCu::xCheckRDCostIBCModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct int xPred = pu.bv.getHor(); int yPred = pu.bv.getVer(); -#if !JVET_Y0058_IBC_LIST_MODIFY || !JVET_Z0084_IBC_TM //should have already been checked at merge list construction +#if !JVET_Y0058_IBC_LIST_MODIFY //should have already been checked at merge list construction #if JVET_Z0084_IBC_TM if (!PU::searchBv(pu, cuPelX, cuPelY, roiWidth, roiHeight, picWidth, picHeight, xPred, yPred, lcuWidth)) // not valid bv derived #else if (!m_pcInterSearch->searchBv(pu, cuPelX, cuPelY, roiWidth, roiHeight, picWidth, picHeight, xPred, yPred, lcuWidth)) // not valid bv derived +#endif +#else + if (pu.bv == Mv(0, 0)) #endif { numValidBv--; continue; } -#endif PU::spanMotionInfo(pu, mergeCtx); distParam.cur.buf = piRefSrch + refStride * yPred + xPred; @@ -9771,11 +9773,13 @@ void EncCu::xCheckRDCostIBCModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct int yPred = pu.bv.getVer(); #if !JVET_Y0058_IBC_LIST_MODIFY //should have already been checked at merge list construction and during refinement if (!PU::searchBv(pu, cuPelX, cuPelY, roiWidth, roiHeight, picWidth, picHeight, xPred, yPred, lcuWidth)) // not valid bv derived +#else + if (pu.bv == Mv(0, 0)) +#endif { numValidBv--; continue; } -#endif PU::spanMotionInfo(pu, mergeCtxTm); distParam.cur.buf = piRefSrch + refStride * yPred + xPred;