author | Jeff Muizelaar <jmuizelaar@mozilla.com> |
Tue, 10 May 2011 11:55:39 -0400 | |
changeset 69254 | f59eca5aea9f44f0205313c7645d71ee1ea43857 |
parent 69253 | a99f84efbb20dd1078860980450c8b008634c951 |
child 69255 | 36e216fdf97a5b54037abcd537a186c81a5e47a9 |
push id | unknown |
push user | unknown |
push date | unknown |
reviewers | ehsan |
bugs | 605179 |
milestone | 6.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
gfx/qcms/iccread.c | file | annotate | diff | comparison | revisions | |
gfx/qcms/qcms.h | file | annotate | diff | comparison | revisions | |
gfx/qcms/qcmsint.h | file | annotate | diff | comparison | revisions | |
gfx/qcms/qcmstypes.h | file | annotate | diff | comparison | revisions | |
gfx/qcms/transform.c | file | annotate | diff | comparison | revisions |
--- a/gfx/qcms/iccread.c +++ b/gfx/qcms/iccread.c @@ -1,9 +1,8 @@ -/* // qcms // Copyright (C) 2009 Mozilla Foundation // Copyright (C) 1998-2007 Marti Maria // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, @@ -15,17 +14,16 @@ // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ #include <math.h> #include <assert.h> #include <stdlib.h> #include <string.h> #include "qcmsint.h" typedef uint32_t be32;
--- a/gfx/qcms/qcms.h +++ b/gfx/qcms/qcms.h @@ -89,17 +89,17 @@ typedef struct _qcms_profile qcms_profil typedef enum { QCMS_INTENT_DEFAULT = 0, QCMS_INTENT_PERCEPTUAL = 0, QCMS_INTENT_RELATIVE_COLORIMETRIC = 1, QCMS_INTENT_SATURATION = 2, QCMS_INTENT_ABSOLUTE_COLORIMETRIC = 3 } qcms_intent; -/* XXX: I don't really like the _DATA_ prefix */ +//XXX: I don't really like the _DATA_ prefix typedef enum { QCMS_DATA_RGB_8, QCMS_DATA_RGBA_8, QCMS_DATA_GRAY_8, QCMS_DATA_GRAYA_8 } qcms_data_type; /* the names for the following two types are sort of ugly */
--- a/gfx/qcms/qcmsint.h +++ b/gfx/qcms/qcmsint.h @@ -108,17 +108,17 @@ struct tag_value { uint32_t reserved; struct { s15Fixed16Number X; s15Fixed16Number Y; s15Fixed16Number Z; } XYZNumber; } XYZType; }; -}; /* I guess we need to pack this? */ +}; // I guess we need to pack this? #endif #define RGB_SIGNATURE 0x52474220 #define GRAY_SIGNATURE 0x47524159 struct _qcms_profile { uint32_t class; uint32_t color_space;
--- a/gfx/qcms/qcmstypes.h +++ b/gfx/qcms/qcmstypes.h @@ -25,17 +25,17 @@ typedef PRUint64 uint64_t; #ifdef __OS2__ /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */ #include <stdlib.h> #elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED) typedef PRUptrdiff uintptr_t; #endif #endif -#else /* MOZ_QCMS */ +#else // MOZ_QCMS #if BYTE_ORDER == LITTLE_ENDIAN #define IS_LITTLE_ENDIAN #elif BYTE_ORDER == BIG_ENDIAN #define IS_BIG_ENDIAN #endif /* all of the platforms that we use _MSC_VER on are little endian
--- a/gfx/qcms/transform.c +++ b/gfx/qcms/transform.c @@ -1,9 +1,8 @@ -/* // qcms // Copyright (C) 2009 Mozilla Corporation // Copyright (C) 1998-2007 Marti Maria // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, @@ -15,17 +14,16 @@ // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ #include <stdlib.h> #include <math.h> #include <assert.h> #include "qcmsint.h" /* for MSVC, GCC, Intel, and Sun compilers */ #if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64) @@ -657,18 +655,18 @@ static uint16_t *build_pow_table(float g } return output; } static float clamp_float(float a) { if (a > 1.) return 1.; - else if (a < 0) - return 0; + else if (a < 0.) + return 0.; else return a; } #if 0 static void qcms_transform_data_rgb_out_pow(qcms_transform *transform, unsigned char *src, unsigned char *dest, size_t length) { int i;