summaryrefslogtreecommitdiffstats
path: root/abs/core/x265/x265-1.7-fix-slowness-with-gcc-5.1.patch
blob: 6aa679dbc1a372b430ce1823b33fe5b895d837d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# HG changeset patch
# User Deepthi Nandakumar <deepthi@multicorewareinc.com>
# Date 1434559454 -19800
#      Wed Jun 17 22:14:14 2015 +0530
# Branch stable
# Node ID 98325f22a1bad500e6a0c3372bf8177e81167cae
# Parent  e0738af788da598a3cdf4458dbb46fbb07563534
fix issue #143 x265 is slow when it is build with GCC 5.1

diff -r e0738af788da -r 98325f22a1ba source/common/vec/vec-primitives.cpp
--- a/source/common/vec/vec-primitives.cpp	Wed May 20 10:29:09 2015 -0500
+++ b/source/common/vec/vec-primitives.cpp	Wed Jun 17 22:14:14 2015 +0530
@@ -32,12 +32,13 @@
 #define HAVE_SSE4
 #define HAVE_AVX2
 #elif defined(__GNUC__)
-#if __clang__ || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
+#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#if __clang__ || GCC_VERSION >= 40300 /* gcc_version >= gcc-4.3.0 */
 #define HAVE_SSE3
 #define HAVE_SSSE3
 #define HAVE_SSE4
 #endif
-#if __clang__ || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 7)
+#if __clang__ || GCC_VERSION >= 40700 /* gcc_version >= gcc-4.7.0 */
 #define HAVE_AVX2
 #endif
 #elif defined(_MSC_VER)