Lines Matching defs:source
47 /* Private version of data source object */
179 tga_source_ptr source = (tga_source_ptr) sinfo;
183 ptr = source->pub.buffer[0];
185 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
186 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
195 tga_source_ptr source = (tga_source_ptr) sinfo;
199 register JSAMPARRAY colormap = source->colormap;
201 ptr = source->pub.buffer[0];
203 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
204 t = UCH(source->tga_pixel[0]);
216 tga_source_ptr source = (tga_source_ptr) sinfo;
221 ptr = source->pub.buffer[0];
223 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
224 t = UCH(source->tga_pixel[0]);
225 t += UCH(source->tga_pixel[1]) << 8;
244 tga_source_ptr source = (tga_source_ptr) sinfo;
248 ptr = source->pub.buffer[0];
250 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
251 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */
252 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]);
253 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
277 tga_source_ptr source = (tga_source_ptr) sinfo;
280 /* Compute row of source that maps to current_row of normal order */
283 source_row = cinfo->image_height - source->current_row - 1;
286 source->pub.buffer = (*cinfo->mem->access_virt_sarray)
287 ((j_common_ptr) cinfo, source->whole_image,
290 source->current_row++;
304 tga_source_ptr source = (tga_source_ptr) sinfo;
315 source->pub.buffer = (*cinfo->mem->access_virt_sarray)
316 ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE);
317 (*source->get_pixel_rows) (cinfo, sinfo);
323 source->pub.get_pixel_rows = get_memory_row;
324 source->current_row = 0;
337 tga_source_ptr source = (tga_source_ptr) sinfo;
346 if (! ReadOK(source->pub.input_file, targaheader, 18))
359 source->pixel_size = UCH(targaheader[16]) >> 3;
366 source->pixel_size < 1 || source->pixel_size > 4 ||
374 source->read_pixel = read_rle_pixel;
375 source->block_count = source->dup_pixel_count = 0;
379 source->read_pixel = read_non_rle_pixel;
388 if (source->pixel_size == 1 && cmaptype == 1)
389 source->get_pixel_rows = get_8bit_row;
395 switch (source->pixel_size) {
397 source->get_pixel_rows = get_16bit_row;
400 source->get_pixel_rows = get_24bit_row;
403 source->get_pixel_rows = get_32bit_row;
414 if (source->pixel_size == 1)
415 source->get_pixel_rows = get_8bit_gray_row;
427 source->whole_image = (*cinfo->mem->request_virt_sarray)
434 /* source->pub.buffer will point to the virtual array. */
435 source->pub.buffer_height = 1; /* in case anyone looks at it */
436 source->pub.get_pixel_rows = preload_image;
439 source->whole_image = NULL;
440 source->pub.buffer = (*cinfo->mem->alloc_sarray)
443 source->pub.buffer_height = 1;
444 source->pub.get_pixel_rows = source->get_pixel_rows;
448 (void) read_byte(source);
454 source->colormap = (*cinfo->mem->alloc_sarray)
457 read_colormap(source, (int) maplen, UCH(targaheader[7]));
461 source->colormap = NULL;
489 tga_source_ptr source;
492 source = (tga_source_ptr)
495 source->cinfo = cinfo; /* make back link for subroutines */
497 source->pub.start_input = start_input_tga;
498 source->pub.finish_input = finish_input_tga;
500 return (cjpeg_source_ptr) source;