"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "base/gxipixel.c" between
ghostscript-9.26.tar.xz and ghostscript-9.27.tar.xz

About: Ghostscript is an interpreter and rendering engine for the PostScript language and for PDF (GPL release).

gxipixel.c  (ghostscript-9.26.tar.xz):gxipixel.c  (ghostscript-9.27.tar.xz)
/* Copyright (C) 2001-2018 Artifex Software, Inc. /* Copyright (C) 2001-2019 Artifex Software, Inc.
All Rights Reserved. All Rights Reserved.
This software is provided AS-IS with no warranty, either express or This software is provided AS-IS with no warranty, either express or
implied. implied.
This software is distributed under license and may not be copied, This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms modified or distributed except as expressly authorized under the terms
of the license contained in the file LICENSE in this distribution. of the license contained in the file LICENSE in this distribution.
Refer to licensing information at http://www.artifex.com or contact Refer to licensing information at http://www.artifex.com or contact
skipping to change at line 996 skipping to change at line 996
{ sample_unpack_1, sample_unpack_2, { sample_unpack_1, sample_unpack_2,
sample_unpack_4, sample_unpack_8, sample_unpack_4, sample_unpack_8,
sample_unpack_12, sample_unpack_16 sample_unpack_12, sample_unpack_16
}, },
{ sample_unpack_1_interleaved, sample_unpack_2_interleaved, { sample_unpack_1_interleaved, sample_unpack_2_interleaved,
sample_unpack_4_interleaved, sample_unpack_8_interleaved, sample_unpack_4_interleaved, sample_unpack_8_interleaved,
sample_unpack_12, sample_unpack_16 sample_unpack_12, sample_unpack_16
}}; }};
int num_planes = penum->num_planes; int num_planes = penum->num_planes;
bool interleaved = (num_planes == 1 && penum->plane_depths[0] != penum-> bps); bool interleaved = (num_planes == 1 && penum->plane_depths[0] != penum-> bps);
irender_proc_t render_fn = NULL;
int i; int i;
if (interleaved) { if (interleaved) {
int num_components = penum->plane_depths[0] / penum->bps; int num_components = penum->plane_depths[0] / penum->bps;
for (i = 1; i < num_components; i++) { for (i = 1; i < num_components; i++) {
if (decode[0] != decode[i * 2 + 0] || if (decode[0] != decode[i * 2 + 0] ||
decode[1] != decode[i * 2 + 1]) decode[1] != decode[i * 2 + 1])
break; break;
} }
if (i == num_components) if (i == num_components)
interleaved = false; /* Use single table. */ interleaved = false; /* Use single table. */
} }
penum->unpack = procs[interleaved][index_bps]; penum->unpack = procs[interleaved][index_bps];
if_debug1m('b', mem, "[b]unpack=%d\n", bps); if_debug1m('b', mem, "[b]unpack=%d\n", bps);
/* Set up pixel0 for image class procedures. */ /* Set up pixel0 for image class procedures. */
penum->dda.pixel0 = penum->dda.strip; penum->dda.pixel0 = penum->dda.strip;
penum->skip_next_line = NULL; penum->skip_next_line = NULL;
for (i = 0; i < gx_image_class_table_count; ++i) for (i = 0; i < gx_image_class_table_count; ++i) {
if ((penum->render = gx_image_class_table[i](penum)) != 0) code = gx_image_class_table[i](penum, &render_fn);
if (code < 0)
goto fail;
if (render_fn != NULL) {
penum->render = render_fn;
break; break;
}
}
penum->dev = dev; /* Restore this (in case it was changed to cdev or rtd ev) */ penum->dev = dev; /* Restore this (in case it was changed to cdev or rtd ev) */
if (i == gx_image_class_table_count) { if (i == gx_image_class_table_count) {
/* No available class can handle this image. */ /* No available class can handle this image. */
return_error(gs_error_rangecheck); return_error(gs_error_rangecheck);
} }
} }
return 0; return 0;
fail: fail:
gs_free_object(mem, buffer, "image buffer"); gs_free_object(mem, buffer, "image buffer");
 End of changes. 4 change blocks. 
3 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)