summaryrefslogtreecommitdiff
path: root/libavcodec/dct-test.c
diff options
context:
space:
mode:
authorOlivier Langlois <olivier@trillion01.com>2014-05-06 17:16:49 -0400
committerMichael Niedermayer <michaelni@gmx.at>2014-05-17 15:51:49 +0200
commitb052bccbe4b5533c3f11fddb14df59fb72dbf463 (patch)
treeafe015f1ab22ce40799862b1a6b299af40e08797 /libavcodec/dct-test.c
parent0eec06ed8747923faa6a98e474f224d922dc487d (diff)
lavc: Use av_gettime_relative()
Whenever av_gettime() is used to measure relative period of time, av_gettime_relative() is prefered as it guarantee monotonic time on supported platforms. Signed-off-by: Olivier Langlois <olivier@trillion01.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dct-test.c')
-rw-r--r--libavcodec/dct-test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 6308348361..2f4c3f75b2 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -348,7 +348,7 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed, c
init_block(block, test, is_idct, &prng, vals);
permute(block1, block, dct->format);
- ti = av_gettime();
+ ti = av_gettime_relative();
it1 = 0;
do {
for (it = 0; it < NB_ITS_SPEED; it++) {
@@ -357,7 +357,7 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed, c
}
emms_c();
it1 += NB_ITS_SPEED;
- ti1 = av_gettime() - ti;
+ ti1 = av_gettime_relative() - ti;
} while (ti1 < 1000000);
printf("%s %s: %0.1f kdct/s\n", is_idct ? "IDCT" : "DCT", dct->name,
@@ -508,7 +508,7 @@ static void idct248_error(const char *name,
if (!speed)
return;
- ti = av_gettime();
+ ti = av_gettime_relative();
it1 = 0;
do {
for (it = 0; it < NB_ITS_SPEED; it++) {
@@ -518,7 +518,7 @@ static void idct248_error(const char *name,
}
emms_c();
it1 += NB_ITS_SPEED;
- ti1 = av_gettime() - ti;
+ ti1 = av_gettime_relative() - ti;
} while (ti1 < 1000000);
printf("%s %s: %0.1f kdct/s\n", 1 ? "IDCT248" : "DCT248", name,