Commit d593876b authored by fbarchard@google.com's avatar fbarchard@google.com

Disable assembly for rotate and scale

BUG=253
TEST=validator
R=nfullagar@google.com

Review URL: https://webrtc-codereview.appspot.com/2034004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@760 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 9b0f0da0
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 759 Version: 760
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -11,6 +11,6 @@ ...@@ -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 759 #define LIBYUV_VERSION 760
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -41,7 +41,7 @@ extern "C" { ...@@ -41,7 +41,7 @@ extern "C" {
#endif #endif
#endif #endif
#if !defined(LIBYUV_DISABLE_NEON) && \ #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON)) (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_MIRRORROW_NEON #define HAS_MIRRORROW_NEON
void MirrorRow_NEON(const uint8* src, uint8* dst, int width); void MirrorRow_NEON(const uint8* src, uint8* dst, int width);
...@@ -57,7 +57,8 @@ void TransposeUVWx8_NEON(const uint8* src, int src_stride, ...@@ -57,7 +57,8 @@ void TransposeUVWx8_NEON(const uint8* src, int src_stride,
int width); int width);
#endif // defined(__ARM_NEON__) #endif // defined(__ARM_NEON__)
#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__) && \ #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \
defined(__mips__) && \
defined(__mips_dsp) && (__mips_dsp_rev >= 2) defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#define HAS_TRANSPOSE_WX8_MIPS_DSPR2 #define HAS_TRANSPOSE_WX8_MIPS_DSPR2
void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride, void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride,
...@@ -72,7 +73,8 @@ void TransposeUVWx8_MIPS_DSPR2(const uint8* src, int src_stride, ...@@ -72,7 +73,8 @@ void TransposeUVWx8_MIPS_DSPR2(const uint8* src, int src_stride,
int width); int width);
#endif // defined(__mips__) #endif // defined(__mips__)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) #if !defined(LIBYUV_DISABLE_X86) && \
defined(_M_IX86) && defined(_MSC_VER)
#define HAS_TRANSPOSE_WX8_SSSE3 #define HAS_TRANSPOSE_WX8_SSSE3
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
static void TransposeWx8_SSSE3(const uint8* src, int src_stride, static void TransposeWx8_SSSE3(const uint8* src, int src_stride,
...@@ -294,7 +296,8 @@ static void TransposeUVWx8_SSE2(const uint8* src, int src_stride, ...@@ -294,7 +296,8 @@ static void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
ret ret
} }
} }
#elif !defined(LIBYUV_DISABLE_X86) && (defined(__i386__) || defined(__x86_64__)) #elif !defined(LIBYUV_DISABLE_X86) && \
(defined(__i386__) || (defined(__x86_64__) && !defined(__native_client__)))
#define HAS_TRANSPOSE_WX8_SSSE3 #define HAS_TRANSPOSE_WX8_SSSE3
static void TransposeWx8_SSSE3(const uint8* src, int src_stride, static void TransposeWx8_SSSE3(const uint8* src, int src_stride,
uint8* dst, int dst_stride, int width) { uint8* dst, int dst_stride, int width) {
...@@ -383,7 +386,7 @@ static void TransposeWx8_SSSE3(const uint8* src, int src_stride, ...@@ -383,7 +386,7 @@ static void TransposeWx8_SSSE3(const uint8* src, int src_stride,
); );
} }
#if !defined(LIBYUV_DISABLE_X86) && defined (__i386__) #if !defined(LIBYUV_DISABLE_X86) && defined(__i386__)
#define HAS_TRANSPOSE_UVWX8_SSE2 #define HAS_TRANSPOSE_UVWX8_SSE2
extern "C" void TransposeUVWx8_SSE2(const uint8* src, int src_stride, extern "C" void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
uint8* dst_a, int dst_stride_a, uint8* dst_a, int dst_stride_a,
...@@ -511,7 +514,8 @@ extern "C" void TransposeUVWx8_SSE2(const uint8* src, int src_stride, ...@@ -511,7 +514,8 @@ extern "C" void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
"ret \n" "ret \n"
#endif #endif
); );
#elif !defined(LIBYUV_DISABLE_X86) && defined(__x86_64__) #elif !defined(LIBYUV_DISABLE_X86) && !defined(__native_client__) && \
defined(__x86_64__)
// 64 bit version has enough registers to do 16x8 to 8x16 at a time. // 64 bit version has enough registers to do 16x8 to 8x16 at a time.
#define HAS_TRANSPOSE_WX8_FAST_SSSE3 #define HAS_TRANSPOSE_WX8_FAST_SSSE3
static void TransposeWx8_FAST_SSSE3(const uint8* src, int src_stride, static void TransposeWx8_FAST_SSSE3(const uint8* src, int src_stride,
......
...@@ -22,14 +22,15 @@ extern "C" { ...@@ -22,14 +22,15 @@ extern "C" {
// ARGBScale has a function to copy pixels to a row, striding each source // ARGBScale has a function to copy pixels to a row, striding each source
// pixel by a constant. // pixel by a constant.
#if !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || \ #if !defined(LIBYUV_DISABLE_X86) && \
defined(__x86_64__) || defined(__i386__)) (defined(_M_IX86) || \
(defined(__x86_64__) && !defined(__native_client__)) || defined(__i386__))
#define HAS_SCALEARGBROWDOWNEVEN_SSE2 #define HAS_SCALEARGBROWDOWNEVEN_SSE2
void ScaleARGBRowDownEven_SSE2(const uint8* src_ptr, int src_stride, void ScaleARGBRowDownEven_SSE2(const uint8* src_ptr, int src_stride,
int src_stepx, int src_stepx,
uint8* dst_ptr, int dst_width); uint8* dst_ptr, int dst_width);
#endif #endif
#if !defined(LIBYUV_DISABLE_NEON) && \ #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON)) (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_SCALEARGBROWDOWNEVEN_NEON #define HAS_SCALEARGBROWDOWNEVEN_NEON
void ScaleARGBRowDownEven_NEON(const uint8* src_ptr, int src_stride, void ScaleARGBRowDownEven_NEON(const uint8* src_ptr, int src_stride,
......
...@@ -48,7 +48,7 @@ void SetUseReferenceImpl(bool use) { ...@@ -48,7 +48,7 @@ void SetUseReferenceImpl(bool use) {
// ScaleRowDown2Int also used by planar functions // ScaleRowDown2Int also used by planar functions
// NEON downscalers with interpolation. // NEON downscalers with interpolation.
#if !defined(LIBYUV_DISABLE_NEON) && \ #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON)) (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_SCALEROWDOWN2_NEON #define HAS_SCALEROWDOWN2_NEON
// Note - not static due to reuse in convert for 444 to 420. // Note - not static due to reuse in convert for 444 to 420.
...@@ -95,7 +95,8 @@ void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr, ...@@ -95,7 +95,8 @@ void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr,
// SSE2 downscalers with interpolation. // SSE2 downscalers with interpolation.
// Constants for SSSE3 code // Constants for SSSE3 code
#elif !defined(LIBYUV_DISABLE_X86) && \ #elif !defined(LIBYUV_DISABLE_X86) && \
(defined(_M_IX86) || defined(__i386__) || defined(__x86_64__)) (defined(_M_IX86) || defined(__i386__) || \
(defined(__x86_64__) && !defined(__native_client__)))
// Offsets for source bytes 0 to 9 // Offsets for source bytes 0 to 9
static uvec8 kShuf0 = static uvec8 kShuf0 =
...@@ -172,7 +173,8 @@ static uvec16 kScaleAb2 = ...@@ -172,7 +173,8 @@ static uvec16 kScaleAb2 =
{ 65536 / 3, 65536 / 3, 65536 / 2, 65536 / 3, 65536 / 3, 65536 / 2, 0, 0 }; { 65536 / 3, 65536 / 3, 65536 / 2, 65536 / 3, 65536 / 3, 65536 / 2, 0, 0 };
#endif #endif
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) #if !defined(LIBYUV_DISABLE_X86) && \
defined(_M_IX86) && defined(_MSC_VER)
#define HAS_SCALEROWDOWN2_SSE2 #define HAS_SCALEROWDOWN2_SSE2
// Reads 32 pixels, throws half away and writes 16 pixels. // Reads 32 pixels, throws half away and writes 16 pixels.
// Alignment requirement: src_ptr 16 byte aligned, dst_ptr 16 byte aligned. // Alignment requirement: src_ptr 16 byte aligned, dst_ptr 16 byte aligned.
...@@ -799,7 +801,8 @@ static void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -799,7 +801,8 @@ static void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
} }
} }
#elif !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__)) #elif !defined(LIBYUV_DISABLE_X86) && \
((defined(__x86_64__) && !defined(__native_client__)) || defined(__i386__))
// GCC versions of row functions are verbatim conversions from Visual C. // GCC versions of row functions are verbatim conversions from Visual C.
// Generated using gcc disassembly on Visual C object file: // Generated using gcc disassembly on Visual C object file:
// objdump -D yuvscaler.obj >yuvscaler.txt // objdump -D yuvscaler.obj >yuvscaler.txt
...@@ -1395,7 +1398,7 @@ static void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -1395,7 +1398,7 @@ static void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
#endif // defined(__x86_64__) || defined(__i386__) #endif // defined(__x86_64__) || defined(__i386__)
#if !defined(LIBYUV_DISABLE_MIPS) && \ #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \
defined(__mips_dsp) && (__mips_dsp_rev >= 2) defined(__mips_dsp) && (__mips_dsp_rev >= 2)
#define HAS_SCALEROWDOWN2_MIPS_DSPR2 #define HAS_SCALEROWDOWN2_MIPS_DSPR2
void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */,
......
...@@ -27,7 +27,7 @@ static __inline int Abs(int v) { ...@@ -27,7 +27,7 @@ static __inline int Abs(int v) {
} }
// ARGB scaling uses bilinear or point, but not box filter. // ARGB scaling uses bilinear or point, but not box filter.
#if !defined(LIBYUV_DISABLE_NEON) && \ #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \
(defined(__ARM_NEON__) || defined(LIBYUV_NEON)) (defined(__ARM_NEON__) || defined(LIBYUV_NEON))
#define HAS_SCALEARGBROWDOWNEVEN_NEON #define HAS_SCALEARGBROWDOWNEVEN_NEON
#define HAS_SCALEARGBROWDOWN2_NEON #define HAS_SCALEARGBROWDOWN2_NEON
...@@ -43,7 +43,8 @@ void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -43,7 +43,8 @@ void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
#endif #endif
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) #if !defined(LIBYUV_DISABLE_X86) && \
defined(_M_IX86) && defined(_MSC_VER)
#define HAS_SCALEARGBROWDOWN2_SSE2 #define HAS_SCALEARGBROWDOWN2_SSE2
// Reads 8 pixels, throws half away and writes 4 even pixels (0, 2, 4, 6) // 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. // Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
...@@ -344,7 +345,8 @@ static void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, ...@@ -344,7 +345,8 @@ static void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb,
} }
} }
#elif !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__)) #elif !defined(LIBYUV_DISABLE_X86) && \
((defined(__x86_64__) && !defined(__native_client__)) || defined(__i386__))
// GCC versions of row functions are verbatim conversions from Visual C. // GCC versions of row functions are verbatim conversions from Visual C.
// Generated using gcc disassembly on Visual C object file: // Generated using gcc disassembly on Visual C object file:
// objdump -D yuvscaler.obj >yuvscaler.txt // objdump -D yuvscaler.obj >yuvscaler.txt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment