aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/fft-test.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-20 20:47:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-20 20:47:46 +0200
commit4da42ebe4486f2960d64135395b1a9ef705d9429 (patch)
tree5e405819aa070d6313851ea324ffaf475523d02f /libavcodec/fft-test.c
parente632a430fe03dace7380c11e2bd62ea418e63abc (diff)
parent005c80b645cc6ab5f30cbc3e10ab66a15dfd107e (diff)
downloadandroid_external_ffmpeg-4da42ebe4486f2960d64135395b1a9ef705d9429.tar.gz
android_external_ffmpeg-4da42ebe4486f2960d64135395b1a9ef705d9429.tar.bz2
android_external_ffmpeg-4da42ebe4486f2960d64135395b1a9ef705d9429.zip
Merge remote-tracking branch 'qatar/master'
* qatar/master: MS Screen 1 decoder aacdec: Fix popping channel layouts. av_gettime: support Win32 without gettimeofday() Use av_gettime() in various places Move av_gettime() to libavutil dct-test: use emms_c() from libavutil instead of duplicating it mov: fix operator precedence bug mathematics.h: remove a couple of math defines Remove unnecessary inclusions of [sys/]time.h lavf: remove unnecessary inclusions of unistd.h bfin: libswscale: add const where appropriate to fix warnings bfin: libswscale: remove unnecessary #includes udp: Properly check for invalid sockets tcp: Check the return value from getsockopt network: Use av_strerror for getting error messages udp: Properly print error from getnameinfo mmst: Use AVUNERROR() to convert error codes to the right range for strerror network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows rtmp: Reduce the number of idle posts sent by sleeping 50ms Conflicts: Changelog configure libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dct-test.c libavcodec/version.h libavformat/riff.c libavformat/udp.c libavutil/Makefile libswscale/bfin/yuv2rgb_bfin.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/fft-test.c')
-rw-r--r--libavcodec/fft-test.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index d2bd0cfecb..a385076bee 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -27,6 +27,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/lfg.h"
#include "libavutil/log.h"
+#include "libavutil/time.h"
#include "fft.h"
#if CONFIG_FFT_FLOAT
#include "dct.h"
@@ -34,7 +35,6 @@
#endif
#include <math.h>
#include <unistd.h>
-#include <sys/time.h>
#include <stdlib.h>
#include <string.h>
@@ -186,13 +186,6 @@ static FFTSample frandom(AVLFG *prng)
return (int16_t)av_lfg_get(prng) / 32768.0 * RANGE;
}
-static int64_t gettime(void)
-{
- struct timeval tv;
- gettimeofday(&tv,NULL);
- return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
-}
-
static int check_diff(FFTSample *tab1, FFTSample *tab2, int n, double scale)
{
int i;
@@ -430,7 +423,7 @@ int main(int argc, char **argv)
/* we measure during about 1 seconds */
nb_its = 1;
for(;;) {
- time_start = gettime();
+ time_start = av_gettime();
for (it = 0; it < nb_its; it++) {
switch (transform) {
case TRANSFORM_MDCT:
@@ -456,7 +449,7 @@ int main(int argc, char **argv)
#endif
}
}
- duration = gettime() - time_start;
+ duration = av_gettime() - time_start;
if (duration >= 1000000)
break;
nb_its *= 2;