Commit 78013402 authored by Yi-Wen Chen's avatar Yi-Wen Chen

Remove CPMV comparisons for construnted affine merge candidates from

JVET-M0228, M0166, M0477
parent 818a0736
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_M0228_REMOVE_CPMV_COMPARE 1 // Remove CPMV comparisons for construnted affine merge candidates from JVET-M0228, M0166, M0477
#define JVET_M0145_AFFINE_MV_CLIP 1 // Missing clipping for MV storage in affine
#define JVET_M0381_ONE_CTX_FOR_SUBBLOCK_MRG_IDX 1 // CE2.2.2 a: one context for subblock Merge index
......
......@@ -2544,7 +2544,11 @@ void PU::getAffineControlPointCand( const PredictionUnit &pu, MotionInfo mi[4],
if ( mi[idx0].refIdx[l] >= 0 && mi[idx1].refIdx[l] >= 0 )
{
// check same refidx and different mv
#if JVET_M0228_REMOVE_CPMV_COMPARE
if ( mi[idx0].refIdx[l] == mi[idx1].refIdx[l])
#else
if ( mi[idx0].refIdx[l] == mi[idx1].refIdx[l] && mi[idx0].mv[l] != mi[idx1].mv[l] )
#endif
{
dir |= (l + 1);
refIdx[l] = mi[idx0].refIdx[l];
......@@ -2565,7 +2569,11 @@ void PU::getAffineControlPointCand( const PredictionUnit &pu, MotionInfo mi[4],
if ( mi[idx0].refIdx[l] >= 0 && mi[idx1].refIdx[l] >= 0 && mi[idx2].refIdx[l] >= 0 )
{
// check same refidx and different mv
#if JVET_M0228_REMOVE_CPMV_COMPARE
if ( mi[idx0].refIdx[l] == mi[idx1].refIdx[l] && mi[idx0].refIdx[l] == mi[idx2].refIdx[l])
#else
if ( mi[idx0].refIdx[l] == mi[idx1].refIdx[l] && mi[idx0].refIdx[l] == mi[idx2].refIdx[l] && (mi[idx0].mv[l] != mi[idx1].mv[l] || mi[idx0].mv[l] != mi[idx2].mv[l]) )
#endif
{
dir |= (l + 1);
refIdx[l] = mi[idx0].refIdx[l];
......
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