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