diff --git a/Android.mk b/Android.mk index d53c5afa7..bb8802373 100644 --- a/Android.mk +++ b/Android.mk @@ -9,7 +9,7 @@ LOCAL_SRC_FILES := \ source/compare.cc \ source/compare_common.cc \ source/compare_neon64.cc \ - source/compare_posix.cc \ + source/compare_gcc.cc \ source/convert.cc \ source/convert_argb.cc \ source/convert_from.cc \ @@ -26,14 +26,14 @@ LOCAL_SRC_FILES := \ source/row_common.cc \ source/row_mips.cc \ source/row_neon64.cc \ - source/row_posix.cc \ + source/row_gcc.cc \ source/scale.cc \ source/scale_any.cc \ source/scale_argb.cc \ source/scale_common.cc \ source/scale_mips.cc \ source/scale_neon64.cc \ - source/scale_posix.cc \ + source/scale_gcc.cc \ source/video_common.cc # TODO(fbarchard): Enable mjpeg encoder. diff --git a/BUILD.gn b/BUILD.gn index a240d1168..43a25e018 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -41,7 +41,7 @@ source_set("libyuv") { # sources. "source/compare.cc", "source/compare_common.cc", - "source/compare_posix.cc", + "source/compare_gcc.cc", "source/compare_win.cc", "source/convert.cc", "source/convert_argb.cc", @@ -60,14 +60,14 @@ source_set("libyuv") { "source/row_any.cc", "source/row_common.cc", "source/row_mips.cc", - "source/row_posix.cc", + "source/row_gcc.cc", "source/row_win.cc", "source/scale.cc", "source/scale_any.cc", "source/scale_argb.cc", "source/scale_common.cc", "source/scale_mips.cc", - "source/scale_posix.cc", + "source/scale_gcc.cc", "source/scale_win.cc", "source/video_common.cc", ] diff --git a/CMakeLists.txt b/CMakeLists.txt index b0339882a..1e0acc56f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(ly_source_files ${ly_src_dir}/compare.cc ${ly_src_dir}/compare_common.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}/convert.cc ${ly_src_dir}/convert_argb.cc @@ -35,7 +35,7 @@ set(ly_source_files ${ly_src_dir}/row_common.cc ${ly_src_dir}/row_mips.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}/scale.cc ${ly_src_dir}/scale_any.cc @@ -43,7 +43,7 @@ set(ly_source_files ${ly_src_dir}/scale_common.cc ${ly_src_dir}/scale_mips.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}/video_common.cc ) diff --git a/libyuv.gypi b/libyuv.gypi index 8a99de567..47209c9cb 100644 --- a/libyuv.gypi +++ b/libyuv.gypi @@ -32,7 +32,7 @@ # sources. 'source/compare.cc', 'source/compare_common.cc', - 'source/compare_posix.cc', + 'source/compare_gcc.cc', 'source/compare_win.cc', 'source/convert.cc', 'source/convert_argb.cc', @@ -51,14 +51,14 @@ 'source/row_any.cc', 'source/row_common.cc', 'source/row_mips.cc', - 'source/row_posix.cc', + 'source/row_gcc.cc', 'source/row_win.cc', 'source/scale.cc', 'source/scale_argb.cc', 'source/scale_any.cc', 'source/scale_common.cc', 'source/scale_mips.cc', - 'source/scale_posix.cc', + 'source/scale_gcc.cc', 'source/scale_win.cc', 'source/video_common.cc', ], diff --git a/linux.mk b/linux.mk index d3c33f2cf..364ae1a37 100644 --- a/linux.mk +++ b/linux.mk @@ -8,7 +8,7 @@ CXXFLAGS+=-Iinclude/ LOCAL_OBJ_FILES := \ source/compare.o \ source/compare_common.o \ - source/compare_posix.o \ + source/compare_gcc.o \ source/convert.o \ source/convert_argb.o \ source/convert_from.o \ @@ -23,12 +23,12 @@ LOCAL_OBJ_FILES := \ source/row_any.o \ source/row_common.o \ source/row_mips.o \ - source/row_posix.o \ + source/row_gcc.o \ source/scale.o \ source/scale_argb.o \ source/scale_common.o \ source/scale_mips.o \ - source/scale_posix.o \ + source/scale_gcc.o \ source/video_common.o .cc.o: diff --git a/source/compare_posix.cc b/source/compare_gcc.cc similarity index 100% rename from source/compare_posix.cc rename to source/compare_gcc.cc diff --git a/source/compare_win.cc b/source/compare_win.cc index e6cb20528..19806f275 100644 --- a/source/compare_win.cc +++ b/source/compare_win.cc @@ -16,12 +16,10 @@ namespace libyuv { extern "C" { #endif -// ClangCL use posix source instead. -#if defined(__clang__) && defined(_MSC_VER) -#include "source/compare_posix.cc" +// This module is for Visual C x86. +#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ + defined(_MSC_VER) && !defined(__clang__) -// This module is for Visual C. -#elif !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) __declspec(naked) uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) { __asm { @@ -223,7 +221,7 @@ uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed) { } } #endif // _MSC_VER >= 1700 -#endif // defined(__clang__) && defined(_MSC_VER) +#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) #ifdef __cplusplus } // extern "C" diff --git a/source/row_posix.cc b/source/row_gcc.cc similarity index 100% rename from source/row_posix.cc rename to source/row_gcc.cc diff --git a/source/row_win.cc b/source/row_win.cc index d7360f747..52bfd1a74 100644 --- a/source/row_win.cc +++ b/source/row_win.cc @@ -21,13 +21,9 @@ namespace libyuv { extern "C" { #endif -// ClangCL use posix source instead. -#if defined(__clang__) && defined(_MSC_VER) -#include "source/row_posix.cc" - // This module is for Visual C. -#elif !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) && \ - defined(_MSC_VER) +#if !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) && \ + defined(_MSC_VER) && !defined(__clang__) struct YuvConstants { lvec8 kUVToB; // 0 @@ -6391,7 +6387,7 @@ void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 #endif // defined(_M_X64) -#endif // defined(__clang__) && defined(_MSC_VER) +#endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) #ifdef __cplusplus } // extern "C" diff --git a/source/scale_posix.cc b/source/scale_gcc.cc similarity index 100% rename from source/scale_posix.cc rename to source/scale_gcc.cc diff --git a/source/scale_win.cc b/source/scale_win.cc index 01a816356..92773a39f 100644 --- a/source/scale_win.cc +++ b/source/scale_win.cc @@ -16,12 +16,9 @@ namespace libyuv { extern "C" { #endif -// ClangCL use posix source instead. -#if defined(__clang__) && defined(_MSC_VER) -#include "source/scale_posix.cc" - // 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 static uvec8 kShuf0 = @@ -1349,8 +1346,7 @@ int FixedDiv1_X86(int num, int div) { ret } } - -#endif // defined(__clang__) && defined(_MSC_VER) +#endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) #ifdef __cplusplus } // extern "C"