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

         "psubw %%mm4, %%mm3               \n\t" /* - 6b +3c - d */\
         "paddw %6, %%mm1                  \n\t"\
         "paddw %%mm1, %%mm3               \n\t" /* 20a - 6b +3c - d */\
@@ -2025,7 +2025,7 @@
         "psubw %%mm5, %%mm0               \n\t" /* c - 2b */\
         "movq %%mm3, %%mm5                \n\t" /* JKLMNOPQ */\
         "psrlq $24, %%mm3                 \n\t" /* MNOPQ000 */\

         "paddw " #rnd ", %%mm4            \n\t" /* x2 */\
         "paddw %%mm4, %%mm5               \n\t" /* 20x1 - 6x2 + 3x3 - x4 */\
         "psraw $5, %%mm5                  \n\t"\
@@ -906,10 +906,10 @@
         "paddw %%mm5, %%mm5               \n\t" /* 2b */\
         "psubw %%mm5, %%mm6               \n\t" /* c - 2b */\
         "pshufw $0x06, %%mm0, %%mm5       \n\t" /* 0C0B0A0A */\
