Fix a subtle issue in re-use inter_pred
authorYaowu Xu <yaowu@google.com>
Wed, 22 Oct 2014 18:57:09 +0000 (11:57 -0700)
committerYaowu Xu <yaowu@google.com>
Wed, 22 Oct 2014 19:06:27 +0000 (12:06 -0700)
The initialization of this_mode_pred does not work when the ref_frame
loop ever goes beyond LAST_FRAME. This commit fixes the subtle issue
and allows potentially expanding the loop to test GOLDEN_FRAME.

Change-Id: Ibbd427a22160d1d9eacb8ed0c87f88d6cef9c0f3

vp9/encoder/vp9_pickmode.c

index 9d20bae2b3b40aace246c49b5a0e0bf4ea4fb09a..6b92af2db5aaf036d5fc1a1c4404537964e53303 100644 (file)
@@ -635,7 +635,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
       // motion vector is at sub-pixel accuracy level for luma component, i.e.,
       // the last three bits are all zeros.
       if (cpi->sf.reuse_inter_pred_sby) {
-        if (this_mode == NEARESTMV) {
+        if (!this_mode_pred) {
           this_mode_pred = &tmp[3];
         } else {
           this_mode_pred = &tmp[get_pred_buffer(tmp, 3)];