From d526c5338d50d12a54fd95130030c60070707d3e Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sat, 21 Apr 2012 15:31:10 +0100 Subject: 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 --- libavcodec/arm/mpegaudiodsp_init_arm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libavcodec/arm/mpegaudiodsp_init_arm.c') diff --git a/libavcodec/arm/mpegaudiodsp_init_arm.c b/libavcodec/arm/mpegaudiodsp_init_arm.c index 94a5578..a9804e9 100644 --- a/libavcodec/arm/mpegaudiodsp_init_arm.c +++ b/libavcodec/arm/mpegaudiodsp_init_arm.c @@ -19,6 +19,8 @@ */ #include + +#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; } } -- cgit v1.1