In initMMX2HScaler, when chrDstW is not divisible by 4, the last filterPos element...
authorCédric Schieli <cschieli@gmail.com>
Wed, 11 Mar 2009 14:22:53 +0000 (14:22 +0000)
committerCédric Schieli <cschieli@gmail.com>
Wed, 11 Mar 2009 14:22:53 +0000 (14:22 +0000)
Originally committed as revision 28933 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/swscale.c

index 1307a50..c6012c1 100644 (file)
@@ -1622,7 +1622,7 @@ static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode, int16_t *fil
         }
         xpos+=xInc;
     }
-    filterPos[i/2]= xpos>>16; // needed to jump to the next part
+    filterPos[((i/2)+1)&(~1)]= xpos>>16; // needed to jump to the next part
 }
 #endif /* COMPILE_MMX2 */