]> granicus.if.org Git - libvpx/commitdiff
vp9: Nonrd-pickmode: move some early exits up.
authorMarco <marpan@google.com>
Wed, 6 Dec 2017 18:11:54 +0000 (10:11 -0800)
committerMarco <marpan@google.com>
Wed, 6 Dec 2017 18:18:44 +0000 (10:18 -0800)
Move the early exit checks on usable_ref_frame and
skip_ref_find_pref up before the check on flag_svc_subpel.
The code under flag_svc_subpel requires frame_mv to be set
for the golden/spatial reference, which is only set if the
both those exits don't pass.

No change in behavior.

Change-Id: Id304276c745eeb389ff85fa2dcf510d5976bc413

vp9/encoder/vp9_pickmode.c

index 198852d0eca300ac615f25ca6cd9bf2cf3db25cb..f2f323a282d2fb5f2282b1d2102229679f569b46 100644 (file)
@@ -1696,6 +1696,9 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
       comp_pred = 1;
     }
 
+    if (ref_frame > usable_ref_frame) continue;
+    if (skip_ref_find_pred[ref_frame]) continue;
+
     if (flag_svc_subpel && ref_frame == GOLDEN_FRAME) {
       force_gf_mv = 1;
       // Only test mode if NEARESTMV/NEARMV is (svc_mv_col, svc_mv_row),
@@ -1719,9 +1722,6 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
       if (segfeature_active(seg, mi->segment_id, SEG_LVL_REF_FRAME)) continue;
     }
 
-    if (ref_frame > usable_ref_frame) continue;
-    if (skip_ref_find_pred[ref_frame]) continue;
-
     // For SVC, skip the golden (spatial) reference search if sse of zeromv_last
     // is below threshold.
     if (cpi->use_svc && ref_frame == GOLDEN_FRAME &&