shithub: openh264

Download patch

ref: 66deed24b8f50a3e08976910bcd668bab86611df
parent: 894f073e4b64d66c9825c245b6f2c5da10494056
author: Martin Storsjö <[email protected]>
date: Fri Jun 27 16:13:46 EDT 2014

Implement WelsCPUFeatureDetect for AArch64

Previously it actually didn't return any cpu flags at all.

--- 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;