diff options
author | Olivier Langlois <olivier@trillion01.com> | 2014-05-07 01:16:49 +0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-10-24 10:53:42 +0400 |
commit | 6fdf35fe35d8c1c467708238100648a7a47c930d (patch) | |
tree | f1d0796748588ce66b97db9142b4be92a15bf0ff /libavcodec/dct-test.c | |
parent | 1bd0bdcdc236099d5c0d179696951f35f5310fa5 (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: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/dct-test.c')
-rw-r--r-- | libavcodec/dct-test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c index 32cbe8c52c..f337576836 100644 --- a/libavcodec/dct-test.c +++ b/libavcodec/dct-test.c @@ -231,7 +231,7 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed) init_block(block, test, is_idct, &prng); permute(block1, block, dct->perm_type); - ti = av_gettime(); + ti = av_gettime_relative(); it1 = 0; do { for (it = 0; it < NB_ITS_SPEED; it++) { @@ -239,7 +239,7 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed) dct->func(block); } it1 += NB_ITS_SPEED; - ti1 = av_gettime() - ti; + ti1 = av_gettime_relative() - ti; } while (ti1 < 1000000); emms_c(); @@ -372,7 +372,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++) { @@ -381,7 +381,7 @@ static void idct248_error(const char *name, idct248_put(img_dest, 8, block); } it1 += NB_ITS_SPEED; - ti1 = av_gettime() - ti; + ti1 = av_gettime_relative() - ti; } while (ti1 < 1000000); emms_c(); |