summaryrefslogtreecommitdiff
path: root/libavcodec/motion-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/motion-test.c')
-rw-r--r--libavcodec/motion-test.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libavcodec/motion-test.c b/libavcodec/motion-test.c
index fb97f085be..bf63182db1 100644
--- a/libavcodec/motion-test.c
+++ b/libavcodec/motion-test.c
@@ -32,6 +32,7 @@
#include "config.h"
#include "dsputil.h"
#include "libavutil/lfg.h"
+#include "libavutil/time.h"
#undef printf
@@ -58,13 +59,6 @@ static void help(void)
"test motion implementations\n");
}
-static int64_t gettime(void)
-{
- struct timeval tv;
- gettimeofday(&tv,NULL);
- return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
-}
-
#define NB_ITS 500
int dummy;
@@ -97,7 +91,7 @@ static void test_motion(const char *name,
emms_c();
/* speed test */
- ti = gettime();
+ ti = av_gettime();
d1 = 0;
for(it=0;it<NB_ITS;it++) {
for(y=0;y<HEIGHT-17;y++) {
@@ -109,7 +103,7 @@ static void test_motion(const char *name,
}
emms_c();
dummy = d1; /* avoid optimization */
- ti = gettime() - ti;
+ ti = av_gettime() - ti;
printf(" %0.0f kop/s\n",
(double)NB_ITS * (WIDTH - 16) * (HEIGHT - 16) /