--- filter/yuvdenoise/deinterlace.c.orig	2009-02-21 16:34:02.000000000 +0200
+++ filter/yuvdenoise/deinterlace.c	2009-04-06 17:21:59.000000000 +0300
@@ -163,7 +163,7 @@
                   " pxor        %%mm0 , %%mm0;           /* clear mm0                                          */\n"
                   " pxor        %%mm7 , %%mm7;           /* clear mm7                                          */\n"
                   "                                      /*                                                    */\n"
-                  " .rept 3                              /* repeat 3 times                                     */\n"
+                  /*" rep 3                               repeat 3 times                                     \n" */
                   " movq        (%%esi), %%mm1;          /* 8 Pixels from line                                 */\n"
                   " movq        (%%edi), %%mm2;          /* 8 Pixels from displaced                            */\n"
                   " movq         %%mm2 , %%mm3;          /* hold a copy of mm2 in mm3                          */\n"
@@ -190,7 +190,60 @@
                   " addl         $8    , %%esi;          /* add 8 to frameaddress                              */\n"
                   " addl         $8    , %%eax;          /* add 8 to frameaddress                              */\n"
                   " addl         $8    , %%edi;          /* add 8 to frameaddress                              */\n"
-                  " .endr                                /* end loop                                           */\n"
+                  " movq        (%%esi), %%mm1;          /* 8 Pixels from line                                 */\n"
+                  " movq        (%%edi), %%mm2;          /* 8 Pixels from displaced                            */\n"
+                  " movq         %%mm2 , %%mm3;          /* hold a copy of mm2 in mm3                          */\n"
+                  " psubusb      %%mm1 , %%mm3;          /* positive differences between mm2 and mm1           */\n"
+                  " psubusb      %%mm2 , %%mm1;          /* positive differences between mm1 and mm3           */\n"
+                  " paddusb      %%mm3 , %%mm1;          /* mm1 now contains abs(mm1-mm2)                      */\n"
+                  " movq         %%mm1 , %%mm2;          /* copy mm1 to mm2                                    */\n"
+                  " punpcklbw    %%mm7 , %%mm1;          /* unpack mm1 into mm1 and mm2                        */\n"
+                  " punpckhbw    %%mm7 , %%mm2;          /*                                                    */\n"
+                  " paddusw      %%mm1 , %%mm0;          /* add mm1 (stored in mm1 and mm2...)                 */\n"
+                  " paddusw      %%mm2 , %%mm0;          /* to mm0                                             */\n"
+                  "                                      /*                                                    */\n"
+                  " movq        (%%eax), %%mm1;          /* 8 Pixels from line                                 */\n"
+                  " movq        (%%edi), %%mm2;          /* 8 Pixels from displaced line                       */\n"
+                  " movq         %%mm2 , %%mm3;          /* hold a copy of mm2 in mm3                          */\n"
+                  " psubusb      %%mm1 , %%mm3;          /* positive differences between mm2 and mm1           */\n"
+                  " psubusb      %%mm2 , %%mm1;          /* positive differences between mm1 and mm3           */\n"
+                  " paddusb      %%mm3 , %%mm1;          /* mm1 now contains abs(mm1-mm2)                      */\n"
+                  " movq         %%mm1 , %%mm2;          /* copy mm1 to mm2                                    */\n"
+                  " punpcklbw    %%mm7 , %%mm1;          /* unpack mm1 into mm1 and mm2                        */\n"
+                  " punpckhbw    %%mm7 , %%mm2;          /*                                                    */\n"
+                  " paddusw      %%mm1 , %%mm0;          /* add mm1 (stored in mm1 and mm2...)                 */\n"
+                  " paddusw      %%mm2 , %%mm0;          /* to mm0                                             */\n"
+                  " addl         $8    , %%esi;          /* add 8 to frameaddress                              */\n"
+                  " addl         $8    , %%eax;          /* add 8 to frameaddress                              */\n"
+                  " addl         $8    , %%edi;          /* add 8 to frameaddress                              */\n"
+                  " movq        (%%esi), %%mm1;          /* 8 Pixels from line                                 */\n"
+                  " movq        (%%edi), %%mm2;          /* 8 Pixels from displaced                            */\n"
+                  " movq         %%mm2 , %%mm3;          /* hold a copy of mm2 in mm3                          */\n"
+                  " psubusb      %%mm1 , %%mm3;          /* positive differences between mm2 and mm1           */\n"
+                  " psubusb      %%mm2 , %%mm1;          /* positive differences between mm1 and mm3           */\n"
+                  " paddusb      %%mm3 , %%mm1;          /* mm1 now contains abs(mm1-mm2)                      */\n"
+                  " movq         %%mm1 , %%mm2;          /* copy mm1 to mm2                                    */\n"
+                  " punpcklbw    %%mm7 , %%mm1;          /* unpack mm1 into mm1 and mm2                        */\n"
+                  " punpckhbw    %%mm7 , %%mm2;          /*                                                    */\n"
+                  " paddusw      %%mm1 , %%mm0;          /* add mm1 (stored in mm1 and mm2...)                 */\n"
+                  " paddusw      %%mm2 , %%mm0;          /* to mm0                                             */\n"
+                  "                                      /*                                                    */\n"
+                  " movq        (%%eax), %%mm1;          /* 8 Pixels from line                                 */\n"
+                  " movq        (%%edi), %%mm2;          /* 8 Pixels from displaced line                       */\n"
+                  " movq         %%mm2 , %%mm3;          /* hold a copy of mm2 in mm3                          */\n"
+                  " psubusb      %%mm1 , %%mm3;          /* positive differences between mm2 and mm1           */\n"
+                  " psubusb      %%mm2 , %%mm1;          /* positive differences between mm1 and mm3           */\n"
+                  " paddusb      %%mm3 , %%mm1;          /* mm1 now contains abs(mm1-mm2)                      */\n"
+                  " movq         %%mm1 , %%mm2;          /* copy mm1 to mm2                                    */\n"
+                  " punpcklbw    %%mm7 , %%mm1;          /* unpack mm1 into mm1 and mm2                        */\n"
+                  " punpckhbw    %%mm7 , %%mm2;          /*                                                    */\n"
+                  " paddusw      %%mm1 , %%mm0;          /* add mm1 (stored in mm1 and mm2...)                 */\n"
+                  " paddusw      %%mm2 , %%mm0;          /* to mm0                                             */\n"
+                  " addl         $8    , %%esi;          /* add 8 to frameaddress                              */\n"
+                  " addl         $8    , %%eax;          /* add 8 to frameaddress                              */\n"
+                  " addl         $8    , %%edi;          /* add 8 to frameaddress                              */\n"
+
+                  /*" .end                                 end loop                                           \n" */
                   "                                      /*                                                    */\n"
                   " movq         %%mm0 , %0   ;          /* make mm0 available to gcc ...                      */\n"
                   :"=m" (a)
