diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2025-07-21 01:44:02 +0200 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2025-07-25 21:10:16 +0200 |
commit | 40b56c6536dc6e181da4025b99a1d6d3c047da3c (patch) | |
tree | a90c43e0718dd54048d82920486c781150b74af9 /libavcodec/x86/vc1dsp_init.c | |
parent | 9658d4425e803950e98b72c8906c143f219051ec (diff) | |
download | ffmpeg-40b56c6536dc6e181da4025b99a1d6d3c047da3c.tar.gz |
avcodec/x86/vc1: guard usage of undefined functions with preprocessor
The asumption is that DCE will remove references to those functions.
However some compilers with certain instrumentation enabled doesn't DCE
those at all, resulting in linking failure. Tested with cl.exe -RTCu -RTCs.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Diffstat (limited to 'libavcodec/x86/vc1dsp_init.c')
-rw-r--r-- | libavcodec/x86/vc1dsp_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index 90b2f3624e..e8163f2886 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -102,6 +102,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); +#if HAVE_6REGS && HAVE_INLINE_ASM && HAVE_MMX_EXTERNAL if (HAVE_6REGS && INLINE_MMX(cpu_flags)) if (EXTERNAL_MMX(cpu_flags)) ff_vc1dsp_init_mmx(dsp); @@ -109,6 +110,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) if (HAVE_6REGS && INLINE_MMXEXT(cpu_flags)) if (EXTERNAL_MMXEXT(cpu_flags)) ff_vc1dsp_init_mmxext(dsp); +#endif /* HAVE_6REGS && HAVE_INLINE_ASM && HAVE_MMX_EXTERNAL */ #define ASSIGN_LF4(EXT) \ dsp->vc1_v_loop_filter4 = ff_vc1_v_loop_filter4_ ## EXT; \ |