shithub: openh264

Download patch

ref: cbe67d7e1f131b12d9eecbfc01198b915e114d3b
parent: 01068cc9b967e4931d9a584930304d8ca317ebbd
parent: 7b2f4058c9beb797877b0392bcc34a3e3f6767f6
author: guangwei <GuangweiWang@users.noreply.github.com>
date: Thu Dec 14 10:02:37 EST 2017

Merge pull request #2878 from evivrus510/enable-neon-chromeos

Enable NEON for ChromeOS devices

--- a/codec/common/src/cpu.cpp
+++ b/codec/common/src/cpu.cpp
@@ -258,13 +258,18 @@
 
 /* Generic arm/linux cpu feature detection */
 uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
+  int flags = 0;
   FILE* f = fopen ("/proc/cpuinfo", "r");
 
-  if (!f)
-    return 0;
+#if defined(__chromeos__)
+  flags |= WELS_CPU_NEON;
+#endif
 
+  if (!f) {
+    return flags;
+  }
+
   char buf[200];
-  int flags = 0;
   while (fgets (buf, sizeof (buf), f)) {
     if (!strncmp (buf, "Features", strlen ("Features"))) {
       // The asimd and fp features are listed on 64 bit ARMv8 kernels