summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-06-20 13:50:45 +0100
committerMans Rullgard <mans@mansr.com>2012-06-20 15:38:00 +0100
commitdb7d8fb4ef950329745224d49c8d4fb4174baa22 (patch)
treec0c4f2ac1baceb83b9a4161fdc4f54c917054f36
parentf1f37c701143003fe5506a1fca971932382188ce (diff)
dct-test: use emms_c() from libavutil instead of duplicating it
-rw-r--r--libavcodec/dct-test.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index bc5f2c5aaa..d57789395f 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -181,14 +181,6 @@ static void idct_mmx_init(void)
DECLARE_ALIGNED(16, static DCTELEM, block)[64];
DECLARE_ALIGNED(8, static DCTELEM, block1)[64];
-static inline void mmx_emms(void)
-{
-#if HAVE_MMX
- if (cpu_flags & AV_CPU_FLAG_MMX)
- __asm__ volatile ("emms\n\t");
-#endif
-}
-
static void init_block(DCTELEM block[64], int test, int is_idct, AVLFG *prng)
{
int i, j;
@@ -263,7 +255,7 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed)
permute(block, block1, dct->format);
dct->func(block);
- mmx_emms();
+ emms_c();
if (dct->format == SCALE_PERM) {
for (i = 0; i < 64; i++) {
@@ -330,7 +322,7 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed)
it1 += NB_ITS_SPEED;
ti1 = gettime() - ti;
} while (ti1 < 1000000);
- mmx_emms();
+ emms_c();
printf("%s %s: %0.1f kdct/s\n", is_idct ? "IDCT" : "DCT", dct->name,
(double) it1 * 1000.0 / (double) ti1);
@@ -472,7 +464,7 @@ static void idct248_error(const char *name,
it1 += NB_ITS_SPEED;
ti1 = gettime() - ti;
} while (ti1 < 1000000);
- mmx_emms();
+ emms_c();
printf("%s %s: %0.1f kdct/s\n", 1 ? "IDCT248" : "DCT248", name,
(double) it1 * 1000.0 / (double) ti1);