vp9: Non-rd pickmode: fix logic in reference masking.
authorMarco <marpan@google.com>
Thu, 3 Nov 2016 17:21:12 +0000 (10:21 -0700)
committerMarco <marpan@google.com>
Thu, 3 Nov 2016 17:32:57 +0000 (10:32 -0700)
Add condition that usable_ref_frame > LAST.
This is to avoid potentially skipping all last-nonzero mv modes,
if golden is used as a reference but skipped completely for the
current block.

This has no effect currenty, as we always consider testing golden
mode for each block.

Change-Id: I3182cf44664081935a90ed43aa7b32e710e60e22

vp9/encoder/vp9_pickmode.c

index ce9007a..2b7ddbc 100644 (file)
@@ -1573,7 +1573,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
         !(frame_mv[this_mode][ref_frame].as_int == 0 &&
           ref_frame == LAST_FRAME)) {
       if (usable_ref_frame < ALTREF_FRAME) {
-        if (!force_skip_low_temp_var) {
+        if (!force_skip_low_temp_var && usable_ref_frame > LAST_FRAME) {
           i = (ref_frame == LAST_FRAME) ? GOLDEN_FRAME : LAST_FRAME;
           if ((cpi->ref_frame_flags & flag_list[i]))
             if (x->pred_mv_sad[ref_frame] > (x->pred_mv_sad[i] << 1))