diff options
author | Mans Rullgard <mans@mansr.com> | 2012-04-25 20:49:01 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-04-25 23:19:40 +0100 |
commit | b6a6e90a7c79f9530637a1efb62e0af4049822c1 (patch) | |
tree | 11e75da7ffb1702756b6c5da92e4c035738298f3 /libavcodec/fft-test.c | |
parent | 6eca84bad8b0692eeede7ae363b7bdd580d6407d (diff) | |
download | ffmpeg-b6a6e90a7c79f9530637a1efb62e0af4049822c1.tar.gz |
fft-test: add option to set cpuflag mask
This can be useful for testing.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/fft-test.c')
-rw-r--r-- | libavcodec/fft-test.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c index f890de61aa..70c0655ad0 100644 --- a/libavcodec/fft-test.c +++ b/libavcodec/fft-test.c @@ -23,6 +23,7 @@ * FFT and MDCT tests. */ +#include "libavutil/cpu.h" #include "libavutil/mathematics.h" #include "libavutil/lfg.h" #include "libavutil/log.h" @@ -240,6 +241,7 @@ int main(int argc, char **argv) FFTComplex *tab, *tab1, *tab_ref; FFTSample *tab2; int it, i, c; + int cpuflags; int do_speed = 0; int err = 1; enum tf_transform transform = TRANSFORM_FFT; @@ -258,7 +260,7 @@ int main(int argc, char **argv) fft_nbits = 9; for(;;) { - c = getopt(argc, argv, "hsimrdn:f:"); + c = getopt(argc, argv, "hsimrdn:f:c:"); if (c == -1) break; switch(c) { @@ -286,6 +288,12 @@ int main(int argc, char **argv) case 'f': scale = atof(optarg); break; + case 'c': + cpuflags = av_parse_cpu_flags(optarg); + if (cpuflags < 0) + return 1; + av_set_cpu_flags_mask(cpuflags); + break; } } |