summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-20 17:09:46 +0000
committerramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-20 17:09:46 +0000
commitc082aa34adef2d8148ce601a8142b3ce036fc522 (patch)
treed406e7d0faf46fdd2ba9a63e505aa03d479806b7
parentb252972ab468cbe3a9d7ff33366561c40d0391ec (diff)
downloadmpv-c082aa34adef2d8148ce601a8142b3ce036fc522.tar.bz2
mpv-c082aa34adef2d8148ce601a8142b3ce036fc522.tar.xz
Set fast_bilinear functions in sws_init_swScale().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30085 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libswscale/swscale_template.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c
index bf944ee6bc..92786bea5b 100644
--- a/libswscale/swscale_template.c
+++ b/libswscale/swscale_template.c
@@ -2293,12 +2293,7 @@ static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth,
src= formatConvBuffer;
}
-#if COMPILE_TEMPLATE_MMX
- // Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one).
- if (!(flags&SWS_FAST_BILINEAR) || (!canMMX2BeUsed))
-#else
- if (!(flags&SWS_FAST_BILINEAR))
-#endif
+ if (!c->hyscale_fast)
{
c->hScale(dst, dstWidth, src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize);
} else { // fast bilinear upscale / crap downscale
@@ -2455,12 +2450,7 @@ inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth,
src2= formatConvBuffer+VOFW;
}
-#if COMPILE_TEMPLATE_MMX
- // Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one).
- if (!(flags&SWS_FAST_BILINEAR) || (!canMMX2BeUsed))
-#else
- if (!(flags&SWS_FAST_BILINEAR))
-#endif
+ if (!c->hcscale_fast)
{
c->hScale(dst , dstWidth, src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);
c->hScale(dst+VOFW, dstWidth, src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);
@@ -2948,8 +2938,16 @@ static void RENAME(sws_init_swScale)(SwsContext *c)
c->hScale = RENAME(hScale );
+#if COMPILE_TEMPLATE_MMX
+ // Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one).
+ if (c->flags & SWS_FAST_BILINEAR && c->canMMX2BeUsed)
+#else
+ if (c->flags & SWS_FAST_BILINEAR)
+#endif
+ {
c->hyscale_fast = RENAME(hyscale_fast);
c->hcscale_fast = RENAME(hcscale_fast);
+ }
c->hcscale_internal = NULL;
switch(srcFormat) {