[FFmpeg-cvslog] avcodec/x86/svq1enc: Remove obsolete MMXEXT function

Andreas Rheinhardt git at videolan.org
Wed Jun 22 15:28:53 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Jun 10 20:58:35 2022 +0200| [9426a2f8ff4607b7293e6140e56b8cc44e629dbd] | committer: Andreas Rheinhardt

avcodec/x86/svq1enc: 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_ssd_int8_vs_int16_mmx are truely ancient
32bit x86s it is removed.

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

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

 libavcodec/x86/svq1enc.asm    | 22 +---------------------
 libavcodec/x86/svq1enc_init.c |  5 -----
 2 files changed, 1 insertion(+), 26 deletions(-)

diff --git a/libavcodec/x86/svq1enc.asm b/libavcodec/x86/svq1enc.asm
index a87632836d..123e86ba24 100644
--- a/libavcodec/x86/svq1enc.asm
+++ b/libavcodec/x86/svq1enc.asm
@@ -23,39 +23,19 @@
 
 SECTION .text
 
-%macro SSD_INT8_VS_INT16 0
+INIT_XMM sse2
 cglobal ssd_int8_vs_int16, 3, 3, 3, pix1, pix2, size
     pxor m0, m0
 .loop:
     sub       sizeq, 8
     movq      m1, [pix1q + sizeq]
     mova      m2, [pix2q + sizeq*2]
-%if mmsize == 8
-    movq      m3, [pix2q + sizeq*2 + mmsize]
-    punpckhbw m4, m1
-    punpcklbw m1, m1
-    psraw     m4, 8
-    psraw     m1, 8
-    psubw     m3, m4
-    psubw     m2, m1
-    pmaddwd   m3, m3
-    pmaddwd   m2, m2
-    paddd     m0, m3
-    paddd     m0, m2
-%else
     punpcklbw m1, m1
     psraw     m1, 8
     psubw     m2, m1
     pmaddwd   m2, m2
     paddd     m0, m2
-%endif
     jg .loop
     HADDD     m0, m1
     movd     eax, m0
     RET
-%endmacro
-
-INIT_MMX mmx
-SSD_INT8_VS_INT16
-INIT_XMM sse2
-SSD_INT8_VS_INT16
diff --git a/libavcodec/x86/svq1enc_init.c b/libavcodec/x86/svq1enc_init.c
index 40b4b0e183..787a5245f3 100644
--- a/libavcodec/x86/svq1enc_init.c
+++ b/libavcodec/x86/svq1enc_init.c
@@ -24,8 +24,6 @@
 #include "libavutil/x86/cpu.h"
 #include "libavcodec/svq1enc.h"
 
-int ff_ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2,
-                             intptr_t size);
 int ff_ssd_int8_vs_int16_sse2(const int8_t *pix1, const int16_t *pix2,
                               intptr_t size);
 
@@ -33,9 +31,6 @@ av_cold void ff_svq1enc_init_x86(SVQ1EncContext *c)
 {
     int cpu_flags = av_get_cpu_flags();
 
-    if (EXTERNAL_MMX(cpu_flags)) {
-        c->ssd_int8_vs_int16 = ff_ssd_int8_vs_int16_mmx;
-    }
     if (EXTERNAL_SSE2(cpu_flags)) {
         c->ssd_int8_vs_int16 = ff_ssd_int8_vs_int16_sse2;
     }



More information about the ffmpeg-cvslog mailing list