You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
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>
This commit is contained in:
@ -23,7 +23,11 @@
|
||||
|
||||
#include "libavcodec/vc1dsp.h"
|
||||
|
||||
#if HAVE_6REGS && HAVE_INLINE_ASM && HAVE_MMX_EXTERNAL
|
||||
|
||||
void ff_vc1dsp_init_mmx(VC1DSPContext *dsp);
|
||||
void ff_vc1dsp_init_mmxext(VC1DSPContext *dsp);
|
||||
|
||||
#endif /* HAVE_6REGS && HAVE_INLINE_ASM && HAVE_MMX_EXTERNAL */
|
||||
|
||||
#endif /* AVCODEC_X86_VC1DSP_H */
|
||||
|
@ -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; \
|
||||
|
Reference in New Issue
Block a user