[FFmpeg-devel] [PATCH] avcodec/x86/vvc/vvcdsp_init: fix unresolved external symbol on ARCH_X86_32
Wang Bin
wbsecg1 at gmail.com
Wed Feb 7 11:47:32 EET 2024
Andreas Rheinhardt <andreas.rheinhardt at outlook.com> 于2024年2月5日周一 20:04写道:
> toqsxw at outlook.com:
> > From: Wu Jianhua <toqsxw at outlook.com>
> >
> > Signed-off-by: Wu Jianhua <toqsxw at outlook.com>
> > ---
> > libavcodec/x86/vvc/vvcdsp_init.c | 78 ++++++++++++++++----------------
> > 1 file changed, 40 insertions(+), 38 deletions(-)
> >
> > diff --git a/libavcodec/x86/vvc/vvcdsp_init.c
> b/libavcodec/x86/vvc/vvcdsp_init.c
> > index 909ef9f56b..8ee4074350 100644
> > --- a/libavcodec/x86/vvc/vvcdsp_init.c
> > +++ b/libavcodec/x86/vvc/vvcdsp_init.c
> > @@ -31,6 +31,7 @@
> > #include "libavcodec/vvc/vvcdsp.h"
> > #include "libavcodec/x86/h26x/h2656dsp.h"
> >
> > +#if ARCH_X86_64
> > #define FW_PUT(name, depth, opt) \
> > static void ff_vvc_put_ ## name ## _ ## depth ## _##opt(int16_t *dst,
> const uint8_t *src, ptrdiff_t srcstride, \
> > int height, const
> int8_t *hf, const int8_t *vf, int width) \
> > @@ -204,51 +205,52 @@ AVG_FUNCS(16, 12, avx2)
> > c->inter.avg = bf(avg, bd, opt);
> \
> > c->inter.w_avg = bf(w_avg, bd, opt);
> \
> > } while (0)
> > +#endif
> >
> > void ff_vvc_dsp_init_x86(VVCDSPContext *const c, const int bd)
> > {
> > +#if ARCH_X86_64
> > const int cpu_flags = av_get_cpu_flags();
> >
> > - if (ARCH_X86_64) {
> > - if (bd == 8) {
> > - if (EXTERNAL_SSE4(cpu_flags)) {
> > - MC_LINK_SSE4(8);
> > - }
> > - if (EXTERNAL_AVX2_FAST(cpu_flags)) {
> > - MC_LINKS_AVX2(8);
> > - }
> > - } else if (bd == 10) {
> > - if (EXTERNAL_SSE4(cpu_flags)) {
> > - MC_LINK_SSE4(10);
> > - }
> > - if (EXTERNAL_AVX2_FAST(cpu_flags)) {
> > - MC_LINKS_AVX2(10);
> > - MC_LINKS_16BPC_AVX2(10);
> > - }
> > - } else if (bd == 12) {
> > - if (EXTERNAL_SSE4(cpu_flags)) {
> > - MC_LINK_SSE4(12);
> > - }
> > - if (EXTERNAL_AVX2_FAST(cpu_flags)) {
> > - MC_LINKS_AVX2(12);
> > - MC_LINKS_16BPC_AVX2(12);
> > - }
> > + if (bd == 8) {
> > + if (EXTERNAL_SSE4(cpu_flags)) {
> > + MC_LINK_SSE4(8);
> > }
> > + if (EXTERNAL_AVX2_FAST(cpu_flags)) {
> > + MC_LINKS_AVX2(8);
> > + }
> > + } else if (bd == 10) {
> > + if (EXTERNAL_SSE4(cpu_flags)) {
> > + MC_LINK_SSE4(10);
> > + }
> > + if (EXTERNAL_AVX2_FAST(cpu_flags)) {
> > + MC_LINKS_AVX2(10);
> > + MC_LINKS_16BPC_AVX2(10);
> > + }
> > + } else if (bd == 12) {
> > + if (EXTERNAL_SSE4(cpu_flags)) {
> > + MC_LINK_SSE4(12);
> > + }
> > + if (EXTERNAL_AVX2_FAST(cpu_flags)) {
> > + MC_LINKS_AVX2(12);
> > + MC_LINKS_16BPC_AVX2(12);
> > + }
> > + }
> >
> > - if (EXTERNAL_AVX2(cpu_flags)) {
> > - switch (bd) {
> > - case 8:
> > - AVG_INIT(8, avx2);
> > - break;
> > - case 10:
> > - AVG_INIT(10, avx2);
> > - break;
> > - case 12:
> > - AVG_INIT(12, avx2);
> > - break;
> > - default:
> > - break;
> > - }
> > + if (EXTERNAL_AVX2(cpu_flags)) {
> > + switch (bd) {
> > + case 8:
> > + AVG_INIT(8, avx2);
> > + break;
> > + case 10:
> > + AVG_INIT(10, avx2);
> > + break;
> > + case 12:
> > + AVG_INIT(12, avx2);
> > + break;
> > + default:
> > + break;
> > }
> > }
> > +#endif
> > }
>
> Are really all of these functions unavailable for 32bit?
>
> - Andreas
>
>
http://fate.ffmpeg.org/log.cgi?time=20240207055809&slot=x86_32-msvc14-dll-md-windows-native&log=compile
More information about the ffmpeg-devel
mailing list