Commit 9dafbe3521 for aom

commit 9dafbe3521d68975541c652ffece0ff2bb65b76b
Author: Wan-Teh Chang <wtc@google.com>
Date:   Fri Mar 20 14:29:50 2026 -0700

    Improve handle_inter_mode() comments

    The caller passes uninitialized rd_stats_y and rd_stats_uv to
    handle_inter_mode(), so rd_stats_y and rd_stats_uv cannot possibly be
    in,out parameters.

    handle_inter_mode() has only two return statements. In the early return
    (of INT64_MAX), it doesn't set several output parameters. So warn that
    output parameters are not set if the function returns INT64_MAX.

    Bug: 494653438
    Change-Id: I2d27217379218c7795b9f2e247b1828661ad0a09

diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 08806eb37c..60d088c2b6 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2998,9 +2998,9 @@ static inline bool fast_interp_search(const AV1_COMP *cpi, MACROBLOCK *x,
  * \param[in]     bsize             Current block size.
  * \param[in,out] rd_stats          Struct to keep track of the overall RD
  *                                  information.
- * \param[in,out] rd_stats_y        Struct to keep track of the RD information
+ * \param[out]    rd_stats_y        Struct to keep track of the RD information
  *                                  for only the Y plane.
- * \param[in,out] rd_stats_uv       Struct to keep track of the RD information
+ * \param[out]    rd_stats_uv       Struct to keep track of the RD information
  *                                  for only the UV planes.
  * \param[in]     args              HandleInterModeArgs struct holding
  *                                  miscellaneous arguments for inter mode
@@ -3044,7 +3044,8 @@ static inline bool fast_interp_search(const AV1_COMP *cpi, MACROBLOCK *x,
  * \param[out]    yrd               Stores the rdcost corresponding to encoding
  *                                  the luma plane.
  *
- * \return The RD cost for the mode being searched.
+ * \return The RD cost for the mode being searched. If the return value is
+ *         INT64_MAX, the output parameters are not set; do not use them.
  */
 static int64_t handle_inter_mode(
     AV1_COMP *const cpi, TileDataEnc *tile_data, MACROBLOCK *x,