Revision fb16b7e7

View differences:

libavcodec/dsputil.c
21 21
#include "avcodec.h"
22 22
#include "dsputil.h"
23 23

  
24
#ifdef HAVE_MMX
25
int mm_flags; /* multimedia extension flags */
26
#endif
27

  
28 24
void (*get_pixels)(DCTELEM *block, const UINT8 *pixels, int line_size);
29 25
void (*put_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size);
30 26
void (*add_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size);
libavcodec/dsputil.h
75 75

  
76 76
static inline void emms(void)
77 77
{
78
	asm volatile ("emms;");
78
    __asm __volatile ("emms;":::"memory");
79
}
80

  
81
#define emms_c() \
82
{\
83
    if (mm_flags & MM_MMX)\
84
        emms();\
79 85
}
80 86

  
81 87
#define __align8 __attribute__ ((aligned (8)))
......
84 90

  
85 91
#else
86 92

  
93
#define emms_c()
94

  
87 95
#define __align8
88 96

  
89 97
#endif
libavcodec/motion_est.c
434 434
	dmin = phods_motion_search(s, &mx, &my, range / 2, xmin, ymin, xmax, ymax);
435 435
        break;
436 436
    }
437
#ifdef HAVE_MMX
438
    if (mm_flags & MM_MMX)
439
        emms();
440
#endif
437
    emms_c();
441 438

  
442 439
    /* intra / predictive decision */
443 440
    xx = mb_x * 16;

Also available in: Unified diff