Skip to content
Snippets Groups Projects
Commit eb8a29ce authored by Anish Tamse's avatar Anish Tamse
Browse files

M0192 modifications - affine chroma MV is average of two luma sub-block MVs...

M0192 modifications - affine chroma MV is average of two luma sub-block MVs instead of four; MV rounding is unified
parent 709ca33d
No related branches found
No related tags found
1 merge request!195M0192 modifications - affine chroma MV is average of two luma sub-block MVs...
......@@ -755,11 +755,23 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
else
{
#if JVET_M0265_MV_ROUNDING_CLEANUP
#if JVET_M0192_AFF_CHROMA_SIMPL
Mv curMv = m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE) * MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE)] +
m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE + 1)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE + 1)];
roundAffineMv(curMv.hor, curMv.ver, 1);
#else
Mv curMv = m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE) * MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE)] +
m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE + 1)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE)] +
m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE + 1)] +
m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE + 1)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE + 1)];
roundAffineMv(curMv.hor, curMv.ver, 2);
#endif
#else
#if JVET_M0192_AFF_CHROMA_SIMPL
Mv curMv = m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE) * MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE)] +
m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE + 1)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE + 1)];
curMv.setHor(curMv.getHor() >= 0 ? ((curMv.getHor() + 1) >> 1) : -((-curMv.getHor() + 1) >> 1));
curMv.setVer(curMv.getVer() >= 0 ? ((curMv.getVer() + 1) >> 1) : -((-curMv.getVer() + 1) >> 1));
#else
Mv curMv = (m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE) * MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE)] +
m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE + 1)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE)] +
......@@ -767,6 +779,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE + 1)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE + 1)] +
Mv(2, 2));
curMv.set(curMv.getHor() >> 2, curMv.getVer() >> 2);
#endif
#endif
if (sps.getWrapAroundEnabledFlag())
{
......
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_M0192_AFF_CHROMA_SIMPL 1 // Affine chroma MV derivation simplification and rounding unification
#define JVET_M0116_ATMVP_LEFT_NB_FOR_OFFSET 1 // Only use left neighbor for ATMVP offset derivation, from M0273, M0240, M0116, M0338, M0204
#define JVET_M0063_BDOF_FIX 1 // BDOF bitdepth bugfix
......@@ -79,7 +81,6 @@
#define JVET_M0142_CCLM_COLLOCATED_CHROMA 1 // Adding support for chroma sample location type 2 in CCLM
#define JVET_M0479_18BITS_MV_CLIP 1
#define JVET_M0497_FAST_DST7 1
......
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