Commit 6cbafc14 authored by Ryoji HASHIMOTO's avatar Ryoji HASHIMOTO

Fix for ticket 230, wrong memory bandwidth in DMVR

parent 72f85464
Pipeline #1735 passed with stage
......@@ -1654,6 +1654,16 @@ void InterPrediction::xPrefetchPad(PredictionUnit& pu, PelUnitBuf &pcPad, RefPic
#endif
PelBuf &dstBuf = pcPad.bufs[compID];
g_pelBufOP.copyBuffer((Pel *)refBuf.buf, refBuf.stride, ((Pel *)dstBuf.buf) + offset, dstBuf.stride, width, height);
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
JVET_J0090_SET_REF_PICTURE( refPic, (ComponentID)compID );
for ( int row = 0 ; row < height ; row++ )
{
for ( int col = 0 ; col < width ; col++ )
{
JVET_J0090_CACHE_ACCESS( ((Pel *)refBuf.buf) + row * refBuf.stride + col, __FILE__, __LINE__ );
}
}
#endif
}
/*padding on all side of size DMVR_PAD_LENGTH*/
{
......@@ -1940,6 +1950,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
xPrefetchPad(pu, m_cYuvRefBuffDMVRL1, REF_PIC_LIST_1);
JVET_J0090_SET_CACHE_ENABLE( false );
  • Eventhough memory bandwidth measurement is disabled here to not factor while xinitMC and xFinalPaddedMCForDMVR, It is re-enabled inside predInterBlk in the following place, which makes the memory bandwidth measurement wrong.

    JVET_J0090_SET_CACHE_ENABLE( true ); if (bioApplied && compID == COMPONENT_Y) { const int shift = std::max(2, (IF_INTERNAL_PREC - clpRng.bd)); const Pel* refPel = refBuf.buf - refBuf.stride - 1; Pel* dstPel = m_filteredBlockTmp[2 + m_iRefListIdx][compID] + dstBuf.stride + 1; for (int w = 0; w < (width - 2 * BIO_EXTEND_SIZE); w++)

  • How about enabling cache "true" in InterPrediction::xPredInterBlk only when dmvrWidth == 0?

    The default value of dmvrWidth is 0 for this function call.

  • dmvrWidth is equal 0 for xPredInterBlk call in xFinalPaddedMCForDMVR, it is non zero only in xinitMC Need to add seperate variable to differentiate the predInterBlk called from DMVR or not.

  • you can enable cache "true" in InterPrediction::xPredInterBlk only srcPadBuf == NULL

Please register or sign in to reply
xinitMC(pu, clpRngs);
// point mc buffer to cetre point to avoid multiplication to reach each iteration to the begining
......@@ -2071,6 +2082,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
}
}
}
JVET_J0090_SET_CACHE_ENABLE( true );
}
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
void InterPrediction::cacheAssign( CacheModel *cache )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment