Lines Matching refs:dc

67 init_dither_channel_new(stpi_dither_channel_t *dc, stp_vars_t *v)
83 ((stpi_ordered_t *) (dc->aux_data))->ord_new = ord;
84 ord->channels = dc->nlevels - 1;
92 stpi_dither_segment_t *dd = &(dc->ranges[j]);
168 print_color_ordered_new(const stpi_dither_t *d, stpi_dither_channel_t *dc,
174 int levels = dc->nlevels - 1;
175 unsigned dpoint = ditherpoint(d, &(dc->dithermat), x);
176 const stpi_ordered_t *o = (const stpi_ordered_t *) dc->aux_data;
187 stpi_dither_segment_t *dd = &(dc->ranges[i]);
191 unsigned char *tptr = dc->ptr + d->ptr_offset;
196 set_row_ends(dc, x);
210 print_color_ordered(const stpi_dither_t *d, stpi_dither_channel_t *dc, int val,
216 int levels = dc->nlevels - 1;
223 stpi_dither_segment_t *dd = &(dc->ranges[i]);
235 if (rangepoint >= ditherpoint(d, &(dc->dithermat), x))
242 unsigned char *tptr = dc->ptr + d->ptr_offset;
247 set_row_ends(dc, x);
271 stpi_dither_channel_t *dc = &CHANNEL(d, i);
272 if (dc->aux_data)
274 stpi_ordered_t *ord = (stpi_ordered_t *) dc->aux_data;
284 stp_free(dc->aux_data);
285 dc->aux_data = NULL;
300 stpi_dither_channel_t *dc = &CHANNEL(d, i);
302 dc->aux_data = stp_malloc(sizeof(stpi_ordered_t));
303 s = (stpi_ordered_t *) dc->aux_data;
307 s->shift = 16 - dc->signif_bits;
308 s->mask = ((1 << dc->signif_bits) - 1) << s->shift;
315 if (dc->nlevels < 2)
317 else if (i == 0 || !compare_channels(&CHANNEL(d, 0), dc))
320 init_dither_channel_new(dc, v);
362 stpi_dither_channel_t *dc = &(CHANNEL(d, i));
363 if (dc->nlevels != 1)
365 if (dc->nlevels != 1 || dc->ranges[0].upper->bits != 1)
400 stpi_dither_channel_t *dc = &CHANNEL(d, i);
401 stpi_ordered_t *s = (stpi_ordered_t *) dc->aux_data;
403 unsigned short val = raw[i] << dc->signif_bits;
412 unsigned char *tptr = dc->ptr + d->ptr_offset;
413 set_row_ends(dc, x);