Change YUV_DISABLE_ASM to LIBYUV_DISABLE_NEON, LIBYUV_DISABLE_MIPS, LIBYUV_DISABLE_X86

BUG=189
TESTED=try
Review URL: https://webrtc-codereview.appspot.com/1113006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@582 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
fbarchard@google.com 2013-02-27 00:20:29 +00:00
parent 928483f397
commit 83a63e65a6
26 changed files with 75 additions and 80 deletions

View File

@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 581
Version: 582
License: BSD
License File: LICENSE

View File

@ -324,7 +324,7 @@ int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
#if defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
defined(TARGET_IPHONE_SIMULATOR)
#define YUV_DISABLE_ASM
#define LIBYUV_DISABLE_X86
#endif
// Row functions for copying a pixels from a source with a slope to a row
// of destination. Useful for scaling, rotation, mirror, texture mapping.
@ -332,13 +332,13 @@ LIBYUV_API
void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride,
uint8* dst_argb, const float* uv_dudv, int width);
// The following are available on all x86 platforms:
#if !defined(YUV_DISABLE_ASM) && \
#if !defined(LIBYUV_DISABLE_X86) && \
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
LIBYUV_API
void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
uint8* dst_argb, const float* uv_dudv, int width);
#define HAS_ARGBAFFINEROW_SSE2
#endif
#endif // LIBYUV_DISABLE_X86
#ifdef __cplusplus
} // extern "C"

View File

