[FFmpeg-cvslog] avcodec/x86/diracdsp: Remove obsolete MMX(EXT) functions

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


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Jun  7 01:37:59 2022 +0200| [d29a9c2aa68fc3eb6d61ff95c698e29316037583] | committer: Andreas Rheinhardt

avcodec/x86/diracdsp: Remove obsolete MMX(EXT) 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 <andreas.rheinhardt at outlook.com>

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

 libavcodec/x86/diracdsp.asm    |  8 --------
 libavcodec/x86/diracdsp_init.c | 25 -------------------------
 2 files changed, 33 deletions(-)

diff --git a/libavcodec/x86/diracdsp.asm b/libavcodec/x86/diracdsp.asm
index 17145baf87..e5e2b11846 100644
--- a/libavcodec/x86/diracdsp.asm
+++ b/libavcodec/x86/diracdsp.asm
@@ -248,14 +248,6 @@ cglobal add_dirac_obmc%1_%2, 6,6,5, dst, src, stride, obmc, yblen
 %endm
 
 INIT_MMX
-%if ARCH_X86_64 == 0
-PUT_RECT mmx
-ADD_RECT mmx
-
-HPEL_FILTER mmx
-ADD_OBMC 32, mmx
-ADD_OBMC 16, mmx
-%endif
 ADD_OBMC 8, mmx
 
 INIT_XMM
diff --git a/libavcodec/x86/diracdsp_init.c b/libavcodec/x86/diracdsp_init.c
index 8baacf3129..f678759dc0 100644
--- a/libavcodec/x86/diracdsp_init.c
+++ b/libavcodec/x86/diracdsp_init.c
@@ -22,19 +22,14 @@
 #include "libavcodec/diracdsp.h"
 #include "fpel.h"
 
-void ff_add_rect_clamped_mmx(uint8_t *, const uint16_t *, int, const int16_t *, int, int, int);
 void ff_add_rect_clamped_sse2(uint8_t *, const uint16_t *, int, const int16_t *, int, int, int);
 
 void ff_add_dirac_obmc8_mmx(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen);
-void ff_add_dirac_obmc16_mmx(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen);
-void ff_add_dirac_obmc32_mmx(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen);
 
 void ff_add_dirac_obmc16_sse2(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen);
 void ff_add_dirac_obmc32_sse2(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen);
 
-void ff_put_rect_clamped_mmx(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height);
 void ff_put_rect_clamped_sse2(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height);
-void ff_put_signed_rect_clamped_mmx(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height);
 void ff_put_signed_rect_clamped_sse2(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height);
 void ff_put_signed_rect_clamped_10_sse4(uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int width, int height);
 
@@ -87,16 +82,9 @@ static void OPNAME ## _dirac_pixels32_ ## EXT(uint8_t *dst, const uint8_t *src[5
     }\
 }
 
-DIRAC_PIXOP(put, mmx)
-DIRAC_PIXOP(avg, mmx)
-DIRAC_PIXOP(avg, mmxext)
-
 DIRAC_PIXOP(put, sse2)
 DIRAC_PIXOP(avg, sse2)
 
-#if !ARCH_X86_64
-HPEL_FILTER(8, mmx)
-#endif
 HPEL_FILTER(16, sse2)
 
 #endif // HAVE_X86ASM
@@ -108,19 +96,6 @@ void ff_diracdsp_init_x86(DiracDSPContext* c)
 
     if (EXTERNAL_MMX(mm_flags)) {
         c->add_dirac_obmc[0] = ff_add_dirac_obmc8_mmx;
-#if !ARCH_X86_64
-        c->add_dirac_obmc[1] = ff_add_dirac_obmc16_mmx;
-        c->add_dirac_obmc[2] = ff_add_dirac_obmc32_mmx;
-        c->dirac_hpel_filter = dirac_hpel_filter_mmx;
-        c->add_rect_clamped = ff_add_rect_clamped_mmx;
-        c->put_signed_rect_clamped[0] = (void *)ff_put_signed_rect_clamped_mmx;
-#endif
-        PIXFUNC(put, 0, mmx);
-        PIXFUNC(avg, 0, mmx);
-    }
-
-    if (EXTERNAL_MMXEXT(mm_flags)) {
-        PIXFUNC(avg, 0, mmxext);
     }
 
     if (EXTERNAL_SSE2(mm_flags)) {



More information about the ffmpeg-cvslog mailing list