shithub: libvpx

Download patch

ref: d28d82263fc5df3585ed8c10d1d9ed095603e0e8
parent: eda6b925495ee975314f2f5bfcbfea614f5df330
author: angiebird <angiebird@google.com>
date: Wed Mar 25 14:18:23 EDT 2020

Init frames_to_key in vp9_rc_init()

Change-Id: Ic667c77ff58672212fc2e9dd5066c650b0152226

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -3749,8 +3749,8 @@
   int gop_show_frames;
   int show_idx = 0;
   int last_gop_use_alt_ref = 0;
-  rc.static_scene_max_gf_interval = 250;
   vp9_rc_init(oxcf, 1, &rc);
+  rc.static_scene_max_gf_interval = 250;
 
   while (show_idx < first_pass_info->num_frames) {
     int use_alt_ref;
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -402,6 +402,7 @@
   rc->fac_active_worst_gf = 100;
   rc->force_qpmin = 0;
   for (i = 0; i < MAX_LAG_BUFFERS; ++i) rc->avg_source_sad[i] = 0;
+  rc->frames_to_key = 0;
   rc->frames_since_key = 8;  // Sensible default for first frame.
   rc->this_key_frame_forced = 0;
   rc->next_key_frame_forced = 0;