diff mbox series

[FFmpeg-devel,28/41] avcodec/x86/svq1enc_init: Disable overridden functions on x64

Message ID DB6PR0101MB221493A7007635957E08C3918FA79@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Superseded
Headers show
Series Stop including superseded functions for x64 | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt June 9, 2022, 11:55 p.m. UTC
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT, SSE and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2). This commit therefore disables
the MMX implementation (which is overridden by the SSE2
specific implementation) at compile-time for x64.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavcodec/x86/svq1enc.asm    | 2 ++
 libavcodec/x86/svq1enc_init.c | 2 ++
 2 files changed, 4 insertions(+)
diff mbox series


diff --git a/libavcodec/x86/svq1enc.asm b/libavcodec/x86/svq1enc.asm
index a87632836d..a43d3b4029 100644
--- a/libavcodec/x86/svq1enc.asm
+++ b/libavcodec/x86/svq1enc.asm
@@ -55,7 +55,9 @@  cglobal ssd_int8_vs_int16, 3, 3, 3, pix1, pix2, size
+%if ARCH_X86_32
 INIT_XMM sse2
diff --git a/libavcodec/x86/svq1enc_init.c b/libavcodec/x86/svq1enc_init.c
index 40b4b0e183..aaebbb92cc 100644
--- a/libavcodec/x86/svq1enc_init.c
+++ b/libavcodec/x86/svq1enc_init.c
@@ -33,9 +33,11 @@  av_cold void ff_svq1enc_init_x86(SVQ1EncContext *c)
     int cpu_flags = av_get_cpu_flags();
+#if ARCH_X86_32
     if (EXTERNAL_MMX(cpu_flags)) {
         c->ssd_int8_vs_int16 = ff_ssd_int8_vs_int16_mmx;
     if (EXTERNAL_SSE2(cpu_flags)) {
         c->ssd_int8_vs_int16 = ff_ssd_int8_vs_int16_sse2;