Commit 82b54073f0 for aom

commit 82b54073f09f537845226122ee4e9ec3493344e6
Author: Anusuya <anusuya.k@ittiam.com>
Date:   Tue Feb 10 10:54:55 2026 +0530

    Tune sf 'alt_ref_search_fp'

    The pruning of BWD, ALTREF2, ALTREF is made less aggressive for
    speed=4, 5, 6. Also, the condition to avoid pruning is changed to be
    based on the difference in relative distance between the reference
    frame and the LAST_FRAME. Earlier the condition was based on 1.5
    times the relative distance of LAST_FRAME which can result in
    aggressive pruning when the the relative distance of LAST_FRAME is
    large.

        Encoder Instruction                BD-Rate Loss(%)
    cpu  Count Reduction(%)  avg.psnr  ovr.psnr  ssim     vmaf   vmaf_neg
     2        -0.05          -0.0024   -0.0048  -0.0037  -0.0045  -0.0031
     3        -0.14          -0.0388   -0.0358  -0.0401  -0.0455  -0.0442
     4        -2.20          -0.2543   -0.2582  -0.3351  -0.2325  -0.2401
     5        -1.53          -0.2618   -0.2524  -0.3056  -0.2740  -0.2801
     6        -0.86          -0.1986   -0.1758  -0.2604  -0.2232  -0.2137

    STATS_CHANGED for speed>=2

    Change-Id: I4ecc0344b314a37e27409a4926ba567b4877364b

diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index dcce6bbcf4..a9e0f8f9b4 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -4131,11 +4131,10 @@ static inline void init_mode_skip_mask(mode_skip_mask_t *mask,
             0) {
           // Prune inter modes when relative dist of ALTREF2 and ALTREF is close
           // to the relative dist of LAST_FRAME.
-          if (inter_sf->alt_ref_search_fp == 1 &&
-              (abs(cpi->ref_frame_dist_info
-                       .ref_relative_dist[ref_frame - LAST_FRAME]) >
-               1.5 * abs(cpi->ref_frame_dist_info
-                             .ref_relative_dist[LAST_FRAME - LAST_FRAME]))) {
+          if (abs(cpi->ref_frame_dist_info
+                      .ref_relative_dist[ref_frame - LAST_FRAME] -
+                  cpi->ref_frame_dist_info
+                      .ref_relative_dist[LAST_FRAME - LAST_FRAME]) > 4) {
             continue;
           }
           if (x->pred_mv_sad[ref_frame] > sad_thresh)