• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git a/third_party/libopenjpeg20/mct.c b/third_party/libopenjpeg20/mct.c
2index 8b0276f..7731c15 100644
3--- a/third_party/libopenjpeg20/mct.c
4+++ b/third_party/libopenjpeg20/mct.c
5@@ -37,13 +37,16 @@
6  * POSSIBILITY OF SUCH DAMAGE.
7  */
8
9-#ifdef __SSE__
10+#if defined(__SSE__) && !defined(_M_IX86) && !defined(__i386)
11+#define USE_SSE
12 #include <xmmintrin.h>
13 #endif
14-#ifdef __SSE2__
15+#if defined(__SSE2__) && !defined(_M_IX86) && !defined(__i386)
16+#define USE_SSE2
17 #include <emmintrin.h>
18 #endif
19-#ifdef __SSE4_1__
20+#if defined(__SSE4_1__) && !defined(_M_IX86) && !defined(__i386)
21+#define USE_SSE4
22 #include <smmintrin.h>
23 #endif
24
25@@ -72,7 +75,7 @@ const OPJ_FLOAT64 * opj_mct_get_mct_norms_real ()
26 /* <summary> */
27 /* Forward reversible MCT. */
28 /* </summary> */
29-#ifdef __SSE2__
30+#ifdef USE_SSE2
31 void opj_mct_encode(
32 		OPJ_INT32* restrict c0,
33 		OPJ_INT32* restrict c1,
34@@ -137,7 +140,7 @@ void opj_mct_encode(
35 /* <summary> */
36 /* Inverse reversible MCT. */
37 /* </summary> */
38-#ifdef __SSE2__
39+#ifdef USE_SSE2
40 void opj_mct_decode(
41 		OPJ_INT32* restrict c0,
42 		OPJ_INT32* restrict c1,
43@@ -204,7 +207,7 @@ OPJ_FLOAT64 opj_mct_getnorm(OPJ_UINT32 compno) {
44 /* <summary> */
45 /* Forward irreversible MCT. */
46 /* </summary> */
47-#ifdef __SSE4_1__
48+#ifdef USE_SSE4
49 void opj_mct_encode_real(
50 												 OPJ_INT32* restrict c0,
51 												 OPJ_INT32* restrict c1,
52@@ -377,7 +380,7 @@ void opj_mct_decode_real(
53 		OPJ_UINT32 n)
54 {
55 	OPJ_UINT32 i;
56-#ifdef __SSE__
57+#ifdef USE_SSE
58 	__m128 vrv, vgu, vgv, vbu;
59 	vrv = _mm_set1_ps(1.402f);
60 	vgu = _mm_set1_ps(0.34413f);
61