@ -24,7 +24,7 @@ extern "C" {
#if defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
defined(TARGET_IPHONE_SIMULATOR)
#define YUV_DISABLE_ASM
#define LIBYUV_DISABLE_X86
#endif
// True if compiling for SSSE3 as a requirement.
#if defined(__SSSE3__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 3))
@ -32,7 +32,7 @@ extern "C" {
#endif
// The following are available on all x86 platforms:
#if !defined(YUV_DISABLE_ASM) && \
#if !defined(LIBYUV_DISABLE_X86) && \
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
// Conversions.
#define HAS_ABGRTOARGBROW_SSSE3
@ -121,7 +121,7 @@ extern "C" {
// The following are Windows only.
// TODO(fbarchard): Port to gcc.
#if !defined(YUV_DISABLE_ASM) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#define HAS_ARGBCOLORTABLEROW_X86
#define HAS_COPYROW_AVX2
// Visual C 2012 required for AVX2.
@ -146,7 +146,7 @@ extern "C" {
// The following are Yasm x86 only.
// TODO(fbarchard): Port AVX2 to inline.
#if !defined(YUV_DISABLE_ASM) && defined(HAVE_YASM)
#if !defined(LIBYUV_DISABLE_X86) && defined(HAVE_YASM)
(defined(_M_IX86) || defined(_M_X64) || \
defined(__x86_64__) || defined(__i386__))
#define HAS_SPLITUVROW_AVX2
@ -160,7 +160,7 @@ extern "C" {
#endif
// The following are disabled when SSSE3 is available:
#if !defined(YUV_DISABLE_ASM) && \
#if !defined(LIBYUV_DISABLE_X86) && \
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) && \
!defined(LIBYUV_SSSE3_ONLY)
#define HAS_ARGBATTENUATEROW_SSE2
@ -169,7 +169,7 @@ extern "C" {
#endif
// The following are available on Neon platforms
#if !defined(YUV_DISABLE_ASM) && (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#if !defined(LIBYUV_DISABLE_NEON) && (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_ABGRTOARGBROW_NEON
#define HAS_ABGRTOUVROW_NEON
#define HAS_ABGRTOYROW_NEON
@ -257,7 +257,7 @@ extern "C" {
#endif
// The following are available on Mips platforms
#if !defined(YUV_DISABLE_ASM) && defined(__mips__)
#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__)
#define HAS_COPYROW_MIPS
#if defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#define HAS_SPLITUVROW_MIPS_DSPR2

View File

@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 581
#define LIBYUV_VERSION 582
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT

View File

@ -30,6 +30,9 @@
],
'defines': [
'HAVE_JPEG',
# 'LIBYUV_DISABLE_X86',
# 'LIBYUV_DISABLE_NEON',
# 'LIBYUV_DISABLE_MIPS',
# 'LIBYUV_BUILDING_SHARED_LIBRARY',
],
'include_dirs': [

View File

@ -19,6 +19,9 @@
],
'defines': [
'LIBYUV_SVNREVISION="<!(svnversion -n)"',
# 'LIBYUV_DISABLE_X86',
# 'LIBYUV_DISABLE_NEON',
# 'LIBYUV_DISABLE_MIPS',
# 'LIBYUV_USING_SHARED_LIBRARY',
],
'sources': [

View File

@ -30,7 +30,7 @@ extern "C" {
uint32 HashDjb2_C(const uint8* src, int count, uint32 seed);
// This module is for Visual C x86
#if !defined(YUV_DISABLE_ASM) && (defined(_M_IX86) || \
#if !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || \
(defined(__x86_64__) || (defined(__i386__) && !defined(__pic__))))
#define HAS_HASHDJB2_SSE41
@ -68,17 +68,18 @@ uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed) {
}
uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count);
#if !defined(YUV_DISABLE_ASM) && (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#if !defined(LIBYUV_DISABLE_NEON) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_SUMSQUAREERROR_NEON
uint32 SumSquareError_NEON(const uint8* src_a, const uint8* src_b, int count);
#endif
#if !defined(YUV_DISABLE_ASM) && (defined(_M_IX86) || \
#if !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || \
defined(__x86_64__) || defined(__i386__))
#define HAS_SUMSQUAREERROR_SSE2
uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count);
#endif
// Visual C 2012 required for AVX2.
#if !defined(YUV_DISABLE_ASM) && defined(_M_IX86) && _MSC_VER >= 1700
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && _MSC_VER >= 1700
#define HAS_SUMSQUAREERROR_AVX2
uint32 SumSquareError_AVX2(const uint8* src_a, const uint8* src_b, int count);
#endif

View File

@ -15,7 +15,7 @@ namespace libyuv {
extern "C" {
#endif
#if !defined(YUV_DISABLE_ASM) && defined(__ARM_NEON__)
#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__)
uint32 SumSquareError_NEON(const uint8* src_a, const uint8* src_b, int count) {
volatile uint32 sse;

View File

@ -16,7 +16,7 @@ namespace libyuv {
extern "C" {
#endif
#if !defined(YUV_DISABLE_ASM) && (defined(__x86_64__) || defined(__i386__))
#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) {
uint32 sse;
@ -64,7 +64,7 @@ uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) {
#endif // defined(__x86_64__) || defined(__i386__)
#if !defined(YUV_DISABLE_ASM) && \
#if !defined(LIBYUV_DISABLE_X86) && \
(defined(__x86_64__) || (defined(__i386__) && !defined(__pic__)))
// GCC 4.2 on OSX has link error when passing static or const to inline.
// TODO(fbarchard): Use static const when gcc 4.2 support is dropped.

View File

@ -16,7 +16,7 @@ namespace libyuv {
extern "C" {
#endif
#if !defined(YUV_DISABLE_ASM) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
__declspec(naked) __declspec(align(16))
uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) {
@ -183,7 +183,7 @@ uint32 HashDjb2_SSE41(const uint8* src, int count, uint32 seed) {
ret
}
}
#endif // !defined(YUV_DISABLE_ASM) && defined(_M_IX86)
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#ifdef __cplusplus
} // extern "C"

View File

@ -133,11 +133,12 @@ int I422ToI420(const uint8* src_y, int src_stride_y,
// Blends 32x2 pixels to 16x1
// source in scale.cc
#if !defined(YUV_DISABLE_ASM) && (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#if !defined(LIBYUV_DISABLE_NEON) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_SCALEROWDOWN2_NEON
void ScaleRowDown2Int_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width);
#elif !defined(YUV_DISABLE_ASM) && \
#elif !defined(LIBYUV_DISABLE_X86) && \
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
void ScaleRowDown2Int_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,

View File

@ -20,7 +20,7 @@ namespace libyuv {
extern "C" {
#endif
#if !defined(YUV_DISABLE_ASM) && \
#if !defined(LIBYUV_DISABLE_X86) && \
(defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
#if defined(__APPLE__) && defined(__i386__)
#define DECLARE_FUNCTION(name) \
@ -41,7 +41,8 @@ extern "C" {
#endif
#endif
#if !defined(YUV_DISABLE_ASM) && (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#if !defined(LIBYUV_DISABLE_NEON) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_MIRRORROW_NEON
void MirrorRow_NEON(const uint8* src, uint8* dst, int width);
#define HAS_MIRRORROW_UV_NEON
@ -56,8 +57,8 @@ void TransposeUVWx8_NEON(const uint8* src, int src_stride,
int width);
#endif // defined(__ARM_NEON__)
#if !defined(YUV_DISABLE_ASM) && defined(__mips__)
#if defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__) && \
defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#define HAS_TRANSPOSE_WX8_MIPS_DSPR2
void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride,
uint8* dst, int dst_stride, int width);
@ -69,11 +70,9 @@ void TransposeUVWx8_MIPS_DSPR2(const uint8* src, int src_stride,
uint8* dst_a, int dst_stride_a,
uint8* dst_b, int dst_stride_b,
int width);
#endif
#endif
#endif // defined(__mips__)
#if !defined(YUV_DISABLE_ASM) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#define HAS_TRANSPOSE_WX8_SSSE3
__declspec(naked) __declspec(align(16))
static void TransposeWx8_SSSE3(const uint8* src, int src_stride,
@ -295,7 +294,7 @@ static void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
ret
}
}
#elif !defined(YUV_DISABLE_ASM) && (defined(__i386__) || defined(__x86_64__))
#elif !defined(LIBYUV_DISABLE_X86) && (defined(__i386__) || defined(__x86_64__))
#define HAS_TRANSPOSE_WX8_SSSE3
static void TransposeWx8_SSSE3(const uint8* src, int src_stride,
uint8* dst, int dst_stride, int width) {
@ -384,7 +383,7 @@ static void TransposeWx8_SSSE3(const uint8* src, int src_stride,
);
}
#if !defined(YUV_DISABLE_ASM) && defined (__i386__)
#if !defined(LIBYUV_DISABLE_X86) && defined (__i386__)
#define HAS_TRANSPOSE_UVWX8_SSE2
extern "C" void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
uint8* dst_a, int dst_stride_a,
@ -506,7 +505,7 @@ extern "C" void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
"pop %ebx \n"
"ret \n"
);
#elif !defined(YUV_DISABLE_ASM) && defined(__x86_64__)
#elif !defined(LIBYUV_DISABLE_X86) && defined(__x86_64__)
// 64 bit version has enough registers to do 16x8 to 8x16 at a time.
#define HAS_TRANSPOSE_WX8_FAST_SSSE3
static void TransposeWx8_FAST_SSSE3(const uint8* src, int src_stride,

View File

@ -22,14 +22,15 @@ extern "C" {
// ARGBScale has a function to copy pixels to a row, striding each source
// pixel by a constant.
#if !defined(YUV_DISABLE_ASM) && (defined(_M_IX86) || \
#if !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || \
defined(__x86_64__) || defined(__i386__))
#define HAS_SCALEARGBROWDOWNEVEN_SSE2
void ScaleARGBRowDownEven_SSE2(const uint8* src_ptr, int src_stride,
int src_stepx,
uint8* dst_ptr, int dst_width);
#endif
#if !defined(YUV_DISABLE_ASM) && (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#if !defined(LIBYUV_DISABLE_NEON) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_SCALEARGBROWDOWNEVEN_NEON
void ScaleARGBRowDownEven_NEON(const uint8* src_ptr, int src_stride,
int src_stepx,

View File

@ -17,7 +17,8 @@ namespace libyuv {
extern "C" {
#endif
#if !defined(YUV_DISABLE_ASM) && defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#if !defined(LIBYUV_DISABLE_MIPS) && \
defined(__mips_dsp) && (__mips_dsp_rev >= 2)
void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride,
uint8* dst, int dst_stride,

View File

@ -17,8 +17,7 @@ namespace libyuv {
extern "C" {
#endif
#if !defined(YUV_DISABLE_ASM) && defined(__ARM_NEON__)
#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__)
static const uvec8 kVTbl4x4Transpose =
{ 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15 };

View File

@ -832,7 +832,8 @@ static __inline void YuvPixel2(uint8 y, uint8 u, uint8 v,
*r = Clip(static_cast<int32>((u * UR + v * VR) - (BR) + y1) >> 6);
}
#if !defined(YUV_DISABLE_ASM) && (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#if !defined(LIBYUV_DISABLE_NEON) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON))
// C mimic assembly.
// TODO(fbarchard): Remove subsampling from Neon.
void I444ToARGBRow_C(const uint8* src_y,
@ -1734,7 +1735,7 @@ void I422ToUYVYRow_C(const uint8* src_y,
}
}
#if !defined(YUV_DISABLE_ASM)
#if !defined(LIBYUV_DISABLE_X86)
// row_win.cc has asm version, but GCC uses 2 step wrapper. 5% slower.
// TODO(fbarchard): Handle width > kMaxStride here instead of calling code.
#if defined(__x86_64__) || defined(__i386__)
@ -1833,7 +1834,7 @@ void UYVYToARGBRow_Unaligned_SSSE3(const uint8* src_uyvy,
}
#endif // defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)
#endif // !defined(YUV_DISABLE_ASM)
#endif // !defined(LIBYUV_DISABLE_X86)
#ifdef __cplusplus
} // extern "C"

View File

@ -372,7 +372,8 @@ void CopyRow_MIPS(const uint8* src, uint8* dst, int count) {
#endif // HAS_COPYROW_MIPS
// MIPS DSPR2 functions
#if !defined(YUV_DISABLE_ASM) && defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips_dsp) && \
(__mips_dsp_rev >= 2)
void SplitUVRow_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
int width) {
__asm__ __volatile__ (

View File

@ -16,7 +16,7 @@ extern "C" {
#endif
// This module is for GCC Neon
#if !defined(YUV_DISABLE_ASM) && defined(__ARM_NEON__)
#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__)
// Read 8 Y, 4 U and 4 V from 422
#define READYUV422 \

View File

@ -18,7 +18,7 @@ extern "C" {
#endif
// This module is for GCC x86 and x64
#if !defined(YUV_DISABLE_ASM) && (defined(__x86_64__) || defined(__i386__))
#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
// GCC 4.2 on OSX has link error when passing static or const to inline.
// TODO(fbarchard): Use static const when gcc 4.2 support is dropped.

View File

@ -16,7 +16,7 @@ extern "C" {
#endif
// This module is for Visual C x86.
#if !defined(YUV_DISABLE_ASM) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#ifdef HAS_ARGBTOYROW_SSSE3

View File

@ -44,7 +44,8 @@ void SetUseReferenceImpl(bool use) {
// ScaleRowDown2Int also used by planar functions
// NEON downscalers with interpolation.
#if !defined(YUV_DISABLE_ASM) && (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#if !defined(LIBYUV_DISABLE_NEON) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_SCALEROWDOWN2_NEON
// Note - not static due to reuse in convert for 444 to 420.
void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t /* src_stride */,
@ -94,9 +95,8 @@ void ScaleFilterRows_NEON(uint8* dst_ptr,
// SSE2 downscalers with interpolation.
// Constants for SSSE3 code
#elif !defined(YUV_DISABLE_ASM) && \
#elif !defined(LIBYUV_DISABLE_X86) && \
(defined(_M_IX86) || defined(__i386__) || defined(__x86_64__))
// GCC 4.2 on OSX has link error when passing static or const to inline.
// TODO(fbarchard): Use static const when gcc 4.2 support is dropped.
#ifdef __APPLE__
@ -180,8 +180,7 @@ CONST uvec16 kScaleAb2 =
{ 65536 / 3, 65536 / 3, 65536 / 2, 65536 / 3, 65536 / 3, 65536 / 2, 0, 0 };
#endif
#if !defined(YUV_DISABLE_ASM) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#define HAS_SCALEROWDOWN2_SSE2
// Reads 32 pixels, throws half away and writes 16 pixels.
// Alignment requirement: src_ptr 16 byte aligned, dst_ptr 16 byte aligned.
@ -1258,7 +1257,7 @@ static void ScaleFilterRows_Unaligned_SSSE3(uint8* dst_ptr,
ret
}
}
#elif !defined(YUV_DISABLE_ASM) && (defined(__x86_64__) || defined(__i386__))
#elif !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
// GCC versions of row functions are verbatim conversions from Visual C.
// Generated using gcc disassembly on Visual C object file:
// objdump -D yuvscaler.obj >yuvscaler.txt
@ -2243,7 +2242,8 @@ static void ScaleFilterRows_Unaligned_SSSE3(uint8* dst_ptr,
}
#endif // defined(__x86_64__) || defined(__i386__)
#if !defined(YUV_DISABLE_ASM) && defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#if !defined(LIBYUV_DISABLE_MIPS) && \
defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#define HAS_SCALEROWDOWN2_MIPS_DSPR2
void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */,
uint8* dst, int dst_width);

View File

@ -25,7 +25,8 @@ extern "C" {
// ARGB scaling uses bilinear or point, but not box filter.
#if !defined(YUV_DISABLE_ASM) && (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#if !defined(LIBYUV_DISABLE_NEON) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_SCALEARGBROWDOWNEVEN_NEON
#define HAS_SCALEARGBROWDOWN2_NEON
#define HAS_SCALEARGBFILTERROWS_NEON
@ -44,8 +45,7 @@ void ScaleARGBFilterRows_NEON(uint8* dst_ptr,
int dst_width, int source_y_fraction);
#endif
#if !defined(YUV_DISABLE_ASM) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#define HAS_SCALEARGBROWDOWN2_SSE2
// Reads 8 pixels, throws half away and writes 4 even pixels (0, 2, 4, 6)
// Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
@ -396,8 +396,7 @@ void ScaleARGBFilterRows_SSSE3(uint8* dst_argb, const uint8* src_argb,
}
}
#elif !defined(YUV_DISABLE_ASM) && (defined(__x86_64__) || defined(__i386__))
#elif !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
// GCC versions of row functions are verbatim conversions from Visual C.
// Generated using gcc disassembly on Visual C object file:
// objdump -D yuvscaler.obj >yuvscaler.txt

View File

@ -17,8 +17,7 @@ extern "C" {
#endif
// This module is for GCC Neon
#if !defined(YUV_DISABLE_ASM) && defined(__ARM_NEON__)
#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__)
void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t /* src_stride */,
uint8* dst, int dst_width) {

View File

@ -17,7 +17,8 @@ extern "C" {
#endif
// This module is for GCC MIPS DSPR2
#if !defined(YUV_DISABLE_ASM) && defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#if !defined(LIBYUV_DISABLE_MIPS) && \
defined(__mips_dsp) && (__mips_dsp_rev >= 2)
void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */,
uint8* dst, int dst_width) {

View File

@ -17,14 +17,10 @@ extern "C" {
#endif
// This module is for GCC Neon
#if !defined(YUV_DISABLE_ASM) && defined(__ARM_NEON__)
#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__)
/**
* NEON downscalers with interpolation.
*
* Provided by Fritz Koenig
*
*/
// NEON downscalers with interpolation.
// Provided by Fritz Koenig
void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t /* src_stride */,
uint8* dst, int dst_width) {

View File

@ -859,9 +859,6 @@ TEST_F(libyuvTest, ARGBBlend_Opt) {
TEST_F(libyuvTest, TestAffine) {
SIMD_ALIGNED(uint8 orig_pixels_0[256][4]);
SIMD_ALIGNED(uint8 interpolate_pixels_C[256][4]);
#if defined(HAS_ARGBAFFINEROW_SSE2)
SIMD_ALIGNED(uint8 interpolate_pixels_Opt[256][4]);
#endif
for (int i = 0; i < 256; ++i) {
for (int j = 0; j < 4; ++j) {
@ -878,25 +875,17 @@ TEST_F(libyuvTest, TestAffine) {
EXPECT_EQ(191u, interpolate_pixels_C[255][3]);
#if defined(HAS_ARGBAFFINEROW_SSE2)
SIMD_ALIGNED(uint8 interpolate_pixels_Opt[256][4]);
ARGBAffineRow_SSE2(&orig_pixels_0[0][0], 0, &interpolate_pixels_Opt[0][0],
uv_step, 256);
EXPECT_EQ(0, memcmp(interpolate_pixels_Opt, interpolate_pixels_C, 256 * 4));
#endif
#if defined(HAS_ARGBAFFINEROW_SSE2)
int has_sse2 = TestCpuFlag(kCpuHasSSE2);
if (has_sse2) {
for (int i = 0; i < benchmark_pixels_div256_; ++i) {
ARGBAffineRow_SSE2(&orig_pixels_0[0][0], 0, &interpolate_pixels_Opt[0][0],
uv_step, 256);
}
} else {
#endif
for (int i = 0; i < benchmark_pixels_div256_; ++i) {
ARGBAffineRow_C(&orig_pixels_0[0][0], 0, &interpolate_pixels_C[0][0],
uv_step, 256);
}
#if defined(HAS_ARGBAFFINEROW_SSE2)
}
#endif
}
@ -1172,3 +1161,4 @@ TEST_F(libyuvTest, ARGBSubtract_Opt) {
}
} // namespace libyuv