From 6e618676dc9971a67dbe15c3472df62fcec23095 Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Sat, 8 Mar 2014 00:23:04 +0000 Subject: [PATCH] More wordy comments about Neon BUG=315 TESTED=untested R=wuwang@google.com Review URL: https://webrtc-codereview.appspot.com/9599004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@982 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/cpu_id.cc | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.chromium b/README.chromium index 039760664..c1a2b7d11 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 981 +Version: 982 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 543d5e09f..6796fe51a 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 981 +#define LIBYUV_VERSION 982 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/cpu_id.cc b/source/cpu_id.cc index bc051e022..112460e71 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -122,7 +122,9 @@ LIBYUV_API SAFEBUFFERS int ArmCpuCaps(const char* cpuinfo_name) { FILE* f = fopen(cpuinfo_name, "r"); if (!f) { - return kCpuHasNEON; // Assume Neon if /proc/cpuinfo is unavailable. + // Assume Neon if /proc/cpuinfo is unavailable. + // This will occur for Chrome sandbox for Pepper or Render process. + return kCpuHasNEON; } char cpuinfo_line[512]; while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f)) { @@ -248,10 +250,10 @@ int InitCpuFlags(void) { cpu_info_ &= ~kCpuHasMIPS_DSPR2; } #elif defined(__arm__) +// gcc -mfpu=neon defines __ARM_NEON__ +// __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon. +// For Linux, /proc/cpuinfo can be tested but without that assume Neon. #if defined(__ARM_NEON__) || defined(__native_client__) || !defined(__linux__) - // gcc -mfpu=neon defines __ARM_NEON__ - // Enable Neon if you want support for Neon and Arm, and use MaskCpuFlags - // to disable Neon on devices that do not have it. cpu_info_ = kCpuHasNEON; #else // Linux arm parse text file for neon detect.