summaryrefslogtreecommitdiff
path: root/libavcodec/fft-test.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-03-20 11:48:27 +0000
committerDiego Biurrun <diego@biurrun.de>2009-03-20 11:48:27 +0000
commit294eaa26437edf29d866b0bf63d7de57515a0f95 (patch)
tree605c390daa352a0400dae8422e65af9487f122c4 /libavcodec/fft-test.c
parentc7594e0764d9d41ec4fb6b14deacd3cc6eafc4b3 (diff)
downloadffmpeg-294eaa26437edf29d866b0bf63d7de57515a0f95.tar.gz
Replace random() usage in test programs by av_lfg_*().
Originally committed as revision 18070 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/fft-test.c')
-rw-r--r--libavcodec/fft-test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index 92a09611a6..4f1ce982de 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -23,6 +23,7 @@
* FFT and MDCT tests.
*/
+#include "libavutil/lfg.h"
#include "dsputil.h"
#include <math.h>
#include <unistd.h>
@@ -31,7 +32,6 @@
#include <string.h>
#undef exit
-#undef random
/* reference fft */
@@ -131,7 +131,9 @@ void mdct_ref(float *output, float *input, int nbits)
float frandom(void)
{
- return (float)((random() & 0xffff) - 32768) / 32768.0;
+ AVLFG prn;
+ av_lfg_init(&prn, 1);
+ return (float)((av_lfg_get(&prn) & 0xffff) - 32768) / 32768.0;
}
int64_t gettime(void)