Defines for ARM and MIPS CPU types.

This removes a dependency on Chromium's build/build_config.h
(which is not allowed).
The added defines are identical to the ones in build/build_config.h.

NOTRY=True

Review URL: https://codereview.webrtc.org/1532333002

Cr-Commit-Position: refs/heads/master@{#11082}
This commit is contained in:
kjellander
2015-12-18 04:28:42 -08:00
committed by Commit bot
parent ae2c5ad12a
commit 9b7fc7f25d
2 changed files with 9 additions and 9 deletions

View File

@ -12,7 +12,7 @@
#include <string.h> #include <string.h>
#include "build/build_config.h" #include "webrtc/typedefs.h"
#include "webrtc/modules/desktop_capture/differ_block_sse2.h" #include "webrtc/modules/desktop_capture/differ_block_sse2.h"
#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" #include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
@ -38,7 +38,7 @@ bool BlockDifference(const uint8_t* image1,
static bool (*diff_proc)(const uint8_t*, const uint8_t*, int) = NULL; static bool (*diff_proc)(const uint8_t*, const uint8_t*, int) = NULL;
if (!diff_proc) { if (!diff_proc) {
#if defined(ARCH_CPU_ARM_FAMILY) || defined(ARCH_CPU_MIPS_FAMILY) #if defined(WEBRTC_ARCH_ARM_FAMILY) || defined(WEBRTC_ARCH_MIPS_FAMILY)
// For ARM and MIPS processors, always use C version. // For ARM and MIPS processors, always use C version.
// TODO(hclam): Implement a NEON version. // TODO(hclam): Implement a NEON version.
diff_proc = &BlockDifference_C; diff_proc = &BlockDifference_C;

View File

@ -24,6 +24,7 @@
#define WEBRTC_ARCH_64_BITS #define WEBRTC_ARCH_64_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_ARCH_LITTLE_ENDIAN
#elif defined(__aarch64__) #elif defined(__aarch64__)
#define WEBRTC_ARCH_ARM_FAMILY
#define WEBRTC_ARCH_64_BITS #define WEBRTC_ARCH_64_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_ARCH_LITTLE_ENDIAN
#elif defined(_M_IX86) || defined(__i386__) #elif defined(_M_IX86) || defined(__i386__)
@ -32,16 +33,15 @@
#define WEBRTC_ARCH_32_BITS #define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_ARCH_LITTLE_ENDIAN
#elif defined(__ARMEL__) #elif defined(__ARMEL__)
// TODO(ajm): We'd prefer to control platform defines here, but this is #define WEBRTC_ARCH_ARM_FAMILY
// currently provided by the Android makefiles. Commented to avoid duplicate
// definition warnings.
//#define WEBRTC_ARCH_ARM
// TODO(ajm): Chromium uses the following two defines. Should we switch?
//#define WEBRTC_ARCH_ARM_FAMILY
//#define WEBRTC_ARCH_ARMEL
#define WEBRTC_ARCH_32_BITS #define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_ARCH_LITTLE_ENDIAN
#elif defined(__MIPSEL__) #elif defined(__MIPSEL__)
#if defined(__LP64__)
#define WEBRTC_ARCH_MIPS64_FAMILY
#else
#define WEBRTC_ARCH_MIPS_FAMILY
#endif
#define WEBRTC_ARCH_32_BITS #define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN #define WEBRTC_ARCH_LITTLE_ENDIAN
#elif defined(__pnacl__) #elif defined(__pnacl__)