1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/x86/vvc/dsp_init: Make alf wrappers static

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-04-03 12:41:22 +02:00
parent ed37a8f75a
commit 5c619da0ed

View File

@ -102,21 +102,9 @@ void BF(ff_vvc_alf_classify_grad, bpc, opt)(int *gradient_sum,
void BF(ff_vvc_alf_classify, bpc, opt)(int *class_idx, int *transpose_idx, const int *gradient_sum, \
intptr_t width, intptr_t height, intptr_t vb_pos, intptr_t bit_depth); \
#define ALF_PROTOTYPES(bpc, bd, opt) \
void bf(ff_vvc_alf_filter_luma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \
int width, int height, const int16_t *filter, const int16_t *clip, const int vb_pos); \
void bf(ff_vvc_alf_filter_chroma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \
int width, int height, const int16_t *filter, const int16_t *clip, const int vb_pos); \
void bf(ff_vvc_alf_classify, bd, opt)(int *class_idx, int *transpose_idx, \
const uint8_t *src, ptrdiff_t src_stride, int width, int height, int vb_pos, int *gradient_tmp); \
ALF_BPC_PROTOTYPES(8, avx2)
ALF_BPC_PROTOTYPES(16, avx2)
ALF_PROTOTYPES(8, 8, avx2)
ALF_PROTOTYPES(16, 10, avx2)
ALF_PROTOTYPES(16, 12, avx2)
#if ARCH_X86_64
#define FW_PUT(name, depth, opt) \
static void vvc_put_ ## name ## _ ## depth ## _##opt(int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, \
@ -213,20 +201,20 @@ AVG_FUNCS(16, 10, avx2)
AVG_FUNCS(16, 12, avx2)
#define ALF_FUNCS(bpc, bd, opt) \
void bf(ff_vvc_alf_filter_luma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \
static void bf(vvc_alf_filter_luma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \
int width, int height, const int16_t *filter, const int16_t *clip, const int vb_pos) \
{ \
const int param_stride = (width >> 2) * ALF_NUM_COEFF_LUMA; \
BF(ff_vvc_alf_filter_luma, bpc, opt)(dst, dst_stride, src, src_stride, width, height, \
filter, clip, param_stride, vb_pos, (1 << bd) - 1); \
} \
void bf(ff_vvc_alf_filter_chroma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \
static void bf(vvc_alf_filter_chroma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \
int width, int height, const int16_t *filter, const int16_t *clip, const int vb_pos) \
{ \
BF(ff_vvc_alf_filter_chroma, bpc, opt)(dst, dst_stride, src, src_stride, width, height, \
filter, clip, 0, vb_pos,(1 << bd) - 1); \
} \
void bf(ff_vvc_alf_classify, bd, opt)(int *class_idx, int *transpose_idx, \
static void bf(vvc_alf_classify, bd, opt)(int *class_idx, int *transpose_idx, \
const uint8_t *src, ptrdiff_t src_stride, int width, int height, int vb_pos, int *gradient_tmp) \
{ \
BF(ff_vvc_alf_classify_grad, bpc, opt)(gradient_tmp, src, src_stride, width, height, vb_pos); \
@ -317,9 +305,9 @@ ALF_FUNCS(16, 12, 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; \
c->alf.classify = ff_vvc_alf_classify_##bd##_avx2; \
c->alf.filter[LUMA] = vvc_alf_filter_luma_##bd##_avx2; \
c->alf.filter[CHROMA] = vvc_alf_filter_chroma_##bd##_avx2; \
c->alf.classify = vvc_alf_classify_##bd##_avx2; \
} while (0)
int ff_vvc_sad_avx2(const int16_t *src0, const int16_t *src1, int dx, int dy, int block_w, int block_h);