mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Merge commit '8675bcb0addb1c7fb0b04682d1f3f95d5b8dae14'
* commit '8675bcb0addb1c7fb0b04682d1f3f95d5b8dae14': aarch64: add armv8 CPU flag Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
4c57c6a765
2
Makefile
2
Makefile
@ -73,7 +73,7 @@ config.h: .config
|
|||||||
|
|
||||||
SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS \
|
SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS \
|
||||||
HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS \
|
HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS \
|
||||||
ARMV5TE-OBJS ARMV6-OBJS VFP-OBJS NEON-OBJS \
|
ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \
|
||||||
ALTIVEC-OBJS MMX-OBJS YASM-OBJS \
|
ALTIVEC-OBJS MMX-OBJS YASM-OBJS \
|
||||||
MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSPR1-OBJS MIPS32R2-OBJS \
|
MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSPR1-OBJS MIPS32R2-OBJS \
|
||||||
OBJS SLIBOBJS HOSTOBJS TESTOBJS
|
OBJS SLIBOBJS HOSTOBJS TESTOBJS
|
||||||
|
1
arch.mak
1
arch.mak
@ -1,5 +1,6 @@
|
|||||||
OBJS-$(HAVE_ARMV5TE) += $(ARMV5TE-OBJS) $(ARMV5TE-OBJS-yes)
|
OBJS-$(HAVE_ARMV5TE) += $(ARMV5TE-OBJS) $(ARMV5TE-OBJS-yes)
|
||||||
OBJS-$(HAVE_ARMV6) += $(ARMV6-OBJS) $(ARMV6-OBJS-yes)
|
OBJS-$(HAVE_ARMV6) += $(ARMV6-OBJS) $(ARMV6-OBJS-yes)
|
||||||
|
OBJS-$(HAVE_ARMV8) += $(ARMV8-OBJS) $(ARMV8-OBJS-yes)
|
||||||
OBJS-$(HAVE_VFP) += $(VFP-OBJS) $(VFP-OBJS-yes)
|
OBJS-$(HAVE_VFP) += $(VFP-OBJS) $(VFP-OBJS-yes)
|
||||||
OBJS-$(HAVE_NEON) += $(NEON-OBJS) $(NEON-OBJS-yes)
|
OBJS-$(HAVE_NEON) += $(NEON-OBJS) $(NEON-OBJS-yes)
|
||||||
|
|
||||||
|
3
configure
vendored
3
configure
vendored
@ -1494,6 +1494,7 @@ ARCH_EXT_LIST_ARM="
|
|||||||
armv5te
|
armv5te
|
||||||
armv6
|
armv6
|
||||||
armv6t2
|
armv6t2
|
||||||
|
armv8
|
||||||
neon
|
neon
|
||||||
vfp
|
vfp
|
||||||
vfpv3
|
vfpv3
|
||||||
@ -1887,6 +1888,7 @@ CMDLINE_APPEND="
|
|||||||
armv5te_deps="arm"
|
armv5te_deps="arm"
|
||||||
armv6_deps="arm"
|
armv6_deps="arm"
|
||||||
armv6t2_deps="arm"
|
armv6t2_deps="arm"
|
||||||
|
armv8_deps="aarch64"
|
||||||
neon_deps_any="aarch64 arm"
|
neon_deps_any="aarch64 arm"
|
||||||
vfp_deps_any="aarch64 arm"
|
vfp_deps_any="aarch64 arm"
|
||||||
vfpv3_deps="vfp"
|
vfpv3_deps="vfp"
|
||||||
@ -4218,6 +4220,7 @@ check_inline_asm inline_asm_labels '"1:\n"'
|
|||||||
check_inline_asm inline_asm_nonlocal_labels '"Label:\n"'
|
check_inline_asm inline_asm_nonlocal_labels '"Label:\n"'
|
||||||
|
|
||||||
if enabled aarch64; then
|
if enabled aarch64; then
|
||||||
|
enabled armv8 && check_insn armv8 'prfm pldl1strm, [x0]'
|
||||||
# internal assembler in clang 3.3 does not support this instruction
|
# internal assembler in clang 3.3 does not support this instruction
|
||||||
enabled neon && check_insn neon 'ext v0.8B, v0.8B, v1.8B, #1'
|
enabled neon && check_insn neon 'ext v0.8B, v0.8B, v1.8B, #1'
|
||||||
enabled vfp && check_insn vfp 'fmadd d0, d0, d1, d2'
|
enabled vfp && check_insn vfp 'fmadd d0, d0, d1, d2'
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
int ff_get_cpu_flags_aarch64(void)
|
int ff_get_cpu_flags_aarch64(void)
|
||||||
{
|
{
|
||||||
return AV_CPU_FLAG_NEON * HAVE_NEON |
|
return AV_CPU_FLAG_ARMV8 * HAVE_ARMV8 |
|
||||||
AV_CPU_FLAG_VFP * HAVE_VFP;
|
AV_CPU_FLAG_NEON * HAVE_NEON |
|
||||||
|
AV_CPU_FLAG_VFP * HAVE_VFP;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "libavutil/cpu.h"
|
#include "libavutil/cpu.h"
|
||||||
#include "libavutil/cpu_internal.h"
|
#include "libavutil/cpu_internal.h"
|
||||||
|
|
||||||
|
#define have_armv8(flags) CPUEXT(flags, ARMV8)
|
||||||
#define have_neon(flags) CPUEXT(flags, NEON)
|
#define have_neon(flags) CPUEXT(flags, NEON)
|
||||||
#define have_vfp(flags) CPUEXT(flags, VFP)
|
#define have_vfp(flags) CPUEXT(flags, VFP)
|
||||||
|
|
||||||
|
@ -130,6 +130,7 @@ int av_parse_cpu_flags(const char *s)
|
|||||||
{ "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFPV3 }, .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" },
|
{ "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" },
|
||||||
#elif ARCH_AARCH64
|
#elif ARCH_AARCH64
|
||||||
|
{ "armv8", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ARMV8 }, .unit = "flags" },
|
||||||
{ "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" },
|
{ "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" },
|
{ "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" },
|
||||||
#endif
|
#endif
|
||||||
@ -263,6 +264,7 @@ static const struct {
|
|||||||
const char *name;
|
const char *name;
|
||||||
} cpu_flag_tab[] = {
|
} cpu_flag_tab[] = {
|
||||||
#if ARCH_AARCH64
|
#if ARCH_AARCH64
|
||||||
|
{ AV_CPU_FLAG_ARMV8, "armv8" },
|
||||||
{ AV_CPU_FLAG_NEON, "neon" },
|
{ AV_CPU_FLAG_NEON, "neon" },
|
||||||
{ AV_CPU_FLAG_VFP, "vfp" },
|
{ AV_CPU_FLAG_VFP, "vfp" },
|
||||||
#elif ARCH_ARM
|
#elif ARCH_ARM
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
#define AV_CPU_FLAG_VFP (1 << 3)
|
#define AV_CPU_FLAG_VFP (1 << 3)
|
||||||
#define AV_CPU_FLAG_VFPV3 (1 << 4)
|
#define AV_CPU_FLAG_VFPV3 (1 << 4)
|
||||||
#define AV_CPU_FLAG_NEON (1 << 5)
|
#define AV_CPU_FLAG_NEON (1 << 5)
|
||||||
|
#define AV_CPU_FLAG_ARMV8 (1 << 6)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the flags which specify extensions supported by the CPU.
|
* Return the flags which specify extensions supported by the CPU.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user