Remove references to 3 argument GetGopEncodeInfo

Also make GetGopEncodeInfoWithLookahead pure virtual, and use
the preprocessor to make GetGopEncodeInfoWithLookahead and
GetGopEncodeInfo synonymous.

After this, GetGopEncodeInfoWithLookahead can be globally
replaced with GetGopEncodeInfo, and then the #define can be
removed, and the transition from 3 args to 4 will be complete.

Bug: b/242892473
Change-Id: I7dc8a0ee0843f2c9bb6789b24c8e8a2c30817b9c
diff --git a/av1/ratectrl_qmode_interface.h b/av1/ratectrl_qmode_interface.h
index b24a50c..71285d0 100644
--- a/av1/ratectrl_qmode_interface.h
+++ b/av1/ratectrl_qmode_interface.h
@@ -254,6 +254,13 @@
   const TplGopStats *tpl_gop_stats;  // Not owned, may not be nullptr.
 };
 
+// Now that there are no more references to the old three-argument
+// GetGopEncodeInfo, it can be brought back to life as an alias for
+// GetGopEncodeInfoWithLookahead.
+// TODO(b/242892473): Remove this #define after replacing all references to
+// GetGopEncodeInfoWithLookahead with GetGopEncodeInfo.
+#define GetGopEncodeInfo GetGopEncodeInfoWithLookahead
+
 class AV1RateControlQModeInterface {
  public:
   AV1RateControlQModeInterface();
@@ -263,18 +270,6 @@
   virtual StatusOr<GopStructList> DetermineGopInfo(
       const FirstpassInfo &firstpass_info) = 0;
 
-  // DEPRECATED. Call GetGopEncodeInfoWithLookahead instead.
-  // TODO(b/242892473): Remove when all references are gone.
-  virtual StatusOr<GopEncodeInfo> GetGopEncodeInfo(
-      const GopStruct &gop_struct, const TplGopStats &tpl_gop_stats,
-      const RefFrameTable &ref_frame_table_snapshot_init) {
-    (void)gop_struct;
-    (void)tpl_gop_stats;
-    (void)ref_frame_table_snapshot_init;
-    return { { AOM_CODEC_UNSUP_FEATURE,
-               "GetGopEncodeInfo is deprecated and unimplemented" } };
-  }
-
   // Accepts GOP structure and TPL info from the encoder and returns q index and
   // rdmult for each frame. This should be called with consecutive GOPs as
   // returned by DetermineGopInfo.
@@ -286,16 +281,10 @@
   // ref_frame_table_snapshot_init; for subsequent GOPs, it should be the
   // final_snapshot returned on the previous call.
   //
-  // TODO(b/242892473): Remove implementation and make pure virtual when
-  // implemented by all derived classes.
   virtual StatusOr<GopEncodeInfo> GetGopEncodeInfoWithLookahead(
       const GopStruct &gop_struct, const TplGopStats &tpl_gop_stats,
       const std::vector<LookaheadStats> &lookahead_stats,
-      const RefFrameTable &ref_frame_table_snapshot_init) {
-    (void)lookahead_stats;
-    return GetGopEncodeInfo(gop_struct, tpl_gop_stats,
-                            ref_frame_table_snapshot_init);
-  }
+      const RefFrameTable &ref_frame_table_snapshot_init) = 0;
 };
 }  // namespace aom
 
diff --git a/test/mock_ratectrl_qmode.h b/test/mock_ratectrl_qmode.h
index a6e3e59..252d3a6 100644
--- a/test/mock_ratectrl_qmode.h
+++ b/test/mock_ratectrl_qmode.h
@@ -23,11 +23,6 @@
               (override));
   MOCK_METHOD(StatusOr<GopStructList>, DetermineGopInfo,
               (const FirstpassInfo &firstpass_info), (override));
-  // TODO(b/242892473): Remove when no longer used.
-  MOCK_METHOD(StatusOr<GopEncodeInfo>, GetGopEncodeInfo,
-              (const GopStruct &gop_struct, const TplGopStats &tpl_gop_stats,
-               const RefFrameTable &ref_frame_table_snapshot_init),
-              (override));
   MOCK_METHOD(StatusOr<GopEncodeInfo>, GetGopEncodeInfoWithLookahead,
               (const GopStruct &gop_struct, const TplGopStats &tpl_gop_stats,
                const std::vector<LookaheadStats> &lookahead_stats,