diff options
author | Mans Rullgard <mans@mansr.com> | 2012-04-21 15:31:10 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-04-22 12:30:45 +0100 |
commit | d526c5338d50d12a54fd95130030c60070707d3e (patch) | |
tree | 5cac97b8414872d2bdf977292e63ef8edf3eb49a /libavcodec/arm/fft_init_arm.c | |
parent | d7458bc8c62ae1cb2ffc805b989fcddf4029dda6 (diff) | |
download | ffmpeg-d526c5338d50d12a54fd95130030c60070707d3e.tar.gz |
ARM: allow runtime masking of CPU features
This allows masking CPU features with the -cpuflags avconv option
which is useful for testing different optimisations without rebuilding.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/arm/fft_init_arm.c')
-rw-r--r-- | libavcodec/arm/fft_init_arm.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavcodec/arm/fft_init_arm.c b/libavcodec/arm/fft_init_arm.c index b2c3b721fd..9ec620f2d2 100644 --- a/libavcodec/arm/fft_init_arm.c +++ b/libavcodec/arm/fft_init_arm.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/arm/cpu.h" #include "libavcodec/fft.h" #include "libavcodec/rdft.h" #include "libavcodec/synth_filter.h" @@ -39,7 +40,9 @@ void ff_synth_filter_float_neon(FFTContext *imdct, av_cold void ff_fft_init_arm(FFTContext *s) { - if (HAVE_NEON) { + int cpu_flags = av_get_cpu_flags(); + + if (have_neon(cpu_flags)) { s->fft_permute = ff_fft_permute_neon; s->fft_calc = ff_fft_calc_neon; #if CONFIG_MDCT @@ -54,7 +57,9 @@ av_cold void ff_fft_init_arm(FFTContext *s) #if CONFIG_RDFT av_cold void ff_rdft_init_arm(RDFTContext *s) { - if (HAVE_NEON) + int cpu_flags = av_get_cpu_flags(); + + if (have_neon(cpu_flags)) s->rdft_calc = ff_rdft_calc_neon; } #endif @@ -62,7 +67,9 @@ av_cold void ff_rdft_init_arm(RDFTContext *s) #if CONFIG_DCA_DECODER av_cold void ff_synth_filter_init_arm(SynthFilterContext *s) { - if (HAVE_NEON) + int cpu_flags = av_get_cpu_flags(); + + if (have_neon(cpu_flags)) s->synth_filter_float = ff_synth_filter_float_neon; } #endif |