/external/libjpeg-turbo/ |
D | jdmaster.c | 34 use_merged_upsample(j_decompress_ptr cinfo) in use_merged_upsample() argument 38 if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling) in use_merged_upsample() 41 if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 || in use_merged_upsample() 42 (cinfo->out_color_space != JCS_RGB && in use_merged_upsample() 43 cinfo->out_color_space != JCS_RGB565 && in use_merged_upsample() 44 cinfo->out_color_space != JCS_EXT_RGB && in use_merged_upsample() 45 cinfo->out_color_space != JCS_EXT_RGBX && in use_merged_upsample() 46 cinfo->out_color_space != JCS_EXT_BGR && in use_merged_upsample() 47 cinfo->out_color_space != JCS_EXT_BGRX && in use_merged_upsample() 48 cinfo->out_color_space != JCS_EXT_XBGR && in use_merged_upsample() [all …]
|
D | jdapistd.c | 28 LOCAL(boolean) output_pass_setup(j_decompress_ptr cinfo); 43 jpeg_start_decompress(j_decompress_ptr cinfo) in jpeg_start_decompress() argument 45 if (cinfo->global_state == DSTATE_READY) { in jpeg_start_decompress() 47 jinit_master_decompress(cinfo); in jpeg_start_decompress() 48 if (cinfo->buffered_image) { in jpeg_start_decompress() 50 cinfo->global_state = DSTATE_BUFIMAGE; in jpeg_start_decompress() 53 cinfo->global_state = DSTATE_PRELOAD; in jpeg_start_decompress() 55 if (cinfo->global_state == DSTATE_PRELOAD) { in jpeg_start_decompress() 57 if (cinfo->inputctl->has_multiple_scans) { in jpeg_start_decompress() 62 if (cinfo->progress != NULL) in jpeg_start_decompress() [all …]
|
D | jdapimin.c | 34 jpeg_CreateDecompress(j_decompress_ptr cinfo, int version, size_t structsize) in jpeg_CreateDecompress() argument 39 cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ in jpeg_CreateDecompress() 41 ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); in jpeg_CreateDecompress() 43 ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, in jpeg_CreateDecompress() 53 struct jpeg_error_mgr *err = cinfo->err; in jpeg_CreateDecompress() 54 void *client_data = cinfo->client_data; /* ignore Purify complaint here */ in jpeg_CreateDecompress() 55 MEMZERO(cinfo, sizeof(struct jpeg_decompress_struct)); in jpeg_CreateDecompress() 56 cinfo->err = err; in jpeg_CreateDecompress() 57 cinfo->client_data = client_data; in jpeg_CreateDecompress() 59 cinfo->is_decompressor = TRUE; in jpeg_CreateDecompress() [all …]
|
D | jcmarker.c | 113 emit_byte(j_compress_ptr cinfo, int val) in emit_byte() argument 116 struct jpeg_destination_mgr *dest = cinfo->dest; in emit_byte() 120 if (!(*dest->empty_output_buffer) (cinfo)) in emit_byte() 121 ERREXIT(cinfo, JERR_CANT_SUSPEND); in emit_byte() 127 emit_marker(j_compress_ptr cinfo, JPEG_MARKER mark) in emit_marker() argument 130 emit_byte(cinfo, 0xFF); in emit_marker() 131 emit_byte(cinfo, (int)mark); in emit_marker() 136 emit_2bytes(j_compress_ptr cinfo, int value) in emit_2bytes() argument 139 emit_byte(cinfo, (value >> 8) & 0xFF); in emit_2bytes() 140 emit_byte(cinfo, value & 0xFF); in emit_2bytes() [all …]
|
D | jcmaster.c | 69 jpeg_calc_jpeg_dimensions(j_compress_ptr cinfo) in jpeg_calc_jpeg_dimensions() argument 73 cinfo->jpeg_width = cinfo->image_width; in jpeg_calc_jpeg_dimensions() 74 cinfo->jpeg_height = cinfo->image_height; in jpeg_calc_jpeg_dimensions() 75 cinfo->min_DCT_h_scaled_size = DCTSIZE; in jpeg_calc_jpeg_dimensions() 76 cinfo->min_DCT_v_scaled_size = DCTSIZE; in jpeg_calc_jpeg_dimensions() 82 initial_setup(j_compress_ptr cinfo, boolean transcode_only) in initial_setup() argument 94 jpeg_calc_jpeg_dimensions(cinfo); in initial_setup() 98 if (cinfo->_jpeg_height <= 0 || cinfo->_jpeg_width <= 0 || in initial_setup() 99 cinfo->num_components <= 0 || cinfo->input_components <= 0) in initial_setup() 100 ERREXIT(cinfo, JERR_EMPTY_IMAGE); in initial_setup() [all …]
|
D | jcapimin.c | 34 jpeg_CreateCompress(j_compress_ptr cinfo, int version, size_t structsize) in jpeg_CreateCompress() argument 39 cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ in jpeg_CreateCompress() 41 ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); in jpeg_CreateCompress() 43 ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, in jpeg_CreateCompress() 53 struct jpeg_error_mgr *err = cinfo->err; in jpeg_CreateCompress() 54 void *client_data = cinfo->client_data; /* ignore Purify complaint here */ in jpeg_CreateCompress() 55 MEMZERO(cinfo, sizeof(struct jpeg_compress_struct)); in jpeg_CreateCompress() 56 cinfo->err = err; in jpeg_CreateCompress() 57 cinfo->client_data = client_data; in jpeg_CreateCompress() 59 cinfo->is_decompressor = FALSE; in jpeg_CreateCompress() [all …]
|
D | jdmarker.c | 122 #define INPUT_VARS(cinfo) \ argument 123 struct jpeg_source_mgr *datasrc = (cinfo)->src; \ 128 #define INPUT_SYNC(cinfo) \ argument 133 #define INPUT_RELOAD(cinfo) \ argument 141 #define MAKE_BYTE_AVAIL(cinfo, action) \ argument 143 if (!(*datasrc->fill_input_buffer) (cinfo)) \ 145 INPUT_RELOAD(cinfo); \ 151 #define INPUT_BYTE(cinfo, V, action) \ argument 152 MAKESTMT( MAKE_BYTE_AVAIL(cinfo, action); \ 159 #define INPUT_2BYTES(cinfo, V, action) \ argument [all …]
|
D | jdinput.c | 36 METHODDEF(int) consume_markers(j_decompress_ptr cinfo); 44 initial_setup(j_decompress_ptr cinfo) in initial_setup() argument 51 if ((long)cinfo->image_height > (long)JPEG_MAX_DIMENSION || in initial_setup() 52 (long)cinfo->image_width > (long)JPEG_MAX_DIMENSION) in initial_setup() 53 ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int)JPEG_MAX_DIMENSION); in initial_setup() 56 if (cinfo->data_precision != BITS_IN_JSAMPLE) in initial_setup() 57 ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); in initial_setup() 60 if (cinfo->num_components > MAX_COMPONENTS) in initial_setup() 61 ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, in initial_setup() 65 cinfo->max_h_samp_factor = 1; in initial_setup() [all …]
|
D | jcapistd.c | 39 jpeg_start_compress(j_compress_ptr cinfo, boolean write_all_tables) in jpeg_start_compress() argument 41 if (cinfo->global_state != CSTATE_START) in jpeg_start_compress() 42 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); in jpeg_start_compress() 45 jpeg_suppress_tables(cinfo, FALSE); /* mark all tables to be written */ in jpeg_start_compress() 48 (*cinfo->err->reset_error_mgr) ((j_common_ptr)cinfo); in jpeg_start_compress() 49 (*cinfo->dest->init_destination) (cinfo); in jpeg_start_compress() 51 jinit_compress_master(cinfo); in jpeg_start_compress() 53 (*cinfo->master->prepare_for_pass) (cinfo); in jpeg_start_compress() 57 cinfo->next_scanline = 0; in jpeg_start_compress() 58 cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING); in jpeg_start_compress() [all …]
|
D | jdarith.c | 74 get_byte(j_decompress_ptr cinfo) in get_byte() argument 77 struct jpeg_source_mgr *src = cinfo->src; in get_byte() 80 if (!(*src->fill_input_buffer) (cinfo)) in get_byte() 81 ERREXIT(cinfo, JERR_CANT_SUSPEND); in get_byte() 115 arith_decode(j_decompress_ptr cinfo, unsigned char *st) in arith_decode() argument 117 register arith_entropy_ptr e = (arith_entropy_ptr)cinfo->entropy; in arith_decode() 126 if (cinfo->unread_marker) in arith_decode() 129 data = get_byte(cinfo); /* read next input byte */ in arith_decode() 131 do data = get_byte(cinfo); in arith_decode() 142 cinfo->unread_marker = data; in arith_decode() [all …]
|
D | jcparam.c | 28 jpeg_add_quant_table(j_compress_ptr cinfo, int which_tbl, in jpeg_add_quant_table() argument 42 if (cinfo->global_state != CSTATE_START) in jpeg_add_quant_table() 43 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); in jpeg_add_quant_table() 46 ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl); in jpeg_add_quant_table() 48 qtblptr = &cinfo->quant_tbl_ptrs[which_tbl]; in jpeg_add_quant_table() 51 *qtblptr = jpeg_alloc_quant_table((j_common_ptr)cinfo); in jpeg_add_quant_table() 97 jpeg_default_qtables(j_compress_ptr cinfo, boolean force_baseline) in jpeg_default_qtables() argument 104 jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl, in jpeg_default_qtables() 105 cinfo->q_scale_factor[0], force_baseline); in jpeg_default_qtables() 106 jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl, in jpeg_default_qtables() [all …]
|
D | jdtrans.c | 22 LOCAL(void) transdecode_master_selection(j_decompress_ptr cinfo); 48 jpeg_read_coefficients(j_decompress_ptr cinfo) in jpeg_read_coefficients() argument 50 if (cinfo->global_state == DSTATE_READY) { in jpeg_read_coefficients() 52 transdecode_master_selection(cinfo); in jpeg_read_coefficients() 53 cinfo->global_state = DSTATE_RDCOEFS; in jpeg_read_coefficients() 55 if (cinfo->global_state == DSTATE_RDCOEFS) { in jpeg_read_coefficients() 60 if (cinfo->progress != NULL) in jpeg_read_coefficients() 61 (*cinfo->progress->progress_monitor) ((j_common_ptr)cinfo); in jpeg_read_coefficients() 63 retcode = (*cinfo->inputctl->consume_input) (cinfo); in jpeg_read_coefficients() 69 if (cinfo->progress != NULL && in jpeg_read_coefficients() [all …]
|
D | jcarith.c | 122 emit_byte(int val, j_compress_ptr cinfo) in emit_byte() argument 125 struct jpeg_destination_mgr *dest = cinfo->dest; in emit_byte() 129 if (!(*dest->empty_output_buffer) (cinfo)) in emit_byte() 130 ERREXIT(cinfo, JERR_CANT_SUSPEND); in emit_byte() 139 finish_pass(j_compress_ptr cinfo) in finish_pass() argument 141 arith_entropy_ptr e = (arith_entropy_ptr)cinfo->entropy; in finish_pass() 158 do emit_byte(0x00, cinfo); in finish_pass() 160 emit_byte(e->buffer + 1, cinfo); in finish_pass() 162 emit_byte(0x00, cinfo); in finish_pass() 171 do emit_byte(0x00, cinfo); in finish_pass() [all …]
|
D | jpegint.h | 63 void (*prepare_for_pass) (j_compress_ptr cinfo); 64 void (*pass_startup) (j_compress_ptr cinfo); 65 void (*finish_pass) (j_compress_ptr cinfo); 74 void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode); 75 void (*process_data) (j_compress_ptr cinfo, JSAMPARRAY input_buf, 81 void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode); 82 void (*pre_process_data) (j_compress_ptr cinfo, JSAMPARRAY input_buf, 91 void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode); 92 boolean (*compress_data) (j_compress_ptr cinfo, JSAMPIMAGE input_buf); 97 void (*start_pass) (j_compress_ptr cinfo); [all …]
|
D | rdbmp.c | 66 j_compress_ptr cinfo; /* back link saves passing separate parm */ member 98 ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); in read_byte() 134 ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP); in read_colormap() 138 if (sinfo->cinfo->in_color_space == JCS_UNKNOWN && gray) in read_colormap() 139 sinfo->cinfo->in_color_space = JCS_GRAYSCALE; in read_colormap() 141 if (sinfo->cinfo->in_color_space == JCS_GRAYSCALE && !gray) in read_colormap() 142 ERREXIT(sinfo->cinfo, JERR_BAD_IN_COLORSPACE); in read_colormap() 154 get_8bit_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) in get_8bit_row() argument 168 image_ptr = (*cinfo->mem->access_virt_sarray) in get_8bit_row() 169 ((j_common_ptr)cinfo, source->whole_image, in get_8bit_row() [all …]
|
D | jerror.h | 230 #define ERREXIT(cinfo, code) \ argument 231 ((cinfo)->err->msg_code = (code), \ 232 (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) 233 #define ERREXIT1(cinfo, code, p1) \ argument 234 ((cinfo)->err->msg_code = (code), \ 235 (cinfo)->err->msg_parm.i[0] = (p1), \ 236 (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) 237 #define ERREXIT2(cinfo, code, p1, p2) \ argument 238 ((cinfo)->err->msg_code = (code), \ 239 (cinfo)->err->msg_parm.i[0] = (p1), \ [all …]
|
D | wrrle.c | 68 METHODDEF(void) rle_put_pixel_rows(j_decompress_ptr cinfo, 80 start_output_rle(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) in start_output_rle() argument 86 cd_progress_ptr progress = (cd_progress_ptr)cinfo->progress; in start_output_rle() 102 if (cinfo->output_width > 32767 || cinfo->output_height > 32767) in start_output_rle() 103 ERREXIT2(cinfo, JERR_RLE_DIMENSIONS, cinfo->output_width, in start_output_rle() 104 cinfo->output_height); in start_output_rle() 106 if (cinfo->out_color_space != JCS_GRAYSCALE && in start_output_rle() 107 cinfo->out_color_space != JCS_RGB) in start_output_rle() 108 ERREXIT(cinfo, JERR_RLE_COLORSPACE); in start_output_rle() 110 if (cinfo->output_components != 1 && cinfo->output_components != 3) in start_output_rle() [all …]
|
D | jccolor.c | 198 rgb_ycc_start(j_compress_ptr cinfo) in rgb_ycc_start() argument 200 my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert; in rgb_ycc_start() 206 (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, in rgb_ycc_start() 234 rgb_ycc_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf, in rgb_ycc_convert() argument 237 switch (cinfo->in_color_space) { in rgb_ycc_convert() 239 extrgb_ycc_convert_internal(cinfo, input_buf, output_buf, output_row, in rgb_ycc_convert() 244 extrgbx_ycc_convert_internal(cinfo, input_buf, output_buf, output_row, in rgb_ycc_convert() 248 extbgr_ycc_convert_internal(cinfo, input_buf, output_buf, output_row, in rgb_ycc_convert() 253 extbgrx_ycc_convert_internal(cinfo, input_buf, output_buf, output_row, in rgb_ycc_convert() 258 extxbgr_ycc_convert_internal(cinfo, input_buf, output_buf, output_row, in rgb_ycc_convert() [all …]
|
D | jdcoefct.c | 28 METHODDEF(int) decompress_onepass(j_decompress_ptr cinfo, 31 METHODDEF(int) decompress_data(j_decompress_ptr cinfo, JSAMPIMAGE output_buf); 34 LOCAL(boolean) smoothing_ok(j_decompress_ptr cinfo); 35 METHODDEF(int) decompress_smooth_data(j_decompress_ptr cinfo, 45 start_input_pass(j_decompress_ptr cinfo) in start_input_pass() argument 47 cinfo->input_iMCU_row = 0; in start_input_pass() 48 start_iMCU_row(cinfo); in start_input_pass() 57 start_output_pass(j_decompress_ptr cinfo) in start_output_pass() argument 60 my_coef_ptr coef = (my_coef_ptr)cinfo->coef; in start_output_pass() 64 if (cinfo->do_block_smoothing && smoothing_ok(cinfo)) in start_output_pass() [all …]
|
D | jdmainct.c | 115 METHODDEF(void) process_data_simple_main(j_decompress_ptr cinfo, 119 METHODDEF(void) process_data_context_main(j_decompress_ptr cinfo, 124 METHODDEF(void) process_data_crank_post(j_decompress_ptr cinfo, 132 alloc_funny_pointers(j_decompress_ptr cinfo) in alloc_funny_pointers() argument 137 my_main_ptr main_ptr = (my_main_ptr)cinfo->main; in alloc_funny_pointers() 139 int M = cinfo->_min_DCT_scaled_size; in alloc_funny_pointers() 147 (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, in alloc_funny_pointers() 148 cinfo->num_components * 2 * sizeof(JSAMPARRAY)); in alloc_funny_pointers() 149 main_ptr->xbuffer[1] = main_ptr->xbuffer[0] + cinfo->num_components; in alloc_funny_pointers() 151 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; in alloc_funny_pointers() [all …]
|
D | wrbmp.c | 78 LOCAL(void) write_colormap(j_decompress_ptr cinfo, bmp_dest_ptr dest, 97 put_pixel_rows(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, in put_pixel_rows() argument 109 image_ptr = (*cinfo->mem->access_virt_sarray) in put_pixel_rows() 110 ((j_common_ptr)cinfo, dest->whole_image, in put_pixel_rows() 123 if (cinfo->out_color_space == JCS_EXT_BGR) { in put_pixel_rows() 125 outptr += cinfo->output_width * 3; in put_pixel_rows() 126 } else if (cinfo->out_color_space == JCS_RGB565) { in put_pixel_rows() 129 for (col = cinfo->output_width; col > 0; col--) { in put_pixel_rows() 142 } else if (cinfo->out_color_space == JCS_CMYK) { in put_pixel_rows() 143 for (col = cinfo->output_width; col > 0; col--) { in put_pixel_rows() [all …]
|
D | jdcolor.c | 211 build_ycc_rgb_table(j_decompress_ptr cinfo) in build_ycc_rgb_table() argument 213 my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert; in build_ycc_rgb_table() 219 (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, in build_ycc_rgb_table() 222 (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, in build_ycc_rgb_table() 225 (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, in build_ycc_rgb_table() 228 (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, in build_ycc_rgb_table() 254 ycc_rgb_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, in ycc_rgb_convert() argument 257 switch (cinfo->out_color_space) { in ycc_rgb_convert() 259 ycc_extrgb_convert_internal(cinfo, input_buf, input_row, output_buf, in ycc_rgb_convert() 264 ycc_extrgbx_convert_internal(cinfo, input_buf, input_row, output_buf, in ycc_rgb_convert() [all …]
|
D | jdphuff.c | 84 METHODDEF(boolean) decode_mcu_DC_first(j_decompress_ptr cinfo, 86 METHODDEF(boolean) decode_mcu_AC_first(j_decompress_ptr cinfo, 88 METHODDEF(boolean) decode_mcu_DC_refine(j_decompress_ptr cinfo, 90 METHODDEF(boolean) decode_mcu_AC_refine(j_decompress_ptr cinfo, 99 start_pass_phuff_decoder(j_decompress_ptr cinfo) in start_pass_phuff_decoder() argument 101 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in start_pass_phuff_decoder() 108 is_DC_band = (cinfo->Ss == 0); in start_pass_phuff_decoder() 113 if (cinfo->Se != 0) in start_pass_phuff_decoder() 117 if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2) in start_pass_phuff_decoder() 120 if (cinfo->comps_in_scan != 1) in start_pass_phuff_decoder() [all …]
|
D | rdppm.c | 102 read_pbm_integer(j_compress_ptr cinfo, FILE *infile, unsigned int maxval) in read_pbm_integer() argument 115 ERREXIT(cinfo, JERR_INPUT_EOF); in read_pbm_integer() 119 ERREXIT(cinfo, JERR_PPM_NONNUMERIC); in read_pbm_integer() 128 ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); in read_pbm_integer() 146 get_text_gray_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) in get_text_gray_row() argument 157 for (col = cinfo->image_width; col > 0; col--) { in get_text_gray_row() 158 *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)]; in get_text_gray_row() 165 for (col = cinfo->image_width; col > 0; col--) { \ 173 get_text_gray_rgb_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) in get_text_gray_rgb_row() argument 183 register int rindex = rgb_red[cinfo->in_color_space]; in get_text_gray_rgb_row() [all …]
|
D | djpeg.c | 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() [all …]
|