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/mpegaudiodsp_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/mpegaudiodsp_init_arm.c')
-rw-r--r-- | libavcodec/arm/mpegaudiodsp_init_arm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/arm/mpegaudiodsp_init_arm.c b/libavcodec/arm/mpegaudiodsp_init_arm.c index 94a55787ad..a9804e976c 100644 --- a/libavcodec/arm/mpegaudiodsp_init_arm.c +++ b/libavcodec/arm/mpegaudiodsp_init_arm.c @@ -19,6 +19,8 @@ */ #include <stdint.h> + +#include "libavutil/arm/cpu.h" #include "libavcodec/mpegaudiodsp.h" #include "config.h" @@ -27,7 +29,9 @@ void ff_mpadsp_apply_window_fixed_armv6(int32_t *synth_buf, int32_t *window, void ff_mpadsp_init_arm(MPADSPContext *s) { - if (HAVE_ARMV6) { + int cpu_flags = av_get_cpu_flags(); + + if (have_armv6(cpu_flags)) { s->apply_window_fixed = ff_mpadsp_apply_window_fixed_armv6; } } |