Lines Matching refs:source
85 rle_source_ptr source = (rle_source_ptr) sinfo; in start_input_rle() local
92 source->header = *rle_hdr_init(NULL); in start_input_rle()
93 source->header.rle_file = source->pub.input_file; in start_input_rle()
94 switch (rle_get_setup(&(source->header))) { in start_input_rle()
117 width = source->header.xmax - source->header.xmin + 1; in start_input_rle()
118 height = source->header.ymax - source->header.ymin + 1; in start_input_rle()
119 source->header.xmin = 0; /* realign horizontally */ in start_input_rle()
120 source->header.xmax = width-1; in start_input_rle()
126 if (source->header.ncolors == 1 && source->header.ncmap == 0) { in start_input_rle()
127 source->visual = GRAYSCALE; in start_input_rle()
129 } else if (source->header.ncolors == 1 && source->header.ncmap == 1) { in start_input_rle()
130 source->visual = MAPPEDGRAY; in start_input_rle()
132 1 << source->header.cmaplen); in start_input_rle()
133 } else if (source->header.ncolors == 1 && source->header.ncmap == 3) { in start_input_rle()
134 source->visual = PSEUDOCOLOR; in start_input_rle()
136 1 << source->header.cmaplen); in start_input_rle()
137 } else if (source->header.ncolors == 3 && source->header.ncmap == 3) { in start_input_rle()
138 source->visual = TRUECOLOR; in start_input_rle()
140 1 << source->header.cmaplen); in start_input_rle()
141 } else if (source->header.ncolors == 3 && source->header.ncmap == 0) { in start_input_rle()
142 source->visual = DIRECTCOLOR; in start_input_rle()
147 if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) { in start_input_rle()
159 if (source->visual != GRAYSCALE) { in start_input_rle()
160 source->rle_row = (rle_pixel**) (*cinfo->mem->alloc_sarray) in start_input_rle()
166 source->image = (*cinfo->mem->request_virt_sarray) in start_input_rle()
168 (JDIMENSION) (width * source->header.ncolors), in start_input_rle()
178 source->pub.buffer_height = 1; in start_input_rle()
191 rle_source_ptr source = (rle_source_ptr) sinfo; in get_rle_row() local
193 source->row--; in get_rle_row()
194 source->pub.buffer = (*cinfo->mem->access_virt_sarray) in get_rle_row()
195 ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); in get_rle_row()
209 rle_source_ptr source = (rle_source_ptr) sinfo; in get_pseudocolor_row() local
215 colormap = source->header.cmap; in get_pseudocolor_row()
216 dest_row = source->pub.buffer[0]; in get_pseudocolor_row()
217 source->row--; in get_pseudocolor_row()
219 ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); in get_pseudocolor_row()
245 rle_source_ptr source = (rle_source_ptr) sinfo; in load_image() local
255 colormap = source->header.cmap; in load_image()
256 rle_row = source->rle_row; in load_image()
261 RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */ in load_image()
271 switch (source->visual) { in load_image()
277 ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); in load_image()
278 rle_getrow(&source->header, rle_row); in load_image()
292 ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); in load_image()
293 rle_row = source->rle_row; in load_image()
294 rle_getrow(&source->header, rle_row); in load_image()
297 for (channel = 0; channel < source->header.ncolors; channel++) { in load_image()
315 ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); in load_image()
316 rle_getrow(&source->header, rle_row); in load_image()
343 if (source->visual == PSEUDOCOLOR) { in load_image()
344 source->pub.buffer = source->rle_row; in load_image()
345 source->pub.get_pixel_rows = get_pseudocolor_row; in load_image()
347 source->pub.get_pixel_rows = get_rle_row; in load_image()
349 source->row = cinfo->image_height; in load_image()
352 return (*source->pub.get_pixel_rows) (cinfo, sinfo); in load_image()
374 rle_source_ptr source; in jinit_read_rle() local
377 source = (rle_source_ptr) in jinit_read_rle()
381 source->pub.start_input = start_input_rle; in jinit_read_rle()
382 source->pub.finish_input = finish_input_rle; in jinit_read_rle()
383 source->pub.get_pixel_rows = load_image; in jinit_read_rle()
385 return (cjpeg_source_ptr) source; in jinit_read_rle()