aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2016-01-07 17:16:16 +0100
committerMattias Andrée <maandree@member.fsf.org>2016-01-07 17:16:16 +0100
commiteba337c7114593bffb9a5d57cc2a163b12619b68 (patch)
tree4e90be1c465a926380d2aea2a1af8d26372a2fda /src
parentm (diff)
downloadlibclut-eba337c7114593bffb9a5d57cc2a163b12619b68.tar.gz
libclut-eba337c7114593bffb9a5d57cc2a163b12619b68.tar.bz2
libclut-eba337c7114593bffb9a5d57cc2a163b12619b68.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--src/libclut.h73
1 files changed, 37 insertions, 36 deletions
diff --git a/src/libclut.h b/src/libclut.h
index eba99d3..891c7c4 100644
--- a/src/libclut.h
+++ b/src/libclut.h
@@ -131,24 +131,24 @@
break; \
libclut_model_srgb_to_ciexyy(rs__[i__] / ((double)(max)), gs__[i__] / ((double)(max)), \
bs__[i__] / ((double)(max)), &x__, &y__, &Y__); \
- for (i__ = 0; i__ < rn__; i__) \
- { \
- if (r != 1.0) \
- { \
- libclut_model_ciexyy_to_srgb(x__, y__, (Y__ - 0.5) * r + 0.5, &r__, &g__, &b__); \
- rs__[i__] = (type)(r__ * (double)(max)); \
- } \
- if (g != 1.0) \
- { \
- libclut_model_ciexyy_to_srgb(x__, y__, (Y__ - 0.5) * g + 0.5, &r__, &g__, &b__); \
- gs__[i__] = (type)(g__ * (double)(max)); \
- } \
- if (b != 1.0) \
- { \
- libclut_model_ciexyy_to_srgb(x__, y__, (Y__ - 0.5) * b + 0.5, &r__, &g__, &b__); \
- bs__[i__] = (type)(b__ * (double)(max)); \
- } \
- } \
+ if (r != 1.0) \
+ for (i__ = 0; i__ < rn__; i__) \
+ { \
+ libclut_model_ciexyy_to_srgb(x__, y__, (Y__ - 0.5) * r + 0.5, &r__, &g__, &b__); \
+ rs__[i__] = (type)(r__ * (double)(max)); \
+ } \
+ if (g != 1.0) \
+ for (i__ = 0; i__ < gn__; i__) \
+ { \
+ libclut_model_ciexyy_to_srgb(x__, y__, (Y__ - 0.5) * g + 0.5, &r__, &g__, &b__); \
+ gs__[i__] = (type)(g__ * (double)(max)); \
+ } \
+ if (b != 1.0) \
+ for (i__ = 0; i__ < bn__; i__) \
+ { \
+ libclut_model_ciexyy_to_srgb(x__, y__, (Y__ - 0.5) * b + 0.5, &r__, &g__, &b__); \
+ bs__[i__] = (type)(b__ * (double)(max)); \
+ } \
} \
} \
while (0)
@@ -229,28 +229,29 @@
break; \
libclut_model_srgb_to_ciexyy(rs__[i__] / ((double)(max)), gs__[i__] / ((double)(max)), \
bs__[i__] / ((double)(max)), &x__, &y__, &Y__); \
- for (i__ = 0; i__ < rn__; i__) \
- { \
- if (r != 1.0) \
- { \
- libclut_model_ciexyy_to_srgb(x__, y__, Y__ * r, &r__, &g__, &b__); \
- rs__[i__] = (type)(r__ * (double)(max)); \
- } \
- if (g != 1.0) \
- { \
- libclut_model_ciexyy_to_srgb(x__, y__, Y__ * g, &r__, &g__, &b__); \
- gs__[i__] = (type)(g__ * (double)(max)); \
- } \
- if (b != 1.0) \
- { \
- libclut_model_ciexyy_to_srgb(x__, y__, Y__ * b, &r__, &g__, &b__); \
- bs__[i__] = (type)(b__ * (double)(max)); \
- } \
- } \
+ if (r != 1.0) \
+ for (i__ = 0; i__ < rn__; i__) \
+ { \
+ libclut_model_ciexyy_to_srgb(x__, y__, Y__ * r, &r__, &g__, &b__); \
+ rs__[i__] = (type)(r__ * (double)(max)); \
+ } \
+ if (g != 1.0) \
+ for (i__ = 0; i__ < gn__; i__) \
+ { \
+ libclut_model_ciexyy_to_srgb(x__, y__, Y__ * g, &r__, &g__, &b__); \
+ gs__[i__] = (type)(g__ * (double)(max)); \
+ } \
+ if (b != 1.0) \
+ for (i__ = 0; i__ < bn__; i__) \
+ { \
+ libclut_model_ciexyy_to_srgb(x__, y__, Y__ * b, &r__, &g__, &b__); \
+ bs__[i__] = (type)(b__ * (double)(max)); \
+ } \
} \
} \
while (0)
+
#endif