From 6feea076e98512d78c8d735509ab6b5e9a71ca1c Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Fri, 10 Jun 2022 20:54:45 +0200 Subject: [PATCH] avcodec/x86/lossless_audiodsp: Remove obsolete MMXEXT function 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 ff_scalarproduct_and_madd_int16_mmxext are truely ancient 32bit x86s it is removed. Signed-off-by: Andreas Rheinhardt --- libavcodec/x86/lossless_audiodsp.asm | 12 +----------- libavcodec/x86/lossless_audiodsp_init.c | 6 ------ 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/libavcodec/x86/lossless_audiodsp.asm b/libavcodec/x86/lossless_audiodsp.asm index 063d7b41af..ff18eb7081 100644 --- a/libavcodec/x86/lossless_audiodsp.asm +++ b/libavcodec/x86/lossless_audiodsp.asm @@ -22,18 +22,14 @@ SECTION .text -%macro SCALARPRODUCT 0 ; int ff_scalarproduct_and_madd_int16(int16_t *v1, int16_t *v2, int16_t *v3, ; int order, int mul) +INIT_XMM sse2 cglobal scalarproduct_and_madd_int16, 4,4,8, v1, v2, v3, order, mul shl orderq, 1 movd m7, mulm -%if mmsize == 16 pshuflw m7, m7, 0 punpcklqdq m7, m7 -%else - pshufw m7, m7, 0 -%endif pxor m6, m6 add v1q, orderq add v2q, orderq @@ -61,12 +57,6 @@ cglobal scalarproduct_and_madd_int16, 4,4,8, v1, v2, v3, order, mul HADDD m6, m0 movd eax, m6 RET -%endmacro - -INIT_MMX mmxext -SCALARPRODUCT -INIT_XMM sse2 -SCALARPRODUCT INIT_XMM sse4 ; int ff_scalarproduct_and_madd_int32(int16_t *v1, int32_t *v2, int16_t *v3, diff --git a/libavcodec/x86/lossless_audiodsp_init.c b/libavcodec/x86/lossless_audiodsp_init.c index f74c7e4361..462329db32 100644 --- a/libavcodec/x86/lossless_audiodsp_init.c +++ b/libavcodec/x86/lossless_audiodsp_init.c @@ -21,9 +21,6 @@ #include "libavutil/x86/cpu.h" #include "libavcodec/lossless_audiodsp.h" -int32_t ff_scalarproduct_and_madd_int16_mmxext(int16_t *v1, const int16_t *v2, - const int16_t *v3, - int order, int mul); int32_t ff_scalarproduct_and_madd_int16_sse2(int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul); @@ -40,9 +37,6 @@ av_cold void ff_llauddsp_init_x86(LLAudDSPContext *c) #if HAVE_X86ASM int cpu_flags = av_get_cpu_flags(); - if (EXTERNAL_MMXEXT(cpu_flags)) - c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_mmxext; - if (EXTERNAL_SSE2(cpu_flags)) c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_sse2;