Skip to content
Snippets Groups Projects
Commit 9cea7cf3 authored by Vadim Seregin's avatar Vadim Seregin
Browse files

Merge branch 'revertMR380andfix' into 'master'

Revert MR383 and fix

See merge request !396
parents 4d272da2 01154641
No related branches found
No related tags found
1 merge request!396Revert MR383 and fix
Pipeline #9547 passed
......@@ -5652,7 +5652,7 @@ void InterPrediction::motionCompensationIbcGpm( CodingUnit &cu, MergeCtx &ibcGpm
}
 
#if JVET_AA0070_RRIBC
void InterPrediction::adjustIbcMergeRribcCand(PredictionUnit &pu, MergeCtx& mrgCtx, uint32_t startPos, uint32_t endPos)
void InterPrediction::adjustIbcMergeRribcCand(PredictionUnit &pu, MergeCtx& mrgCtx, uint32_t startPos, uint32_t endPos, bool* isSkipThisCand)
{
if (mrgCtx.numValidMergeCand <= 1)
{
......@@ -5674,11 +5674,15 @@ void InterPrediction::adjustIbcMergeRribcCand(PredictionUnit &pu, MergeCtx& mrg
for (uint32_t uiMergeCand = startPos; uiMergeCand < endPos; ++uiMergeCand)
{
uiCost = 0;
if (mrgCtx.mvFieldNeighbours[(uiMergeCand << 1) + 0].mv.hor == 0 && mrgCtx.mvFieldNeighbours[(uiMergeCand << 1) + 0].mv.ver == 0)
{
break;
}
if (candNumNoRribc >= mrgCtx.numValidMergeCand)
{
break;
}
if (mrgCtx.rribcFlipTypes[uiMergeCand] > 0 || (mrgCtx.mvFieldNeighbours[(uiMergeCand << 1) + 0].mv.hor == 0 && mrgCtx.mvFieldNeighbours[(uiMergeCand << 1) + 0].mv.ver == 0))
if (mrgCtx.rribcFlipTypes[uiMergeCand] > 0)
{
uiCost = MAX_UINT - 1;
if (noNeedSort && uiMergeCand < mrgCtx.numValidMergeCand)
......@@ -5696,6 +5700,13 @@ void InterPrediction::adjustIbcMergeRribcCand(PredictionUnit &pu, MergeCtx& mrg
if (!noNeedSort)
{
updateIBCCandInfo(pu, mrgCtx, rdCandList, startPos, endPos);
if (isSkipThisCand)
{
for (int i = 0; i < mrgCtx.numValidMergeCand; i++)
{
isSkipThisCand[i] = isSkipThisCand[rdCandList[i]];
}
}
}
}
#endif
......
......@@ -738,7 +738,7 @@ public:
#if JVET_AC0112_IBC_GPM
void motionCompensationIbcGpm(CodingUnit &cu, MergeCtx &ibcGpmMrgCtx, IntraPrediction* pcIntraPred);
#if JVET_AA0070_RRIBC
void adjustIbcMergeRribcCand(PredictionUnit &pu, MergeCtx& mrgCtx, uint32_t startPos, uint32_t endPos);
void adjustIbcMergeRribcCand(PredictionUnit &pu, MergeCtx& mrgCtx, uint32_t startPos, uint32_t endPos, bool *isSkipThisCand = NULL);
#endif
#endif
......
......@@ -11709,12 +11709,8 @@ void EncCu::xCheckRDCostIBCModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct
{
mergeCtxIbcGeo = mergeCtx;
#if JVET_AA0070_RRIBC
m_pcInterSearch->adjustIbcMergeRribcCand(pu, mergeCtxIbcGeo, 0, IBC_MRG_MAX_NUM_CANDS_MEM);
m_pcInterSearch->adjustIbcMergeRribcCand(pu, mergeCtxIbcGeo, 0, IBC_MRG_MAX_NUM_CANDS_MEM, isSkipThisCand);
#endif
for (int i = 0; i < mergeCtx.numValidMergeCand; i++)
{
isSkipThisCand[i] = false;
}
for (int i = 0; i < skipCandNum[mergeCtx.numValidMergeCand - 1]; i++)
{
isSkipThisCand[mergeCtx.numValidMergeCand - 1 - i] = true;
......@@ -11743,17 +11739,7 @@ void EncCu::xCheckRDCostIBCModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct
if (pu.bv == tempBv)
{
numValidBv--;
#if JVET_AC0112_IBC_GPM
if (testIbcGpm)
{
ibcGpmCandNumValid++;
distParamSad.cur.buf = piRefSrch + refStride * pu.bv.getVer() + pu.bv.getHor();
distParamSad.cur.stride = refBuf.stride;
ibcPredBuf[mergeCtx.numValidMergeCand + mergeCandIbcGpm] = m_acMergeBuffer[mergeCtx.numValidMergeCand + mergeCandIbcGpm].getBuf(localUnitArea);
ibcPredBuf[mergeCtx.numValidMergeCand + mergeCandIbcGpm].bufs[COMPONENT_Y].copyFrom(distParamSad.cur);
sadWholeBlk[mergeCtx.numValidMergeCand + mergeCandIbcGpm] = distParamSad.distFunc(distParamSad);
}
#endif
isSkipThisCand[mergeCtx.numValidMergeCand + mergeCandIbcGpm] = true;
continue;
}
 
......@@ -11941,12 +11927,8 @@ void EncCu::xCheckRDCostIBCModeMerge2Nx2N(CodingStructure *&tempCS, CodingStruct
{
mergeCtxTmIbcGeo = mergeCtxTm;
#if JVET_AA0070_RRIBC
m_pcInterSearch->adjustIbcMergeRribcCand(pu, mergeCtxTmIbcGeo, 0, IBC_MRG_MAX_NUM_CANDS_MEM);
m_pcInterSearch->adjustIbcMergeRribcCand(pu, mergeCtxTmIbcGeo, 0, IBC_MRG_MAX_NUM_CANDS_MEM, isSkipThisCand + mergeCtx.numValidMergeCand);
#endif
for (int i = 0; i < mergeCtxTmIbcGeo.numValidMergeCand; i++)
{
isSkipThisCand[mergeCtx.numValidMergeCand + i] = false;
}
for (int i = 0; i < skipCandNumTm[mergeCtx.numValidMergeCand + mergeCtxTm.numValidMergeCand - 1]; i++)
{
isSkipThisCand[mergeCtx.numValidMergeCand + mergeCtxTm.numValidMergeCand - 1 - i] = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment