shithub: libvpx

Download patch

ref: 2899a9d438ce5243936428baf4b6f4f1e63faae8
parent: 3c20815a40557e5fce62d49bd4109eb1c8900778
author: Marco Paniconi <marpan@google.com>
date: Wed Jun 27 08:26:09 EDT 2018

vp9-svc: Fix to early golden exit nonrd-pickmode

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

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1541,8 +1541,10 @@
 
   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 @@
 
     // 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;