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

gcc msys compile ifdefs avoid Visual C inline

BUG=243
TEST=local compile with gcc
R=jkoleszar@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@717 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent dee86a14
......@@ -128,7 +128,7 @@ extern "C" {
// The following are Windows only.
// TODO(fbarchard): Port to gcc.
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
#define HAS_ARGBCOLORTABLEROW_X86
// Visual C 2012 required for AVX2.
#if _MSC_VER >= 1700
......
......@@ -16,7 +16,7 @@ namespace libyuv {
extern "C" {
#endif
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
__declspec(naked) __declspec(align(16))
uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) {
......@@ -184,7 +184,7 @@ uint32 HashDjb2_SSE41(const uint8* src, int count, uint32 seed) {
ret
}
}
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
#ifdef __cplusplus
} // extern "C"
......
......@@ -74,7 +74,7 @@ void CpuId(int cpu_info[4], int) {
static uint32 XGetBV(unsigned int xcr) {
return static_cast<uint32>(_xgetbv(xcr));
}
#elif !defined(__CLR_VER) && defined(_M_IX86)
#elif !defined(__CLR_VER) && defined(_M_IX86) && defined(_MSC_VER)
#define HAS_XGETBV
__declspec(naked) __declspec(align(16))
static uint32 XGetBV(unsigned int xcr) {
......
......@@ -72,7 +72,7 @@ void TransposeUVWx8_MIPS_DSPR2(const uint8* src, int src_stride,
int width);
#endif // defined(__mips__)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
#define HAS_TRANSPOSE_WX8_SSSE3
__declspec(naked) __declspec(align(16))
static void TransposeWx8_SSSE3(const uint8* src, int src_stride,
......
......@@ -16,7 +16,7 @@ extern "C" {
#endif
// This module is for Visual C x86.
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
#ifdef HAS_ARGBTOYROW_SSSE3
......@@ -6602,8 +6602,7 @@ void I422ToUYVYRow_SSE2(const uint8* src_y,
ret
}
}
#endif // _M_IX86
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
#ifdef __cplusplus
} // extern "C"
......
......@@ -179,7 +179,7 @@ CONST uvec16 kScaleAb2 =
{ 65536 / 3, 65536 / 3, 65536 / 2, 65536 / 3, 65536 / 3, 65536 / 2, 0, 0 };
#endif
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
#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.
......
......@@ -43,7 +43,7 @@ void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width);
#endif
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
#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.
......@@ -814,7 +814,7 @@ static void ScaleARGBDownEven(int src_width, int src_height,
}
}
// ScaleARGB ARGB to/from any dimensions, with bilinear interpolation.
// Scale ARGB down with bilinear interpolation.
static void ScaleARGBBilinearDown(int src_height,
int dst_width, int dst_height,
int src_stride, int dst_stride,
......@@ -898,7 +898,7 @@ static void ScaleARGBBilinearDown(int src_height,
}
}
// ScaleARGB ARGB to/from any dimensions, with bilinear interpolation.
// Scale ARGB up with bilinear interpolation.
static void ScaleARGBBilinearUp(int src_width, int src_height,
int dst_width, int dst_height,
int src_stride, int dst_stride,
......
......@@ -79,7 +79,7 @@ static uint32 SumSquareError_NEON(const uint8* src_a,
: "memory", "cc", "q0", "q1", "q2", "q3", "q7", "q8", "q9", "q10");
return sse;
}
#elif !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#elif !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
#define HAS_SUMSQUAREERROR_SSE2
__declspec(naked)
static uint32 SumSquareError_SSE2(const uint8* /*src_a*/,
......
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