ffmpeg | branch: master | Kacper Michajłow <kaspe...@gmail.com> | Mon Jul 21 01:44:02 2025 +0200| [40b56c6536dc6e181da4025b99a1d6d3c047da3c] | committer: Kacper Michajłow
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 <kaspe...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40b56c6536dc6e181da4025b99a1d6d3c047da3c --- libavcodec/x86/vc1dsp.h | 4 ++++ libavcodec/x86/vc1dsp_init.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/libavcodec/x86/vc1dsp.h b/libavcodec/x86/vc1dsp.h index fdd4de1813..6185407b18 100644 --- a/libavcodec/x86/vc1dsp.h +++ b/libavcodec/x86/vc1dsp.h @@ -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 */ 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; \ _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".