diff mbox series

[FFmpeg-devel,19/41] avfilter/x86/vf_noise: Disable overridden functions on x64

Message ID DB6PR0101MB221421BAF914A32CCD528D7D8FA79@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Superseded
Headers show
Series Stop including superseded functions for x64 | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt June 9, 2022, 11:55 p.m. UTC
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.rheinhardt@outlook.com>
 libavfilter/x86/vf_noise.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series


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 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);
 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;
         n->line_noise_avg = line_noise_avg_mmx;