summaryrefslogtreecommitdiff
path: root/libavcodec/arm/h264pred_init_arm.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/h264pred_init_arm.c
parentd7458bc8c62ae1cb2ffc805b989fcddf4029dda6 (diff)
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/h264pred_init_arm.c')
-rw-r--r--libavcodec/arm/h264pred_init_arm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/arm/h264pred_init_arm.c b/libavcodec/arm/h264pred_init_arm.c
index 5fc07bc137..808cc54d5a 100644
--- a/libavcodec/arm/h264pred_init_arm.c
+++ b/libavcodec/arm/h264pred_init_arm.c
@@ -20,6 +20,7 @@
#include <stdint.h>
+#include "libavutil/arm/cpu.h"
#include "libavcodec/h264pred.h"
void ff_pred16x16_vert_neon(uint8_t *src, int stride);
@@ -76,5 +77,8 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b
void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, int bit_depth, const int chroma_format_idc)
{
- if (HAVE_NEON) ff_h264_pred_init_neon(h, codec_id, bit_depth, chroma_format_idc);
+ int cpu_flags = av_get_cpu_flags();
+
+ if (have_neon(cpu_flags))
+ ff_h264_pred_init_neon(h, codec_id, bit_depth, chroma_format_idc);
}