summaryrefslogtreecommitdiff
path: root/libavcodec/dct-test.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-01 19:15:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-01 19:15:24 +0200
commit461030a7ac8e4c563442af44147cf1cef173792f (patch)
tree00f57aeea3d23153289929823db27b8d8ae3b692 /libavcodec/dct-test.c
parent9758b1cb887dac09de13c5dda7c2b52d3314f6ec (diff)
dct-test: perform emms before gettime().
This fixes the hypothetical case of a gettime implementation using floats Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dct-test.c')
-rw-r--r--libavcodec/dct-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 9e023ab4fc..f85bccb420 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.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));
dct->func(block);
}
+ mmx_emms();
it1 += NB_ITS_SPEED;
ti1 = gettime() - ti;
} while (ti1 < 1000000);
- mmx_emms();
printf("%s %s: %0.1f kdct/s\n", is_idct ? "IDCT" : "DCT", dct->name,
(double) it1 * 1000.0 / (double) ti1);
@@ -512,10 +512,10 @@ static void idct248_error(const char *name,
block[i] = block1[i];
idct248_put(img_dest, 8, block);
}
+ mmx_emms();
it1 += NB_ITS_SPEED;
ti1 = gettime() - ti;
} while (ti1 < 1000000);
- mmx_emms();
printf("%s %s: %0.1f kdct/s\n", 1 ? "IDCT248" : "DCT248", name,
(double) it1 * 1000.0 / (double) ti1);