ref: 58349156b1544d65a1ddc65f1e7f3d251e4f3415
parent: fd132aba0f2e02193b0854a9693b04e0ef740175
parent: 66deed24b8f50a3e08976910bcd668bab86611df
author: zhilwang <[email protected]>
date: Mon Jun 30 06:04:03 EDT 2014
Merge pull request #1035 from mstorsjo/aarch64-cpufeatures Implement WelsCPUFeatureDetect for AArch64
--- a/codec/common/src/cpu.cpp
+++ b/codec/common/src/cpu.cpp
@@ -280,7 +280,19 @@
WELS_CPU_NEON;
}
#endif
-#else /* Neither X86_ASM nor HAVE_NEON */
+#elif defined(HAVE_NEON_AARCH64)
+
+/* For AArch64, no runtime detection actually is necessary for now, since
+ * NEON and VFPv3 is mandatory on all such CPUs. (/proc/cpuinfo doesn't
+ * contain neon, and the android cpufeatures library doesn't return it
+ * either.) */
+
+uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
+ return WELS_CPU_VFPv3 |
+ WELS_CPU_NEON;
+}
+
+#else /* Neither X86_ASM, HAVE_NEON nor HAVE_NEON_AARCH64 */
uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
return 0;