Change ifdefs to make more sense: HAVE_SSSE3 should only be around SSSE3-code,

not around MMX code etc.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31018 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-04-05 16:38:40 +00:00
parent bafe08d111
commit d55c67d157
1 changed files with 10 additions and 6 deletions

View File

@ -91,7 +91,7 @@ static void blur_line_c(uint16_t *dc, uint16_t *buf, uint16_t *buf1,
} }
} }
#if HAVE_SSSE3 #if HAVE_MMX2
static void filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc, static void filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc,
int width, int thresh, const uint16_t *dithers) int width, int thresh, const uint16_t *dithers)
{ {
@ -138,7 +138,9 @@ static void filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc,
:"memory" :"memory"
); );
} }
#endif
#if HAVE_SSSE3
static void filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc, static void filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc,
int width, int thresh, const uint16_t *dithers) int width, int thresh, const uint16_t *dithers)
{ {
@ -184,7 +186,9 @@ static void filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc,
:"memory" :"memory"
); );
} }
#endif // HAVE_SSSE3
#if HAVE_6REGS && HAVE_SSE2
#define BLURV(load)\ #define BLURV(load)\
intptr_t x = -2*width;\ intptr_t x = -2*width;\
__asm__ volatile(\ __asm__ volatile(\
@ -218,7 +222,6 @@ static void filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc,
:"memory"\ :"memory"\
); );
#if HAVE_6REGS
static void blur_line_sse2(uint16_t *dc, uint16_t *buf, uint16_t *buf1, static void blur_line_sse2(uint16_t *dc, uint16_t *buf, uint16_t *buf1,
uint8_t *src, int sstride, int width) uint8_t *src, int sstride, int width)
{ {
@ -228,8 +231,7 @@ static void blur_line_sse2(uint16_t *dc, uint16_t *buf, uint16_t *buf1,
BLURV("movdqa"); BLURV("movdqa");
} }
} }
#endif // HAVE_6REGS #endif // HAVE_6REGS && HAVE_SSE2
#endif // HAVE_SSSE3
static void filter(struct vf_priv_s *ctx, uint8_t *dst, uint8_t *src, static void filter(struct vf_priv_s *ctx, uint8_t *dst, uint8_t *src,
int width, int height, int dstride, int sstride, int r) int width, int height, int dstride, int sstride, int r)
@ -383,13 +385,15 @@ static int vf_open(vf_instance_t *vf, char *args)
vf->priv->blur_line = blur_line_c; vf->priv->blur_line = blur_line_c;
vf->priv->filter_line = filter_line_c; vf->priv->filter_line = filter_line_c;
#if HAVE_SSSE3 #if HAVE_6REGS && HAVE_SSE2
#if HAVE_6REGS
if (gCpuCaps.hasSSE2) if (gCpuCaps.hasSSE2)
vf->priv->blur_line = blur_line_sse2; vf->priv->blur_line = blur_line_sse2;
#endif #endif
#if HAVE_MMX2
if (gCpuCaps.hasMMX2) if (gCpuCaps.hasMMX2)
vf->priv->filter_line = filter_line_mmx2; vf->priv->filter_line = filter_line_mmx2;
#endif
#if HAVE_SSSE3
if (gCpuCaps.hasSSSE3) if (gCpuCaps.hasSSSE3)
vf->priv->filter_line = filter_line_ssse3; vf->priv->filter_line = filter_line_ssse3;
#endif #endif