From 57bf42131429e3213799f6ee8cf1e4c1c2c85741 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Date: Wed, 2 Apr 2025 11:27:34 +0200 Subject: [PATCH 02/23] avcodec/x86/vvc/dsp_init: Make ff_vvc_apply_bdof_##bd##_avx2 static These wrappers around ff_vvc_apply_bdof_avx2() are only used in dsp_init.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/x86/vvc/dsp_init.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/libavcodec/x86/vvc/dsp_init.c b/libavcodec/x86/vvc/dsp_init.c index 6245dc1a8b..6ee43b79da 100644 --- a/libavcodec/x86/vvc/dsp_init.c +++ b/libavcodec/x86/vvc/dsp_init.c @@ -71,20 +71,13 @@ DMVR_PROTOTYPES( 8, avx2) DMVR_PROTOTYPES(10, avx2) DMVR_PROTOTYPES(12, avx2) -#define OF_PROTOTYPES(bd, opt) \ -void ff_vvc_apply_bdof_##bd##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ - const int16_t *src0, const int16_t *src1, int w, int h); \ - -OF_PROTOTYPES( 8, avx2) -OF_PROTOTYPES(10, avx2) -OF_PROTOTYPES(12, avx2) - #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL -void ff_vvc_apply_bdof_avx2(uint8_t *dst, ptrdiff_t dst_stride, \ - const int16_t *src0, const int16_t *src1, int w, int h, int pixel_max); \ +void ff_vvc_apply_bdof_avx2(uint8_t *dst, ptrdiff_t dst_stride, + const int16_t *src0, const int16_t *src1, + int w, int h, int pixel_max); #define OF_FUNC(bd, opt) \ -void ff_vvc_apply_bdof_##bd##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ +static void vvc_apply_bdof_##bd##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ const int16_t *src0, const int16_t *src1, int w, int h) \ { \ ff_vvc_apply_bdof##_##opt(dst, dst_stride, src0, src1, w, h, (1 << bd) - 1); \ @@ -93,6 +86,8 @@ void ff_vvc_apply_bdof_##bd##_##opt(uint8_t *dst, ptrdiff_t dst_stride, OF_FUNC( 8, avx2) OF_FUNC(10, avx2) OF_FUNC(12, avx2) + +#define OF_INIT(bd) c->inter.apply_bdof = vvc_apply_bdof_##bd##_avx2 #endif #define ALF_BPC_PROTOTYPES(bpc, opt) \ @@ -321,10 +316,6 @@ ALF_FUNCS(16, 12, avx2) c->inter.dmvr[1][1] = ff_vvc_dmvr_hv_##bd##_avx2; \ } while (0) -#define OF_INIT(bd) do { \ - c->inter.apply_bdof = ff_vvc_apply_bdof_##bd##_avx2; \ -} while (0) - #define ALF_INIT(bd) do { \ c->alf.filter[LUMA] = ff_vvc_alf_filter_luma_##bd##_avx2; \ c->alf.filter[CHROMA] = ff_vvc_alf_filter_chroma_##bd##_avx2; \ -- 2.45.2