From 2b94f23b06d9bbab4cd5b5fec9f4e53ff365e5ab Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sat, 11 Jun 2022 00:21:15 +0200 Subject: [PATCH] swresample/x86/audio_convert: Remove obsolete MMX functions x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt --- libswresample/x86/audio_convert.asm | 9 --------- libswresample/x86/audio_convert_init.c | 9 +-------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/libswresample/x86/audio_convert.asm b/libswresample/x86/audio_convert.asm index d441636d3c..d6d6a81495 100644 --- a/libswresample/x86/audio_convert.asm +++ b/libswresample/x86/audio_convert.asm @@ -608,15 +608,6 @@ pack_8ch_%2_to_%1_u_int %+ SUFFIX: %macro NOP_N 0-6 %endmacro -INIT_MMX mmx -CONV int32, int16, u, 2, 1, INT16_TO_INT32_N, NOP_N -CONV int32, int16, a, 2, 1, INT16_TO_INT32_N, NOP_N -CONV int16, int32, u, 1, 2, INT32_TO_INT16_N, NOP_N -CONV int16, int32, a, 1, 2, INT32_TO_INT16_N, NOP_N - -PACK_6CH float, float, u, 2, 2, 0, NOP_N, NOP_N -PACK_6CH float, float, a, 2, 2, 0, NOP_N, NOP_N - INIT_XMM sse PACK_6CH float, float, u, 2, 2, 7, NOP_N, NOP_N PACK_6CH float, float, a, 2, 2, 7, NOP_N, NOP_N diff --git a/libswresample/x86/audio_convert_init.c b/libswresample/x86/audio_convert_init.c index a7d5ab89f8..f6d36f9ca6 100644 --- a/libswresample/x86/audio_convert_init.c +++ b/libswresample/x86/audio_convert_init.c @@ -26,7 +26,7 @@ #define PROTO(pre, in, out, cap) void ff ## pre ## in## _to_ ##out## _a_ ##cap(uint8_t **dst, const uint8_t **src, int len); #define PROTO2(pre, out, cap) PROTO(pre, int16, out, cap) PROTO(pre, int32, out, cap) PROTO(pre, float, out, cap) #define PROTO3(pre, cap) PROTO2(pre, int16, cap) PROTO2(pre, int32, cap) PROTO2(pre, float, cap) -#define PROTO4(pre) PROTO3(pre, mmx) PROTO3(pre, sse) PROTO3(pre, sse2) PROTO3(pre, ssse3) PROTO3(pre, sse4) PROTO3(pre, avx) PROTO3(pre, avx2) +#define PROTO4(pre) PROTO3(pre, sse) PROTO3(pre, sse2) PROTO3(pre, ssse3) PROTO3(pre, sse4) PROTO3(pre, avx) PROTO3(pre, avx2) PROTO4(_) PROTO4(_pack_2ch_) PROTO4(_pack_6ch_) @@ -52,15 +52,8 @@ av_cold void swri_audio_convert_init_x86(struct AudioConvert *ac, ac->simd_f = ff_int32_to_int16_a_ ## cap;\ } -MULTI_CAPS_FUNC(MMX, mmx) MULTI_CAPS_FUNC(SSE2, sse2) - if(EXTERNAL_MMX(mm_flags)) { - if(channels == 6) { - if( out_fmt == AV_SAMPLE_FMT_FLT && in_fmt == AV_SAMPLE_FMT_FLTP || out_fmt == AV_SAMPLE_FMT_S32 && in_fmt == AV_SAMPLE_FMT_S32P) - ac->simd_f = ff_pack_6ch_float_to_float_a_mmx; - } - } if(EXTERNAL_SSE(mm_flags)) { if(channels == 6) { if( out_fmt == AV_SAMPLE_FMT_FLT && in_fmt == AV_SAMPLE_FMT_FLTP || out_fmt == AV_SAMPLE_FMT_S32 && in_fmt == AV_SAMPLE_FMT_S32P)