From: "Ronald S. Bultje" <[email protected]>
---
libswscale/swscale.c | 4 ++--
libswscale/utils.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 7ae5af3..0f8ef2b 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
+#if HAVE_MMX && HAVE_INLINE_ASM
updateMMXDitherTables(c, dstY, lumBufIndex, chrBufIndex,
lastInLumBuf, lastInChrBuf);
#endif
@@ -661,7 +661,7 @@ static int swScale(SwsContext *c, const uint8_t *src[],
if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf)
fillPlane(dst[3], dstStride[3], dstW, dstY - lastDstY, lastDstY, 255);
-#if HAVE_MMX2
+#if HAVE_MMX2 && HAVE_INLINE_ASM
if (av_get_cpu_flags() & AV_CPU_FLAG_MMX2)
__asm__ volatile ("sfence" ::: "memory");
#endif
diff --git a/libswscale/utils.c b/libswscale/utils.c
index d8fee58..a6b5a18 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -576,7 +576,7 @@ fail:
return ret;
}
-#if HAVE_MMX2
+#if HAVE_MMX2 && HAVE_INLINE_ASM
static int initMMX2HScaler(int dstW, int xInc, uint8_t *filterCode,
int16_t *filter, int32_t *filterPos, int numSplits)
{
@@ -739,7 +739,7 @@ static int initMMX2HScaler(int dstW, int xInc, uint8_t
*filterCode,
return fragmentPos + 1;
}
-#endif /* HAVE_MMX2 */
+#endif /* HAVE_MMX2 && HAVE_INLINE_ASM */
static void getSubSampleFactors(int *h, int *v, enum PixelFormat format)
{
@@ -971,7 +971,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
SwsFilter *dstFilter)
FF_ALLOC_OR_GOTO(c, c->formatConvBuffer,
(FFALIGN(srcW, 16) * 2 * FFALIGN(c->srcBpc, 8) >> 3) + 16,
fail);
- if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2 &&
+ if (HAVE_MMX2 && HAVE_INLINE_ASM && cpu_flags & AV_CPU_FLAG_MMX2 &&
c->srcBpc == 8 && c->dstBpc <= 10) {
c->canMMX2BeUsed = (dstW >= srcW && (dstW & 31) == 0 &&
(srcW & 15) == 0) ? 1 : 0;
@@ -1010,7 +1010,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
SwsFilter *dstFilter)
/* precalculate horizontal scaler filter coefficients */
{
-#if HAVE_MMX2
+#if HAVE_MMX2 && HAVE_INLINE_ASM
// can't downscale !!!
if (c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR)) {
c->lumMmx2FilterCodeSize = initMMX2HScaler(dstW, c->lumXInc, NULL,
@@ -1046,7 +1046,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
SwsFilter *dstFilter)
mprotect(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize, PROT_EXEC
| PROT_READ);
#endif
} else
-#endif /* HAVE_MMX2 */
+#endif /* HAVE_MMX2 && HAVE_INLINE_ASM */
{
const int filterAlign =
(HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? 4 :
--
1.7.9.5
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel