diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 1307a5076bd33d0a4e586facdf82c8e08534c04e..c6012c15b722f62b261035e460a9e4763351ebe6 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -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 */