[FFmpeg-cvslog] avcodec/x86/fdct: guard usage of undefined functions with preprocessor
Kacper Michajłow
git at videolan.org
Fri Jul 25 22:49:31 EEST 2025
ffmpeg | branch: master | Kacper Michajłow <kasper93 at gmail.com> | Mon Jul 21 01:40:08 2025 +0200| [9658d4425e803950e98b72c8906c143f219051ec] | committer: Kacper Michajłow
avcodec/x86/fdct: 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 at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9658d4425e803950e98b72c8906c143f219051ec
---
libavcodec/x86/fdctdsp_init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/x86/fdctdsp_init.c b/libavcodec/x86/fdctdsp_init.c
index 92a842433d..107912afc8 100644
--- a/libavcodec/x86/fdctdsp_init.c
+++ b/libavcodec/x86/fdctdsp_init.c
@@ -26,6 +26,7 @@
av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)
{
+#if HAVE_SSE2_INLINE
int cpu_flags = av_get_cpu_flags();
const int dct_algo = avctx->dct_algo;
@@ -35,4 +36,5 @@ av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx,
c->fdct = ff_fdct_sse2;
}
}
+#endif
}
More information about the ffmpeg-cvslog
mailing list