History

avfilter/x86/vf_noise: Remove obsolete MMX function

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 line_noise_mmx are truely ancient 32bit x86s it is removed.

Andreas Rheinhardt committed 4 years ago

Commit c5dd2fd1 parent 9bc52711 file · +0 −29Browse files

Unified · Split

libavfilter/x86/vf_noise.c+0−29
@@ -25,34 +25,6 @@ · 24 unmodified lines
25#include "libavfilter/vf_noise.h"25#include "libavfilter/vf_noise.h"
26 26
27#if HAVE_INLINE_ASM27#if HAVE_INLINE_ASM
28static void line_noise_mmx(uint8_t *dst, const uint8_t *src,
29 const int8_t *noise, int len, int shift)
30{
31 x86_reg mmx_len= len & (~7);
32 noise += shift;
33
34 __asm__ volatile(
35 "mov %3, %%"FF_REG_a" \n\t"
36 "pcmpeqb %%mm7, %%mm7 \n\t"
37 "psllw $15, %%mm7 \n\t"
38 "packsswb %%mm7, %%mm7 \n\t"
39 ".p2align 4 \n\t"
40 "1: \n\t"
41 "movq (%0, %%"FF_REG_a"), %%mm0 \n\t"
42 "movq (%1, %%"FF_REG_a"), %%mm1 \n\t"
43 "pxor %%mm7, %%mm0 \n\t"
44 "paddsb %%mm1, %%mm0 \n\t"
45 "pxor %%mm7, %%mm0 \n\t"
46 "movq %%mm0, (%2, %%"FF_REG_a") \n\t"
47 "add $8, %%"FF_REG_a" \n\t"
48 " js 1b \n\t"
49 :: "r" (src+mmx_len), "r" (noise+mmx_len), "r" (dst+mmx_len), "g" (-mmx_len)
50 : "%"FF_REG_a
51 );
52 if (mmx_len != len)
53 ff_line_noise_c(dst+mmx_len, src+mmx_len, noise+mmx_len, len-mmx_len, 0);
54}
55
56#if HAVE_6REGS28#if HAVE_6REGS
57static void line_noise_avg_mmx(uint8_t *dst, const uint8_t *src,29static void line_noise_avg_mmx(uint8_t *dst, const uint8_t *src,
58 int len, const int8_t * const *shift)30 int len, const int8_t * const *shift)
@@ -132,7 +104,6 @@ av_cold void ff_noise_init_x86(NoiseContext *n) · 73 unmodified lines
132 int cpu_flags = av_get_cpu_flags();104 int cpu_flags = av_get_cpu_flags();
133 105
134 if (INLINE_MMX(cpu_flags)) {106 if (INLINE_MMX(cpu_flags)) {
135 n->line_noise = line_noise_mmx;
136#if HAVE_6REGS107#if HAVE_6REGS
137 n->line_noise_avg = line_noise_avg_mmx;108 n->line_noise_avg = line_noise_avg_mmx;
138#endif109#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t