]> granicus.if.org Git - libvpx/commitdiff
Force SIMPLE_TRANSLATION motion for SEG_LVL_SKIP blocks.
authorGeza Lore <gezalore@gmail.com>
Thu, 23 Jun 2016 12:51:37 +0000 (13:51 +0100)
committerGeza Lore <gezalore@gmail.com>
Thu, 23 Jun 2016 13:09:16 +0000 (14:09 +0100)
Change-Id: Ib8ac19f25d06351b8aabed742aa0be66e28ec4d4

vp10/encoder/bitstream.c
vp10/encoder/rdopt.c

index 7557ce4731f7311d13d365fa5794f5d0f8a93fda..ba1ca68add31f4f27e4336661c7df26f83c4be0d 100644 (file)
@@ -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
index bda9065b04d6b7da6c4e1bfbe2d5dbfe990b5444..794c089d3af5d0f7a301a7d9364c8658fe14d445 100644 (file)
@@ -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;