Commit a067a67cb4 for aom
commit a067a67cb4d7ab7c379a4c0e249d7be9108dddf0
Author: Apurve Kumar Pandey <apurve.pandey@ittiam.com>
Date: Tue Feb 17 19:04:09 2026 +0530
Speed up subpel search for USE_2_TAPS
In tpl module, bilinear filter is used for sub-pel search.
However, optimized functions were not used during sub-pel
search when subpel_search_type is USE_2_TAPS in
av1_find_best_sub_pixel_tree(). This patch fixes the same.
Encoder performance results averaged over all resolutions
are as follows:
Instruction Count
cpu Reduction(%)
1 1.83
2 1.84
This change is bit-exact for all presets.
Change-Id: I0d5a9cc53f0523972dce788324618568bb7975a6
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index b451a21ffe..b89b12f815 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -2895,7 +2895,7 @@ static AOM_FORCE_INLINE void second_level_check_v2(
best_mv->col + diag_step.col };
int has_better_mv = 0;
- if (var_params->subpel_search_type != USE_2_TAPS_ORIG) {
+ if (var_params->subpel_search_type > USE_2_TAPS) {
check_better(xd, cm, &row_bias_mv, best_mv, mv_limits, var_params,
mv_cost_params, besterr, sse1, distortion, &has_better_mv);
check_better(xd, cm, &col_bias_mv, best_mv, mv_limits, var_params,
@@ -3326,7 +3326,7 @@ int av1_find_best_sub_pixel_tree(MACROBLOCKD *xd, const AV1_COMMON *const cm,
*distortion = start_mv_stats->distortion;
*sse1 = start_mv_stats->sse;
} else {
- if (subpel_search_type != USE_2_TAPS_ORIG) {
+ if (subpel_search_type > USE_2_TAPS) {
besterr = upsampled_setup_center_error(xd, cm, bestmv, var_params,
mv_cost_params, sse1, distortion);
} else {
@@ -3346,7 +3346,7 @@ int av1_find_best_sub_pixel_tree(MACROBLOCKD *xd, const AV1_COMMON *const cm,
}
MV diag_step;
- if (subpel_search_type != USE_2_TAPS_ORIG) {
+ if (subpel_search_type > USE_2_TAPS) {
diag_step = first_level_check(xd, cm, iter_center_mv, bestmv, hstep,
mv_limits, var_params, mv_cost_params,
&besterr, sse1, distortion);