Lines Matching defs:source
49 /* Private version of data source object */
180 tga_source_ptr source = (tga_source_ptr)sinfo;
184 ptr = source->pub.buffer[0];
186 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
187 *ptr++ = (JSAMPLE)UCH(source->tga_pixel[0]);
196 tga_source_ptr source = (tga_source_ptr)sinfo;
200 register JSAMPARRAY colormap = source->colormap;
201 int cmaplen = source->cmap_length;
203 ptr = source->pub.buffer[0];
205 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
206 t = UCH(source->tga_pixel[0]);
220 tga_source_ptr source = (tga_source_ptr)sinfo;
225 ptr = source->pub.buffer[0];
227 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
228 t = UCH(source->tga_pixel[0]);
229 t += UCH(source->tga_pixel[1]) << 8;
248 tga_source_ptr source = (tga_source_ptr)sinfo;
252 ptr = source->pub.buffer[0];
254 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
255 *ptr++ = (JSAMPLE)UCH(source->tga_pixel[2]); /* change BGR to RGB order */
256 *ptr++ = (JSAMPLE)UCH(source->tga_pixel[1]);
257 *ptr++ = (JSAMPLE)UCH(source->tga_pixel[0]);
281 tga_source_ptr source = (tga_source_ptr)sinfo;
284 /* Compute row of source that maps to current_row of normal order */
287 source_row = cinfo->image_height - source->current_row - 1;
290 source->pub.buffer = (*cinfo->mem->access_virt_sarray)
291 ((j_common_ptr)cinfo, source->whole_image,
294 source->current_row++;
308 tga_source_ptr source = (tga_source_ptr)sinfo;
319 source->pub.buffer = (*cinfo->mem->access_virt_sarray)
320 ((j_common_ptr)cinfo, source->whole_image, row, (JDIMENSION)1, TRUE);
321 (*source->get_pixel_rows) (cinfo, sinfo);
327 source->pub.get_pixel_rows = get_memory_row;
328 source->current_row = 0;
341 tga_source_ptr source = (tga_source_ptr)sinfo;
350 if (!ReadOK(source->pub.input_file, targaheader, 18))
363 source->pixel_size = UCH(targaheader[16]) >> 3;
370 source->pixel_size < 1 || source->pixel_size > 4 ||
378 source->read_pixel = read_rle_pixel;
379 source->block_count = source->dup_pixel_count = 0;
383 source->read_pixel = read_non_rle_pixel;
392 if (source->pixel_size == 1 && cmaptype == 1)
393 source->get_pixel_rows = get_8bit_row;
399 switch (source->pixel_size) {
401 source->get_pixel_rows = get_16bit_row;
404 source->get_pixel_rows = get_24bit_row;
407 source->get_pixel_rows = get_32bit_row;
418 if (source->pixel_size == 1)
419 source->get_pixel_rows = get_8bit_gray_row;
431 source->whole_image = (*cinfo->mem->request_virt_sarray)
438 /* source->pub.buffer will point to the virtual array. */
439 source->pub.buffer_height = 1; /* in case anyone looks at it */
440 source->pub.get_pixel_rows = preload_image;
443 source->whole_image = NULL;
444 source->pub.buffer = (*cinfo->mem->alloc_sarray)
447 source->pub.buffer_height = 1;
448 source->pub.get_pixel_rows = source->get_pixel_rows;
452 (void)read_byte(source);
458 source->colormap = (*cinfo->mem->alloc_sarray)
460 source->cmap_length = (int)maplen;
462 read_colormap(source, (int)maplen, UCH(targaheader[7]));
466 source->colormap = NULL;
467 source->cmap_length = 0;
495 tga_source_ptr source;
498 source = (tga_source_ptr)
501 source->cinfo = cinfo; /* make back link for subroutines */
503 source->pub.start_input = start_input_tga;
504 source->pub.finish_input = finish_input_tga;
506 return (cjpeg_source_ptr)source;