diff options
author | Mans Rullgard <mans@mansr.com> | 2012-04-25 18:11:33 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-04-25 23:19:40 +0100 |
commit | 6eca84bad8b0692eeede7ae363b7bdd580d6407d (patch) | |
tree | 1ede5f4178a5145e01cce110e23ccecc17dacb7f | |
parent | 3527a7393392b80e1780cbb24b7d8c91a51a7a18 (diff) | |
download | ffmpeg-6eca84bad8b0692eeede7ae363b7bdd580d6407d.tar.gz |
cpu: recognise only cpu flag names pertinent to the architecture
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r-- | libavutil/cpu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavutil/cpu.c b/libavutil/cpu.c index d11ff40d83..6532744d2b 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -63,7 +63,9 @@ int av_parse_cpu_flags(const char *s) #define CPUFLAG_FMA4 (AV_CPU_FLAG_FMA4 | CPUFLAG_AVX) static const AVOption cpuflags_opts[] = { { "flags" , NULL, 0, AV_OPT_TYPE_FLAGS, { 0 }, INT64_MIN, INT64_MAX, .unit = "flags" }, +#if ARCH_PPC { "altivec" , NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ALTIVEC }, .unit = "flags" }, +#elif ARCH_X86 { "mmx" , NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_MMX }, .unit = "flags" }, { "mmx2" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_MMX2 }, .unit = "flags" }, { "sse" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_SSE }, .unit = "flags" }, @@ -80,14 +82,14 @@ int av_parse_cpu_flags(const char *s) { "fma4" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_FMA4 }, .unit = "flags" }, { "3dnow" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_3DNOW }, .unit = "flags" }, { "3dnowext", NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_3DNOWEXT }, .unit = "flags" }, - +#elif ARCH_ARM { "armv5te", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV5TE }, .unit = "flags" }, { "armv6", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV6 }, .unit = "flags" }, { "armv6t2", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV6T2 }, .unit = "flags" }, { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_VFP }, .unit = "flags" }, { "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_VFPV3 }, .unit = "flags" }, { "neon", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_NEON }, .unit = "flags" }, - +#endif { NULL }, }; static const AVClass class = { |