From 2718a3be1f8867fd4f6cb3f452d6917838b1ed88 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 12 Jun 2022 00:40:09 +0200 Subject: [PATCH] avutil/x86/float_dsp: Remove obsolete 3dnowext function 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). So given that the only systems which benefit from ff_vector_fmul_window_3dnowext are truely ancient 32bit AMD x86s it is removed. Signed-off-by: Andreas Rheinhardt --- libavutil/x86/float_dsp.asm | 25 +------------------------ libavutil/x86/float_dsp_init.c | 5 ----- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm index b773e61a64..cca4d019c7 100644 --- a/libavutil/x86/float_dsp.asm +++ b/libavutil/x86/float_dsp.asm @@ -294,7 +294,7 @@ VECTOR_DMUL_SCALAR ; vector_fmul_window(float *dst, const float *src0, ; const float *src1, const float *win, int len); ;----------------------------------------------------------------------------- -%macro VECTOR_FMUL_WINDOW 0 +INIT_XMM sse cglobal vector_fmul_window, 5, 6, 6, dst, src0, src1, win, len, len1 shl lend, 2 lea len1q, [lenq - mmsize] @@ -305,7 +305,6 @@ cglobal vector_fmul_window, 5, 6, 6, dst, src0, src1, win, len, len1 .loop: mova m0, [winq + lenq] mova m4, [src0q + lenq] -%if cpuflag(sse) mova m1, [winq + len1q] mova m5, [src1q + len1q] shufps m1, m1, 0x1b @@ -319,34 +318,12 @@ cglobal vector_fmul_window, 5, 6, 6, dst, src0, src1, win, len, len1 addps m2, m3 subps m1, m0 shufps m2, m2, 0x1b -%else - pswapd m1, [winq + len1q] - pswapd m5, [src1q + len1q] - mova m2, m0 - mova m3, m1 - pfmul m2, m4 - pfmul m3, m5 - pfmul m1, m4 - pfmul m0, m5 - pfadd m2, m3 - pfsub m1, m0 - pswapd m2, m2 -%endif mova [dstq + lenq], m1 mova [dstq + len1q], m2 sub len1q, mmsize add lenq, mmsize jl .loop -%if mmsize == 8 - femms -%endif REP_RET -%endmacro - -INIT_MMX 3dnowext -VECTOR_FMUL_WINDOW -INIT_XMM sse -VECTOR_FMUL_WINDOW ;----------------------------------------------------------------------------- ; vector_fmul_add(float *dst, const float *src0, const float *src1, diff --git a/libavutil/x86/float_dsp_init.c b/libavutil/x86/float_dsp_init.c index 8826e4e2c9..ad17bc2044 100644 --- a/libavutil/x86/float_dsp_init.c +++ b/libavutil/x86/float_dsp_init.c @@ -56,8 +56,6 @@ void ff_vector_dmul_scalar_sse2(double *dst, const double *src, void ff_vector_dmul_scalar_avx(double *dst, const double *src, double mul, int len); -void ff_vector_fmul_window_3dnowext(float *dst, const float *src0, - const float *src1, const float *win, int len); void ff_vector_fmul_window_sse(float *dst, const float *src0, const float *src1, const float *win, int len); @@ -83,9 +81,6 @@ av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) { int cpu_flags = av_get_cpu_flags(); - if (EXTERNAL_AMD3DNOWEXT(cpu_flags)) { - fdsp->vector_fmul_window = ff_vector_fmul_window_3dnowext; - } if (EXTERNAL_SSE(cpu_flags)) { fdsp->vector_fmul = ff_vector_fmul_sse; fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse;