Add max/min_gf_interval to vpx_rc_config_t
authorJerome Jiang <jianj@google.com>
Thu, 14 Sep 2023 20:04:19 +0000 (16:04 -0400)
committerJerome Jiang <jianj@google.com>
Thu, 14 Sep 2023 20:04:19 +0000 (16:04 -0400)
Bug: b/300499738
Change-Id: Id32cb5e3ce667539c0d1efe1ff5fcc7a49e35329

vp9/vp9_cx_iface.c
vpx/vpx_ext_ratectrl.h

index 06c0ac1..b1dfe99 100644 (file)
@@ -1960,7 +1960,8 @@ static vpx_codec_err_t ctrl_set_external_rate_control(vpx_codec_alg_priv_t *ctx,
     ratectrl_config.frame_width = frame_info->frame_width;
     ratectrl_config.frame_height = frame_info->frame_height;
     ratectrl_config.show_frame_count = cpi->twopass.first_pass_info.num_frames;
-
+    ratectrl_config.max_gf_interval = oxcf->max_gf_interval;
+    ratectrl_config.min_gf_interval = oxcf->min_gf_interval;
     // TODO(angiebird): Double check whether this is the proper way to set up
     // target_bitrate and frame_rate.
     ratectrl_config.target_bitrate_kbps = (int)(oxcf->target_bandwidth / 1000);
index ef96be6..46d290d 100644 (file)
@@ -307,6 +307,8 @@ typedef struct vpx_rc_config {
   int frame_width;      /**< frame width */
   int frame_height;     /**< frame height */
   int show_frame_count; /**< number of visible frames in the video */
+  int max_gf_interval;  /**< max GOP size in number of show frames */
+  int min_gf_interval;  /**< min GOP size in number of show frames */
   /*!
    * Target bitrate in kilobytes per second
    */