Home | History | Annotate | Download | only in libjpeg-turbo

Lines Matching refs:source

86   rle_source_ptr source = (rle_source_ptr) sinfo;
93 source->header = *rle_hdr_init(NULL);
94 source->header.rle_file = source->pub.input_file;
95 switch (rle_get_setup(&(source->header))) {
118 width = source->header.xmax - source->header.xmin + 1;
119 height = source->header.ymax - source->header.ymin + 1;
120 source->header.xmin = 0; /* realign horizontally */
121 source->header.xmax = width-1;
127 if (source->header.ncolors == 1 && source->header.ncmap == 0) {
128 source->visual = GRAYSCALE;
130 } else if (source->header.ncolors == 1 && source->header.ncmap == 1) {
131 source->visual = MAPPEDGRAY;
133 1 << source->header.cmaplen);
134 } else if (source->header.ncolors == 1 && source->header.ncmap == 3) {
135 source->visual = PSEUDOCOLOR;
137 1 << source->header.cmaplen);
138 } else if (source->header.ncolors == 3 && source->header.ncmap == 3) {
139 source->visual = TRUECOLOR;
141 1 << source->header.cmaplen);
142 } else if (source->header.ncolors == 3 && source->header.ncmap == 0) {
143 source->visual = DIRECTCOLOR;
148 if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) {
160 if (source->visual != GRAYSCALE) {
161 source->rle_row = (rle_pixel**) (*cinfo->mem->alloc_sarray)
167 source->image = (*cinfo->mem->request_virt_sarray)
169 (JDIMENSION) (width * source->header.ncolors),
179 source->pub.buffer_height = 1;
192 rle_source_ptr source = (rle_source_ptr) sinfo;
194 source->row--;
195 source->pub.buffer = (*cinfo->mem->access_virt_sarray)
196 ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE);
210 rle_source_ptr source = (rle_source_ptr) sinfo;
216 colormap = source->header.cmap;
217 dest_row = source->pub.buffer[0];
218 source->row--;
220 ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE);
239 * we set source->pub.get_pixel_rows so that subsequent calls go straight to
246 rle_source_ptr source = (rle_source_ptr) sinfo;
256 colormap = source->header.cmap;
257 rle_row = source->rle_row;
262 RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */
272 switch (source->visual) {
278 ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
279 rle_getrow(&source->header, rle_row);
293 ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
294 rle_row = source->rle_row;
295 rle_getrow(&source->header, rle_row);
298 for (channel = 0; channel < source->header.ncolors; channel++) {
316 ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
317 rle_getrow(&source->header, rle_row);
344 if (source->visual == PSEUDOCOLOR) {
345 source->pub.buffer = source->rle_row;
346 source->pub.get_pixel_rows = get_pseudocolor_row;
348 source->pub.get_pixel_rows = get_rle_row;
350 source->row = cinfo->image_height;
353 return (*source->pub.get_pixel_rows) (cinfo, sinfo);
375 rle_source_ptr source;
378 source = (rle_source_ptr)
382 source->pub.start_input = start_input_rle;
383 source->pub.finish_input = finish_input_rle;
384 source->pub.get_pixel_rows = load_image;
386 return (cjpeg_source_ptr) source;