Lines Matching refs:source

44 /* Private version of data source object */
177 tga_source_ptr source = (tga_source_ptr) sinfo;
181 ptr = source->pub.buffer[0];
183 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
184 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
193 tga_source_ptr source = (tga_source_ptr) sinfo;
197 register JSAMPARRAY colormap = source->colormap;
199 ptr = source->pub.buffer[0];
201 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
202 t = UCH(source->tga_pixel[0]);
214 tga_source_ptr source = (tga_source_ptr) sinfo;
219 ptr = source->pub.buffer[0];
221 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
222 t = UCH(source->tga_pixel[0]);
223 t += UCH(source->tga_pixel[1]) << 8;
242 tga_source_ptr source = (tga_source_ptr) sinfo;
246 ptr = source->pub.buffer[0];
248 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
249 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */
250 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]);
251 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
275 tga_source_ptr source = (tga_source_ptr) sinfo;
278 /* Compute row of source that maps to current_row of normal order */
281 source_row = cinfo->image_height - source->current_row - 1;
284 source->pub.buffer = (*cinfo->mem->access_virt_sarray)
285 ((j_common_ptr) cinfo, source->whole_image,
288 source->current_row++;
302 tga_source_ptr source = (tga_source_ptr) sinfo;
313 source->pub.buffer = (*cinfo->mem->access_virt_sarray)
314 ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE);
315 (*source->get_pixel_rows) (cinfo, sinfo);
321 source->pub.get_pixel_rows = get_memory_row;
322 source->current_row = 0;
335 tga_source_ptr source = (tga_source_ptr) sinfo;
344 if (! ReadOK(source->pub.input_file, targaheader, 18))
357 source->pixel_size = UCH(targaheader[16]) >> 3;
364 source->pixel_size < 1 || source->pixel_size > 4 ||
371 source->read_pixel = read_rle_pixel;
372 source->block_count = source->dup_pixel_count = 0;
376 source->read_pixel = read_non_rle_pixel;
385 if (source->pixel_size == 1 && cmaptype == 1)
386 source->get_pixel_rows = get_8bit_row;
392 switch (source->pixel_size) {
394 source->get_pixel_rows = get_16bit_row;
397 source->get_pixel_rows = get_24bit_row;
400 source->get_pixel_rows = get_32bit_row;
411 if (source->pixel_size == 1)
412 source->get_pixel_rows = get_8bit_gray_row;
424 source->whole_image = (*cinfo->mem->request_virt_sarray)
431 /* source->pub.buffer will point to the virtual array. */
432 source->pub.buffer_height = 1; /* in case anyone looks at it */
433 source->pub.get_pixel_rows = preload_image;
436 source->whole_image = NULL;
437 source->pub.buffer = (*cinfo->mem->alloc_sarray)
440 source->pub.buffer_height = 1;
441 source->pub.get_pixel_rows = source->get_pixel_rows;
445 (void) read_byte(source);
451 source->colormap = (*cinfo->mem->alloc_sarray)
454 read_colormap(source, (int) maplen, UCH(targaheader[7]));
458 source->colormap = NULL;
486 tga_source_ptr source;
489 source = (tga_source_ptr)
492 source->cinfo = cinfo; /* make back link for subroutines */
494 source->pub.start_input = start_input_tga;
495 source->pub.finish_input = finish_input_tga;
497 return (cjpeg_source_ptr) source;