summaryrefslogtreecommitdiff
path: root/libavfilter/x86
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-13 08:39:57 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-22 13:38:01 +0200
commit7c3c1d938f2e01bd607deb814706f67438e85b7a (patch)
treef24aede9ae20195d51cb001c5573c63339222876 /libavfilter/x86
parent4d7128be9a31c7bf6cb79436711ded3cc9767fe8 (diff)
downloadffmpeg-7c3c1d938f2e01bd607deb814706f67438e85b7a.tar.gz
avfilter/x86/vf_idet: Remove obsolete MMX(EXT) functions
The only system which benefit from these are truely ancient 32bit x86s as all other systems use at least the SSE2 versions (this includes all x64 cpus (which is why this code is restricted to x86-32)). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/x86')
-rw-r--r--libavfilter/x86/vf_idet.asm58
-rw-r--r--libavfilter/x86/vf_idet_init.c16
2 files changed, 1 insertions, 73 deletions
diff --git a/libavfilter/x86/vf_idet.asm b/libavfilter/x86/vf_idet.asm
index 9596abd7e2..7bc8e7d2c4 100644
--- a/libavfilter/x86/vf_idet.asm
+++ b/libavfilter/x86/vf_idet.asm
@@ -25,60 +25,6 @@
SECTION .text
-; Implementation that does 8-bytes at a time using single-word operations.
-%macro IDET_FILTER_LINE 1
-INIT_MMX %1
-cglobal idet_filter_line, 4, 5, 0, a, b, c, width, index
- xor indexq, indexq
-%define m_zero m2
-%define m_sum m5
- pxor m_sum, m_sum
- pxor m_zero, m_zero
-
-.loop:
- movu m0, [aq + indexq*1]
- punpckhbw m1, m0, m_zero
- punpcklbw m0, m_zero
-
- movu m3, [cq + indexq*1]
- punpckhbw m4, m3, m_zero
- punpcklbw m3, m_zero
-
- paddsw m1, m4
- paddsw m0, m3
-
- movu m3, [bq + indexq*1]
- punpckhbw m4, m3, m_zero
- punpcklbw m3, m_zero
-
- paddw m4, m4
- paddw m3, m3
- psubsw m1, m4
- psubsw m0, m3
-
- ABS2 m1, m0, m4, m3
-
- paddw m0, m1
- punpckhwd m1, m0, m_zero
- punpcklwd m0, m_zero
-
- paddd m0, m1
- paddd m_sum, m0
-
- add indexq, 0x8
- CMP widthd, indexd
- jg .loop
-
- HADDD m_sum, m0
- movd eax, m_sum
- RET
-%endmacro
-
-%if ARCH_X86_32
-IDET_FILTER_LINE mmxext
-IDET_FILTER_LINE mmx
-%endif
-
;******************************************************************************
; 16bit implementation that does 4/8-pixels at a time
@@ -128,10 +74,6 @@ cglobal idet_filter_line_16bit, 4, 5, 8, a, b, c, width, index
INIT_XMM sse2
IDET_FILTER_LINE_16BIT 8
-%if ARCH_X86_32
-INIT_MMX mmx
-IDET_FILTER_LINE_16BIT 4
-%endif
;******************************************************************************
; SSE2 8-bit implementation that does 16-bytes at a time:
diff --git a/libavfilter/x86/vf_idet_init.c b/libavfilter/x86/vf_idet_init.c
index d4d9bd0893..acb4e2a778 100644
--- a/libavfilter/x86/vf_idet_init.c
+++ b/libavfilter/x86/vf_idet_init.c
@@ -24,7 +24,7 @@
#if HAVE_X86ASM
-/* declares main callable idet_filter_line_{mmx,mmxext,sse2}() */
+/* declares main callable idet_filter_line_sse2() */
#define FUNC_MAIN_DECL(KIND, SPAN) \
int ff_idet_filter_line_##KIND(const uint8_t *a, const uint8_t *b, \
const uint8_t *c, int w); \
@@ -58,11 +58,6 @@ static int idet_filter_line_16bit_##KIND(const uint16_t *a, const uint16_t *b, \
FUNC_MAIN_DECL(sse2, 16)
FUNC_MAIN_DECL_16bit(sse2, 8)
-#if ARCH_X86_32
-FUNC_MAIN_DECL(mmx, 8)
-FUNC_MAIN_DECL(mmxext, 8)
-FUNC_MAIN_DECL_16bit(mmx, 4)
-#endif
#endif
av_cold void ff_idet_init_x86(IDETContext *idet, int for_16b)
@@ -70,15 +65,6 @@ av_cold void ff_idet_init_x86(IDETContext *idet, int for_16b)
#if HAVE_X86ASM
const int cpu_flags = av_get_cpu_flags();
-#if ARCH_X86_32
- if (EXTERNAL_MMX(cpu_flags)) {
- idet->filter_line = for_16b ? (ff_idet_filter_func)idet_filter_line_16bit_mmx : idet_filter_line_mmx;
- }
- if (EXTERNAL_MMXEXT(cpu_flags)) {
- idet->filter_line = for_16b ? (ff_idet_filter_func)idet_filter_line_16bit_mmx : idet_filter_line_mmxext;
- }
-#endif // ARCH_x86_32
-
if (EXTERNAL_SSE2(cpu_flags)) {
idet->filter_line = for_16b ? (ff_idet_filter_func)idet_filter_line_16bit_sse2 : idet_filter_line_sse2;
}