ref: fe8cce2e36ff22d5426afe3271f9c7e32d8dc9ac
parent: 5c8431b9e4e0534f25031cf745b5d71b9492ee1e
author: angiebird <angiebird@google.com>
date: Tue May 26 10:44:10 EDT 2020
Init static_scene_max_gf_interval in vp9_rc_init() Change-Id: I2cad885fac2fd5f3e84d02b905a2ce59eb66760e
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -3771,7 +3771,6 @@
int show_idx = 0;
int last_gop_use_alt_ref = 0;
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
@@ -431,6 +431,11 @@
rc->max_gf_interval = vp9_rc_get_default_max_gf_interval(
oxcf->init_framerate, rc->min_gf_interval);
rc->baseline_gf_interval = (rc->min_gf_interval + rc->max_gf_interval) / 2;
+ if ((oxcf->pass == 0) && (oxcf->rc_mode == VPX_Q)) {
+ rc->static_scene_max_gf_interval = FIXED_GF_INTERVAL;
+ } else {
+ rc->static_scene_max_gf_interval = MAX_STATIC_GF_GROUP_LENGTH;
+ }
rc->force_max_q = 0;
rc->last_post_encode_dropped_scene_change = 0;