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). This commit therefore disables line_noise_mmx
at compile-time for x64.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
---
 libavfilter/x86/vf_noise.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavfilter/x86/vf_noise.c b/libavfilter/x86/vf_noise.c
index f7a4d00336..ce7260e94f 100644
--- a/libavfilter/x86/vf_noise.c
+++ b/libavfilter/x86/vf_noise.c
@@ -25,6 +25,7 @@
 #include "libavfilter/vf_noise.h"
 
 #if HAVE_INLINE_ASM
+#if ARCH_X86_32
 static void line_noise_mmx(uint8_t *dst, const uint8_t *src,
                            const int8_t *noise, int len, int shift)
 {
@@ -52,6 +53,7 @@ static void line_noise_mmx(uint8_t *dst, const uint8_t *src,
     if (mmx_len != len)
         ff_line_noise_c(dst+mmx_len, src+mmx_len, noise+mmx_len, len-mmx_len, 
0);
 }
+#endif
 
 #if HAVE_6REGS
 static void line_noise_avg_mmx(uint8_t *dst, const uint8_t *src,
@@ -132,7 +134,9 @@ av_cold void ff_noise_init_x86(NoiseContext *n)
     int cpu_flags = av_get_cpu_flags();
 
     if (INLINE_MMX(cpu_flags)) {
+#if ARCH_X86_32
         n->line_noise     = line_noise_mmx;
+#endif
 #if HAVE_6REGS
         n->line_noise_avg = line_noise_avg_mmx;
 #endif
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to