1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

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@gmail.com>
This commit is contained in:
Kacper Michajłow
2025-07-21 01:40:08 +02:00
parent 6bc23ab352
commit 9658d4425e

View File

@ -26,6 +26,7 @@
av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx, av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth) unsigned high_bit_depth)
{ {
#if HAVE_SSE2_INLINE
int cpu_flags = av_get_cpu_flags(); int cpu_flags = av_get_cpu_flags();
const int dct_algo = avctx->dct_algo; 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; c->fdct = ff_fdct_sse2;
} }
} }
#endif
} }