From: Geza Lore Date: Thu, 23 Jun 2016 12:51:37 +0000 (+0100) Subject: Force SIMPLE_TRANSLATION motion for SEG_LVL_SKIP blocks. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9e7675c1a5132d9c3b3d58b5affd3b5dbf4191b;p=libvpx Force SIMPLE_TRANSLATION motion for SEG_LVL_SKIP blocks. Change-Id: Ib8ac19f25d06351b8aabed742aa0be66e28ec4d4 --- diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c index 7557ce473..ba1ca68ad 100644 --- a/vp10/encoder/bitstream.c +++ b/vp10/encoder/bitstream.c @@ -1369,9 +1369,14 @@ static void pack_inter_mode_mvs(VP10_COMP *cpi, const MODE_INFO *mi, #if CONFIG_EXT_INTER if (mbmi->ref_frame[1] != INTRA_FRAME) #endif // CONFIG_EXT_INTER - if (is_motvar_allowed(mbmi)) + if (is_motvar_allowed(mbmi)) { + // TODO(debargha): Might want to only emit this if SEG_LVL_SKIP + // is not active, and assume SIMPLE_TRANSLATION in the decoder if + // it is active. + assert(mbmi->motion_variation < MOTION_VARIATIONS); vp10_write_token(w, vp10_motvar_tree, cm->fc->motvar_prob[bsize], &motvar_encodings[mbmi->motion_variation]); + } #endif // CONFIG_OBMC || CONFIG_WARPED_MOTION #if CONFIG_EXT_INTER diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c index bda9065b0..794c089d3 100644 --- a/vp10/encoder/rdopt.c +++ b/vp10/encoder/rdopt.c @@ -10238,6 +10238,7 @@ void vp10_rd_pick_inter_mode_sb_seg_skip(VP10_COMP *cpi, mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0; #endif // CONFIG_EXT_INTRA mbmi->mode = ZEROMV; + mbmi->motion_variation = SIMPLE_TRANSLATION; mbmi->uv_mode = DC_PRED; mbmi->ref_frame[0] = LAST_FRAME; mbmi->ref_frame[1] = NONE;