diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2001-10-28 19:41:50 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2001-10-28 19:41:50 +0000 |
commit | 99cefd0bda558682476545d741d0dd55b22f1400 (patch) | |
tree | 713ff37f3c29c01fb4b3c34d9c6f23c3ffac8c55 /postproc/swscale.c | |
parent | 388584703676f9e886c24ee0327160fa90021174 (diff) | |
download | ffmpeg-99cefd0bda558682476545d741d0dd55b22f1400.tar.gz |
3dnow prefetch & sfence
Originally committed as revision 2521 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/swscale.c')
-rw-r--r-- | postproc/swscale.c | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c index 476367d60b..d4a242309b 100644 --- a/postproc/swscale.c +++ b/postproc/swscale.c @@ -9,6 +9,7 @@ #include <string.h> #include "../config.h" #include "swscale.h" +#include "../mmx_defs.h" //#undef HAVE_MMX2 //#undef HAVE_MMX @@ -929,20 +930,15 @@ static inline void hyscale(uint16_t *dst, int dstWidth, uint8_t *src, int srcWid "xorl %%ecx, %%ecx \n\t" "xorl %%ebx, %%ebx \n\t" "movw %4, %%bx \n\t" // (xInc*4)&0xFFFF -#ifdef HAVE_MMX2 -#define FUNNY_Y_CODE \ - "prefetchnta 1024(%%esi) \n\t"\ - "prefetchnta 1056(%%esi) \n\t"\ - "prefetchnta 1088(%%esi) \n\t"\ - "call funnyYCode \n\t"\ - "movq temp0, %%mm2 \n\t"\ - "xorl %%ecx, %%ecx \n\t" -#else + #define FUNNY_Y_CODE \ + PREFETCH" 1024(%%esi) \n\t"\ + PREFETCH" 1056(%%esi) \n\t"\ + PREFETCH" 1088(%%esi) \n\t"\ "call funnyYCode \n\t"\ "movq temp0, %%mm2 \n\t"\ "xorl %%ecx, %%ecx \n\t" -#endif + FUNNY_Y_CODE FUNNY_Y_CODE FUNNY_Y_CODE @@ -1046,20 +1042,13 @@ inline static void hcscale(uint16_t *dst, int dstWidth, "xorl %%ebx, %%ebx \n\t" "movw %4, %%bx \n\t" // (xInc*4)&0xFFFF -#ifdef HAVE_MMX2 #define FUNNYUVCODE \ - "prefetchnta 1024(%%esi) \n\t"\ - "prefetchnta 1056(%%esi) \n\t"\ - "prefetchnta 1088(%%esi) \n\t"\ + PREFETCH" 1024(%%esi) \n\t"\ + PREFETCH" 1056(%%esi) \n\t"\ + PREFETCH" 1088(%%esi) \n\t"\ "call funnyUVCode \n\t"\ "movq temp0, %%mm2 \n\t"\ "xorl %%ecx, %%ecx \n\t" -#else -#define FUNNYUVCODE \ - "call funnyUVCode \n\t"\ - "movq temp0, %%mm2 \n\t"\ - "xorl %%ecx, %%ecx \n\t" -#endif FUNNYUVCODE FUNNYUVCODE @@ -1439,12 +1428,8 @@ else s_xinc2= s_xinc; g16Dither2= g16Dither; #endif } - -#ifdef HAVE_3DNOW - asm volatile("femms"); -#elif defined (HAVE_MMX) - asm volatile("emms"); -#endif +__asm __volatile(SFENCE:::"memory"); +__asm __volatile(EMMS:::"memory"); } |