[FFmpeg-cvslog] avcodec/x86/vorbisdsp: Remove obsolete 3dnow functions

Andreas Rheinhardt git at videolan.org
Wed Jun 22 15:29:19 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Jun 11 03:31:25 2022 +0200| [f76477d4d78b01ae0170d3e7d8ef77ac3105a80c] | committer: Andreas Rheinhardt

avcodec/x86/vorbisdsp: Remove obsolete 3dnow functions

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 the 3dnow implementations are truely ancient 32bit AMD x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f76477d4d78b01ae0170d3e7d8ef77ac3105a80c
---

 libavcodec/x86/vorbisdsp.asm    | 29 -----------------------------
 libavcodec/x86/vorbisdsp_init.c |  6 ------
 2 files changed, 35 deletions(-)

diff --git a/libavcodec/x86/vorbisdsp.asm b/libavcodec/x86/vorbisdsp.asm
index d952296716..9afe2eb352 100644
--- a/libavcodec/x86/vorbisdsp.asm
+++ b/libavcodec/x86/vorbisdsp.asm
@@ -27,35 +27,6 @@ pdw_80000000: times 4 dd 0x80000000
 
 SECTION .text
 
-%if ARCH_X86_32
-INIT_MMX 3dnow
-cglobal vorbis_inverse_coupling, 3, 3, 6, mag, ang, block_size
-    pxor                     m7, m7
-    lea                    magq, [magq+block_sizeq*4]
-    lea                    angq, [angq+block_sizeq*4]
-    neg             block_sizeq
-.loop:
-    mova                     m0, [magq+block_sizeq*4]
-    mova                     m1, [angq+block_sizeq*4]
-    mova                     m2, m0
-    mova                     m3, m1
-    pfcmpge                  m2, m7     ; m <= 0.0
-    pfcmpge                  m3, m7     ; a <= 0.0
-    pslld                    m2, 31     ; keep only the sign bit
-    pxor                     m1, m2
-    mova                     m4, m3
-    pand                     m3, m1
-    pandn                    m4, m1
-    pfadd                    m3, m0     ; a = m + ((a < 0) & (a ^ sign(m)))
-    pfsub                    m0, m4     ; m = m + ((a > 0) & (a ^ sign(m)))
-    mova   [angq+block_sizeq*4], m3
-    mova   [magq+block_sizeq*4], m0
-    add             block_sizeq, 2
-    jl .loop
-    femms
-    RET
-%endif
-
 INIT_XMM sse
 cglobal vorbis_inverse_coupling, 3, 3, 6, mag, ang, block_size
     mova                     m5, [pdw_80000000]
diff --git a/libavcodec/x86/vorbisdsp_init.c b/libavcodec/x86/vorbisdsp_init.c
index bc1cc43a18..da9f9e685e 100644
--- a/libavcodec/x86/vorbisdsp_init.c
+++ b/libavcodec/x86/vorbisdsp_init.c
@@ -24,8 +24,6 @@
 #include "libavutil/x86/cpu.h"
 #include "libavcodec/vorbisdsp.h"
 
-void ff_vorbis_inverse_coupling_3dnow(float *mag, float *ang,
-                                      intptr_t blocksize);
 void ff_vorbis_inverse_coupling_sse(float *mag, float *ang,
                                     intptr_t blocksize);
 
@@ -33,10 +31,6 @@ av_cold void ff_vorbisdsp_init_x86(VorbisDSPContext *dsp)
 {
     int cpu_flags = av_get_cpu_flags();
 
-#if ARCH_X86_32
-    if (EXTERNAL_AMD3DNOW(cpu_flags))
-        dsp->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_3dnow;
-#endif /* ARCH_X86_32 */
     if (EXTERNAL_SSE(cpu_flags))
         dsp->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_sse;
 }



More information about the ffmpeg-cvslog mailing list