aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/arm/dsputil_init_vfp.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-04-21 15:31:10 +0100
committerMans Rullgard <mans@mansr.com>2012-04-22 12:30:45 +0100
commitd526c5338d50d12a54fd95130030c60070707d3e (patch)
tree5cac97b8414872d2bdf977292e63ef8edf3eb49a /libavcodec/arm/dsputil_init_vfp.c
parentd7458bc8c62ae1cb2ffc805b989fcddf4029dda6 (diff)
downloadffmpeg-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/dsputil_init_vfp.c')
-rw-r--r--libavcodec/arm/dsputil_init_vfp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/arm/dsputil_init_vfp.c b/libavcodec/arm/dsputil_init_vfp.c
index 9cda890411..d5e2d3b4ef 100644
--- a/libavcodec/arm/dsputil_init_vfp.c
+++ b/libavcodec/arm/dsputil_init_vfp.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/arm/cpu.h"
#include "libavcodec/dsputil.h"
#include "dsputil_arm.h"
@@ -28,7 +29,9 @@ void ff_vector_fmul_reverse_vfp(float *dst, const float *src0,
void ff_dsputil_init_vfp(DSPContext* c, AVCodecContext *avctx)
{
- if (!HAVE_VFPV3)
+ int cpu_flags = av_get_cpu_flags();
+
+ if (!have_vfpv3(cpu_flags))
c->vector_fmul = ff_vector_fmul_vfp;
c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp;
}