Lines Matching refs:source
178 tga_source_ptr source = (tga_source_ptr) sinfo; in get_8bit_gray_row() local
182 ptr = source->pub.buffer[0]; in get_8bit_gray_row()
184 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ in get_8bit_gray_row()
185 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); in get_8bit_gray_row()
194 tga_source_ptr source = (tga_source_ptr) sinfo; in get_8bit_row() local
198 register JSAMPARRAY colormap = source->colormap; in get_8bit_row()
200 ptr = source->pub.buffer[0]; in get_8bit_row()
202 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ in get_8bit_row()
203 t = UCH(source->tga_pixel[0]); in get_8bit_row()
215 tga_source_ptr source = (tga_source_ptr) sinfo; in get_16bit_row() local
220 ptr = source->pub.buffer[0]; in get_16bit_row()
222 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ in get_16bit_row()
223 t = UCH(source->tga_pixel[0]); in get_16bit_row()
224 t += UCH(source->tga_pixel[1]) << 8; in get_16bit_row()
243 tga_source_ptr source = (tga_source_ptr) sinfo; in get_24bit_row() local
247 ptr = source->pub.buffer[0]; in get_24bit_row()
249 (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ in get_24bit_row()
250 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */ in get_24bit_row()
251 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]); in get_24bit_row()
252 *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); in get_24bit_row()
276 tga_source_ptr source = (tga_source_ptr) sinfo; in get_memory_row() local
282 source_row = cinfo->image_height - source->current_row - 1; in get_memory_row()
285 source->pub.buffer = (*cinfo->mem->access_virt_sarray) in get_memory_row()
286 ((j_common_ptr) cinfo, source->whole_image, in get_memory_row()
289 source->current_row++; in get_memory_row()
303 tga_source_ptr source = (tga_source_ptr) sinfo; in preload_image() local
314 source->pub.buffer = (*cinfo->mem->access_virt_sarray) in preload_image()
315 ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE); in preload_image()
316 (*source->get_pixel_rows) (cinfo, sinfo); in preload_image()
322 source->pub.get_pixel_rows = get_memory_row; in preload_image()
323 source->current_row = 0; in preload_image()
336 tga_source_ptr source = (tga_source_ptr) sinfo; in start_input_tga() local
345 if (! ReadOK(source->pub.input_file, targaheader, 18)) in start_input_tga()
358 source->pixel_size = UCH(targaheader[16]) >> 3; in start_input_tga()
365 source->pixel_size < 1 || source->pixel_size > 4 || in start_input_tga()
373 source->read_pixel = read_rle_pixel; in start_input_tga()
374 source->block_count = source->dup_pixel_count = 0; in start_input_tga()
378 source->read_pixel = read_non_rle_pixel; in start_input_tga()
387 if (source->pixel_size == 1 && cmaptype == 1) in start_input_tga()
388 source->get_pixel_rows = get_8bit_row; in start_input_tga()
394 switch (source->pixel_size) { in start_input_tga()
396 source->get_pixel_rows = get_16bit_row; in start_input_tga()
399 source->get_pixel_rows = get_24bit_row; in start_input_tga()
402 source->get_pixel_rows = get_32bit_row; in start_input_tga()
413 if (source->pixel_size == 1) in start_input_tga()
414 source->get_pixel_rows = get_8bit_gray_row; in start_input_tga()
426 source->whole_image = (*cinfo->mem->request_virt_sarray) in start_input_tga()
434 source->pub.buffer_height = 1; /* in case anyone looks at it */ in start_input_tga()
435 source->pub.get_pixel_rows = preload_image; in start_input_tga()
438 source->whole_image = NULL; in start_input_tga()
439 source->pub.buffer = (*cinfo->mem->alloc_sarray) in start_input_tga()
442 source->pub.buffer_height = 1; in start_input_tga()
443 source->pub.get_pixel_rows = source->get_pixel_rows; in start_input_tga()
447 (void) read_byte(source); in start_input_tga()
453 source->colormap = (*cinfo->mem->alloc_sarray) in start_input_tga()
456 read_colormap(source, (int) maplen, UCH(targaheader[7])); in start_input_tga()
460 source->colormap = NULL; in start_input_tga()
488 tga_source_ptr source; in jinit_read_targa() local
491 source = (tga_source_ptr) in jinit_read_targa()
494 source->cinfo = cinfo; /* make back link for subroutines */ in jinit_read_targa()
496 source->pub.start_input = start_input_tga; in jinit_read_targa()
497 source->pub.finish_input = finish_input_tga; in jinit_read_targa()
499 return (cjpeg_source_ptr) source; in jinit_read_targa()