From 60fbce16bb28e4298716c8ab3c6c38fc7e9ebfae Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 19 Apr 2014 15:56:52 +0200 Subject: vf_divtc: remove inline asm Becomes a bit slower (tested with progressive solid color video only), but this filter is pretty obscure and I'm not even sure what it's useful for. --- video/filter/vf_divtc.c | 50 ------------------------------------------------- 1 file changed, 50 deletions(-) (limited to 'video') diff --git a/video/filter/vf_divtc.c b/video/filter/vf_divtc.c index 56901f6870..869d7462d1 100644 --- a/video/filter/vf_divtc.c +++ b/video/filter/vf_divtc.c @@ -24,7 +24,6 @@ #include "config.h" #include "common/msg.h" -#include "common/cpudetect.h" #include "options/m_option.h" #include "libavutil/common.h" #include "compat/mpbswap.h" @@ -51,52 +50,6 @@ struct vf_priv_s struct mp_image *buffer; }; -/* - * diff_MMX and diff_C stolen from vf_decimate.c - */ - -#if HAVE_MMX && HAVE_EBX_AVAILABLE -static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns) - { - volatile short out[4]; - __asm__ ( - "movl $8, %%ecx \n\t" - "pxor %%mm4, %%mm4 \n\t" - "pxor %%mm7, %%mm7 \n\t" - - ".align 4 \n\t" - "1: \n\t" - - "movq (%%"REG_S"), %%mm0 \n\t" - "movq (%%"REG_S"), %%mm2 \n\t" - "add %%"REG_a", %%"REG_S" \n\t" - "movq (%%"REG_D"), %%mm1 \n\t" - "add %%"REG_b", %%"REG_D" \n\t" - "psubusb %%mm1, %%mm2 \n\t" - "psubusb %%mm0, %%mm1 \n\t" - "movq %%mm2, %%mm0 \n\t" - "movq %%mm1, %%mm3 \n\t" - "punpcklbw %%mm7, %%mm0 \n\t" - "punpcklbw %%mm7, %%mm1 \n\t" - "punpckhbw %%mm7, %%mm2 \n\t" - "punpckhbw %%mm7, %%mm3 \n\t" - "paddw %%mm0, %%mm4 \n\t" - "paddw %%mm1, %%mm4 \n\t" - "paddw %%mm2, %%mm4 \n\t" - "paddw %%mm3, %%mm4 \n\t" - - "decl %%ecx \n\t" - "jnz 1b \n\t" - "movq %%mm4, (%%"REG_d") \n\t" - "emms \n\t" - : - : "S" (old), "D" (new), "a" ((long)os), "b" ((long)ns), "d" (out) - : "%ecx", "memory" - ); - return out[0]+out[1]+out[2]+out[3]; - } -#endif - static int diff_C(unsigned char *old, unsigned char *new, int os, int ns) { int x, y, d=0; @@ -644,9 +597,6 @@ static int vf_open(vf_instance_t *vf) abort(); diff = diff_C; -#if HAVE_MMX && HAVE_EBX_AVAILABLE - if(gCpuCaps.hasMMX) diff = diff_MMX; -#endif vf_detc_init_pts_buf(&p->ptsbuf); return 1; -- cgit v1.2.3