          "punpcklbw %%mm7, %%mm3           \n\t" /* 0M0N0O0P */\
          "paddw %%mm3, %%mm2               \n\t" /* d */\
          "psubw %%mm2, %%mm0               \n\t" /* -6b + 3c - d */\
-@@ -2033,7 +2033,7 @@
+@@ -966,7 +966,7 @@
          "punpcklbw %%mm7, %%mm2           \n\t" /* 0J0K0L0M */\
          "punpckhbw %%mm7, %%mm5           \n\t" /* 0N0O0P0Q */\
          "paddw %%mm2, %%mm6               \n\t" /* a */\

         "paddw %6, %%mm0                  \n\t"\
         "paddw %%mm6, %%mm0               \n\t" /* 20a - 6b + 3c - d */\
         "psraw $5, %%mm0                  \n\t"\
@@ -2048,8 +2048,8 @@
         "paddw %%mm2, %%mm5               \n\t" /* d */\
         "paddw %%mm6, %%mm6               \n\t" /* 2b */\
         "psubw %%mm6, %%mm4               \n\t" /* c - 2b */\

+        "pmullw %7, %%mm1 \n\t" /* 20a */\
+        "pmullw %8, %%mm3  \n\t" /* 3c - 6b */\
         "psubw %%mm4, %%mm3               \n\t" /* -6b + 3c - d */\
         "paddw %5, %%mm1                  \n\t"\
         "paddw %%mm1, %%mm3               \n\t" /* 20a - 6b + 3c - d */\
@@ -1106,7 +1108,9 @@
         "decl %2                          \n\t"\
         " jnz 1b                          \n\t"\
         : "+a"(src), "+c"(dst), "+d"(h)\
-        : "S"((long)srcStride), "D"((long)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER)\
+        : "S"((long)srcStride), "D"((long)dstStride),\
+          "m"(temp), "m"(ROUNDER),\
+          "m"(ff_pw_20), "m"(ff_pw_3)\
         : "memory"\
     );\
 }\
@@ -1185,31 +1189,31 @@
         "movq 8(%0), %%mm1              \n\t"\
         "movq 16(%0), %%mm2             \n\t"\
         "movq 24(%0), %%mm3             \n\t"\
