Commit 461030a7 authored by Michael Niedermayer's avatar Michael Niedermayer

dct-test: perform emms before gettime().

This fixes the hypothetical case of a gettime implementation using floats
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9758b1cb
...@@ -351,10 +351,10 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed, c ...@@ -351,10 +351,10 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed, c
memcpy(block, block1, sizeof(block)); memcpy(block, block1, sizeof(block));
dct->func(block); dct->func(block);
} }
mmx_emms();
it1 += NB_ITS_SPEED; it1 += NB_ITS_SPEED;
ti1 = gettime() - ti; ti1 = gettime() - ti;
} while (ti1 < 1000000); } while (ti1 < 1000000);
mmx_emms();
printf("%s %s: %0.1f kdct/s\n", is_idct ? "IDCT" : "DCT", dct->name, printf("%s %s: %0.1f kdct/s\n", is_idct ? "IDCT" : "DCT", dct->name,
(double) it1 * 1000.0 / (double) ti1); (double) it1 * 1000.0 / (double) ti1);
...@@ -512,10 +512,10 @@ static void idct248_error(const char *name, ...@@ -512,10 +512,10 @@ static void idct248_error(const char *name,
block[i] = block1[i]; block[i] = block1[i];
idct248_put(img_dest, 8, block); idct248_put(img_dest, 8, block);
} }
mmx_emms();
it1 += NB_ITS_SPEED; it1 += NB_ITS_SPEED;
ti1 = gettime() - ti; ti1 = gettime() - ti;
} while (ti1 < 1000000); } while (ti1 < 1000000);
mmx_emms();
printf("%s %s: %0.1f kdct/s\n", 1 ? "IDCT248" : "DCT248", name, printf("%s %s: %0.1f kdct/s\n", 1 ? "IDCT248" : "DCT248", name,
(double) it1 * 1000.0 / (double) ti1); (double) it1 * 1000.0 / (double) ti1);
......
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