Commit 4cea455cab for aom

commit 4cea455cabe16fabad4a8020b4dee269d157f0ef
Author: Wan-Teh Chang <wtc@google.com>
Date:   Tue Oct 6 13:27:15 2026 -0700

    Fix one scaled ref index in compound motion search

    https://aomedia-review.googlesource.com/c/aom/+/169472 corrected scaled
    ref indices in compound motion search, but it missed one index.

    Bug: 570668340
    Change-Id: I58b557d2824ccf72c941bb850fe5546d10349670

diff --git a/av1/encoder/motion_search_facade.c b/av1/encoder/motion_search_facade.c
index 57a41612e5..bcdca3c34c 100644
--- a/av1/encoder/motion_search_facade.c
+++ b/av1/encoder/motion_search_facade.c
@@ -803,15 +803,15 @@ int av1_compound_single_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
     // match the resolution of the current frame, allowing the existing
     // full-pixel motion search code to be used without additional
     // modifications.
-    for (int i = 0; i < num_planes; i++) {
-      backup_yv12[i] = xd->plane[i].pre[ref_idx];
-    }
-    const int mi_row = xd->mi_row;
-    const int mi_col = xd->mi_col;
     // The index below needs to be 0 instead of ref_idx since we assume the
     // 0th slot to be used for subsequent searches. Note that the ref_idx
     // reference buffer has been copied to the 0th slot in the code above.
     // Now we need to swap the reference frame for the 0th slot.
+    for (int i = 0; i < num_planes; i++) {
+      backup_yv12[i] = xd->plane[i].pre[0];
+    }
+    const int mi_row = xd->mi_row;
+    const int mi_col = xd->mi_col;
     av1_setup_pre_planes(xd, 0, scaled_ref_frame, mi_row, mi_col, NULL,
                          num_planes);
   }