OLD | NEW |
1 diff --git a/third_party/qcms/src/iccread.c b/third_party/qcms/src/iccread.c | 1 diff --git a/third_party/qcms/src/iccread.c b/third_party/qcms/src/iccread.c |
2 index 36b7011..9ee6b94 100644 | 2 index 36b7011..9ee6b94 100644 |
3 --- a/third_party/qcms/src/iccread.c | 3 --- a/third_party/qcms/src/iccread.c |
4 +++ b/third_party/qcms/src/iccread.c | 4 +++ b/third_party/qcms/src/iccread.c |
5 @@ -266,7 +266,7 @@ qcms_bool qcms_profile_is_bogus(qcms_profile *profile) | 5 @@ -266,7 +266,7 @@ qcms_bool qcms_profile_is_bogus(qcms_profile *profile) |
6 if (profile->color_space != RGB_SIGNATURE) | 6 if (profile->color_space != RGB_SIGNATURE) |
7 return false; | 7 return false; |
8 | 8 |
9 - if (profile->A2B0 || profile->B2A0) | 9 - if (profile->A2B0 || profile->B2A0) |
10 + if (qcms_supports_iccv4 && (profile->A2B0 || profile->B2A0)) | 10 + if (qcms_supports_iccv4 && (profile->A2B0 || profile->B2A0)) |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 +#define qcms_atomic_increment(x) _InterlockedIncrement((long volatile *)&x) | 164 +#define qcms_atomic_increment(x) _InterlockedIncrement((long volatile *)&x) |
165 +#define qcms_atomic_decrement(x) _InterlockedDecrement((long volatile*)&x) | 165 +#define qcms_atomic_decrement(x) _InterlockedDecrement((long volatile*)&x) |
166 + | 166 + |
167 +#else | 167 +#else |
168 + | 168 + |
169 +#define qcms_atomic_increment(x) __sync_add_and_fetch(&x, 1) | 169 +#define qcms_atomic_increment(x) __sync_add_and_fetch(&x, 1) |
170 +#define qcms_atomic_decrement(x) __sync_sub_and_fetch(&x, 1) | 170 +#define qcms_atomic_decrement(x) __sync_sub_and_fetch(&x, 1) |
171 + | 171 + |
172 +#endif | 172 +#endif |
173 diff --git a/third_party/qcms/src/qcmstypes.h b/third_party/qcms/src/qcmstypes.h | 173 diff --git a/third_party/qcms/src/qcmstypes.h b/third_party/qcms/src/qcmstypes.h |
174 index 56d8de3..9a9b197 100644 | 174 index 56d8de3..d58f691 100644 |
175 --- a/third_party/qcms/src/qcmstypes.h | 175 --- a/third_party/qcms/src/qcmstypes.h |
176 +++ b/third_party/qcms/src/qcmstypes.h | 176 +++ b/third_party/qcms/src/qcmstypes.h |
177 @@ -87,7 +87,12 @@ typedef unsigned __int64 uint64_t; | 177 @@ -22,37 +22,6 @@ |
| 178 #ifndef QCMS_TYPES_H |
| 179 #define QCMS_TYPES_H |
| 180 |
| 181 -#ifdef MOZ_QCMS |
| 182 - |
| 183 -#include "prtypes.h" |
| 184 - |
| 185 -/* prtypes.h defines IS_LITTLE_ENDIAN and IS_BIG ENDIAN */ |
| 186 - |
| 187 -#if defined (__SVR4) && defined (__sun) |
| 188 -/* int_types.h gets included somehow, so avoid redefining the types differently
*/ |
| 189 -#include <sys/int_types.h> |
| 190 -#elif defined (_AIX) |
| 191 -#include <sys/types.h> |
| 192 -#elif !defined(ANDROID) && !defined(__OpenBSD__) |
| 193 -typedef PRInt8 int8_t; |
| 194 -typedef PRUint8 uint8_t; |
| 195 -typedef PRInt16 int16_t; |
| 196 -typedef PRUint16 uint16_t; |
| 197 -typedef PRInt32 int32_t; |
| 198 -typedef PRUint32 uint32_t; |
| 199 -typedef PRInt64 int64_t; |
| 200 -typedef PRUint64 uint64_t; |
| 201 - |
| 202 -#ifdef __OS2__ |
| 203 -/* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't coll
ide */ |
| 204 -#include <stdlib.h> |
| 205 -#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED) |
| 206 -typedef PRUptrdiff uintptr_t; |
| 207 -#endif |
| 208 -#endif |
| 209 - |
| 210 -#else // MOZ_QCMS |
| 211 - |
| 212 #if BYTE_ORDER == LITTLE_ENDIAN |
| 213 #define IS_LITTLE_ENDIAN |
| 214 #elif BYTE_ORDER == BIG_ENDIAN |
| 215 @@ -75,7 +44,7 @@ typedef PRUptrdiff uintptr_t; |
| 216 |
| 217 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi
) || defined (__sun) || defined (sun) || defined (__digital__) |
| 218 # include <inttypes.h> |
| 219 -#elif defined (_MSC_VER) |
| 220 +#elif defined (_MSC_VER) && _MSC_VER < 1600 |
| 221 typedef __int8 int8_t; |
| 222 typedef unsigned __int8 uint8_t; |
| 223 typedef __int16 int16_t; |
| 224 @@ -87,7 +56,12 @@ typedef unsigned __int64 uint64_t; |
178 #ifdef _WIN64 | 225 #ifdef _WIN64 |
179 typedef unsigned __int64 uintptr_t; | 226 typedef unsigned __int64 uintptr_t; |
180 #else | 227 #else |
181 +#pragma warning(push) | 228 +#pragma warning(push) |
182 +/* Disable benign redefinition of type warning 4142 */ | 229 +/* Disable benign redefinition of type warning 4142 */ |
183 +#pragma warning(disable:4142) | 230 +#pragma warning(disable:4142) |
184 typedef unsigned long uintptr_t; | 231 typedef unsigned long uintptr_t; |
185 +/* Restore warnings */ | 232 +/* Restore warnings */ |
186 +#pragma warning(pop) | 233 +#pragma warning(pop) |
187 #endif | 234 #endif |
188 | 235 |
189 #elif defined (_AIX) | 236 #elif defined (_AIX) |
| 237 @@ -96,8 +70,6 @@ typedef unsigned long uintptr_t; |
| 238 # include <stdint.h> |
| 239 #endif |
| 240 |
| 241 -#endif |
| 242 - |
| 243 typedef qcms_bool bool; |
| 244 #define true 1 |
| 245 #define false 0 |
190 diff --git a/third_party/qcms/src/transform-sse1.c b/third_party/qcms/src/transf
orm-sse1.c | 246 diff --git a/third_party/qcms/src/transform-sse1.c b/third_party/qcms/src/transf
orm-sse1.c |
191 index 2f34db5..aaee1bf 100644 | 247 index 2f34db5..aaee1bf 100644 |
192 --- a/third_party/qcms/src/transform-sse1.c | 248 --- a/third_party/qcms/src/transform-sse1.c |
193 +++ b/third_party/qcms/src/transform-sse1.c | 249 +++ b/third_party/qcms/src/transform-sse1.c |
194 @@ -34,7 +34,8 @@ static const ALIGN float clampMaxValueX4[4] = | 250 @@ -34,7 +34,8 @@ static const ALIGN float clampMaxValueX4[4] = |
195 void qcms_transform_data_rgb_out_lut_sse1(qcms_transform *transform, | 251 void qcms_transform_data_rgb_out_lut_sse1(qcms_transform *transform, |
196 unsigned char *src, | 252 unsigned char *src, |
197 unsigned char *dest, | 253 unsigned char *dest, |
198 - size_t length) | 254 - size_t length) |
199 + size_t length, | 255 + size_t length, |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 | 1001 |
946 -float lut_interp_linear(double value, uint16_t *table, int length); | 1002 -float lut_interp_linear(double value, uint16_t *table, int length); |
947 -float lut_interp_linear_float(float value, float *table, int length); | 1003 -float lut_interp_linear_float(float value, float *table, int length); |
948 -uint16_t lut_interp_linear16(uint16_t input_value, uint16_t *table, int length)
; | 1004 -uint16_t lut_interp_linear16(uint16_t input_value, uint16_t *table, int length)
; |
949 +float lut_interp_linear(double value, uint16_t *table, size_t length); | 1005 +float lut_interp_linear(double value, uint16_t *table, size_t length); |
950 +float lut_interp_linear_float(float value, float *table, size_t length); | 1006 +float lut_interp_linear_float(float value, float *table, size_t length); |
951 +uint16_t lut_interp_linear16(uint16_t input_value, uint16_t *table, size_t leng
th); | 1007 +uint16_t lut_interp_linear16(uint16_t input_value, uint16_t *table, size_t leng
th); |
952 | 1008 |
953 | 1009 |
954 static inline float lerp(float a, float b, float t) | 1010 static inline float lerp(float a, float b, float t) |
OLD | NEW |