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

ifdefs for compilers commented

BUG=none
TEST=try bots
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@859 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent ba0eab93
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 858
Version: 859
License: BSD
License File: LICENSE
......
......@@ -145,26 +145,29 @@ extern "C" {
#define HAS_YUY2TOYROW_SSE2
#endif
// AVX2 functions available on all x86 platforms, but not NaCL, and
// require VS2012, clang 3.4 or gcc 4.7.
// GCC >= 4.7.0 required for AVX2.
#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
/* Test for GCC >= 4.7.0 */
#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
#define GCC_HAS_AVX2 1
#endif // GNUC >= 4.7
#endif // __GNUC__
// clang >= 3.4.0 required for AVX2.
#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
/* Test for clang >= 3.4.0 */
#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
#define CLANG_HAS_AVX2 1
#endif // GNUC >= 4.7
#endif // __GNUC__
#endif // clang >= 3.4
#endif // __clang__
#if !defined(LIBYUV_DISABLE_X86) && \
(defined(__x86_64__) || defined(__i386__)) && \
((defined(_M_IX86) && defined(_MSC_VER) && _MSC_VER >= 1700) || \
defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
// Visual C 2012 required for AVX2.
#if defined(_M_IX86) && defined(_MSC_VER) && _MSC_VER >= 1700
#define VISUALC_HAS_AVX2 1
#endif // VisualStudio >= 2012
// The following are available on all x86 platforms except NaCL x64, and
// require VS2012, clang 3.4 or gcc 4.7.
#if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \
defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
// Effects:
#define HAS_ARGBPOLYNOMIALROW_AVX2
#define HAS_ARGBSHUFFLEROW_AVX2
......@@ -172,13 +175,9 @@ extern "C" {
#define HAS_ARGBCOPYYTOALPHAROW_AVX2
#endif
// The following are Windows only:
// The following are require VS2012.
// TODO(fbarchard): Port to gcc.
#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER)
// Effects:
// Caveat: Visual C 2012 required for AVX2.
#if _MSC_VER >= 1700
#if !defined(LIBYUV_DISABLE_X86) && defined(VISUALC_HAS_AVX2)
#define HAS_ARGBTOUVROW_AVX2
#define HAS_ARGBTOYJROW_AVX2
#define HAS_ARGBTOYROW_AVX2
......@@ -202,8 +201,7 @@ extern "C" {
#define HAS_ARGBMULTIPLYROW_AVX2
#define HAS_ARGBSUBTRACTROW_AVX2
#define HAS_ARGBUNATTENUATEROW_AVX2
#endif // _MSC_VER >= 1700
#endif // defined(_MSC_VER)
#endif // defined(VISUALC_HAS_AVX2)
// The following are Yasm x86 only:
// TODO(fbarchard): Port AVX2 to inline.
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 858
#define LIBYUV_VERSION 859
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
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