Commit 2b20a3c4 authored by glantau's avatar glantau

added emms_c() macro which should can used in c code in both mmx/non mmx cases


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 22a6d0ba
...@@ -21,10 +21,6 @@ ...@@ -21,10 +21,6 @@
#include "avcodec.h" #include "avcodec.h"
#include "dsputil.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 (*get_pixels)(DCTELEM *block, const UINT8 *pixels, int line_size);
void (*put_pixels_clamped)(const DCTELEM *block, 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); void (*add_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size);
......
...@@ -75,7 +75,13 @@ int mm_support(void); ...@@ -75,7 +75,13 @@ int mm_support(void);
static inline void emms(void) 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))) #define __align8 __attribute__ ((aligned (8)))
...@@ -84,6 +90,8 @@ void dsputil_init_mmx(void); ...@@ -84,6 +90,8 @@ void dsputil_init_mmx(void);
#else #else
#define emms_c()
#define __align8 #define __align8
#endif #endif
......
...@@ -434,10 +434,7 @@ int estimate_motion(MpegEncContext * s, ...@@ -434,10 +434,7 @@ int estimate_motion(MpegEncContext * s,
dmin = phods_motion_search(s, &mx, &my, range / 2, xmin, ymin, xmax, ymax); dmin = phods_motion_search(s, &mx, &my, range / 2, xmin, ymin, xmax, ymax);
break; break;
} }
#ifdef HAVE_MMX emms_c();
if (mm_flags & MM_MMX)
emms();
#endif
/* intra / predictive decision */ /* intra / predictive decision */
xx = mb_x * 16; xx = mb_x * 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment