[vlc-commits] Revert ARM part of [806505a4f]

Rafaël Carré git at videolan.org
Mon Aug 29 14:43:07 CEST 2011


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Mon Aug 29 08:42:04 2011 -0400| [7bb289c4d1564a66efa59879956d51beef6eb8dd] | committer: Rafaël Carré

Revert ARM part of [806505a4f]

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7bb289c4d1564a66efa59879956d51beef6eb8dd
---

 src/misc/cpu.c |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/misc/cpu.c b/src/misc/cpu.c
index 490fe5c..813f2fd 100644
--- a/src/misc/cpu.c
+++ b/src/misc/cpu.c
@@ -257,6 +257,10 @@ out:
 # if defined (__ARM_NEON__)
     i_capabilities |= CPU_CAPABILITY_NEON;
 # elif defined (CAN_COMPILE_NEON)
+#  define NEED_RUNTIME_CPU_CHECK 1
+# endif
+
+# ifdef NEED_RUNTIME_CPU_CHECK
 #  if defined (__linux__)
     FILE *info = fopen ("/proc/cpuinfo", "rt");
     if (info != NULL)
@@ -266,16 +270,18 @@ out:
 
         while (getline (&line, &linelen, info) != -1)
         {
-             const char *cap;
+            const char *cap;
 
-             if (strncmp (line, "Features\t:", 10))
-                 continue;
+            if (strncmp (line, "Features\t:", 10))
+                continue;
 
-             cap = strstr (line + 10, " neon");
-             if (cap != NULL && (cap[5] == '\0' || cap[5] == ' '))
-                 i_capabilities |= CPU_CAPABILITY_NEON;
-
-             break;
+            /* TODO: detect other CPU features when we use them */
+#   if defined (CAN_COMPILE_NEON) && !defined (__ARM_NEON__)
+                cap = strstr (line + 10, " neon");
+            if (cap != NULL && (cap[5] == '\0' || cap[5] == ' '))
+                i_capabilities |= CPU_CAPABILITY_NEON;
+#   endif
+            break;
         }
         fclose (info);
         free (line);



More information about the vlc-commits mailing list