Remove TwoPassCfg struct & absorb stats_in in oxcf

Change-Id: Ib23206bb958c1a9e564301ee7386b465c920c497
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index 0d795b2..b7e0dd1d 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -719,8 +719,6 @@
 
   DecoderModelCfg *const dec_model_cfg = &oxcf->dec_model_cfg;
 
-  TwoPassCfg *const two_pass_cfg = &oxcf->two_pass_cfg;
-
   RateControlCfg *const rc_cfg = &oxcf->rc_cfg;
 
   QuantizationCfg *const q_cfg = &oxcf->q_cfg;
@@ -905,8 +903,8 @@
   algo_cfg->enable_tpl_model =
       resize_cfg->resize_mode ? 0 : extra_cfg->enable_tpl_model;
 
-  // Set two-pass configuration.
-  two_pass_cfg->stats_in = cfg->rc_twopass_stats_in;
+  // Set two-pass stats configuration.
+  oxcf->twopass_stats_in = cfg->rc_twopass_stats_in;
 
   // Set Key frame configuration.
   kf_cfg->fwd_kf_enabled = cfg->fwd_kf_enabled;
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index cc2b935..6fe33b8 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -951,13 +951,12 @@
 #if !CONFIG_REALTIME_ONLY
   if (is_stat_consumption_stage(cpi)) {
     const size_t packet_sz = sizeof(FIRSTPASS_STATS);
-    const int packets = (int)(oxcf->two_pass_cfg.stats_in.sz / packet_sz);
+    const int packets = (int)(oxcf->twopass_stats_in.sz / packet_sz);
 
     if (!cpi->lap_enabled) {
       /*Re-initialize to stats buffer, populated by application in the case of
        * two pass*/
-      cpi->twopass.stats_buf_ctx->stats_in_start =
-          oxcf->two_pass_cfg.stats_in.buf;
+      cpi->twopass.stats_buf_ctx->stats_in_start = oxcf->twopass_stats_in.buf;
       cpi->twopass.stats_in = cpi->twopass.stats_buf_ctx->stats_in_start;
       cpi->twopass.stats_buf_ctx->stats_in_end =
           &cpi->twopass.stats_buf_ctx->stats_in_start[packets - 1];
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 5cdd47a..abf85d9 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -604,20 +604,6 @@
   bool timing_info_present;
 } DecoderModelCfg;
 
-/*!\endcond */
-/*!
- * \brief Two pass specific rate control configuration parameters
- */
-typedef struct {
-  // TWO PASS DATARATE CONTROL OPTIONS.
-  /*!
-   * stats_in buffer contains all of the stats packets produced in the first
-   * pass, concatenated.
-   */
-  aom_fixed_buf_t stats_in;
-} TwoPassCfg;
-/*!\cond */
-
 typedef struct {
   // Indicates the update frequency for coeff costs.
   COST_UPDATE_TYPE coeff;
@@ -835,9 +821,10 @@
 
   /*!\endcond */
   /*!
-   * Two pass specific rate control configuration parameters
+   * stats_in buffer contains all of the stats packets produced in the first
+   * pass, concatenated.
    */
-  TwoPassCfg two_pass_cfg;
+  aom_fixed_buf_t twopass_stats_in;
   /*!\cond */
 
   // Configuration related to encoder toolsets.
diff --git a/doc/dev_guide/av1_encoder.dox b/doc/dev_guide/av1_encoder.dox
index 5619242..7339847 100644
--- a/doc/dev_guide/av1_encoder.dox
+++ b/doc/dev_guide/av1_encoder.dox
@@ -117,7 +117,6 @@
     - \ref AV1EncoderConfig.algo_cfg (\ref AlgoCfg)
     - \ref AV1EncoderConfig.kf_cfg (\ref KeyFrameCfg)
     - \ref AV1EncoderConfig.rc_cfg (\ref RateControlCfg)
-    - \ref AV1EncoderConfig.two_pass_cfg (\ref TwoPassCfg)
 
 - \ref AlgoCfg (Algorithm related configuration parameters)
     - \ref AlgoCfg.arnr_max_frames
@@ -148,8 +147,6 @@
     - \ref RATE_CONTROL.frames_till_gf_update_due
     - \ref RATE_CONTROL.frames_to_key
 
-- \ref TwoPassCfg (VBR pass specific rate control configuration)
-
 - \ref TWO_PASS (Two pass status and control data)
 
 - \ref GF_GROUP (Data relating to the current GF/ARF group)
@@ -423,7 +420,6 @@
 
  - \ref AV1EncoderConfig (Encoder configuration parameters)
     - \ref AV1EncoderConfig.rc_cfg (\ref RateControlCfg)
-    - \ref AV1EncoderConfig.two_pass_cfg (\ref TwoPassCfg)
 
  - \ref FIRSTPASS_STATS *frame_stats_buf (used to store per frame first
    pass stats)