Commit d5a8be14 authored by Xiang Li's avatar Xiang Li
Browse files

Merge branch 'JVET_O0594_BDOF_REF_SAMPLE_PADDING' into 'master'

JVET-O0594: BDOF reference sample padding using the nearest integer sample position

See merge request jvet/VVCSoftware_VTM!727
parents 2ba5e75b 449aa027
......@@ -737,7 +737,13 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
if (bioApplied && compID == COMPONENT_Y)
{
const int shift = std::max<int>(2, (IF_INTERNAL_PREC - clpRng.bd));
#if JVET_O0594_BDOF_REF_SAMPLE_PADDING
int xOffset = (xFrac < 8) ? 1 : 0;
int yOffset = (yFrac < 8) ? 1 : 0;
const Pel* refPel = refBuf.buf - yOffset * refBuf.stride - xOffset;
#else
const Pel* refPel = refBuf.buf - refBuf.stride - 1;
#endif
Pel* dstPel = m_filteredBlockTmp[2 + m_iRefListIdx][compID] + dstBuf.stride + 1;
for (int w = 0; w < (width - 2 * BIO_EXTEND_SIZE); w++)
{
......@@ -745,7 +751,11 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
dstPel[w] = val - (Pel)IF_INTERNAL_OFFS;
}
#if JVET_O0594_BDOF_REF_SAMPLE_PADDING
refPel = refBuf.buf + (1 - yOffset)*refBuf.stride - xOffset;
#else
refPel = refBuf.buf - 1;
#endif
dstPel = m_filteredBlockTmp[2 + m_iRefListIdx][compID] + 2 * dstBuf.stride + 1;
for (int h = 0; h < (height - 2 * BIO_EXTEND_SIZE - 2); h++)
{
......@@ -759,7 +769,11 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
dstPel += dstBuf.stride;
}
#if JVET_O0594_BDOF_REF_SAMPLE_PADDING
refPel = refBuf.buf + (height - 2 * BIO_EXTEND_SIZE - 2 + 1 - yOffset)*refBuf.stride - xOffset;
#else
refPel = refBuf.buf + (height - 2 * BIO_EXTEND_SIZE - 2)*refBuf.stride - 1;
#endif
dstPel = m_filteredBlockTmp[2 + m_iRefListIdx][compID] + (height - 2 * BIO_EXTEND_SIZE)*dstBuf.stride + 1;
for (int w = 0; w < (width - 2 * BIO_EXTEND_SIZE); w++)
{
......
......@@ -147,6 +147,8 @@
#define JVET_O0596_CBF_SIG_ALIGN_TO_SPEC 1 // JVET-O0596 align cbf signaling with specification
#define JVET_O0193_REMOVE_TR_DEPTH_IN_CBF_CTX 1 // JVET-O0193/JVET-O0375: remove transform depth in cbf context modeling
#define JVET_O0594_BDOF_REF_SAMPLE_PADDING 1 // JVET-O0594/O0252/O0506/O0615/O0624: BDOF reference sample padding using the nearest integer sample position
#define FIX_DB_MAX_TRANSFORM_SIZE 1
#define MRG_SHARELIST_SHARSIZE 32
......
Supports Markdown
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