[MPlayer-cvslog] r31018 - trunk/libmpcodecs/vf_gradfun.c
reimar
subversion at mplayerhq.hu
Mon Apr 5 18:38:40 CEST 2010
Author: reimar
Date: Mon Apr 5 18:38:40 2010
New Revision: 31018
Log:
Change ifdefs to make more sense: HAVE_SSSE3 should only be around SSSE3-code,
not around MMX code etc.
Modified:
trunk/libmpcodecs/vf_gradfun.c
Modified: trunk/libmpcodecs/vf_gradfun.c
==============================================================================
--- trunk/libmpcodecs/vf_gradfun.c Mon Apr 5 17:58:38 2010 (r31017)
+++ trunk/libmpcodecs/vf_gradfun.c Mon Apr 5 18:38:40 2010 (r31018)
@@ -91,7 +91,7 @@ static void blur_line_c(uint16_t *dc, ui
}
}
-#if HAVE_SSSE3
+#if HAVE_MMX2
static void filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc,
int width, int thresh, const uint16_t *dithers)
{
@@ -138,7 +138,9 @@ static void filter_line_mmx2(uint8_t *ds
:"memory"
);
}
+#endif
+#if HAVE_SSSE3
static void filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc,
int width, int thresh, const uint16_t *dithers)
{
@@ -184,7 +186,9 @@ static void filter_line_ssse3(uint8_t *d
:"memory"
);
}
+#endif // HAVE_SSSE3
+#if HAVE_6REGS && HAVE_SSE2
#define BLURV(load)\
intptr_t x = -2*width;\
__asm__ volatile(\
@@ -218,7 +222,6 @@ static void filter_line_ssse3(uint8_t *d
:"memory"\
);
-#if HAVE_6REGS
static void blur_line_sse2(uint16_t *dc, uint16_t *buf, uint16_t *buf1,
uint8_t *src, int sstride, int width)
{
@@ -228,8 +231,7 @@ static void blur_line_sse2(uint16_t *dc,
BLURV("movdqa");
}
}
-#endif // HAVE_6REGS
-#endif // HAVE_SSSE3
+#endif // HAVE_6REGS && HAVE_SSE2
static void filter(struct vf_priv_s *ctx, uint8_t *dst, uint8_t *src,
int width, int height, int dstride, int sstride, int r)
@@ -383,13 +385,15 @@ static int vf_open(vf_instance_t *vf, ch
vf->priv->blur_line = blur_line_c;
vf->priv->filter_line = filter_line_c;
-#if HAVE_SSSE3
-#if HAVE_6REGS
+#if HAVE_6REGS && HAVE_SSE2
if (gCpuCaps.hasSSE2)
vf->priv->blur_line = blur_line_sse2;
#endif
+#if HAVE_MMX2
if (gCpuCaps.hasMMX2)
vf->priv->filter_line = filter_line_mmx2;
+#endif
+#if HAVE_SSSE3
if (gCpuCaps.hasSSSE3)
vf->priv->filter_line = filter_line_ssse3;
#endif
More information about the MPlayer-cvslog
mailing list