mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-02-09 03:06:44 +08:00
detect neon for ndk but not sdk
BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/366005 git-svn-id: http://libyuv.googlecode.com/svn/trunk@152 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
7be186ab2b
commit
0abb8dda2d
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 151
|
Version: 152
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace libyuv {
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LIBYUV_VERSION 151
|
#define LIBYUV_VERSION 152
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <intrin.h> // For __cpuid()
|
#include <intrin.h> // For __cpuid()
|
||||||
#endif
|
#endif
|
||||||
#ifdef __ANDROID__
|
#if defined(__ANDROID__) && defined(NDK_ROOT)
|
||||||
#include <cpu-features.h> // For android_getCpuFeatures()
|
#include <cpu-features.h> // For android_getCpuFeatures()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ int InitCpuFlags() {
|
|||||||
if (getenv("LIBYUV_DISABLE_SSSE3")) {
|
if (getenv("LIBYUV_DISABLE_SSSE3")) {
|
||||||
cpu_info_ &= ~kCpuHasSSSE3;
|
cpu_info_ &= ~kCpuHasSSSE3;
|
||||||
}
|
}
|
||||||
#elif defined(__ANDROID__) && defined(__ARM_NEON__)
|
#elif defined(__ANDROID__) && defined(__ARM_NEON__) && defined(NDK_ROOT)
|
||||||
uint64_t features = android_getCpuFeatures();
|
uint64_t features = android_getCpuFeatures();
|
||||||
cpu_info_ = ((features & ANDROID_CPU_ARM_FEATURE_NEON) ? kCpuHasNEON : 0) |
|
cpu_info_ = ((features & ANDROID_CPU_ARM_FEATURE_NEON) ? kCpuHasNEON : 0) |
|
||||||
kCpuInitialized;
|
kCpuInitialized;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user