mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-02-16 07:09:53 +08:00
Detect pnacl and disable x86 specific code.
BUG=none TESTED=untested R=ryanpetrie@google.com Review URL: https://webrtc-codereview.appspot.com/7099004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@968 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
ae997018e5
commit
2c8108e6c2
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 967
|
Version: 968
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -382,10 +382,11 @@ int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
|
|||||||
uint8* dst_argb, int dst_stride_argb,
|
uint8* dst_argb, int dst_stride_argb,
|
||||||
int width, int height, int interpolation);
|
int width, int height, int interpolation);
|
||||||
|
|
||||||
#if defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
||||||
defined(TARGET_IPHONE_SIMULATOR)
|
defined(TARGET_IPHONE_SIMULATOR)
|
||||||
#define LIBYUV_DISABLE_X86
|
#define LIBYUV_DISABLE_X86
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Row functions for copying a pixels from a source with a slope to a row
|
// Row functions for copying a pixels from a source with a slope to a row
|
||||||
// of destination. Useful for scaling, rotation, mirror, texture mapping.
|
// of destination. Useful for scaling, rotation, mirror, texture mapping.
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
|
|||||||
@ -37,7 +37,7 @@ extern "C" {
|
|||||||
free(var##_mem); \
|
free(var##_mem); \
|
||||||
var = 0
|
var = 0
|
||||||
|
|
||||||
#if defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
||||||
defined(TARGET_IPHONE_SIMULATOR)
|
defined(TARGET_IPHONE_SIMULATOR)
|
||||||
#define LIBYUV_DISABLE_X86
|
#define LIBYUV_DISABLE_X86
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -18,6 +18,11 @@ namespace libyuv {
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
||||||
|
defined(TARGET_IPHONE_SIMULATOR)
|
||||||
|
#define LIBYUV_DISABLE_X86
|
||||||
|
#endif
|
||||||
|
|
||||||
// The following are available on all x86 platforms:
|
// The following are available on all x86 platforms:
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && \
|
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||||
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
|
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 967
|
#define LIBYUV_VERSION 968
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -13,7 +13,8 @@
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <intrin.h> // For __cpuidex()
|
#include <intrin.h> // For __cpuidex()
|
||||||
#endif
|
#endif
|
||||||
#if !defined(__CLR_VER) && !defined(__native_client__) && defined(_M_X64) && \
|
#if !defined(__pnacl__) && !defined(__CLR_VER) && \
|
||||||
|
!defined(__native_client__) && defined(_M_X64) && \
|
||||||
defined(_MSC_VER) && (_MSC_FULL_VER >= 160040219)
|
defined(_MSC_VER) && (_MSC_FULL_VER >= 160040219)
|
||||||
#include <immintrin.h> // For _xgetbv()
|
#include <immintrin.h> // For _xgetbv()
|
||||||
#endif
|
#endif
|
||||||
@ -42,7 +43,8 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Low level cpuid for X86. Returns zeros on other CPUs.
|
// Low level cpuid for X86. Returns zeros on other CPUs.
|
||||||
#if !defined(__CLR_VER) && (defined(_M_IX86) || defined(_M_X64) || \
|
#if !defined(__pnacl__) && !defined(__CLR_VER) && \
|
||||||
|
(defined(_M_IX86) || defined(_M_X64) || \
|
||||||
defined(__i386__) || defined(__x86_64__))
|
defined(__i386__) || defined(__x86_64__))
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
void CpuId(uint32 info_eax, uint32 info_ecx, uint32* cpu_info) {
|
void CpuId(uint32 info_eax, uint32 info_ecx, uint32* cpu_info) {
|
||||||
@ -179,7 +181,8 @@ static LIBYUV_BOOL TestEnv(const char*) {
|
|||||||
|
|
||||||
LIBYUV_API SAFEBUFFERS
|
LIBYUV_API SAFEBUFFERS
|
||||||
int InitCpuFlags(void) {
|
int InitCpuFlags(void) {
|
||||||
#if !defined(__CLR_VER) && defined(CPU_X86)
|
#if !defined(__pnacl__) && !defined(__CLR_VER) && defined(CPU_X86)
|
||||||
|
|
||||||
uint32 cpu_info1[4] = { 0, 0, 0, 0 };
|
uint32 cpu_info1[4] = { 0, 0, 0, 0 };
|
||||||
uint32 cpu_info7[4] = { 0, 0, 0, 0 };
|
uint32 cpu_info7[4] = { 0, 0, 0, 0 };
|
||||||
CpuId(1, 0, cpu_info1);
|
CpuId(1, 0, cpu_info1);
|
||||||
|
|||||||
@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
#ifdef HAVE_JPEG
|
#ifdef HAVE_JPEG
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#ifndef __CLR_VER
|
|
||||||
|
#if !defined(__pnacl__) && !defined(__CLR_VER) && !defined(COVERAGE_ENABLED) &&\
|
||||||
|
!defined(TARGET_IPHONE_SIMULATOR)
|
||||||
// Must be included before jpeglib.
|
// Must be included before jpeglib.
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#define HAVE_SETJMP
|
#define HAVE_SETJMP
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user