[gs-commits] ghostpdl branch, gs9.28-temp-for-testing, updated. gs9.28-temp-for-testing-tag-6-g3b5cffa
[email protected] (Robin Watts)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, gs9.28-temp-for-testing has been updated
via 3b5cffabfad0daa430be50c7c70bc111bf1a9dd2 (commit)
via 7ae9a6d4b4216585673537713c4a1ac180809576 (commit)
from 802b23e38b229936d56c28a4c00cf55cf7a42d3a (commit)
----------------------------------------------------------------------
commit 3b5cffabfad0daa430be50c7c70bc111bf1a9dd2
Author: Robin Watts <[email protected]>
Date: Mon Aug 26 15:28:33 2019 +0100
Fix deep colour knockout logic.
Problem seen with:
tests_private/pdf/PDF_1.7_FTS/fts_25_2507.pdf.psdcmyk16.72.0
diff --git a/base/gxblend.c b/base/gxblend.c
index 8f6645e..cf9991b 100644
--- a/base/gxblend.c
+++ b/base/gxblend.c
@@ -1395,7 +1395,7 @@ art_blend_pixel_16_inline(uint16_t *gs_restrict dst, const uint16_t *gs_restrict
else if (b >= s)
dst[i] = 0xffff;
else
- dst[i] = (unsigned int)(0xffff * b + (s>>1)) / (unsigned int)s;
+ dst[i] = ((unsigned int)(0xffff * b + (s>>1))) / s;
}
break;
case BLEND_MODE_ColorBurn:
@@ -1407,7 +1407,7 @@ art_blend_pixel_16_inline(uint16_t *gs_restrict dst, const uint16_t *gs_restrict
else if (b >= s)
dst[i] = 0;
else
- dst[i] = 0xffff - (unsigned int)(0xffff * b + (s>>1)) / (unsigned int)s;
+ dst[i] = 0xffff - ((unsigned int)(0xffff * b + (s>>1))) / s;
}
break;
case BLEND_MODE_Darken:
@@ -2582,12 +2582,13 @@ art_pdf_composite_knockout_16(uint16_t *gs_restrict dst,
for (i = 0; i < n_chan; i++) {
int c_bl; /* Result of blend function */
int c_mix; /* Blend result mixed with source color */
+ int stmp;
c_s = src[i];
c_b = dst[i];
c_bl = blend[i];
- tmp = a_b * (c_bl - ((int)c_s)) + 0x8000;
- c_mix = c_s + (((tmp >> 16) + tmp) >> 16);
+ stmp = (a_b>>1) * (c_bl - ((int)c_s)) + 0x4000;
+ c_mix = c_s + (((stmp >> 16) + stmp) >> 15);
tmp = (c_b << 16) + src_scale * (c_mix - c_b) + 0x8000;
dst[i] = tmp >> 16;
}
----------------------------------------------------------------------
commit 7ae9a6d4b4216585673537713c4a1ac180809576
Author: Robin Watts <[email protected]>
Date: Mon Aug 26 14:34:46 2019 +0100
Squash a couple of warnings.
diff --git a/base/gdevmem.c b/base/gdevmem.c
index 9a3fe5e..7b158a0 100644
--- a/base/gdevmem.c
+++ b/base/gdevmem.c
@@ -387,7 +387,7 @@ gdev_mem_max_height(const gx_device_memory * dev, int width, ulong size,
int height;
ulong max_height;
ulong data_size;
- bool deep = device_is_deep(dev);
+ bool deep = device_is_deep((const gx_device *)dev);
if (page_uses_transparency) {
/*
diff --git a/base/gdevp14.c b/base/gdevp14.c
index d38951a..aecc354 100644
--- a/base/gdevp14.c
+++ b/base/gdevp14.c
@@ -6798,7 +6798,7 @@ c_pdf14trans_write(const gs_composite_t * pct, byte * data, uint * psize,
int pdf14_needed = cdev->pdf14_needed;
int trans_group_level = cdev->pdf14_trans_group_level;
int smask_level = cdev->pdf14_smask_level;
- bool deep = device_is_deep(cdev);
+ bool deep = device_is_deep((gx_device *)cdev);
code = dev_proc((gx_device *) cdev, get_profile)((gx_device *) cdev,
&dev_profile);
Summary of changes:
base/gdevmem.c | 2 +-
base/gdevp14.c | 2 +-
base/gxblend.c | 9 +++++----
3 files changed, 7 insertions(+), 6 deletions(-)