From 1b9df4c5c85ca9ff161249a8ffbaeda2f5edf5df Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Tue, 24 Jun 2014 22:26:30 +0000 Subject: [PATCH] Add nacl version check to enable Neon on M37 and bundles for X86 on M33 BUG=333 TESTED=nacl build and validate R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/20769004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1019 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/row.h | 14 +++++++++++--- include/libyuv/version.h | 2 +- source/row_neon.cc | 3 +-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.chromium b/README.chromium index d1a759400..591fc3a85 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1018 +Version: 1019 License: BSD License File: LICENSE diff --git a/include/libyuv/row.h b/include/libyuv/row.h index d9d23339d..d45a3ea1f 100644 --- a/include/libyuv/row.h +++ b/include/libyuv/row.h @@ -15,6 +15,10 @@ #include "libyuv/basic_types.h" +#if defined(__native_client__) +#include "ppapi/c/pp_macros.h" // For PPAPI_RELEASE +#endif + #ifdef __cplusplus namespace libyuv { extern "C" { @@ -47,7 +51,12 @@ extern "C" { #endif // Enable for NaCL pepper 33 for bundle and AVX2 support. -// #define NEW_BINUTILS +#if defined(__native_client__) && PPAPI_RELEASE >= 33 +#define NEW_BINUTILS +#endif +#if defined(__native_client__) && defined(__arm__) && PPAPI_RELEASE < 37 +#define LIBYUV_DISABLE_NEON +#endif // The following are available on all x86 platforms: #if !defined(LIBYUV_DISABLE_X86) && \ @@ -242,8 +251,7 @@ extern "C" { // The following are available on Neon platforms: #if !defined(LIBYUV_DISABLE_NEON) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON)) && \ - !defined(__native_client__) + (defined(__ARM_NEON__) || defined(LIBYUV_NEON)) #define HAS_ABGRTOUVROW_NEON #define HAS_ABGRTOYROW_NEON #define HAS_ARGB1555TOARGBROW_NEON diff --git a/include/libyuv/version.h b/include/libyuv/version.h index b6ace33de..43fb7f432 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 1018 +#define LIBYUV_VERSION 1019 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/row_neon.cc b/source/row_neon.cc index 3c5a90a2d..a84e3e468 100644 --- a/source/row_neon.cc +++ b/source/row_neon.cc @@ -16,8 +16,7 @@ extern "C" { #endif // This module is for GCC Neon -#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__) && \ - !defined(__native_client__) +#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__) // Read 8 Y, 4 U and 4 V from 422 #define READYUV422 \