Commit 2e9f3e5c authored by fbarchard@google.com's avatar fbarchard@google.com

rename source files from row_posix.cc etc to row_gcc.cc to avoid gyp build…

rename source files from row_posix.cc etc to row_gcc.cc to avoid gyp build filtering out source files from build when on windows with clang.  The source code contained in row_gcc.cc is gcc syntax inline assembly available for any platform that supports gcc or clang for intel cpus.
BUG=440
TESTED=try bots
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1430 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent d880a90e
...@@ -9,7 +9,7 @@ LOCAL_SRC_FILES := \ ...@@ -9,7 +9,7 @@ LOCAL_SRC_FILES := \
source/compare.cc \ source/compare.cc \
source/compare_common.cc \ source/compare_common.cc \
source/compare_neon64.cc \ source/compare_neon64.cc \
source/compare_posix.cc \ source/compare_gcc.cc \
source/convert.cc \ source/convert.cc \
source/convert_argb.cc \ source/convert_argb.cc \
source/convert_from.cc \ source/convert_from.cc \
...@@ -26,14 +26,14 @@ LOCAL_SRC_FILES := \ ...@@ -26,14 +26,14 @@ LOCAL_SRC_FILES := \
source/row_common.cc \ source/row_common.cc \
source/row_mips.cc \ source/row_mips.cc \
source/row_neon64.cc \ source/row_neon64.cc \
source/row_posix.cc \ source/row_gcc.cc \
source/scale.cc \ source/scale.cc \
source/scale_any.cc \ source/scale_any.cc \
source/scale_argb.cc \ source/scale_argb.cc \
source/scale_common.cc \ source/scale_common.cc \
source/scale_mips.cc \ source/scale_mips.cc \
source/scale_neon64.cc \ source/scale_neon64.cc \
source/scale_posix.cc \ source/scale_gcc.cc \
source/video_common.cc source/video_common.cc
# TODO(fbarchard): Enable mjpeg encoder. # TODO(fbarchard): Enable mjpeg encoder.
......
...@@ -41,7 +41,7 @@ source_set("libyuv") { ...@@ -41,7 +41,7 @@ source_set("libyuv") {
# sources. # sources.
"source/compare.cc", "source/compare.cc",
"source/compare_common.cc", "source/compare_common.cc",
"source/compare_posix.cc", "source/compare_gcc.cc",
"source/compare_win.cc", "source/compare_win.cc",
"source/convert.cc", "source/convert.cc",
"source/convert_argb.cc", "source/convert_argb.cc",
...@@ -60,14 +60,14 @@ source_set("libyuv") { ...@@ -60,14 +60,14 @@ source_set("libyuv") {
"source/row_any.cc", "source/row_any.cc",
"source/row_common.cc", "source/row_common.cc",
"source/row_mips.cc", "source/row_mips.cc",
"source/row_posix.cc", "source/row_gcc.cc",
"source/row_win.cc", "source/row_win.cc",
"source/scale.cc", "source/scale.cc",
"source/scale_any.cc", "source/scale_any.cc",
"source/scale_argb.cc", "source/scale_argb.cc",
"source/scale_common.cc", "source/scale_common.cc",
"source/scale_mips.cc", "source/scale_mips.cc",
"source/scale_posix.cc", "source/scale_gcc.cc",
"source/scale_win.cc", "source/scale_win.cc",
"source/video_common.cc", "source/video_common.cc",
] ]
......
...@@ -14,7 +14,7 @@ set(ly_source_files ...@@ -14,7 +14,7 @@ set(ly_source_files
${ly_src_dir}/compare.cc ${ly_src_dir}/compare.cc
${ly_src_dir}/compare_common.cc ${ly_src_dir}/compare_common.cc
${ly_src_dir}/compare_neon.cc ${ly_src_dir}/compare_neon.cc
${ly_src_dir}/compare_posix.cc ${ly_src_dir}/compare_gcc.cc
${ly_src_dir}/compare_win.cc ${ly_src_dir}/compare_win.cc
${ly_src_dir}/convert.cc ${ly_src_dir}/convert.cc
${ly_src_dir}/convert_argb.cc ${ly_src_dir}/convert_argb.cc
...@@ -35,7 +35,7 @@ set(ly_source_files ...@@ -35,7 +35,7 @@ set(ly_source_files
${ly_src_dir}/row_common.cc ${ly_src_dir}/row_common.cc
${ly_src_dir}/row_mips.cc ${ly_src_dir}/row_mips.cc
${ly_src_dir}/row_neon.cc ${ly_src_dir}/row_neon.cc
${ly_src_dir}/row_posix.cc ${ly_src_dir}/row_gcc.cc
${ly_src_dir}/row_win.cc ${ly_src_dir}/row_win.cc
${ly_src_dir}/scale.cc ${ly_src_dir}/scale.cc
${ly_src_dir}/scale_any.cc ${ly_src_dir}/scale_any.cc
...@@ -43,7 +43,7 @@ set(ly_source_files ...@@ -43,7 +43,7 @@ set(ly_source_files
${ly_src_dir}/scale_common.cc ${ly_src_dir}/scale_common.cc
${ly_src_dir}/scale_mips.cc ${ly_src_dir}/scale_mips.cc
${ly_src_dir}/scale_neon.cc ${ly_src_dir}/scale_neon.cc
${ly_src_dir}/scale_posix.cc ${ly_src_dir}/scale_gcc.cc
${ly_src_dir}/scale_win.cc ${ly_src_dir}/scale_win.cc
${ly_src_dir}/video_common.cc ${ly_src_dir}/video_common.cc
) )
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
# sources. # sources.
'source/compare.cc', 'source/compare.cc',
'source/compare_common.cc', 'source/compare_common.cc',
'source/compare_posix.cc', 'source/compare_gcc.cc',
'source/compare_win.cc', 'source/compare_win.cc',
'source/convert.cc', 'source/convert.cc',
'source/convert_argb.cc', 'source/convert_argb.cc',
...@@ -51,14 +51,14 @@ ...@@ -51,14 +51,14 @@
'source/row_any.cc', 'source/row_any.cc',
'source/row_common.cc', 'source/row_common.cc',
'source/row_mips.cc', 'source/row_mips.cc',
'source/row_posix.cc', 'source/row_gcc.cc',
'source/row_win.cc', 'source/row_win.cc',
'source/scale.cc', 'source/scale.cc',
'source/scale_argb.cc', 'source/scale_argb.cc',
'source/scale_any.cc', 'source/scale_any.cc',
'source/scale_common.cc', 'source/scale_common.cc',
'source/scale_mips.cc', 'source/scale_mips.cc',
'source/scale_posix.cc', 'source/scale_gcc.cc',
'source/scale_win.cc', 'source/scale_win.cc',
'source/video_common.cc', 'source/video_common.cc',
], ],
......
...@@ -8,7 +8,7 @@ CXXFLAGS+=-Iinclude/ ...@@ -8,7 +8,7 @@ CXXFLAGS+=-Iinclude/
LOCAL_OBJ_FILES := \ LOCAL_OBJ_FILES := \
source/compare.o \ source/compare.o \
source/compare_common.o \ source/compare_common.o \
source/compare_posix.o \ source/compare_gcc.o \
source/convert.o \ source/convert.o \
source/convert_argb.o \ source/convert_argb.o \
source/convert_from.o \ source/convert_from.o \
...@@ -23,12 +23,12 @@ LOCAL_OBJ_FILES := \ ...@@ -23,12 +23,12 @@ LOCAL_OBJ_FILES := \
source/row_any.o \ source/row_any.o \
source/row_common.o \ source/row_common.o \
source/row_mips.o \ source/row_mips.o \
source/row_posix.o \ source/row_gcc.o \
source/scale.o \ source/scale.o \
source/scale_argb.o \ source/scale_argb.o \
source/scale_common.o \ source/scale_common.o \
source/scale_mips.o \ source/scale_mips.o \
source/scale_posix.o \ source/scale_gcc.o \
source/video_common.o source/video_common.o
.cc.o: .cc.o:
......
...@@ -16,12 +16,10 @@ namespace libyuv { ...@@ -16,12 +16,10 @@ namespace libyuv {
extern "C" { extern "C" {
#endif #endif
// ClangCL use posix source instead. // This module is for Visual C x86.
#if defined(__clang__) && defined(_MSC_VER) #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
#include "source/compare_posix.cc" defined(_MSC_VER) && !defined(__clang__)
// This module is for Visual C.
#elif !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
__declspec(naked) __declspec(naked)
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) {
__asm { __asm {
...@@ -223,7 +221,7 @@ uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed) { ...@@ -223,7 +221,7 @@ uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed) {
} }
} }
#endif // _MSC_VER >= 1700 #endif // _MSC_VER >= 1700
#endif // defined(__clang__) && defined(_MSC_VER) #endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
......
...@@ -21,13 +21,9 @@ namespace libyuv { ...@@ -21,13 +21,9 @@ namespace libyuv {
extern "C" { extern "C" {
#endif #endif
// ClangCL use posix source instead.
#if defined(__clang__) && defined(_MSC_VER)
#include "source/row_posix.cc"
// This module is for Visual C. // This module is for Visual C.
#elif !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) && \ #if !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) && \
defined(_MSC_VER) defined(_MSC_VER) && !defined(__clang__)
struct YuvConstants { struct YuvConstants {
lvec8 kUVToB; // 0 lvec8 kUVToB; // 0
...@@ -6391,7 +6387,7 @@ void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, ...@@ -6391,7 +6387,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(__clang__) && defined(_MSC_VER) #endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64))
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
......
...@@ -16,12 +16,9 @@ namespace libyuv { ...@@ -16,12 +16,9 @@ namespace libyuv {
extern "C" { extern "C" {
#endif #endif
// ClangCL use posix source instead.
#if defined(__clang__) && defined(_MSC_VER)
#include "source/scale_posix.cc"
// This module is for Visual C x86. // This module is for Visual C x86.
#elif !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 =
...@@ -1349,8 +1346,7 @@ int FixedDiv1_X86(int num, int div) { ...@@ -1349,8 +1346,7 @@ int FixedDiv1_X86(int num, int div) {
ret ret
} }
} }
#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
#endif // defined(__clang__) && defined(_MSC_VER)
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
......
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