Commit 36ffe6fc72 for aom
commit 36ffe6fc723842c63c01c4bbfedb5acb8fc23f54
Author: Yunqing Wang <yunqingwang@google.com>
Date: Wed Apr 22 14:12:55 2026 -0700
Minor change in motion search method setting
Neutral coding performance with a small encoder time reduction
(<= 0.2%) at speed 2.
Bug: 505128814
STATS_CHANGED
Change-Id: I3809d760de809298bd04c0c43e0fd2b32a829c0f
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index ae0e9954c7..4f7d3087f5 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -2973,9 +2973,9 @@ void av1_set_speed_features_qindex_dependent(AV1_COMP *cpi, int speed) {
// For < 720p resolutions:
if (!is_720p_or_larger) {
// For < 720p resolutions:
- static const int ms_qindex_thresh[3][2] = { { 200, 70 },
- { 170, 50 },
- { 170, 40 } };
+ const int ms_qindex_thresh[3][2] = { { 200, 70 },
+ { 170, 50 },
+ { 170, 40 } };
const int qindex_thresh1 = ms_qindex_thresh[aggr][0];
const int qindex_thresh2 = ms_qindex_thresh[aggr][1];
if (cm->quant_params.base_qindex > qindex_thresh1) {
@@ -2986,17 +2986,22 @@ void av1_set_speed_features_qindex_dependent(AV1_COMP *cpi, int speed) {
}
} else {
// For >= 720p resolutions:
- static const int ms_qindex_thresh[3][2] = { { MAXQ, 200 },
- { MAXQ, -1 },
- { 200, 40 } };
+ const int ms_qindex_thresh[3][2] = { { MAXQ, 200 },
+ { MAXQ, -1 },
+ { 200, -1 } };
+ const SEARCH_METHODS motion_search_method[3][2] = {
+ { NSTEP_8PT, NSTEP_8PT },
+ { NSTEP_8PT, DIAMOND },
+ { NSTEP_8PT, DIAMOND }
+ };
const int qindex_thresh1 = ms_qindex_thresh[aggr][0];
const int qindex_thresh2 = ms_qindex_thresh[aggr][1];
if (cm->quant_params.base_qindex > qindex_thresh1) {
sf->mv_sf.search_method = DIAMOND;
sf->tpl_sf.search_method = DIAMOND;
} else if (cm->quant_params.base_qindex > qindex_thresh2) {
- sf->mv_sf.search_method = NSTEP_8PT;
- sf->tpl_sf.search_method = DIAMOND;
+ sf->mv_sf.search_method = motion_search_method[aggr][0];
+ sf->tpl_sf.search_method = motion_search_method[aggr][1];
}
}
}