shithub: libvpx

Download patch

ref: da9f762e24881e1cf4ee05dcee22a7594a47e278
parent: 5ac7a59a0514d92462bff64029051049091d9f4e
author: Marco <[email protected]>
date: Thu Nov 3 06:21:12 EDT 2016

vp9: Non-rd pickmode: fix logic in reference masking.

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

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1573,7 +1573,7 @@
         !(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))