ref: 46fa3d6b5b0a01d6a68ade4287848ee2a098d9a4
parent: d693439beda46732410ecc7b3945132e4ab01511
author: angiebird <angiebird@google.com>
date: Fri Oct 25 07:03:19 EDT 2019
Make [min/max]_gf_interval static under rate_ctrl Change-Id: I0624c4b44a35c760bb00e4d1a07bb0ac2640ea0b
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -2477,6 +2477,16 @@
// Set Maximum gf/arf interval
rc->max_gf_interval = oxcf->max_gf_interval;
rc->min_gf_interval = oxcf->min_gf_interval;
+#if CONFIG_RATE_CTRL
+ if (rc->min_gf_interval == 0) {
+ rc->min_gf_interval = vp9_rc_get_default_min_gf_interval(
+ oxcf->width, oxcf->height, oxcf->init_framerate);
+ }
+ if (rc->max_gf_interval == 0) {
+ rc->max_gf_interval = vp9_rc_get_default_max_gf_interval(
+ oxcf->init_framerate, rc->min_gf_interval);
+ }
+#else
if (rc->min_gf_interval == 0)
rc->min_gf_interval = vp9_rc_get_default_min_gf_interval(
oxcf->width, oxcf->height, cpi->framerate);
@@ -2483,6 +2493,7 @@
if (rc->max_gf_interval == 0)
rc->max_gf_interval = vp9_rc_get_default_max_gf_interval(
cpi->framerate, rc->min_gf_interval);
+#endif
// Extended max interval for genuinely static scenes like slide shows.
rc->static_scene_max_gf_interval = MAX_STATIC_GF_GROUP_LENGTH;