diff options
Diffstat (limited to 'source/fitz/colorspace.c')
-rw-r--r-- | source/fitz/colorspace.c | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index eb24fb04..6113e496 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -105,54 +105,54 @@ static void cmyk_to_rgb(fz_context *ctx, fz_colorspace *cs, const float *cmyk, f /* this is a matrix multiplication, unrolled for performance */ x = c1m1y1 * k; /* 0 0 0 1 */ r = g = b = c1m1y1 - x; /* 0 0 0 0 */ - r += 0.1373 * x; - g += 0.1216 * x; - b += 0.1255 * x; + r += 0.1373f * x; + g += 0.1216f * x; + b += 0.1255f * x; x = c1m1y * k; /* 0 0 1 1 */ - r += 0.1098 * x; - g += 0.1020 * x; + r += 0.1098f * x; + g += 0.1020f * x; x = c1m1y - x; /* 0 0 1 0 */ r += x; - g += 0.9490 * x; + g += 0.9490f * x; x = c1my1 * k; /* 0 1 0 1 */ - r += 0.1412 * x; + r += 0.1412f * x; x = c1my1 - x; /* 0 1 0 0 */ - r += 0.9255 * x; - b += 0.5490 * x; + r += 0.9255f * x; + b += 0.5490f * x; x = c1my * k; /* 0 1 1 1 */ - r += 0.1333 * x; + r += 0.1333f * x; x = c1my - x; /* 0 1 1 0 */ - r += 0.9294 * x; - g += 0.1098 * x; - b += 0.1412 * x; + r += 0.9294f * x; + g += 0.1098f * x; + b += 0.1412f * x; x = cm1y1 * k; /* 1 0 0 1 */ - g += 0.0588 * x; - b += 0.1412 * x; + g += 0.0588f * x; + b += 0.1412f * x; x = cm1y1 - x; /* 1 0 0 0 */ - g += 0.6784 * x; - b += 0.9373 * x; + g += 0.6784f * x; + b += 0.9373f * x; x = cm1y * k; /* 1 0 1 1 */ - g += 0.0745 * x; + g += 0.0745f * x; x = cm1y - x; /* 1 0 1 0 */ - g += 0.6510 * x; - b += 0.3137 * x; + g += 0.6510f * x; + b += 0.3137f * x; x = cmy1 * k; /* 1 1 0 1 */ - b += 0.0078 * x; + b += 0.0078f * x; x = cmy1 - x; /* 1 1 0 0 */ - r += 0.1804 * x; - g += 0.1922 * x; - b += 0.5725 * x; + r += 0.1804f * x; + g += 0.1922f * x; + b += 0.5725f * x; x = cmy * (1-k); /* 1 1 1 0 */ - r += 0.2118 * x; - g += 0.2119 * x; - b += 0.2235 * x; + r += 0.2118f * x; + g += 0.2119f * x; + b += 0.2235f * x; rgb[0] = fz_clamp(r, 0, 1); rgb[1] = fz_clamp(g, 0, 1); rgb[2] = fz_clamp(b, 0, 1); @@ -1171,67 +1171,67 @@ static inline void cached_cmyk_conv(unsigned char *restrict const pr, unsigned c x0 = (c1m1y1<<8) - x1; /* 0 0 0 0 */ x1 = x1>>8; /* From 23 fractional bits to 15 */ r = g = b = x0; - r += 35 * x1; /* 0.1373 */ - g += 31 * x1; /* 0.1216 */ - b += 32 * x1; /* 0.1255 */ + r += 35 * x1; /* 0.1373f */ + g += 31 * x1; /* 0.1216f */ + b += 32 * x1; /* 0.1255f */ x1 = c1m1y * k; /* 0 0 1 1 */ x0 = (c1m1y<<8) - x1; /* 0 0 1 0 */ x1 >>= 8; /* From 23 fractional bits to 15 */ - r += 28 * x1; /* 0.1098 */ - g += 26 * x1; /* 0.1020 */ + r += 28 * x1; /* 0.1098f */ + g += 26 * x1; /* 0.1020f */ r += x0; x0 >>= 8; /* From 23 fractional bits to 15 */ - g += 243 * x0; /* 0.9490 */ + g += 243 * x0; /* 0.9490f */ x1 = c1my1 * k; /* 0 1 0 1 */ x0 = (c1my1<<8) - x1; /* 0 1 0 0 */ x1 >>= 8; /* From 23 fractional bits to 15 */ x0 >>= 8; /* From 23 fractional bits to 15 */ - r += 36 * x1; /* 0.1412 */ - r += 237 * x0; /* 0.9255 */ - b += 141 * x0; /* 0.5490 */ + r += 36 * x1; /* 0.1412f */ + r += 237 * x0; /* 0.9255f */ + b += 141 * x0; /* 0.5490f */ x1 = c1my * k; /* 0 1 1 1 */ x0 = (c1my<<8) - x1; /* 0 1 1 0 */ x1 >>= 8; /* From 23 fractional bits to 15 */ x0 >>= 8; /* From 23 fractional bits to 15 */ - r += 34 * x1; /* 0.1333 */ - r += 238 * x0; /* 0.9294 */ - g += 28 * x0; /* 0.1098 */ - b += 36 * x0; /* 0.1412 */ + r += 34 * x1; /* 0.1333f */ + r += 238 * x0; /* 0.9294f */ + g += 28 * x0; /* 0.1098f */ + b += 36 * x0; /* 0.1412f */ x1 = cm1y1 * k; /* 1 0 0 1 */ x0 = (cm1y1<<8) - x1; /* 1 0 0 0 */ x1 >>= 8; /* From 23 fractional bits to 15 */ x0 >>= 8; /* From 23 fractional bits to 15 */ - g += 15 * x1; /* 0.0588 */ - b += 36 * x1; /* 0.1412 */ - g += 174 * x0; /* 0.6784 */ - b += 240 * x0; /* 0.9373 */ + g += 15 * x1; /* 0.0588f */ + b += 36 * x1; /* 0.1412f */ + g += 174 * x0; /* 0.6784f */ + b += 240 * x0; /* 0.9373f */ x1 = cm1y * k; /* 1 0 1 1 */ x0 = (cm1y<<8) - x1; /* 1 0 1 0 */ x1 >>= 8; /* From 23 fractional bits to 15 */ x0 >>= 8; /* From 23 fractional bits to 15 */ - g += 19 * x1; /* 0.0745 */ - g += 167 * x0; /* 0.6510 */ - b += 80 * x0; /* 0.3137 */ + g += 19 * x1; /* 0.0745f */ + g += 167 * x0; /* 0.6510f */ + b += 80 * x0; /* 0.3137f */ x1 = cmy1 * k; /* 1 1 0 1 */ x0 = (cmy1<<8) - x1; /* 1 1 0 0 */ x1 >>= 8; /* From 23 fractional bits to 15 */ x0 >>= 8; /* From 23 fractional bits to 15 */ - b += 2 * x1; /* 0.0078 */ - r += 46 * x0; /* 0.1804 */ - g += 49 * x0; /* 0.1922 */ - b += 147 * x0; /* 0.5725 */ + b += 2 * x1; /* 0.0078f */ + r += 46 * x0; /* 0.1804f */ + g += 49 * x0; /* 0.1922f */ + b += 147 * x0; /* 0.5725f */ x0 = cmy * (256-k); /* 1 1 1 0 */ x0 >>= 8; /* From 23 fractional bits to 15 */ - r += 54 * x0; /* 0.2118 */ - g += 54 * x0; /* 0.2119 */ - b += 57 * x0; /* 0.2235 */ + r += 54 * x0; /* 0.2118f */ + g += 54 * x0; /* 0.2119f */ + b += 57 * x0; /* 0.2235f */ r -= (r>>8); g -= (g>>8); |