diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-15 14:41:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-15 14:42:49 +0100 |
commit | d5560f1fecde7d7a1fa0d6089ec1e8dd68ed8be1 (patch) | |
tree | 57b334dbe9b28921946a77cff43b66928d67699d /libavutil/cpu.c | |
parent | d01f8790d93a5cdb1c943002d480983da0e448df (diff) | |
parent | b7b17ed66e199afc7246e642bf3b35c3f8eca217 (diff) | |
download | ffmpeg-d5560f1fecde7d7a1fa0d6089ec1e8dd68ed8be1.tar.gz |
Merge commit 'b7b17ed66e199afc7246e642bf3b35c3f8eca217'
* commit 'b7b17ed66e199afc7246e642bf3b35c3f8eca217':
aarch64: add cpuflags support for NEON and VFP
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/cpu.c')
-rw-r--r-- | libavutil/cpu.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libavutil/cpu.c b/libavutil/cpu.c index e0806b1856..d53f497fcc 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -56,9 +56,14 @@ int av_get_cpu_flags(void) if (checked) return flags; - if (ARCH_ARM) flags = ff_get_cpu_flags_arm(); - if (ARCH_PPC) flags = ff_get_cpu_flags_ppc(); - if (ARCH_X86) flags = ff_get_cpu_flags_x86(); + if (ARCH_AARCH64) + flags = ff_get_cpu_flags_aarch64(); + if (ARCH_ARM) + flags = ff_get_cpu_flags_arm(); + if (ARCH_PPC) + flags = ff_get_cpu_flags_ppc(); + if (ARCH_X86) + flags = ff_get_cpu_flags_x86(); checked = 1; return flags; @@ -118,6 +123,9 @@ int av_parse_cpu_flags(const char *s) { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" }, { "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFPV3 }, .unit = "flags" }, { "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" }, +#elif ARCH_AARCH64 + { "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" }, + { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" }, #endif { NULL }, }; @@ -244,7 +252,10 @@ static const struct { int flag; const char *name; } cpu_flag_tab[] = { -#if ARCH_ARM +#if ARCH_AARCH64 + { AV_CPU_FLAG_NEON, "neon" }, + { AV_CPU_FLAG_VFP, "vfp" }, +#elif ARCH_ARM { AV_CPU_FLAG_ARMV5TE, "armv5te" }, { AV_CPU_FLAG_ARMV6, "armv6" }, { AV_CPU_FLAG_ARMV6T2, "armv6t2" }, |