Home
last modified time | relevance | path

Searched refs:cinfo (Results 1 – 25 of 153) sorted by relevance

1234567

/external/libjpeg-turbo/
Djdmaster.c33 use_merged_upsample(j_decompress_ptr cinfo) in use_merged_upsample() argument
37 if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling) in use_merged_upsample()
40 if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 || in use_merged_upsample()
41 (cinfo->out_color_space != JCS_RGB && in use_merged_upsample()
42 cinfo->out_color_space != JCS_RGB565 && in use_merged_upsample()
43 cinfo->out_color_space != JCS_EXT_RGB && in use_merged_upsample()
44 cinfo->out_color_space != JCS_EXT_RGBX && in use_merged_upsample()
45 cinfo->out_color_space != JCS_EXT_BGR && in use_merged_upsample()
46 cinfo->out_color_space != JCS_EXT_BGRX && in use_merged_upsample()
47 cinfo->out_color_space != JCS_EXT_XBGR && in use_merged_upsample()
[all …]
Djdapistd.c30 LOCAL(boolean) output_pass_setup(j_decompress_ptr cinfo);
45 jpeg_start_decompress(j_decompress_ptr cinfo) in jpeg_start_decompress() argument
47 if (cinfo->global_state == DSTATE_READY) { in jpeg_start_decompress()
49 jinit_master_decompress(cinfo); in jpeg_start_decompress()
50 if (cinfo->buffered_image) { in jpeg_start_decompress()
52 cinfo->global_state = DSTATE_BUFIMAGE; in jpeg_start_decompress()
55 cinfo->global_state = DSTATE_PRELOAD; in jpeg_start_decompress()
57 if (cinfo->global_state == DSTATE_PRELOAD) { in jpeg_start_decompress()
59 if (cinfo->inputctl->has_multiple_scans) { in jpeg_start_decompress()
64 if (cinfo->progress != NULL) in jpeg_start_decompress()
[all …]
Djdapimin.c35 jpeg_CreateDecompress(j_decompress_ptr cinfo, int version, size_t structsize) in jpeg_CreateDecompress() argument
40 cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ in jpeg_CreateDecompress()
42 ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); in jpeg_CreateDecompress()
44 ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, in jpeg_CreateDecompress()
54 struct jpeg_error_mgr *err = cinfo->err; in jpeg_CreateDecompress()
55 void *client_data = cinfo->client_data; /* ignore Purify complaint here */ in jpeg_CreateDecompress()
56 MEMZERO(cinfo, sizeof(struct jpeg_decompress_struct)); in jpeg_CreateDecompress()
57 cinfo->err = err; in jpeg_CreateDecompress()
58 cinfo->client_data = client_data; in jpeg_CreateDecompress()
60 cinfo->is_decompressor = TRUE; in jpeg_CreateDecompress()
[all …]
Djcmarker.c113 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 …]
Djcapimin.c34 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 …]
Djcmaster.c69 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 …]
Djdmarker.c122 #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 …]
Djdinput.c36 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 …]
Djdarith.c74 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 …]
Djcapistd.c39 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 …]
Djcparam.c28 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 …]
Djdtrans.c23 LOCAL(void) transdecode_master_selection(j_decompress_ptr cinfo);
49 jpeg_read_coefficients(j_decompress_ptr cinfo) in jpeg_read_coefficients() argument
51 if (cinfo->global_state == DSTATE_READY) { in jpeg_read_coefficients()
53 transdecode_master_selection(cinfo); in jpeg_read_coefficients()
54 cinfo->global_state = DSTATE_RDCOEFS; in jpeg_read_coefficients()
56 if (cinfo->global_state == DSTATE_RDCOEFS) { in jpeg_read_coefficients()
61 if (cinfo->progress != NULL) in jpeg_read_coefficients()
62 (*cinfo->progress->progress_monitor) ((j_common_ptr)cinfo); in jpeg_read_coefficients()
64 retcode = (*cinfo->inputctl->consume_input) (cinfo); in jpeg_read_coefficients()
70 if (cinfo->progress != NULL && in jpeg_read_coefficients()
[all …]
Djcarith.c122 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 …]
Djpegint.h63 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 …]
Djerror.h234 #define ERREXIT(cinfo, code) \ argument
235 ((cinfo)->err->msg_code = (code), \
236 (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
237 #define ERREXIT1(cinfo, code, p1) \ argument
238 ((cinfo)->err->msg_code = (code), \
239 (cinfo)->err->msg_parm.i[0] = (p1), \
240 (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
241 #define ERREXIT2(cinfo, code, p1, p2) \ argument
242 ((cinfo)->err->msg_code = (code), \
243 (cinfo)->err->msg_parm.i[0] = (p1), \
[all …]
Drdbmp.c56 j_compress_ptr cinfo; /* back link saves passing separate parm */ member
88 ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); in read_byte()
124 ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP); in read_colormap()
128 if (sinfo->cinfo->in_color_space == JCS_UNKNOWN && gray) in read_colormap()
129 sinfo->cinfo->in_color_space = JCS_GRAYSCALE; in read_colormap()
131 if (sinfo->cinfo->in_color_space == JCS_GRAYSCALE && !gray) in read_colormap()
132 ERREXIT(sinfo->cinfo, JERR_BAD_IN_COLORSPACE); in read_colormap()
144 get_8bit_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) in get_8bit_row() argument
158 image_ptr = (*cinfo->mem->access_virt_sarray) in get_8bit_row()
159 ((j_common_ptr)cinfo, source->whole_image, in get_8bit_row()
[all …]
Djccolor.c198 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 …]
Djdphuff.c65 METHODDEF(boolean) decode_mcu_DC_first(j_decompress_ptr cinfo,
67 METHODDEF(boolean) decode_mcu_AC_first(j_decompress_ptr cinfo,
69 METHODDEF(boolean) decode_mcu_DC_refine(j_decompress_ptr cinfo,
71 METHODDEF(boolean) decode_mcu_AC_refine(j_decompress_ptr cinfo,
80 start_pass_phuff_decoder(j_decompress_ptr cinfo) in start_pass_phuff_decoder() argument
82 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in start_pass_phuff_decoder()
89 is_DC_band = (cinfo->Ss == 0); in start_pass_phuff_decoder()
94 if (cinfo->Se != 0) in start_pass_phuff_decoder()
98 if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2) in start_pass_phuff_decoder()
101 if (cinfo->comps_in_scan != 1) in start_pass_phuff_decoder()
[all …]
Djdmainct.c116 METHODDEF(void) process_data_simple_main(j_decompress_ptr cinfo,
120 METHODDEF(void) process_data_context_main(j_decompress_ptr cinfo,
125 METHODDEF(void) process_data_crank_post(j_decompress_ptr cinfo,
133 alloc_funny_pointers(j_decompress_ptr cinfo) in alloc_funny_pointers() argument
138 my_main_ptr main_ptr = (my_main_ptr)cinfo->main; in alloc_funny_pointers()
140 int M = cinfo->_min_DCT_scaled_size; in alloc_funny_pointers()
148 (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE, in alloc_funny_pointers()
149 cinfo->num_components * 2 * sizeof(JSAMPARRAY)); in alloc_funny_pointers()
150 main_ptr->xbuffer[1] = main_ptr->xbuffer[0] + cinfo->num_components; in alloc_funny_pointers()
152 for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; in alloc_funny_pointers()
[all …]
Drdppm.c92 read_pbm_integer(j_compress_ptr cinfo, FILE *infile, unsigned int maxval) in read_pbm_integer() argument
105 ERREXIT(cinfo, JERR_INPUT_EOF); in read_pbm_integer()
109 ERREXIT(cinfo, JERR_PPM_NONNUMERIC); in read_pbm_integer()
116 ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); in read_pbm_integer()
135 get_text_gray_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) in get_text_gray_row() argument
146 for (col = cinfo->image_width; col > 0; col--) { in get_text_gray_row()
147 *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)]; in get_text_gray_row()
154 for (col = cinfo->image_width; col > 0; col--) { \
162 get_text_gray_rgb_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) in get_text_gray_rgb_row() argument
172 register int rindex = rgb_red[cinfo->in_color_space]; in get_text_gray_rgb_row()
[all …]
Dwrbmp.c78 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 …]
Djdcolor.c211 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 …]
Ddjpeg.c192 parse_switches(j_decompress_ptr cinfo, int argc, char **argv, in parse_switches() argument
216 cinfo->err->trace_level = 0; in parse_switches()
245 cinfo->desired_number_of_colors = val; in parse_switches()
246 cinfo->quantize_colors = TRUE; in parse_switches()
253 cinfo->dct_method = JDCT_ISLOW; in parse_switches()
255 cinfo->dct_method = JDCT_IFAST; in parse_switches()
257 cinfo->dct_method = JDCT_FLOAT; in parse_switches()
266 cinfo->dither_mode = JDITHER_FS; in parse_switches()
268 cinfo->dither_mode = JDITHER_NONE; in parse_switches()
270 cinfo->dither_mode = JDITHER_ORDERED; in parse_switches()
[all …]
Djdcoefct.c28 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 …]
/external/tensorflow/tensorflow/core/lib/jpeg/
Djpeg_mem.cc88 void no_print(j_common_ptr cinfo) {} in no_print() argument
119 struct jpeg_decompress_struct cinfo; in UncompressLow() local
121 cinfo.err = jpeg_std_error(&jerr); in UncompressLow()
129 cinfo.client_data = &jpeg_jmpbuf; in UncompressLow()
135 jpeg_create_decompress(&cinfo); in UncompressLow()
136 SetSrc(&cinfo, srcdata, datasize, flags.try_recover_truncated_jpeg); in UncompressLow()
137 jpeg_read_header(&cinfo, TRUE); in UncompressLow()
140 if (components == 0) components = std::min(cinfo.num_components, 3); in UncompressLow()
145 cinfo.out_color_space = JCS_GRAYSCALE; in UncompressLow()
148 if (cinfo.jpeg_color_space == JCS_CMYK || in UncompressLow()
[all …]

1234567