[FFmpeg-cvslog] avcodec/x86/vvc: add prototypes for OF functions

James Almer git at videolan.org
Mon Nov 11 14:30:58 EET 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Nov 10 16:46:31 2024 -0300| [9ec042c1aaa64b5f6dff8be263feff4288c1844e] | committer: Nuo Mi

avcodec/x86/vvc: add prototypes for OF functions

And wrap the implemtation in preprocessor checks.
Should fix ticket #11282.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9ec042c1aaa64b5f6dff8be263feff4288c1844e
---

 libavcodec/x86/vvc/vvcdsp_init.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/libavcodec/x86/vvc/vvcdsp_init.c b/libavcodec/x86/vvc/vvcdsp_init.c
index 7b6aa50676..31bb80e109 100644
--- a/libavcodec/x86/vvc/vvcdsp_init.c
+++ b/libavcodec/x86/vvc/vvcdsp_init.c
@@ -104,19 +104,29 @@ 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);                         \
 
-#define OF_PROTOTYPES(bd, opt)                                                                      \
-static void ff_vvc_apply_bdof_##bd##_##opt(uint8_t *dst, ptrdiff_t dst_stride,                      \
+#define OF_FUNC(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)                                         \
 {                                                                                                   \
     ff_vvc_apply_bdof##_##opt(dst, dst_stride, src0, src1, w, h, (1 << bd)  - 1);                   \
 }                                                                                                   \
 
-OF_PROTOTYPES( 8, avx2)
-OF_PROTOTYPES(10, avx2)
-OF_PROTOTYPES(12, avx2)
+OF_FUNC( 8, avx2)
+OF_FUNC(10, avx2)
+OF_FUNC(12, avx2)
+#endif
 
 #define ALF_BPC_PROTOTYPES(bpc, opt)                                                                                     \
 void BF(ff_vvc_alf_filter_luma, bpc, opt)(uint8_t *dst, ptrdiff_t dst_stride,                                            \



More information about the ffmpeg-cvslog mailing list