From feb5575abd810ae0a21de9c3f8dd3033cd4cf573 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sat, 4 Jan 2003 13:26:39 +0000 Subject: really really bad coding. that thing worked by luck, i guess. assuming a parameter to be on a specific stack position is absolutely non-portable and bad programing pratice. putting emms inside the loop? someone must read a mmx manual. CVS patchset: 3770 CVS date: 2003/01/04 13:26:39 --- src/post/goom/ifs_display.c | 15 +------- src/post/goom/zoom_filter_mmx.c | 81 ++++++++++++++++++----------------------- 2 files changed, 37 insertions(+), 59 deletions(-) (limited to 'src') diff --git a/src/post/goom/ifs_display.c b/src/post/goom/ifs_display.c index 657a74063..53530ccf6 100644 --- a/src/post/goom/ifs_display.c +++ b/src/post/goom/ifs_display.c @@ -18,25 +18,12 @@ ifs_fun_mmx(guint32 * data, guint32 * back, int width, int height, if ((x < width) && (y < height) && (x > 0) && (y > 0)) { int pos = x + (y * width); -/* register int b asm ("eax"); - - b = back[pos]; - __asm__ - (" - movd %%eax, %%mm0 - movd %%edx, %%mm1 - paddusb %%mm1, %%mm0 - movd %%mm0, %%eax - ":: - "edx" (couleursl)); - data[pos] = b; -*/ movd_m2r(back[pos],mm0); paddusb_r2r(mm1,mm0); movd_r2m(mm0,data[pos]); } } - __asm__ __volatile__ ("emms"); + emms(); } #endif diff --git a/src/post/goom/zoom_filter_mmx.c b/src/post/goom/zoom_filter_mmx.c index ff7a44214..a7a5ffd8f 100644 --- a/src/post/goom/zoom_filter_mmx.c +++ b/src/post/goom/zoom_filter_mmx.c @@ -1,4 +1,6 @@ #include "goom_config.h" +#include "xineutils.h" + #ifdef MMX #define BUFFPOINTNB 16 #define BUFFPOINTMASK 0xffff @@ -20,7 +22,7 @@ void zoom_filter_mmx (int prevX, int prevY, int bufsize = prevX * prevY; int loop; - __asm__ ("pxor %mm7,%mm7"); + pxor_r2r(mm7,mm7); for (loop=0; loop