sws: dont mess with XInc when the code needing it isnt used
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 10 Jul 2011 23:44:23 +0000 (01:44 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 11 Jul 2011 01:51:46 +0000 (03:51 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/utils.c

index 9d373cc..62839ee 100644 (file)
@@ -916,7 +916,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
             c->chrXInc+= 20;
         }
         //we don't use the x86 asm scaler if MMX is available
-        else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) {
+        else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX && c->scalingBpp == 8) {
             c->lumXInc = ((srcW-2)<<16)/(dstW-2) - 20;
             c->chrXInc = ((c->chrSrcW-2)<<16)/(c->chrDstW-2) - 20;
         }