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>
This commit is contained in:
Mans Rullgard
2012-04-21 15:31:10 +01:00
parent d7458bc8c6
commit d526c5338d
20 changed files with 164 additions and 25 deletions

View File

@@ -17,6 +17,8 @@
*/
#include <stdint.h>
#include "libavutil/arm/cpu.h"
#include "libavcodec/vp8dsp.h"
void ff_vp8_luma_dc_wht_neon(DCTELEM block[4][4][16], DCTELEM dc[16]);
@@ -83,7 +85,9 @@ VP8_MC(bilin4_hv);
av_cold void ff_vp8dsp_init_arm(VP8DSPContext *dsp)
{
if (HAVE_NEON) {
int cpu_flags = av_get_cpu_flags();
if (have_neon(cpu_flags)) {
dsp->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_neon;
dsp->vp8_luma_dc_wht_dc = ff_vp8_luma_dc_wht_dc_neon;