diff mbox series

[FFmpeg-devel,36/41] swresample/x86/rematrix_init: Disable overridden functions on x64

Message ID DB6PR0101MB2214A7D6F974E26957D85BFB8FA79@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>
 libswresample/x86/rematrix.asm    | 2 ++
 libswresample/x86/rematrix_init.c | 2 ++
 2 files changed, 4 insertions(+)
diff mbox series


diff --git a/libswresample/x86/rematrix.asm b/libswresample/x86/rematrix.asm
index 7984b9a729..1c657ff72f 100644
--- a/libswresample/x86/rematrix.asm
+++ b/libswresample/x86/rematrix.asm
@@ -223,11 +223,13 @@  mix_2_1_int16_u_int %+ SUFFIX:
+%if ARCH_X86_32
 MIX1_INT16 u
 MIX1_INT16 a
 MIX2_INT16 u
 MIX2_INT16 a
diff --git a/libswresample/x86/rematrix_init.c b/libswresample/x86/rematrix_init.c
index 0608c74e7f..3981de4277 100644
--- a/libswresample/x86/rematrix_init.c
+++ b/libswresample/x86/rematrix_init.c
@@ -43,10 +43,12 @@  av_cold int swri_rematrix_init_x86(struct SwrContext *s){
     s->mix_2_1_simd = NULL;
     if (s->midbuf.fmt == AV_SAMPLE_FMT_S16P){
+#if ARCH_X86_32
         if(EXTERNAL_MMX(mm_flags)) {
             s->mix_1_1_simd = ff_mix_1_1_a_int16_mmx;
             s->mix_2_1_simd = ff_mix_2_1_a_int16_mmx;
         if(EXTERNAL_SSE2(mm_flags)) {
             s->mix_1_1_simd = ff_mix_1_1_a_int16_sse2;
             s->mix_2_1_simd = ff_mix_2_1_a_int16_sse2;