On Wed, 15 Jan 2014, Janne Grunau wrote:

NEON and VFP are currently mandatory for all ARMv8 profiles. Both are
handled as extensions as far as cpuflags are concerned. This is
consistent with handling x86_64 which always has SSE2, but still
handles it as an extension.
---
configure                  | 17 ++++++++++---
libavutil/aarch64/Makefile |  1 +
libavutil/aarch64/asm.S    | 63 ++++++++++++++++++++++++++++++++++++++++++++++
libavutil/aarch64/cpu.c    | 27 ++++++++++++++++++++
libavutil/aarch64/cpu.h    | 35 ++++++++++++++++++++++++++
libavutil/cpu.c            | 19 +++++++++++---
libavutil/cpu_internal.h   |  1 +
7 files changed, 156 insertions(+), 7 deletions(-)
create mode 100644 libavutil/aarch64/Makefile
create mode 100644 libavutil/aarch64/asm.S
create mode 100644 libavutil/aarch64/cpu.c
create mode 100644 libavutil/aarch64/cpu.h

Looks good in general

diff --git a/libavutil/aarch64/cpu.h b/libavutil/aarch64/cpu.h
new file mode 100644
index 0000000..78320f3
--- /dev/null
+++ b/libavutil/aarch64/cpu.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_AARCH64_CPU_H
+#define AVUTIL_AARCH64_CPU_H
+
+#include "config.h"
+#include "libavutil/cpu.h"
+#include "libavutil/cpu_internal.h"
+
+#define have_neon(flags)          CPUEXT(flags, NEON)
+#define have_vfp(flags)           CPUEXT(flags, VFP)
+
+#define have_neon_external(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, NEON)
+#define have_vfp_external(flags)  CPUEXT_SUFFIX(flags, _EXTERNAL, VFP)
+
+#define have_neon_inline(flags)   CPUEXT_SUFFIX(flags, _INLINE, NEON)
+#define have_vfp_inline(flags)    CPUEXT_SUFFIX(flags, _INLINE, VFP)
+
+#endif /* AVUTIL_AARCH64_CPU_H */

I guess the _external and _inline ones aren't really needed any longer now that the suffix-less HAVE_* have been updated to behave like on arm.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to