Revert "Allow 32 frame subgop with fixed qp offsets"

This reverts commit cff5350efe027e6ddd67dcc253524a271e4990f4.

In the code review for commit cff5350efe027e6ddd67dcc253524a271e4990f4
(https://aomedia-review.googlesource.com/c/aom/+/138521), Jingning said:

  The related logic has been deprecated in the master branch. You can
  safely remove all the changes here now.

Jingning was referring to the CL that deprecated (removed) the
get_q_using_fixed_offsets() function:
https://aomedia-review.googlesource.com/c/aom/+/145743

BUG=aomedia:3148

Change-Id: I81174869dc6ecf657852ecac7d0a885aac9e56d1
diff --git a/aom/aom_encoder.h b/aom/aom_encoder.h
index 6367c10..c324c56 100644
--- a/aom/aom_encoder.h
+++ b/aom/aom_encoder.h
@@ -878,11 +878,11 @@
    */
   unsigned int use_fixed_qp_offsets;
 
-/*!\brief Max number of fixed QP offsets
+/*!\brief Number of fixed QP offsets
  *
  * This defines the number of elements in the fixed_qp_offsets array.
  */
-#define FIXED_QP_OFFSET_COUNT 6
+#define FIXED_QP_OFFSET_COUNT 5
 
   /*!\brief Array of fixed QP offsets
    *
diff --git a/apps/aomenc.c b/apps/aomenc.c
index afc519d..f65efa3 100644
--- a/apps/aomenc.c
+++ b/apps/aomenc.c
@@ -1112,14 +1112,9 @@
       const int fixed_qp_offset_count = arg_parse_list(
           &arg, config->cfg.fixed_qp_offsets, FIXED_QP_OFFSET_COUNT);
       if (fixed_qp_offset_count < FIXED_QP_OFFSET_COUNT) {
-        if (fixed_qp_offset_count < 2) {
-          die("Option --fixed_qp_offsets requires at least 2 comma-separated "
-              "values for kf and arf, but only %d were provided.\n",
-              fixed_qp_offset_count);
-        }
-        for (int k = fixed_qp_offset_count; k < FIXED_QP_OFFSET_COUNT; ++k)
-          config->cfg.fixed_qp_offsets[k] =
-              (config->cfg.fixed_qp_offsets[k - 1] + 1) / 2;
+        die("Option --fixed_qp_offsets requires %d comma-separated values, but "
+            "only %d values were provided.\n",
+            FIXED_QP_OFFSET_COUNT, fixed_qp_offset_count);
       }
       config->cfg.use_fixed_qp_offsets = 1;
     } else if (global->usage == AOM_USAGE_REALTIME &&
diff --git a/av1/arg_defs.c b/av1/arg_defs.c
index f7a36e3..327b664 100644
--- a/av1/arg_defs.c
+++ b/av1/arg_defs.c
@@ -605,9 +605,7 @@
               "pyramid. Selected automatically from --cq-level if "
               "--fixed-qp-offsets is not provided. If this option is not "
               "specified (default), offsets are adaptively chosen by the "
-              "encoder. Further, if this option is specified, at least two "
-              "comma-separated values corresponding to kf and arf offsets "
-              "must be provided, while the rest are chosen by the encoder"),
+              "encoder."),
 
   .fixed_qp_offsets = ARG_DEF(
       NULL, "fixed-qp-offsets", 1,
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index b679dba..54a275b 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -917,12 +917,12 @@
   return (base_q_val - new_q_val);
 }
 
-static double get_modeled_qp_offset(int qp, int level, int bit_depth) {
-  // 76% for keyframe was derived empirically.
-  // 60% similar to rc_pick_q_and_bounds_one_pass_vbr() for Q mode ARF.
+static double get_modeled_qp_offset(int cq_level, int level, int bit_depth) {
+  // 80% for keyframe was derived empirically.
+  // 40% similar to rc_pick_q_and_bounds_one_pass_vbr() for Q mode ARF.
   // Rest derived similar to rc_pick_q_and_bounds_two_pass()
-  static const int percents[FIXED_QP_OFFSET_COUNT] = { 76, 60, 30, 15, 8, 4 };
-  const double q_val = av1_convert_qindex_to_q(qp, bit_depth);
+  static const int percents[FIXED_QP_OFFSET_COUNT] = { 76, 60, 30, 15, 8 };
+  const double q_val = av1_convert_qindex_to_q(cq_level, bit_depth);
   return q_val * percents[level] / 100;
 }
 
@@ -3975,22 +3975,22 @@
       2000,  // rc_two_pass_vbrmax_section
 
       // keyframing settings (kf)
-      0,                           // fwd_kf_enabled
-      AOM_KF_AUTO,                 // kf_mode
-      0,                           // kf_min_dist
-      9999,                        // kf_max_dist
-      0,                           // sframe_dist
-      1,                           // sframe_mode
-      0,                           // large_scale_tile
-      0,                           // monochrome
-      0,                           // full_still_picture_hdr
-      0,                           // save_as_annexb
-      0,                           // tile_width_count
-      0,                           // tile_height_count
-      { 0 },                       // tile_widths
-      { 0 },                       // tile_heights
-      0,                           // use_fixed_qp_offsets
-      { -1, -1, -1, -1, -1, -1 },  // fixed_qp_offsets
+      0,                       // fwd_kf_enabled
+      AOM_KF_AUTO,             // kf_mode
+      0,                       // kf_min_dist
+      9999,                    // kf_max_dist
+      0,                       // sframe_dist
+      1,                       // sframe_mode
+      0,                       // large_scale_tile
+      0,                       // monochrome
+      0,                       // full_still_picture_hdr
+      0,                       // save_as_annexb
+      0,                       // tile_width_count
+      0,                       // tile_height_count
+      { 0 },                   // tile_widths
+      { 0 },                   // tile_heights
+      0,                       // use_fixed_qp_offsets
+      { -1, -1, -1, -1, -1 },  // fixed_qp_offsets
       { 0, 128, 128, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  // cfg
   },
@@ -4046,22 +4046,22 @@
       2000,  // rc_two_pass_vbrmax_section
 
       // keyframing settings (kf)
-      0,                           // fwd_kf_enabled
-      AOM_KF_AUTO,                 // kf_mode
-      0,                           // kf_min_dist
-      9999,                        // kf_max_dist
-      0,                           // sframe_dist
-      1,                           // sframe_mode
-      0,                           // large_scale_tile
-      0,                           // monochrome
-      0,                           // full_still_picture_hdr
-      0,                           // save_as_annexb
-      0,                           // tile_width_count
-      0,                           // tile_height_count
-      { 0 },                       // tile_widths
-      { 0 },                       // tile_heights
-      0,                           // use_fixed_qp_offsets
-      { -1, -1, -1, -1, -1, -1 },  // fixed_qp_offsets
+      0,                       // fwd_kf_enabled
+      AOM_KF_AUTO,             // kf_mode
+      0,                       // kf_min_dist
+      9999,                    // kf_max_dist
+      0,                       // sframe_dist
+      1,                       // sframe_mode
+      0,                       // large_scale_tile
+      0,                       // monochrome
+      0,                       // full_still_picture_hdr
+      0,                       // save_as_annexb
+      0,                       // tile_width_count
+      0,                       // tile_height_count
+      { 0 },                   // tile_widths
+      { 0 },                   // tile_heights
+      0,                       // use_fixed_qp_offsets
+      { -1, -1, -1, -1, -1 },  // fixed_qp_offsets
       { 0, 128, 128, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  // cfg
   },