Lines Matching refs:source
83 rle_source_ptr source = (rle_source_ptr) sinfo; in start_input_rle() local
90 source->header = *rle_hdr_init(NULL); in start_input_rle()
91 source->header.rle_file = source->pub.input_file; in start_input_rle()
92 switch (rle_get_setup(&(source->header))) { in start_input_rle()
115 width = source->header.xmax - source->header.xmin + 1; in start_input_rle()
116 height = source->header.ymax - source->header.ymin + 1; in start_input_rle()
117 source->header.xmin = 0; /* realign horizontally */ in start_input_rle()
118 source->header.xmax = width-1; in start_input_rle()
124 if (source->header.ncolors == 1 && source->header.ncmap == 0) { in start_input_rle()
125 source->visual = GRAYSCALE; in start_input_rle()
127 } else if (source->header.ncolors == 1 && source->header.ncmap == 1) { in start_input_rle()
128 source->visual = MAPPEDGRAY; in start_input_rle()
130 1 << source->header.cmaplen); in start_input_rle()
131 } else if (source->header.ncolors == 1 && source->header.ncmap == 3) { in start_input_rle()
132 source->visual = PSEUDOCOLOR; in start_input_rle()
134 1 << source->header.cmaplen); in start_input_rle()
135 } else if (source->header.ncolors == 3 && source->header.ncmap == 3) { in start_input_rle()
136 source->visual = TRUECOLOR; in start_input_rle()
138 1 << source->header.cmaplen); in start_input_rle()
139 } else if (source->header.ncolors == 3 && source->header.ncmap == 0) { in start_input_rle()
140 source->visual = DIRECTCOLOR; in start_input_rle()
145 if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) { in start_input_rle()
157 if (source->visual != GRAYSCALE) { in start_input_rle()
158 source->rle_row = (rle_pixel**) (*cinfo->mem->alloc_sarray) in start_input_rle()
164 source->image = (*cinfo->mem->request_virt_sarray) in start_input_rle()
166 (JDIMENSION) (width * source->header.ncolors), in start_input_rle()
176 source->pub.buffer_height = 1; in start_input_rle()
189 rle_source_ptr source = (rle_source_ptr) sinfo; in get_rle_row() local
191 source->row--; in get_rle_row()
192 source->pub.buffer = (*cinfo->mem->access_virt_sarray) in get_rle_row()
193 ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); in get_rle_row()
207 rle_source_ptr source = (rle_source_ptr) sinfo; in get_pseudocolor_row() local
213 colormap = source->header.cmap; in get_pseudocolor_row()
214 dest_row = source->pub.buffer[0]; in get_pseudocolor_row()
215 source->row--; in get_pseudocolor_row()
217 ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); in get_pseudocolor_row()
243 rle_source_ptr source = (rle_source_ptr) sinfo; in load_image() local
253 colormap = source->header.cmap; in load_image()
254 rle_row = source->rle_row; in load_image()
260 RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */ in load_image()
270 switch (source->visual) { in load_image()
276 ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); in load_image()
277 rle_getrow(&source->header, rle_row); in load_image()
291 ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); in load_image()
292 rle_row = source->rle_row; in load_image()
293 rle_getrow(&source->header, rle_row); in load_image()
296 for (channel = 0; channel < source->header.ncolors; channel++) { in load_image()
314 ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); in load_image()
315 rle_getrow(&source->header, rle_row); in load_image()
342 if (source->visual == PSEUDOCOLOR) { in load_image()
343 source->pub.buffer = source->rle_row; in load_image()
344 source->pub.get_pixel_rows = get_pseudocolor_row; in load_image()
346 source->pub.get_pixel_rows = get_rle_row; in load_image()
348 source->row = cinfo->image_height; in load_image()
351 return (*source->pub.get_pixel_rows) (cinfo, sinfo); in load_image()
373 rle_source_ptr source; in jinit_read_rle() local
376 source = (rle_source_ptr) in jinit_read_rle()
380 source->pub.start_input = start_input_rle; in jinit_read_rle()
381 source->pub.finish_input = finish_input_rle; in jinit_read_rle()
382 source->pub.get_pixel_rows = load_image; in jinit_read_rle()
384 return (cjpeg_source_ptr) source; in jinit_read_rle()