diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c
index d5a2d3734898c119242940c01c0c97db8d0d0fba..74836387a6907a8b9b9925e6863f1c498017eec6 100644
--- a/libavcodec/i386/dsputil_mmx.c
+++ b/libavcodec/i386/dsputil_mmx.c
@@ -589,7 +589,7 @@ static void diff_bytes_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
     "paddw " #b1 ", " #b1 "		\n\t"\
     "paddw " #b2 ", " #b2 "		\n\t"\
     "psubw " #a1 ", " #b1 "		\n\t"\
-    "psubw " #a2 ", " #b1 "		\n\t"
+    "psubw " #a2 ", " #b2 "		\n\t"
 
 #define HADAMARD48\
         LBUTTERFLY2(%%mm0, %%mm1, %%mm2, %%mm3)\