aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/arm/mpegvideo_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/mpegvideo_arm.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/mpegvideo_arm.c')
-rw-r--r--libavcodec/arm/mpegvideo_arm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/arm/mpegvideo_arm.c b/libavcodec/arm/mpegvideo_arm.c
index 26eed89930..cce90c75ea 100644
--- a/libavcodec/arm/mpegvideo_arm.c
+++ b/libavcodec/arm/mpegvideo_arm.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/arm/cpu.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/mpegvideo.h"
@@ -40,11 +41,12 @@ void ff_dct_unquantize_h263_intra_neon(MpegEncContext *s, DCTELEM *block,
void ff_MPV_common_init_arm(MpegEncContext *s)
{
-#if HAVE_ARMV5TE
- ff_MPV_common_init_armv5te(s);
-#endif
+ int cpu_flags = av_get_cpu_flags();
+
+ if (have_armv5te(cpu_flags))
+ ff_MPV_common_init_armv5te(s);
- if (HAVE_NEON) {
+ if (have_neon(cpu_flags)) {
s->dct_unquantize_h263_intra = ff_dct_unquantize_h263_intra_neon;
s->dct_unquantize_h263_inter = ff_dct_unquantize_h263_inter_neon;
}