[gs-cvs] rev 8767 - trunk/gs/src
giles at ghostscript.com
giles at ghostscript.com
Wed May 21 12:46:48 PDT 2008
Author: giles
Date: 2008-05-21 12:46:47 -0700 (Wed, 21 May 2008)
New Revision: 8767
Modified:
trunk/gs/src/gdevbbox.c
trunk/gs/src/gsimage.c
trunk/gs/src/gsiparam.h
trunk/gs/src/gxclimag.c
trunk/gs/src/gxidata.c
trunk/gs/src/gximage.c
trunk/gs/src/gxiparam.h
trunk/gs/src/zimage.c
Log:
In r8765 we concluded GS_IMAGE_MAX_PLANES was the same as
MAX_COMPONENTS. Make this change permanent by removing the
MAX_PLANES define entirely.
Modified: trunk/gs/src/gdevbbox.c
===================================================================
--- trunk/gs/src/gdevbbox.c 2008-05-21 19:46:43 UTC (rev 8766)
+++ trunk/gs/src/gdevbbox.c 2008-05-21 19:46:47 UTC (rev 8767)
@@ -1016,7 +1016,7 @@
gx_device_bbox *const bdev = (gx_device_bbox *) dev;
gx_device *tdev = bdev->target;
dev_proc_begin_typed_image((*begin_typed_image));
- byte wanted[GS_IMAGE_MAX_PLANES];
+ byte wanted[GS_IMAGE_MAX_COMPONENTS];
if (tdev == 0) {
tdev = dev;
Modified: trunk/gs/src/gsimage.c
===================================================================
--- trunk/gs/src/gsimage.c 2008-05-21 19:46:43 UTC (rev 8766)
+++ trunk/gs/src/gsimage.c 2008-05-21 19:46:47 UTC (rev 8767)
@@ -102,9 +102,9 @@
/* only needed for gs_image_next */
int y;
bool error;
- byte wanted[GS_IMAGE_MAX_PLANES]; /* cache gx_image_planes_wanted */
- byte client_wanted[GS_IMAGE_MAX_PLANES]; /* see gsimage.h */
- image_enum_plane_t planes[GS_IMAGE_MAX_PLANES]; /* see above */
+ byte wanted[GS_IMAGE_MAX_COMPONENTS]; /* cache gx_image_planes_wanted */
+ byte client_wanted[GS_IMAGE_MAX_COMPONENTS]; /* see gsimage.h */
+ image_enum_plane_t planes[GS_IMAGE_MAX_COMPONENTS]; /* see above */
/*
* To reduce setup for transferring complete rows, we maintain a
* partially initialized parameter array for gx_image_plane_data_rows.
@@ -112,7 +112,7 @@
* gx_image_plane_data_rows; the data_x and raster members are reset
* when needed.
*/
- gx_image_plane_t image_planes[GS_IMAGE_MAX_PLANES];
+ gx_image_plane_t image_planes[GS_IMAGE_MAX_COMPONENTS];
};
gs_private_st_composite(st_gs_image_enum, gs_image_enum, "gs_image_enum",
@@ -456,8 +456,8 @@
int px = penum->plane_index;
int num_planes = penum->num_planes;
int i, code;
- uint used[GS_IMAGE_MAX_PLANES];
- gs_const_string plane_data[GS_IMAGE_MAX_PLANES];
+ uint used[GS_IMAGE_MAX_COMPONENTS];
+ gs_const_string plane_data[GS_IMAGE_MAX_COMPONENTS];
if (penum->planes[px].source.size != 0)
return_error(gs_error_rangecheck);
Modified: trunk/gs/src/gsiparam.h
===================================================================
--- trunk/gs/src/gsiparam.h 2008-05-21 19:46:43 UTC (rev 8766)
+++ trunk/gs/src/gsiparam.h 2008-05-21 19:46:47 UTC (rev 8767)
@@ -58,18 +58,13 @@
"gs_image_common_t")
/*
- * Define the maximum number of components in image data.
+ * Define the maximum number of components/planes in image data.
* The +1 is for either color + alpha or mask + color.
*/
#define GS_IMAGE_MAX_COLOR_COMPONENTS GS_CLIENT_COLOR_MAX_COMPONENTS
#define GS_IMAGE_MAX_COMPONENTS (GS_IMAGE_MAX_COLOR_COMPONENTS + 1)
/*
- * Define the maximum number of planes in image data.
- */
-#define GS_IMAGE_MAX_PLANES GS_IMAGE_MAX_COMPONENTS
-
-/*
* Define the structure for defining data common to ImageType 1 images,
* ImageType 3 DataDicts and MaskDicts, and ImageType 4 images -- i.e.,
* all the image types that use explicitly supplied data. It follows
Modified: trunk/gs/src/gxclimag.c
===================================================================
--- trunk/gs/src/gxclimag.c 2008-05-21 19:46:43 UTC (rev 8766)
+++ trunk/gs/src/gxclimag.c 2008-05-21 19:46:47 UTC (rev 8767)
@@ -748,7 +748,7 @@
int by0 = ibox.p.y, by1 = ibox.q.y;
int bpp = pie->bits_per_plane;
int num_planes = pie->num_planes;
- uint offsets[GS_IMAGE_MAX_PLANES];
+ uint offsets[GS_IMAGE_MAX_COMPONENTS];
int i, iy, ih, xskip, xoff, nrows;
uint bytes_per_plane, bytes_per_row, rows_per_cmd;
Modified: trunk/gs/src/gxidata.c
===================================================================
--- trunk/gs/src/gxidata.c 2008-05-21 19:46:43 UTC (rev 8766)
+++ trunk/gs/src/gxidata.c 2008-05-21 19:46:47 UTC (rev 8767)
@@ -47,7 +47,7 @@
+ 7) >> 3)
fixed adjust = penum->adjust;
- ulong offsets[GS_IMAGE_MAX_PLANES];
+ ulong offsets[GS_IMAGE_MAX_COMPONENTS];
int ignore_data_x;
bool bit_planar = penum->num_planes > penum->spp;
int code;
Modified: trunk/gs/src/gximage.c
===================================================================
--- trunk/gs/src/gximage.c 2008-05-21 19:46:43 UTC (rev 8766)
+++ trunk/gs/src/gximage.c 2008-05-21 19:46:47 UTC (rev 8767)
@@ -146,13 +146,13 @@
int data_x, uint raster, int height)
{
int num_planes = info->num_planes;
- gx_image_plane_t planes[GS_IMAGE_MAX_PLANES];
+ gx_image_plane_t planes[GS_IMAGE_MAX_COMPONENTS];
int i;
#ifdef DEBUG
- if (num_planes > GS_IMAGE_MAX_PLANES) {
- lprintf2("num_planes=%d > GS_IMAGE_MAX_PLANES=%d!\n",
- num_planes, GS_IMAGE_MAX_PLANES);
+ if (num_planes > GS_IMAGE_MAX_COMPONENTS) {
+ lprintf2("num_planes=%d > GS_IMAGE_MAX_COMPONENTS=%d!\n",
+ num_planes, GS_IMAGE_MAX_COMPONENTS);
return_error(gs_error_Fatal);
}
#endif
Modified: trunk/gs/src/gxiparam.h
===================================================================
--- trunk/gs/src/gxiparam.h 2008-05-21 19:46:43 UTC (rev 8766)
+++ trunk/gs/src/gxiparam.h 2008-05-21 19:46:47 UTC (rev 8767)
@@ -216,8 +216,8 @@
gs_id id;\
bool skipping; /* don't render, just consume image streams. */\
int num_planes;\
- int plane_depths[GS_IMAGE_MAX_PLANES]; /* [num_planes] */\
- int plane_widths[GS_IMAGE_MAX_PLANES] /* [num_planes] */
+ int plane_depths[GS_IMAGE_MAX_COMPONENTS]; /* [num_planes] */\
+ int plane_widths[GS_IMAGE_MAX_COMPONENTS] /* [num_planes] */
struct gx_image_enum_common_s {
gx_image_enum_common;
};
Modified: trunk/gs/src/zimage.c
===================================================================
--- trunk/gs/src/zimage.c 2008-05-21 19:46:43 UTC (rev 8766)
+++ trunk/gs/src/zimage.c 2008-05-21 19:46:47 UTC (rev 8767)
@@ -378,8 +378,8 @@
gs_image_enum *penum = r_ptr(esp, gs_image_enum);
int px = ETOP_PLANE_INDEX(esp)->value.intval;
int num_sources = ETOP_NUM_SOURCES(esp)->value.intval;
- uint size, used[GS_IMAGE_MAX_PLANES];
- gs_const_string plane_data[GS_IMAGE_MAX_PLANES];
+ uint size, used[GS_IMAGE_MAX_COMPONENTS];
+ gs_const_string plane_data[GS_IMAGE_MAX_COMPONENTS];
const byte *wanted;
int i, code;
@@ -451,7 +451,7 @@
for (;;) {
uint min_avail = max_int;
- gs_const_string plane_data[GS_IMAGE_MAX_PLANES];
+ gs_const_string plane_data[GS_IMAGE_MAX_COMPONENTS];
int code;
int px;
const ref *pp;
@@ -515,7 +515,7 @@
{
int pi;
- uint used[GS_IMAGE_MAX_PLANES];
+ uint used[GS_IMAGE_MAX_COMPONENTS];
code = gs_image_next_planes(penum, plane_data, used);
/* Now that used has been set, update the streams. */
@@ -545,8 +545,8 @@
{
gs_image_enum *penum = r_ptr(esp, gs_image_enum);
int num_sources = ETOP_NUM_SOURCES(esp)->value.intval;
- gs_const_string sources[GS_IMAGE_MAX_PLANES];
- uint used[GS_IMAGE_MAX_PLANES];
+ gs_const_string sources[GS_IMAGE_MAX_COMPONENTS];
+ uint used[GS_IMAGE_MAX_COMPONENTS];
/* Pass no data initially, to find out how much is retained. */
memset(sources, 0, sizeof(sources[0]) * num_sources);
More information about the gs-cvs
mailing list