Merge "Add global motion experiment to rdopt" into nextgenv2

This commit is contained in:
Sarah Parker
2016-09-06 18:07:31 +00:00
committed by Gerrit Code Review
9 changed files with 298 additions and 151 deletions

View File

@@ -939,6 +939,7 @@ static INLINE int is_mv_valid(const MV *mv) {
static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd,
PREDICTION_MODE mode,
MV_REFERENCE_FRAME ref_frame[2],
#if CONFIG_REF_MV
int block,
#endif
@@ -953,6 +954,7 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd,
int_mv *pred_mv =
(bsize >= BLOCK_8X8) ? mbmi->pred_mv : xd->mi[0]->bmi[block].pred_mv_s8;
#endif
(void)ref_frame;
switch (mode) {
#if CONFIG_EXT_INTER
@@ -1007,8 +1009,16 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd,
break;
}
case ZEROMV: {
#if CONFIG_GLOBAL_MOTION
mv[0].as_int =
cm->global_motion[ref_frame[0]].motion_params.wmmat[0].as_int;
if (is_compound)
mv[1].as_int =
cm->global_motion[ref_frame[1]].motion_params.wmmat[0].as_int;
#else
mv[0].as_int = 0;
if (is_compound) mv[1].as_int = 0;
#endif // CONFIG_GLOBAL_MOTION
#if CONFIG_REF_MV
pred_mv[0].as_int = 0;
@@ -1429,7 +1439,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
(void)ref_mv_s8;
#endif
if (!assign_mv(cm, xd, b_mode,
if (!assign_mv(cm, xd, b_mode, mbmi->ref_frame,
#if CONFIG_REF_MV
j,
#endif
@@ -1481,7 +1491,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
}
xd->corrupted |=
!assign_mv(cm, xd, mbmi->mode,
!assign_mv(cm, xd, mbmi->mode, mbmi->ref_frame,
#if CONFIG_REF_MV
0,
#endif