ARM: allow runtime masking of CPU features
[ffmpeg.git] / libavcodec / arm / vp56dsp_init_arm.c
index 5989602..691db58 100644 (file)
@@ -19,6 +19,8 @@
  */
 
 #include <stdint.h>
+
+#include "libavutil/arm/cpu.h"
 #include "libavcodec/avcodec.h"
 #include "libavcodec/vp56dsp.h"
 
@@ -27,7 +29,9 @@ void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t);
 
 void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec)
 {
-    if (codec != CODEC_ID_VP5 && HAVE_NEON) {
+    int cpu_flags = av_get_cpu_flags();
+
+    if (codec != CODEC_ID_VP5 && have_neon(cpu_flags)) {
         s->edge_filter_hor = ff_vp6_edge_filter_hor_neon;
         s->edge_filter_ver = ff_vp6_edge_filter_ver_neon;
     }