summaryrefslogtreecommitdiffstats
path: root/video/filter/pullup.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-19 15:53:33 +0200
committerwm4 <wm4@nowhere>2014-04-19 17:10:20 +0200
commitd0ebecb1c4d2e70d65b91a596acfcffb0e4bc4b0 (patch)
tree050a9e4909e533e49c25475500e8c572ae98bc9f /video/filter/pullup.c
parentd55ed011abb0962eafcbe5977a18a0f1b0b61144 (diff)
downloadmpv-d0ebecb1c4d2e70d65b91a596acfcffb0e4bc4b0.tar.bz2
mpv-d0ebecb1c4d2e70d65b91a596acfcffb0e4bc4b0.tar.xz
vf_pullup: remove inline asm
No change in speed (or even slightly faster, though I tested with progressive solid color video only), and normally we use libavformat's vf_pullup anyway.
Diffstat (limited to 'video/filter/pullup.c')
-rw-r--r--video/filter/pullup.c206
1 files changed, 0 insertions, 206 deletions
diff --git a/video/filter/pullup.c b/video/filter/pullup.c
index 45aa74eedd..864cc90ba4 100644
--- a/video/filter/pullup.c
+++ b/video/filter/pullup.c
@@ -21,197 +21,9 @@
#include <string.h>
#include "config.h"
#include "pullup.h"
-#include "common/cpudetect.h"
#include "common/common.h"
-
-#if ARCH_X86
-#if HAVE_MMX
-static int diff_y_mmx(unsigned char *a, unsigned char *b, int s)
-{
- int ret;
- __asm__ volatile (
- "movl $4, %%ecx \n\t"
- "pxor %%mm4, %%mm4 \n\t"
- "pxor %%mm7, %%mm7 \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_a", %%"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, %%mm3 \n\t"
- "punpcklwd %%mm7, %%mm4 \n\t"
- "punpckhwd %%mm7, %%mm3 \n\t"
- "paddd %%mm4, %%mm3 \n\t"
- "movd %%mm3, %%eax \n\t"
- "psrlq $32, %%mm3 \n\t"
- "movd %%mm3, %%edx \n\t"
- "addl %%edx, %%eax \n\t"
- "emms \n\t"
- : "=a" (ret)
- : "S" (a), "D" (b), "a" (s)
- : "%ecx", "%edx"
- );
- return ret;
-}
-
-static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s)
-{
- int ret;
- __asm__ volatile (
- "movl $4, %%ecx \n\t"
- "pxor %%mm6, %%mm6 \n\t"
- "pxor %%mm7, %%mm7 \n\t"
- "sub %%"REG_a", %%"REG_D" \n\t"
-
- "2: \n\t"
-
- "movq (%%"REG_D"), %%mm0 \n\t"
- "movq (%%"REG_D"), %%mm1 \n\t"
- "punpcklbw %%mm7, %%mm0 \n\t"
- "movq (%%"REG_D",%%"REG_a"), %%mm2 \n\t"
- "punpcklbw %%mm7, %%mm1 \n\t"
- "punpcklbw %%mm7, %%mm2 \n\t"
- "paddw %%mm0, %%mm0 \n\t"
- "paddw %%mm2, %%mm1 \n\t"
- "movq %%mm0, %%mm2 \n\t"
- "psubusw %%mm1, %%mm0 \n\t"
- "psubusw %%mm2, %%mm1 \n\t"
- "paddw %%mm0, %%mm6 \n\t"
- "paddw %%mm1, %%mm6 \n\t"
-
- "movq (%%"REG_S"), %%mm0 \n\t"
- "movq (%%"REG_D"), %%mm1 \n\t"
- "punpckhbw %%mm7, %%mm0 \n\t"
- "movq (%%"REG_D",%%"REG_a"), %%mm2 \n\t"
- "punpckhbw %%mm7, %%mm1 \n\t"
- "punpckhbw %%mm7, %%mm2 \n\t"
- "paddw %%mm0, %%mm0 \n\t"
- "paddw %%mm2, %%mm1 \n\t"
- "movq %%mm0, %%mm2 \n\t"
- "psubusw %%mm1, %%mm0 \n\t"
- "psubusw %%mm2, %%mm1 \n\t"
- "paddw %%mm0, %%mm6 \n\t"
- "paddw %%mm1, %%mm6 \n\t"
-
- "movq (%%"REG_D",%%"REG_a"), %%mm0 \n\t"
- "movq (%%"REG_S"), %%mm1 \n\t"
- "punpcklbw %%mm7, %%mm0 \n\t"
- "movq (%%"REG_S",%%"REG_a"), %%mm2 \n\t"
- "punpcklbw %%mm7, %%mm1 \n\t"
- "punpcklbw %%mm7, %%mm2 \n\t"
- "paddw %%mm0, %%mm0 \n\t"
- "paddw %%mm2, %%mm1 \n\t"
- "movq %%mm0, %%mm2 \n\t"
- "psubusw %%mm1, %%mm0 \n\t"
- "psubusw %%mm2, %%mm1 \n\t"
- "paddw %%mm0, %%mm6 \n\t"
- "paddw %%mm1, %%mm6 \n\t"
-
- "movq (%%"REG_D",%%"REG_a"), %%mm0 \n\t"
- "movq (%%"REG_S"), %%mm1 \n\t"
- "punpckhbw %%mm7, %%mm0 \n\t"
- "movq (%%"REG_S",%%"REG_a"), %%mm2 \n\t"
- "punpckhbw %%mm7, %%mm1 \n\t"
- "punpckhbw %%mm7, %%mm2 \n\t"
- "paddw %%mm0, %%mm0 \n\t"
- "paddw %%mm2, %%mm1 \n\t"
- "movq %%mm0, %%mm2 \n\t"
- "psubusw %%mm1, %%mm0 \n\t"
- "psubusw %%mm2, %%mm1 \n\t"
- "paddw %%mm0, %%mm6 \n\t"
- "paddw %%mm1, %%mm6 \n\t"
-
- "add %%"REG_a", %%"REG_S" \n\t"
- "add %%"REG_a", %%"REG_D" \n\t"
- "decl %%ecx \n\t"
- "jnz 2b \n\t"
-
- "movq %%mm6, %%mm5 \n\t"
- "punpcklwd %%mm7, %%mm6 \n\t"
- "punpckhwd %%mm7, %%mm5 \n\t"
- "paddd %%mm6, %%mm5 \n\t"
- "movd %%mm5, %%eax \n\t"
- "psrlq $32, %%mm5 \n\t"
- "movd %%mm5, %%edx \n\t"
- "addl %%edx, %%eax \n\t"
-
- "emms \n\t"
- : "=a" (ret)
- : "S" (a), "D" (b), "a" (s)
- : "%ecx", "%edx"
- );
- return ret;
-}
-
-static int var_y_mmx(unsigned char *a, unsigned char *b, int s)
-{
- int ret;
- __asm__ volatile (
- "movl $3, %%ecx \n\t"
- "pxor %%mm4, %%mm4 \n\t"
- "pxor %%mm7, %%mm7 \n\t"
-
- "1: \n\t"
-
- "movq (%%"REG_S"), %%mm0 \n\t"
- "movq (%%"REG_S"), %%mm2 \n\t"
- "movq (%%"REG_S",%%"REG_a"), %%mm1 \n\t"
- "add %%"REG_a", %%"REG_S" \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, %%mm3 \n\t"
- "punpcklwd %%mm7, %%mm4 \n\t"
- "punpckhwd %%mm7, %%mm3 \n\t"
- "paddd %%mm4, %%mm3 \n\t"
- "movd %%mm3, %%eax \n\t"
- "psrlq $32, %%mm3 \n\t"
- "movd %%mm3, %%edx \n\t"
- "addl %%edx, %%eax \n\t"
- "emms \n\t"
- : "=a" (ret)
- : "S" (a), "a" (s)
- : "%ecx", "%edx"
- );
- return 4*ret;
-}
-#endif
-#endif
-
#define ABS(a) (((a)^((a)>>31))-((a)>>31))
static int diff_y(unsigned char *a, unsigned char *b, int s)
@@ -778,25 +590,7 @@ void pullup_init_context(struct pullup_context *c)
c->diff = diff_y;
c->comb = licomb_y;
c->var = var_y;
-#if ARCH_X86
-#if HAVE_MMX
- if (c->cpu & PULLUP_CPU_MMX) {
- c->diff = diff_y_mmx;
- c->comb = licomb_y_mmx;
- c->var = var_y_mmx;
- }
-#endif
-#endif
- /* c->comb = qpcomb_y; */
break;
-#if 0
- case PULLUP_FMT_YUY2:
- c->diff = diff_yuy2;
- break;
- case PULLUP_FMT_RGB32:
- c->diff = diff_rgb32;
- break;
-#endif
}
}