[FFmpeg-cvslog] avcodec/x86/blockdsp: Remove obsolete MMX functions

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


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Jun 10 20:49:50 2022 +0200| [ee551a21ddcbf81afe183d9489c534ee80f263a0] | committer: Andreas Rheinhardt

avcodec/x86/blockdsp: Remove obsolete MMX 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=ee551a21ddcbf81afe183d9489c534ee80f263a0
---

 libavcodec/x86/blockdsp.asm    | 6 ------
 libavcodec/x86/blockdsp_init.c | 7 -------
 2 files changed, 13 deletions(-)

diff --git a/libavcodec/x86/blockdsp.asm b/libavcodec/x86/blockdsp.asm
index 9d203df8f5..e380308d4a 100644
--- a/libavcodec/x86/blockdsp.asm
+++ b/libavcodec/x86/blockdsp.asm
@@ -46,9 +46,6 @@ cglobal clear_block, 1, 1, %1, blocks
     RET
 %endmacro
 
-INIT_MMX mmx
-%define ZERO pxor
-CLEAR_BLOCK 0, 4
 INIT_XMM sse
 %define ZERO xorps
 CLEAR_BLOCK 1, 2
@@ -78,9 +75,6 @@ cglobal clear_blocks, 1, 2, %1, blocks, len
     RET
 %endmacro
 
-INIT_MMX mmx
-%define ZERO pxor
-CLEAR_BLOCKS 0
 INIT_XMM sse
 %define ZERO xorps
 CLEAR_BLOCKS 1
diff --git a/libavcodec/x86/blockdsp_init.c b/libavcodec/x86/blockdsp_init.c
index d7f8a8e508..b0ff9376d9 100644
--- a/libavcodec/x86/blockdsp_init.c
+++ b/libavcodec/x86/blockdsp_init.c
@@ -24,10 +24,8 @@
 #include "libavutil/x86/cpu.h"
 #include "libavcodec/blockdsp.h"
 
-void ff_clear_block_mmx(int16_t *block);
 void ff_clear_block_sse(int16_t *block);
 void ff_clear_block_avx(int16_t *block);
-void ff_clear_blocks_mmx(int16_t *blocks);
 void ff_clear_blocks_sse(int16_t *blocks);
 void ff_clear_blocks_avx(int16_t *blocks);
 
@@ -37,11 +35,6 @@ av_cold void ff_blockdsp_init_x86(BlockDSPContext *c,
 #if HAVE_X86ASM
     int cpu_flags = av_get_cpu_flags();
 
-    if (EXTERNAL_MMX(cpu_flags)) {
-        c->clear_block  = ff_clear_block_mmx;
-        c->clear_blocks = ff_clear_blocks_mmx;
-    }
-
     if (EXTERNAL_SSE(cpu_flags)) {
         c->clear_block  = ff_clear_block_sse;
         c->clear_blocks = ff_clear_blocks_sse;



More information about the ffmpeg-cvslog mailing list