mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Enable assembly for clangcl build on Windows. Previously assembly was disabled so clangcl would work, but only with C code. As clangcl mimics both Visual C and GCC, ifdefs need to pick one or the other or often you'll end up with both. In this CL we disable most Visual C code and use the GCC versions which allow assembly for both 32 and 64 bit intel.
BUG=412 TESTED=clang=1 build on windows R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/51389004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1341 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
d6d7de5742
commit
d28cd77f99
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 1337
|
Version: 1341
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -393,7 +393,7 @@ int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
|
|||||||
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
||||||
defined(TARGET_IPHONE_SIMULATOR) || \
|
defined(TARGET_IPHONE_SIMULATOR) || \
|
||||||
(defined(__i386__) && !defined(__SSE2__)) || \
|
(defined(__i386__) && !defined(__SSE2__)) || \
|
||||||
(defined(_MSC_VER) && defined(__clang__))
|
((defined(_MSC_VER) && !defined(__clang__)) && defined(__clang__))
|
||||||
#define LIBYUV_DISABLE_X86
|
#define LIBYUV_DISABLE_X86
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -39,8 +39,7 @@ extern "C" {
|
|||||||
|
|
||||||
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
#if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
||||||
defined(TARGET_IPHONE_SIMULATOR) || \
|
defined(TARGET_IPHONE_SIMULATOR) || \
|
||||||
(defined(__i386__) && !defined(__SSE2__)) || \
|
(defined(__i386__) && !defined(__SSE2__))
|
||||||
(defined(_MSC_VER) && defined(__clang__))
|
|
||||||
#define LIBYUV_DISABLE_X86
|
#define LIBYUV_DISABLE_X86
|
||||||
#endif
|
#endif
|
||||||
// True if compiling for SSSE3 as a requirement.
|
// True if compiling for SSSE3 as a requirement.
|
||||||
@ -158,7 +157,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The following are available on x64 Visual C:
|
// The following are available on x64 Visual C:
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64)
|
#if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64) && !defined(__clang__)
|
||||||
#define HAS_I422TOARGBROW_SSSE3
|
#define HAS_I422TOARGBROW_SSSE3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -177,15 +176,16 @@ extern "C" {
|
|||||||
#endif // __clang__
|
#endif // __clang__
|
||||||
|
|
||||||
// Visual C 2012 required for AVX2.
|
// Visual C 2012 required for AVX2.
|
||||||
#if defined(_M_IX86) && defined(_MSC_VER) && _MSC_VER >= 1700
|
#if defined(_M_IX86) && !defined(__clang__) && \
|
||||||
|
defined(_MSC_VER) && _MSC_VER >= 1700
|
||||||
#define VISUALC_HAS_AVX2 1
|
#define VISUALC_HAS_AVX2 1
|
||||||
#endif // VisualStudio >= 2012
|
#endif // VisualStudio >= 2012
|
||||||
|
|
||||||
// The following are available require VS2012. Port to GCC.
|
// The following are available require VS2012. Port to GCC.
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
|
#if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
|
||||||
// TODO(fbarchard): fix AVX2 versions of YUV conversion. bug=393
|
// TODO(fbarchard): fix AVX2 versions of YUV conversion. bug=393
|
||||||
#define HAS_I422TOABGRROW_AVX2
|
|
||||||
#define HAS_I422TOARGBROW_AVX2
|
#define HAS_I422TOARGBROW_AVX2
|
||||||
|
#define HAS_I422TOABGRROW_AVX2
|
||||||
#define HAS_I422TOBGRAROW_AVX2
|
#define HAS_I422TOBGRAROW_AVX2
|
||||||
#define HAS_I422TORGBAROW_AVX2
|
#define HAS_I422TORGBAROW_AVX2
|
||||||
#define HAS_NV12TOARGBROW_AVX2
|
#define HAS_NV12TOARGBROW_AVX2
|
||||||
@ -382,7 +382,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(__CLR_VER)
|
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__CLR_VER)
|
||||||
#define SIMD_ALIGNED(var) __declspec(align(16)) var
|
#define SIMD_ALIGNED(var) __declspec(align(16)) var
|
||||||
#define SIMD_ALIGNED32(var) __declspec(align(64)) var
|
#define SIMD_ALIGNED32(var) __declspec(align(64)) var
|
||||||
typedef __declspec(align(16)) int16 vec16[8];
|
typedef __declspec(align(16)) int16 vec16[8];
|
||||||
@ -397,8 +397,7 @@ typedef __declspec(align(32)) int8 lvec8[32];
|
|||||||
typedef __declspec(align(32)) uint16 ulvec16[16];
|
typedef __declspec(align(32)) uint16 ulvec16[16];
|
||||||
typedef __declspec(align(32)) uint32 ulvec32[8];
|
typedef __declspec(align(32)) uint32 ulvec32[8];
|
||||||
typedef __declspec(align(32)) uint8 ulvec8[32];
|
typedef __declspec(align(32)) uint8 ulvec8[32];
|
||||||
|
#elif defined(__GNUC__) || defined(__clang__)
|
||||||
#elif defined(__GNUC__)
|
|
||||||
// Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
|
// Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
|
||||||
#define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
|
#define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
|
||||||
#define SIMD_ALIGNED32(var) var __attribute__((aligned(64)))
|
#define SIMD_ALIGNED32(var) var __attribute__((aligned(64)))
|
||||||
|
|||||||
@ -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 1337
|
#define LIBYUV_VERSION 1341
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -37,7 +37,7 @@ uint32 HashDjb2_C(const uint8* src, int count, uint32 seed);
|
|||||||
#define HAS_HASHDJB2_SSE41
|
#define HAS_HASHDJB2_SSE41
|
||||||
uint32 HashDjb2_SSE41(const uint8* src, int count, uint32 seed);
|
uint32 HashDjb2_SSE41(const uint8* src, int count, uint32 seed);
|
||||||
|
|
||||||
#if _MSC_VER >= 1700
|
#ifdef VISUALC_HAS_AVX2
|
||||||
#define HAS_HASHDJB2_AVX2
|
#define HAS_HASHDJB2_AVX2
|
||||||
uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed);
|
uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed);
|
||||||
#endif
|
#endif
|
||||||
@ -138,8 +138,8 @@ uint32 SumSquareError_NEON(const uint8* src_a, const uint8* src_b, int count);
|
|||||||
#define HAS_SUMSQUAREERROR_SSE2
|
#define HAS_SUMSQUAREERROR_SSE2
|
||||||
uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count);
|
uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count);
|
||||||
#endif
|
#endif
|
||||||
// Visual C 2012 required for AVX2.
|
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && _MSC_VER >= 1700
|
#ifdef VISUALC_HAS_AVX2
|
||||||
#define HAS_SUMSQUAREERROR_AVX2
|
#define HAS_SUMSQUAREERROR_AVX2
|
||||||
uint32 SumSquareError_AVX2(const uint8* src_a, const uint8* src_b, int count);
|
uint32 SumSquareError_AVX2(const uint8* src_a, const uint8* src_b, int count);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -16,7 +16,8 @@ namespace libyuv {
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
|
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
|
||||||
|
defined(_MSC_VER) && !defined(__clang__)
|
||||||
|
|
||||||
__declspec(naked) __declspec(align(16))
|
__declspec(naked) __declspec(align(16))
|
||||||
uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) {
|
uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) {
|
||||||
@ -220,7 +221,7 @@ uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed) {
|
|||||||
}
|
}
|
||||||
#endif // _MSC_VER >= 1700
|
#endif // _MSC_VER >= 1700
|
||||||
|
|
||||||
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
|
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) ...
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|||||||
@ -10,13 +10,12 @@
|
|||||||
|
|
||||||
#include "libyuv/cpu_id.h"
|
#include "libyuv/cpu_id.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(__clang__)
|
#if (defined(_MSC_VER) && !defined(__clang__)) && !defined(__clang__)
|
||||||
#include <intrin.h> // For __cpuidex()
|
#include <intrin.h> // For __cpuidex()
|
||||||
#endif
|
#endif
|
||||||
#if !defined(__pnacl__) && !defined(__CLR_VER) && \
|
#if !defined(__pnacl__) && !defined(__CLR_VER) && \
|
||||||
!defined(__native_client__) && \
|
!defined(__native_client__) && (defined(_M_IX86) || defined(_M_X64)) && \
|
||||||
defined(_MSC_VER) && (_MSC_FULL_VER >= 160040219) && \
|
defined(_MSC_VER) && !defined(__clang__) && (_MSC_FULL_VER >= 160040219)
|
||||||
(defined(_M_IX86) || defined(_M_X64))
|
|
||||||
#include <immintrin.h> // For _xgetbv()
|
#include <immintrin.h> // For _xgetbv()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -37,7 +36,7 @@ extern "C" {
|
|||||||
|
|
||||||
// For functions that use the stack and have runtime checks for overflow,
|
// For functions that use the stack and have runtime checks for overflow,
|
||||||
// use SAFEBUFFERS to avoid additional check.
|
// use SAFEBUFFERS to avoid additional check.
|
||||||
#if defined(_MSC_VER) && (_MSC_FULL_VER >= 160040219)
|
#if (defined(_MSC_VER) && !defined(__clang__)) && (_MSC_FULL_VER >= 160040219)
|
||||||
#define SAFEBUFFERS __declspec(safebuffers)
|
#define SAFEBUFFERS __declspec(safebuffers)
|
||||||
#else
|
#else
|
||||||
#define SAFEBUFFERS
|
#define SAFEBUFFERS
|
||||||
@ -49,7 +48,7 @@ extern "C" {
|
|||||||
!defined(__pnacl__) && !defined(__CLR_VER)
|
!defined(__pnacl__) && !defined(__CLR_VER)
|
||||||
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) {
|
||||||
#if defined(_MSC_VER) && !defined(__clang__)
|
#if (defined(_MSC_VER) && !defined(__clang__)) && !defined(__clang__)
|
||||||
// Visual C version uses intrinsic or inline x86 assembly.
|
// Visual C version uses intrinsic or inline x86 assembly.
|
||||||
#if (_MSC_FULL_VER >= 160040219)
|
#if (_MSC_FULL_VER >= 160040219)
|
||||||
__cpuidex((int*)(cpu_info), info_eax, info_ecx);
|
__cpuidex((int*)(cpu_info), info_eax, info_ecx);
|
||||||
@ -72,7 +71,7 @@ void CpuId(uint32 info_eax, uint32 info_ecx, uint32* cpu_info) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// GCC version uses inline x86 assembly.
|
// GCC version uses inline x86 assembly.
|
||||||
#else // defined(_MSC_VER) && !defined(__clang__)
|
#else // (defined(_MSC_VER) && !defined(__clang__)) && !defined(__clang__)
|
||||||
uint32 info_ebx, info_edx;
|
uint32 info_ebx, info_edx;
|
||||||
asm volatile ( // NOLINT
|
asm volatile ( // NOLINT
|
||||||
#if defined( __i386__) && defined(__PIC__)
|
#if defined( __i386__) && defined(__PIC__)
|
||||||
@ -90,7 +89,7 @@ void CpuId(uint32 info_eax, uint32 info_ecx, uint32* cpu_info) {
|
|||||||
cpu_info[1] = info_ebx;
|
cpu_info[1] = info_ebx;
|
||||||
cpu_info[2] = info_ecx;
|
cpu_info[2] = info_ecx;
|
||||||
cpu_info[3] = info_edx;
|
cpu_info[3] = info_edx;
|
||||||
#endif // defined(_MSC_VER) && !defined(__clang__)
|
#endif // (defined(_MSC_VER) && !defined(__clang__)) && !defined(__clang__)
|
||||||
}
|
}
|
||||||
#else // (defined(_M_IX86) || defined(_M_X64) ...
|
#else // (defined(_M_IX86) || defined(_M_X64) ...
|
||||||
LIBYUV_API
|
LIBYUV_API
|
||||||
@ -107,7 +106,7 @@ void CpuId(uint32 eax, uint32 ecx, uint32* cpu_info) {
|
|||||||
// X86 CPUs have xgetbv to detect OS saves high parts of ymm registers.
|
// X86 CPUs have xgetbv to detect OS saves high parts of ymm registers.
|
||||||
int TestOsSaveYmm() {
|
int TestOsSaveYmm() {
|
||||||
uint32 xcr0 = 0u;
|
uint32 xcr0 = 0u;
|
||||||
#if defined(_MSC_VER) && (_MSC_FULL_VER >= 160040219)
|
#if (defined(_MSC_VER) && !defined(__clang__)) && (_MSC_FULL_VER >= 160040219)
|
||||||
xcr0 = (uint32)(_xgetbv(0)); // VS2010 SP1 required.
|
xcr0 = (uint32)(_xgetbv(0)); // VS2010 SP1 required.
|
||||||
#elif defined(_M_IX86) && defined(_MSC_VER) && !defined(__clang__)
|
#elif defined(_M_IX86) && defined(_MSC_VER) && !defined(__clang__)
|
||||||
__asm {
|
__asm {
|
||||||
|
|||||||
@ -677,12 +677,12 @@ int ARGBAdd(const uint8* src_argb0, int src_stride_argb0,
|
|||||||
height = 1;
|
height = 1;
|
||||||
src_stride_argb0 = src_stride_argb1 = dst_stride_argb = 0;
|
src_stride_argb0 = src_stride_argb1 = dst_stride_argb = 0;
|
||||||
}
|
}
|
||||||
#if defined(HAS_ARGBADDROW_SSE2) && defined(_MSC_VER)
|
#if defined(HAS_ARGBADDROW_SSE2) && (defined(_MSC_VER) && !defined(__clang__))
|
||||||
if (TestCpuFlag(kCpuHasSSE2)) {
|
if (TestCpuFlag(kCpuHasSSE2)) {
|
||||||
ARGBAddRow = ARGBAddRow_SSE2;
|
ARGBAddRow = ARGBAddRow_SSE2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAS_ARGBADDROW_SSE2) && !defined(_MSC_VER)
|
#if defined(HAS_ARGBADDROW_SSE2) && !(defined(_MSC_VER) && !defined(__clang__))
|
||||||
if (TestCpuFlag(kCpuHasSSE2)) {
|
if (TestCpuFlag(kCpuHasSSE2)) {
|
||||||
ARGBAddRow = ARGBAddRow_Any_SSE2;
|
ARGBAddRow = ARGBAddRow_Any_SSE2;
|
||||||
if (IS_ALIGNED(width, 4)) {
|
if (IS_ALIGNED(width, 4)) {
|
||||||
|
|||||||
@ -20,6 +20,7 @@ namespace libyuv {
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// TODO(fbarchard): switch to standard form of inline; fails on clangcl.
|
||||||
#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__))
|
||||||
#if defined(__APPLE__) && defined(__i386__)
|
#if defined(__APPLE__) && defined(__i386__)
|
||||||
@ -70,7 +71,7 @@ void TransposeUVWx8_MIPS_DSPR2(const uint8* src, int src_stride,
|
|||||||
#endif // defined(__mips__)
|
#endif // defined(__mips__)
|
||||||
|
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && \
|
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||||
defined(_M_IX86) && defined(_MSC_VER)
|
defined(_M_IX86) && defined(_MSC_VER) && !defined(__clang__)
|
||||||
#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,
|
||||||
@ -381,7 +382,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__) && !defined(__clang__)
|
||||||
#define HAS_TRANSPOSE_UVWX8_SSE2
|
#define HAS_TRANSPOSE_UVWX8_SSE2
|
||||||
void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
|
void TransposeUVWx8_SSE2(const uint8* src, int src_stride,
|
||||||
uint8* dst_a, int dst_stride_a,
|
uint8* dst_a, int dst_stride_a,
|
||||||
|
|||||||
@ -2175,7 +2175,8 @@ void I422ToUYVYRow_C(const uint8* src_y,
|
|||||||
// Maximum temporary width for wrappers to process at a time, in pixels.
|
// Maximum temporary width for wrappers to process at a time, in pixels.
|
||||||
#define MAXTWIDTH 2048
|
#define MAXTWIDTH 2048
|
||||||
|
|
||||||
#if !defined(_MSC_VER) && defined(HAS_I422TORGB565ROW_SSSE3)
|
#if !(defined(_MSC_VER) && !defined(__clang__)) && \
|
||||||
|
defined(HAS_I422TORGB565ROW_SSSE3)
|
||||||
// row_win.cc has asm version, but GCC uses 2 step wrapper.
|
// row_win.cc has asm version, but GCC uses 2 step wrapper.
|
||||||
void I422ToRGB565Row_SSSE3(const uint8* src_y,
|
void I422ToRGB565Row_SSSE3(const uint8* src_y,
|
||||||
const uint8* src_u,
|
const uint8* src_u,
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
#include "libyuv/row.h"
|
#include "libyuv/row.h"
|
||||||
|
|
||||||
#if defined (_M_X64) && !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER)
|
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_X64) && \
|
||||||
|
defined(_MSC_VER) && !defined(__clang__)
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
#include <tmmintrin.h> // For _mm_maddubs_epi16
|
#include <tmmintrin.h> // For _mm_maddubs_epi16
|
||||||
#endif
|
#endif
|
||||||
@ -21,8 +22,8 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This module is for Visual C.
|
// This module is for Visual C.
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && \
|
#if !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) && \
|
||||||
(defined(_M_IX86) || defined(_M_X64))
|
defined(_MSC_VER) && !defined(__clang__)
|
||||||
|
|
||||||
struct YuvConstants {
|
struct YuvConstants {
|
||||||
lvec8 kUVToB; // 0
|
lvec8 kUVToB; // 0
|
||||||
@ -6273,7 +6274,7 @@ void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
|
|||||||
#endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3
|
#endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3
|
||||||
|
|
||||||
#endif // defined(_M_X64)
|
#endif // defined(_M_X64)
|
||||||
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER)
|
#endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) ...
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|||||||
@ -16,7 +16,8 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This module is for Visual C x86.
|
// This module is for Visual C x86.
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
|
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
|
||||||
|
defined(_MSC_VER) && !defined(__clang__)
|
||||||
|
|
||||||
// Offsets for source bytes 0 to 9
|
// Offsets for source bytes 0 to 9
|
||||||
static uvec8 kShuf0 =
|
static uvec8 kShuf0 =
|
||||||
@ -1170,7 +1171,7 @@ int FixedDiv1_X86(int num, int div) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
|
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && ...
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|||||||
@ -26,12 +26,6 @@
|
|||||||
#include "libyuv/video_common.h"
|
#include "libyuv/video_common.h"
|
||||||
#include "../unit_test/unit_test.h"
|
#include "../unit_test/unit_test.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#define SIMD_ALIGNED(var) __declspec(align(16)) var
|
|
||||||
#else // __GNUC__
|
|
||||||
#define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace libyuv {
|
namespace libyuv {
|
||||||
|
|
||||||
#define SUBSAMPLE(v, a) ((((v) + (a) - 1)) / (a))
|
#define SUBSAMPLE(v, a) ((((v) + (a) - 1)) / (a))
|
||||||
|
|||||||
@ -22,12 +22,6 @@
|
|||||||
#include "libyuv/row.h" // For Sobel
|
#include "libyuv/row.h" // For Sobel
|
||||||
#include "../unit_test/unit_test.h"
|
#include "../unit_test/unit_test.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#define SIMD_ALIGNED(var) __declspec(align(16)) var
|
|
||||||
#else // __GNUC__
|
|
||||||
#define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace libyuv {
|
namespace libyuv {
|
||||||
|
|
||||||
TEST_F(libyuvTest, TestAttenuate) {
|
TEST_F(libyuvTest, TestAttenuate) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user