Commit f09045e1 authored by Frank Bossen's avatar Frank Bossen

Merge branch 'M0116_ATMVP_simplification' into 'master'

Only use left neighbor for ATMVP offset derivation

See merge request jvet/VVCSoftware_VTM!181
parents 813b6f27 7cbf6205
Pipeline #602 passed with stage
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#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_M0265_MV_ROUNDING_CLEANUP 1 // Unify MV roundings and make SW/WD allignment
#define JVET_M0228_REMOVE_CPMV_COMPARE 1 // Remove CPMV comparisons for construnted affine merge candidates from JVET-M0228, M0166, M0477
......
......@@ -2803,9 +2803,14 @@ void PU::getAffineMergeCand( const PredictionUnit &pu, AffineMergeCtx& affMrgCtx
int pos = 0;
// Get spatial MV
#if JVET_M0116_ATMVP_LEFT_NB_FOR_OFFSET
const Position posCurLB = pu.Y().bottomLeft();
MotionInfo miLeft;
#else
const Position posCurRT = pu.Y().topRight();
const Position posCurLB = pu.Y().bottomLeft();
MotionInfo miAbove, miLeft, miAboveRight, miBelowLeft;
#endif
//left
const PredictionUnit* puLeft = cs.getPURestricted( posCurLB.offset( -1, 0 ), pu, pu.chType );
......@@ -2832,6 +2837,7 @@ void PU::getAffineMergeCand( const PredictionUnit &pu, AffineMergeCtx& affMrgCtx
pos++;
}
#if !JVET_M0116_ATMVP_LEFT_NB_FOR_OFFSET
// above
const PredictionUnit *puAbove = cs.getPURestricted( posCurRT.offset( 0, -1 ), pu, pu.chType );
bool isAvailableB1 = puAbove && isDiffMER( pu, *puAbove ) && pu.cu != puAbove->cu && CU::isInter( *puAbove->cu );
......@@ -2925,6 +2931,7 @@ void PU::getAffineMergeCand( const PredictionUnit &pu, AffineMergeCtx& affMrgCtx
pos++;
}
}
#endif
mrgCtx.numValidMergeCand = pos;
isAvailableSubPu = getInterMergeSubPuMvpCand( pu, mrgCtx, tmpLICFlag, pos
......
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