And wrap the implemtation in preprocessor checks. Should fix ticket #11282.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -104,19 +104,29 @@ DMVR_PROTOTYPES( 8, avx2) · 103 unmodified lines | ||
| 104 | 104 | DMVR_PROTOTYPES(10, avx2) |
| 105 | 105 | DMVR_PROTOTYPES(12, avx2) |
| 106 | 106 | |
| 107 | +#define OF_PROTOTYPES(bd, opt) \ | |
| 108 | +void ff_vvc_apply_bdof_##bd##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ | |
| 109 | + const int16_t *src0, const int16_t *src1, int w, int h); \ | |
| 110 | + | |
| 111 | +OF_PROTOTYPES( 8, avx2) | |
| 112 | +OF_PROTOTYPES(10, avx2) | |
| 113 | +OF_PROTOTYPES(12, avx2) | |
| 114 | + | |
| 115 | +#if ARCH_X86_64 && HAVE_AVX2_EXTERNAL | |
| 107 | 116 | void ff_vvc_apply_bdof_avx2(uint8_t *dst, ptrdiff_t dst_stride, \ |
| 108 | 117 | const int16_t *src0, const int16_t *src1, int w, int h, int pixel_max); \ |
| 109 | 118 | |
| 110 | −#define OF_PROTOTYPES(bd, opt) \ | |
| 111 | −static void ff_vvc_apply_bdof_##bd##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ | |
| 119 | +#define OF_FUNC(bd, opt) \ | |
| 120 | +void ff_vvc_apply_bdof_##bd##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ | |
| 112 | 121 | const int16_t *src0, const int16_t *src1, int w, int h) \ |
| 113 | 122 | { \ |
| 114 | 123 | ff_vvc_apply_bdof##_##opt(dst, dst_stride, src0, src1, w, h, (1 << bd) - 1); \ |
| 115 | 124 | } \ |
| 116 | 125 | |
| 117 | −OF_PROTOTYPES( 8, avx2) | |
| 118 | −OF_PROTOTYPES(10, avx2) | |
| 119 | −OF_PROTOTYPES(12, avx2) | |
| 126 | +OF_FUNC( 8, avx2) | |
| 127 | +OF_FUNC(10, avx2) | |
| 128 | +OF_FUNC(12, avx2) | |
| 129 | +#endif | |
| 120 | 130 | |
| 121 | 131 | #define ALF_BPC_PROTOTYPES(bpc, opt) \ |
| 122 | 132 | void BF(ff_vvc_alf_filter_luma, bpc, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ |