]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Fix to early golden exit nonrd-pickmode
authorMarco Paniconi <marpan@google.com>
Wed, 27 Jun 2018 19:26:09 +0000 (12:26 -0700)
committerMarco Paniconi <marpan@google.com>
Wed, 27 Jun 2018 20:42:25 +0000 (13:42 -0700)
For SVC: apply the sse_zeromv early exit also to
the case where golden is second temporal reference.
Set the thresh_svc_golden threshold for this case.

This is reduce the encode time for case where golden
is second temporal reference for SVC.
Change-Id: I8c0c87dd746579d3c4f5e983c7f9dd0a1e1476e0

vp9/encoder/vp9_pickmode.c

index eb9abf729d132762bd2c35d41e69b480d5b651ba..1761fa95d175d26ab19f9d07b225221daf6a397a 100644 (file)
@@ -1541,8 +1541,10 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
 
   if (!cpi->use_svc ||
       (svc->use_gf_temporal_ref_current_layer &&
-       !svc->layer_context[svc->temporal_layer_id].is_key_frame))
+       !svc->layer_context[svc->temporal_layer_id].is_key_frame)) {
     gf_temporal_ref = 1;
+    thresh_svc_skip_golden = 500;
+  }
 
   init_ref_frame_cost(cm, xd, ref_frame_cost);
   memset(&mode_checked[0][0], 0, MB_MODE_COUNT * MAX_REF_FRAMES);
@@ -1796,7 +1798,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
 
     // For SVC, skip the golden (spatial) reference search if sse of zeromv_last
     // is below threshold.
-    if (cpi->use_svc && ref_frame == GOLDEN_FRAME && !gf_temporal_ref &&
+    if (cpi->use_svc && ref_frame == GOLDEN_FRAME &&
         sse_zeromv_normalized < thresh_svc_skip_golden)
       continue;