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
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);
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) {