]> granicus.if.org Git - libvpx/commitdiff
Modify early exit for alt_ref in nonrd_pickmode.
authorMarco <marpan@google.com>
Wed, 4 Oct 2017 18:41:52 +0000 (11:41 -0700)
committerMarco <marpan@google.com>
Wed, 4 Oct 2017 18:53:39 +0000 (11:53 -0700)
For 1 pass vbr mode:
On no-show_frame/ARF: instead of skipping alt_ref_frame
completely in mode testing, allow for checking (0, 0) on alt_ref.

Small gain in metrics, ~0.18%, no change in speed.

Change-Id: I32a3c24faca64ab70dd5091071a0dc301db7dd1e

vp9/encoder/vp9_pickmode.c

index 4528910f75d61b213f7ebf7523425c39df97442c..870af84453b55a639fc4dd9b5f46f4d00a820207 100644 (file)
@@ -1582,9 +1582,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
       skip_ref_find_pred[LAST_FRAME] = 1;
       skip_ref_find_pred[GOLDEN_FRAME] = 1;
     }
-    if (cm->show_frame == 0) {
-      usable_ref_frame = GOLDEN_FRAME;
-      skip_ref_find_pred[ALTREF_FRAME] = 1;
+    if (!cm->show_frame) {
       if (cpi->rc.frames_since_key == 1) {
         usable_ref_frame = LAST_FRAME;
         skip_ref_find_pred[GOLDEN_FRAME] = 1;
@@ -1681,6 +1679,10 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
            frame_mv[this_mode][ref_frame].as_int != 0))
         continue;
 
+      if (!cm->show_frame && ref_frame == ALTREF_FRAME &&
+          frame_mv[this_mode][ref_frame].as_int != 0)
+        continue;
+
       if (cpi->rc.alt_ref_gf_group && cm->show_frame &&
           cpi->rc.frames_since_golden > (cpi->rc.baseline_gf_interval >> 1) &&
           ref_frame == GOLDEN_FRAME &&