Commit 399a9541cd for aom
commit 399a9541cdda09e6217498e6b0476bcd62fddb79
Author: Satheesh Kumar <satheesh.kumar@ittiam.com>
Date: Tue Mar 17 12:06:55 2026 +0530
Refactor and cleanup convolve AVX2 intrinsic
This patch removes "general" keyword from function name and
cleans up the redundant call to convolve_x and convolve_y
intrinsics.
Change-Id: I2d89f98c3a890a9db8e06bce10b0e7fbd141eeae
diff --git a/av1/common/x86/convolve_2d_avx2.c b/av1/common/x86/convolve_2d_avx2.c
index c49a471d32..be53424ac7 100644
--- a/av1/common/x86/convolve_2d_avx2.c
+++ b/av1/common/x86/convolve_2d_avx2.c
@@ -82,11 +82,12 @@ static void convolve_2d_sr_w4_avx2(
}
}
-static void convolve_2d_sr_general_avx2(
- const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w,
- int h, const InterpFilterParams *filter_params_x,
- const InterpFilterParams *filter_params_y, const int subpel_x_qn,
- const int subpel_y_qn, ConvolveParams *conv_params) {
+static void convolve_2d_sr_avx2(const uint8_t *src, int src_stride,
+ uint8_t *dst, int dst_stride, int w, int h,
+ const InterpFilterParams *filter_params_x,
+ const InterpFilterParams *filter_params_y,
+ const int subpel_x_qn, const int subpel_y_qn,
+ ConvolveParams *conv_params) {
if (filter_params_x->taps > 8) {
const int bd = 8;
int im_stride = 8, i;
@@ -215,8 +216,7 @@ void av1_convolve_2d_sr_avx2(
filter_params_x, filter_params_y, subpel_x_qn,
subpel_y_qn, conv_params);
} else {
- convolve_2d_sr_general_avx2(src, src_stride, dst, dst_stride, w, h,
- filter_params_x, filter_params_y, subpel_x_qn,
- subpel_y_qn, conv_params);
+ convolve_2d_sr_avx2(src, src_stride, dst, dst_stride, w, h, filter_params_x,
+ filter_params_y, subpel_x_qn, subpel_y_qn, conv_params);
}
}
diff --git a/av1/common/x86/convolve_avx2.c b/av1/common/x86/convolve_avx2.c
index 209dee75e5..c2c3c7cb7a 100644
--- a/av1/common/x86/convolve_avx2.c
+++ b/av1/common/x86/convolve_avx2.c
@@ -18,9 +18,11 @@
#include "aom_dsp/x86/convolve_common_intrin.h"
#include "aom_dsp/x86/synonyms.h"
-static inline void av1_convolve_y_sr_general_avx2(
- const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w,
- int h, const InterpFilterParams *filter_params_y, const int subpel_y_qn) {
+void av1_convolve_y_sr_avx2(const uint8_t *src, int32_t src_stride,
+ uint8_t *dst, int32_t dst_stride, int32_t w,
+ int32_t h,
+ const InterpFilterParams *filter_params_y,
+ const int32_t subpel_y_qn) {
__m128i coeffs_128[4];
__m256i coeffs[6];
int x = 0, y = h;
@@ -834,19 +836,12 @@ static inline void av1_convolve_y_sr_general_avx2(
}
}
-void av1_convolve_y_sr_avx2(const uint8_t *src, int32_t src_stride,
+void av1_convolve_x_sr_avx2(const uint8_t *src, int32_t src_stride,
uint8_t *dst, int32_t dst_stride, int32_t w,
int32_t h,
- const InterpFilterParams *filter_params_y,
- const int32_t subpel_y_qn) {
- av1_convolve_y_sr_general_avx2(src, src_stride, dst, dst_stride, w, h,
- filter_params_y, subpel_y_qn);
-}
-
-static inline void av1_convolve_x_sr_general_avx2(
- const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w,
- int h, const InterpFilterParams *filter_params_x, const int subpel_x_qn,
- ConvolveParams *conv_params) {
+ const InterpFilterParams *filter_params_x,
+ const int32_t subpel_x_qn,
+ ConvolveParams *conv_params) {
const int bits = FILTER_BITS - conv_params->round_0;
int i, j, horiz_tap = get_filter_tap(filter_params_x, subpel_x_qn);
@@ -1399,13 +1394,3 @@ static inline void av1_convolve_x_sr_general_avx2(
}
}
}
-
-void av1_convolve_x_sr_avx2(const uint8_t *src, int32_t src_stride,
- uint8_t *dst, int32_t dst_stride, int32_t w,
- int32_t h,
- const InterpFilterParams *filter_params_x,
- const int32_t subpel_x_qn,
- ConvolveParams *conv_params) {
- av1_convolve_x_sr_general_avx2(src, src_stride, dst, dst_stride, w, h,
- filter_params_x, subpel_x_qn, conv_params);
-}