summaryrefslogtreecommitdiff
path: root/libavcodec/motion-test.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-06-20 01:34:38 +0100
committerMans Rullgard <mans@mansr.com>2012-06-20 17:09:03 +0100
commit980f81d961e62dd38b9dbe6091e72638d6535ccd (patch)
tree1332a4e218a48c11998fd7e44a070d47e88e6961 /libavcodec/motion-test.c
parentae0a301668da542eaf8855e5dd61d0728181b0dd (diff)
downloadffmpeg-980f81d961e62dd38b9dbe6091e72638d6535ccd.tar.gz
Use av_gettime() in various places
Signed-off-by: Mans Rullgard <mans@mansr.com>
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) /