Lines Matching refs:cinfo
189 parse_switches(j_decompress_ptr cinfo, int argc, char **argv, in parse_switches() argument
210 cinfo->err->trace_level = 0; in parse_switches()
239 cinfo->desired_number_of_colors = val; in parse_switches()
240 cinfo->quantize_colors = TRUE; in parse_switches()
247 cinfo->dct_method = JDCT_ISLOW; in parse_switches()
249 cinfo->dct_method = JDCT_IFAST; in parse_switches()
251 cinfo->dct_method = JDCT_FLOAT; in parse_switches()
260 cinfo->dither_mode = JDITHER_FS; in parse_switches()
262 cinfo->dither_mode = JDITHER_NONE; in parse_switches()
264 cinfo->dither_mode = JDITHER_ORDERED; in parse_switches()
281 cinfo->err->trace_level++; in parse_switches()
290 cinfo->two_pass_quantize = FALSE; in parse_switches()
291 cinfo->dither_mode = JDITHER_ORDERED; in parse_switches()
292 if (!cinfo->quantize_colors) /* don't override an earlier -colors */ in parse_switches()
293 cinfo->desired_number_of_colors = 216; in parse_switches()
294 cinfo->dct_method = JDCT_FASTEST; in parse_switches()
295 cinfo->do_fancy_upsampling = FALSE; in parse_switches()
304 cinfo->out_color_space = JCS_GRAYSCALE; in parse_switches()
308 cinfo->out_color_space = JCS_RGB; in parse_switches()
312 cinfo->out_color_space = JCS_RGB565; in parse_switches()
319 jpeg_save_markers(cinfo, JPEG_APP0 + 2, 0xFFFF); in parse_switches()
333 read_color_map(cinfo, mapfile); in parse_switches()
335 cinfo->quantize_colors = TRUE; in parse_switches()
337 ERREXIT(cinfo, JERR_NOT_COMPILED); in parse_switches()
352 cinfo->mem->max_memory_to_use = lval * 1000L; in parse_switches()
356 cinfo->do_fancy_upsampling = FALSE; in parse_switches()
360 cinfo->two_pass_quantize = FALSE; in parse_switches()
395 &cinfo->scale_num, &cinfo->scale_denom) != 2) in parse_switches()
437 jpeg_getc(j_decompress_ptr cinfo) in jpeg_getc() argument
440 struct jpeg_source_mgr *datasrc = cinfo->src; in jpeg_getc()
443 if (!(*datasrc->fill_input_buffer) (cinfo)) in jpeg_getc()
444 ERREXIT(cinfo, JERR_CANT_SUSPEND); in jpeg_getc()
452 print_text_marker(j_decompress_ptr cinfo) in print_text_marker() argument
454 boolean traceit = (cinfo->err->trace_level >= 1); in print_text_marker()
459 length = jpeg_getc(cinfo) << 8; in print_text_marker()
460 length += jpeg_getc(cinfo); in print_text_marker()
464 if (cinfo->unread_marker == JPEG_COM) in print_text_marker()
468 cinfo->unread_marker - JPEG_APP0, (long)length); in print_text_marker()
472 ch = jpeg_getc(cinfo); in print_text_marker()
509 struct jpeg_decompress_struct cinfo; in main() local
532 cinfo.err = jpeg_std_error(&jerr); in main()
533 jpeg_create_decompress(&cinfo); in main()
545 jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker); in main()
546 jpeg_set_marker_processor(&cinfo, JPEG_APP0 + 12, print_text_marker); in main()
556 file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); in main()
605 start_progress_monitor((j_common_ptr)&cinfo, &progress); in main()
629 jpeg_mem_src(&cinfo, inbuffer, insize); in main()
632 jpeg_stdio_src(&cinfo, input_file); in main()
635 (void)jpeg_read_header(&cinfo, TRUE); in main()
638 file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); in main()
646 dest_mgr = jinit_write_bmp(&cinfo, FALSE, TRUE); in main()
649 dest_mgr = jinit_write_bmp(&cinfo, TRUE, TRUE); in main()
654 dest_mgr = jinit_write_gif(&cinfo); in main()
659 dest_mgr = jinit_write_ppm(&cinfo); in main()
664 dest_mgr = jinit_write_rle(&cinfo); in main()
669 dest_mgr = jinit_write_targa(&cinfo); in main()
673 ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT); in main()
679 (void)jpeg_start_decompress(&cinfo); in main()
689 if (skip_end > cinfo.output_height - 1) { in main()
691 cinfo.output_height); in main()
698 tmp = cinfo.output_height; in main()
699 cinfo.output_height -= (skip_end - skip_start + 1); in main()
700 (*dest_mgr->start_output) (&cinfo, dest_mgr); in main()
701 cinfo.output_height = tmp; in main()
704 while (cinfo.output_scanline < skip_start) { in main()
705 num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, in main()
707 (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); in main()
709 jpeg_skip_scanlines(&cinfo, skip_end - skip_start + 1); in main()
710 while (cinfo.output_scanline < cinfo.output_height) { in main()
711 num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, in main()
713 (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); in main()
723 if (crop_x + crop_width > cinfo.output_width || in main()
724 crop_y + crop_height > cinfo.output_height) { in main()
726 progname, cinfo.output_width, cinfo.output_height); in main()
730 jpeg_crop_scanline(&cinfo, &crop_x, &crop_width); in main()
732 (*dest_mgr->calc_buffer_dimensions) (&cinfo, dest_mgr); in main()
734 ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT); in main()
739 tmp = cinfo.output_height; in main()
740 cinfo.output_height = crop_height; in main()
741 (*dest_mgr->start_output) (&cinfo, dest_mgr); in main()
742 cinfo.output_height = tmp; in main()
745 jpeg_skip_scanlines(&cinfo, crop_y); in main()
746 while (cinfo.output_scanline < crop_y + crop_height) { in main()
747 num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, in main()
749 (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); in main()
751 jpeg_skip_scanlines(&cinfo, cinfo.output_height - crop_y - crop_height); in main()
756 (*dest_mgr->start_output) (&cinfo, dest_mgr); in main()
759 while (cinfo.output_scanline < cinfo.output_height) { in main()
760 num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, in main()
762 (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); in main()
782 if (jpeg_read_icc_profile(&cinfo, &icc_profile, &icc_len)) { in main()
792 } else if (cinfo.err->msg_code != JWRN_BOGUS_ICC) in main()
800 (*dest_mgr->finish_output) (&cinfo, dest_mgr); in main()
801 (void)jpeg_finish_decompress(&cinfo); in main()
802 jpeg_destroy_decompress(&cinfo); in main()
811 end_progress_monitor((j_common_ptr)&cinfo); in main()