Mercurial > libavcodec.hg
changeset 6:ec4642daa6fe libavcodec
added emms_c() macro which should can used in c code in both mmx/non mmx cases
author | glantau |
---|---|
date | Tue, 24 Jul 2001 20:42:03 +0000 |
parents | 4479bcab253e |
children | 1d3ac9654178 |
files | dsputil.c dsputil.h motion_est.c |
diffstat | 3 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/dsputil.c Tue Jul 24 20:38:55 2001 +0000 +++ b/dsputil.c Tue Jul 24 20:42:03 2001 +0000 @@ -21,10 +21,6 @@ #include "avcodec.h" #include "dsputil.h" -#ifdef HAVE_MMX -int mm_flags; /* multimedia extension flags */ -#endif - void (*get_pixels)(DCTELEM *block, const UINT8 *pixels, int line_size); void (*put_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size); void (*add_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size);
--- a/dsputil.h Tue Jul 24 20:38:55 2001 +0000 +++ b/dsputil.h Tue Jul 24 20:42:03 2001 +0000 @@ -75,7 +75,13 @@ static inline void emms(void) { - asm volatile ("emms;"); + __asm __volatile ("emms;":::"memory"); +} + +#define emms_c() \ +{\ + if (mm_flags & MM_MMX)\ + emms();\ } #define __align8 __attribute__ ((aligned (8))) @@ -84,6 +90,8 @@ #else +#define emms_c() + #define __align8 #endif
--- a/motion_est.c Tue Jul 24 20:38:55 2001 +0000 +++ b/motion_est.c Tue Jul 24 20:42:03 2001 +0000 @@ -434,10 +434,7 @@ dmin = phods_motion_search(s, &mx, &my, range / 2, xmin, ymin, xmax, ymax); break; } -#ifdef HAVE_MMX - if (mm_flags & MM_MMX) - emms(); -#endif + emms_c(); /* intra / predictive decision */ xx = mb_x * 16;