aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-08-28 14:53:33 +0200
committerDiego Biurrun <diego@biurrun.de>2012-08-31 01:53:25 +0200
commit17337f54c057accf12b0e87d12f576194ad085a8 (patch)
tree1b09c5750a307bbae18fbbcae93aa79b40bf602a /libswscale
parent43b73d59a8b6cba60b0401b39f0f577bc6c1df9e (diff)
downloadffmpeg-17337f54c057accf12b0e87d12f576194ad085a8.tar.gz
x86: Split inline and external assembly #ifdefs
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c2
-rw-r--r--libswscale/utils.c12
-rw-r--r--libswscale/x86/swscale.c6
-rw-r--r--libswscale/x86/yuv2rgb.c10
4 files changed, 15 insertions, 15 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 9da250e1d1..94f51cf5cb 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -518,7 +518,7 @@ static int swScale(SwsContext *c, const uint8_t *src[],
if (!enough_lines)
break; // we can't output a dstY line so let's try with the next slice
-#if HAVE_MMX && HAVE_INLINE_ASM
+#if HAVE_MMX_INLINE
updateMMXDitherTables(c, dstY, lumBufIndex, chrBufIndex,
lastInLumBuf, lastInChrBuf);
#endif
diff --git a/libswscale/utils.c b/libswscale/utils.c
index f890b5cee1..200346cab5 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -577,7 +577,7 @@ fail:
return ret;
}
-#if HAVE_MMXEXT && HAVE_INLINE_ASM
+#if HAVE_MMXEXT_INLINE
static int initMMX2HScaler(int dstW, int xInc, uint8_t *filterCode,
int16_t *filter, int32_t *filterPos, int numSplits)
{
@@ -740,7 +740,7 @@ static int initMMX2HScaler(int dstW, int xInc, uint8_t *filterCode,
return fragmentPos + 1;
}
-#endif /* HAVE_MMXEXT && HAVE_INLINE_ASM */
+#endif /* HAVE_MMXEXT_INLINE */
static void getSubSampleFactors(int *h, int *v, enum PixelFormat format)
{
@@ -1012,7 +1012,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
/* precalculate horizontal scaler filter coefficients */
{
-#if HAVE_MMXEXT && HAVE_INLINE_ASM
+#if HAVE_MMXEXT_INLINE
// can't downscale !!!
if (c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR)) {
c->lumMmx2FilterCodeSize = initMMX2HScaler(dstW, c->lumXInc, NULL,
@@ -1048,7 +1048,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
mprotect(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize, PROT_EXEC | PROT_READ);
#endif
} else
-#endif /* HAVE_MMXEXT && HAVE_INLINE_ASM */
+#endif /* HAVE_MMXEXT_INLINE */
{
const int filterAlign =
(HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? 4 :
@@ -1621,7 +1621,7 @@ void sws_freeContext(SwsContext *c)
av_freep(&c->hLumFilterPos);
av_freep(&c->hChrFilterPos);
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
#ifdef MAP_ANONYMOUS
if (c->lumMmx2FilterCode)
munmap(c->lumMmx2FilterCode, c->lumMmx2FilterCodeSize);
@@ -1638,7 +1638,7 @@ void sws_freeContext(SwsContext *c)
#endif
c->lumMmx2FilterCode = NULL;
c->chrMmx2FilterCode = NULL;
-#endif /* HAVE_MMX */
+#endif /* HAVE_MMX_INLINE */
av_freep(&c->yuvTable);
av_free(c->formatConvBuffer);
diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
index db9fb732b9..581d6f79f7 100644
--- a/libswscale/x86/swscale.c
+++ b/libswscale/x86/swscale.c
@@ -70,7 +70,7 @@ DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UVOffset) = 0x8080808080808080ULL;
DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL;
//MMX versions
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
#undef RENAME
#define COMPILE_TEMPLATE_MMXEXT 0
#define RENAME(a) a ## _MMX
@@ -78,7 +78,7 @@ DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL;
#endif
//MMX2 versions
-#if HAVE_MMXEXT
+#if HAVE_MMXEXT_INLINE
#undef RENAME
#undef COMPILE_TEMPLATE_MMXEXT
#define COMPILE_TEMPLATE_MMXEXT 1
@@ -308,7 +308,7 @@ av_cold void ff_sws_init_swScale_mmx(SwsContext *c)
#if HAVE_INLINE_ASM
if (cpu_flags & AV_CPU_FLAG_MMX)
sws_init_swScale_MMX(c);
-#if HAVE_MMXEXT
+#if HAVE_MMXEXT_INLINE
if (cpu_flags & AV_CPU_FLAG_MMXEXT)
sws_init_swScale_MMX2(c);
#endif
diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
index 93755493ab..af30ca96ee 100644
--- a/libswscale/x86/yuv2rgb.c
+++ b/libswscale/x86/yuv2rgb.c
@@ -50,22 +50,22 @@ DECLARE_ASM_CONST(8, uint64_t, pb_03) = 0x0303030303030303ULL;
DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL;
//MMX versions
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
#undef RENAME
#undef COMPILE_TEMPLATE_MMXEXT
#define COMPILE_TEMPLATE_MMXEXT 0
#define RENAME(a) a ## _MMX
#include "yuv2rgb_template.c"
-#endif /* HAVE_MMX */
+#endif /* HAVE_MMX_INLINE */
//MMX2 versions
-#if HAVE_MMXEXT
+#if HAVE_MMXEXT_INLINE
#undef RENAME
#undef COMPILE_TEMPLATE_MMXEXT
#define COMPILE_TEMPLATE_MMXEXT 1
#define RENAME(a) a ## _MMX2
#include "yuv2rgb_template.c"
-#endif /* HAVE_MMXEXT */
+#endif /* HAVE_MMXEXT_INLINE */
#endif /* HAVE_INLINE_ASM */
@@ -78,7 +78,7 @@ av_cold SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
c->srcFormat != PIX_FMT_YUVA420P)
return NULL;
-#if HAVE_MMXEXT
+#if HAVE_MMXEXT_INLINE
if (cpu_flags & AV_CPU_FLAG_MMXEXT) {
switch (c->dstFormat) {
case PIX_FMT_RGB24: return yuv420_rgb24_MMX2;