Commit 36d15d7377 for aom
commit 36d15d7377d4d740a5a3d674171442377df9b26a
Author: Samuthirika <samuthirika.s@ittiam.com>
Date: Thu Nov 19 22:55:48 2026 +0530
Tune subpel_search_method sf for cpu 2
This CL tunes the sf 'subpel_search_method' for different
caller sites in cpu 2. It is set from SUBPEL_TREE to
SUBPEL_TREE_PRUNED for the below cases:
- Simple motion search (av1_simple_motion_search_sse_var)
- Single motion search (av1_single_motion_search)
when pyramid_level > 3
- Compound motion search (av1_joint_motion_search and
av1_compound_single_motion_search) for 720p and
above resolutions
Encoder performance results averaged over all resolutions are
as follows:
Instruction Count BD-Rate Loss(%)
cpu Reduction(%) avg.psnr ssim vmaf vmaf_neg uvq_1p5
2 4.008 0.0756 0.0441 0.0690 0.0406 0.2216
STATS_CHANGED for cpu 2
Change-Id: I0937a3fff06a3367741ae29008f4c9f1354c2797
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index fc7751d3f0..90f382fc86 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -929,6 +929,8 @@ static void set_good_speed_feature_framesize_dependent(
} else {
sf->mv_sf.disable_second_mv = boosted ? 0 : 2;
sf->mv_sf.auto_mv_step_size = 1;
+ sf->mv_sf.subpel_search_method[SUBPEL_SEARCH_COMPOUND] =
+ SUBPEL_TREE_PRUNED;
}
if (!is_720p_or_larger) {
@@ -951,6 +953,15 @@ static void set_good_speed_feature_framesize_dependent(
const int low_q = get_mode_q_level(cpi) <= 80;
const int is_top_pyr =
boosted || cpi->ppi->gf_group.layer_depth[cpi->gf_frame_index] <= 2;
+ if (low_q && is_lf_frame) {
+ set_subpel_search_methods(sf->mv_sf.subpel_search_method,
+ SUBPEL_TREE_PRUNED_MORE);
+ } else {
+ set_subpel_search_methods(sf->mv_sf.subpel_search_method,
+ SUBPEL_TREE_PRUNED);
+ }
+ sf->mv_sf.subpel_search_method[SUBPEL_SEARCH_TF] = SUBPEL_TREE_PRUNED;
+ sf->mv_sf.subpel_search_method[SUBPEL_SEARCH_TPL] = SUBPEL_TREE_PRUNED;
sf->inter_sf.enable_fast_wedge_mask_search = 1;
sf->inter_sf.skip_newmv_in_drl = 4;
sf->inter_sf.skip_ext_comp_nearmv_mode = 1;
@@ -1038,6 +1049,8 @@ static void set_good_speed_feature_framesize_dependent(
const int high_q = get_mode_q_level(cpi) > 145;
sf->tx_sf.tx_type_search.winner_mode_tx_type_pruning =
(speed >= 5 || !boosted || !high_q) ? 2 : 1;
+ set_subpel_search_methods(sf->mv_sf.subpel_search_method,
+ SUBPEL_TREE_PRUNED_MORE);
sf->winner_mode_sf.enable_winner_mode_for_tx_size_srch = 1;
if (is_720p_or_larger) {
sf->part_sf.partition_search_breakout_dist_thr = (1 << 26);
@@ -1383,6 +1396,10 @@ static void set_good_speed_features_framesize_independent(
sf->mv_sf.simple_motion_subpel_force_stop = QUARTER_PEL;
sf->mv_sf.subpel_iters_per_step = 1;
sf->mv_sf.reduce_search_range = 1;
+ if (cm->current_frame.pyramid_level > 3) {
+ sf->mv_sf.subpel_search_method[SUBPEL_SEARCH_SINGLE] = SUBPEL_TREE_PRUNED;
+ }
+ sf->mv_sf.subpel_search_method[SUBPEL_SEARCH_SMS] = SUBPEL_TREE_PRUNED;
// TODO(chiyotsai@google.com): We can get 10% speed up if we move
// adaptive_rd_thresh to speed 1. But currently it performs poorly on some
@@ -1489,15 +1506,6 @@ static void set_good_speed_features_framesize_independent(
}
}
- if (low_q && is_lf_frame) {
- set_subpel_search_methods(sf->mv_sf.subpel_search_method,
- SUBPEL_TREE_PRUNED_MORE);
- } else {
- set_subpel_search_methods(sf->mv_sf.subpel_search_method,
- SUBPEL_TREE_PRUNED);
- }
- sf->mv_sf.subpel_search_method[SUBPEL_SEARCH_TF] = SUBPEL_TREE_PRUNED;
- sf->mv_sf.subpel_search_method[SUBPEL_SEARCH_TPL] = SUBPEL_TREE_PRUNED;
sf->mv_sf.simple_motion_subpel_force_stop =
(is_deep_lf_frame || (low_q && is_lf_frame)) ? HALF_PEL : QUARTER_PEL;
sf->mv_sf.search_method = DIAMOND;
@@ -1607,8 +1615,6 @@ static void set_good_speed_features_framesize_independent(
#if CONFIG_PYRAMID_ME
sf->pme_sf.enable_pyramid_me = false;
#endif // CONFIG_PYRAMID_ME
- set_subpel_search_methods(sf->mv_sf.subpel_search_method,
- SUBPEL_TREE_PRUNED_MORE);
sf->gm_sf.prune_zero_mv_with_sse = 2;
sf->gm_sf.downsample_level = 1;