Lines Matching refs:cinfo
19 LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo));
45 jpeg_read_coefficients (j_decompress_ptr cinfo) in jpeg_read_coefficients() argument
47 if (cinfo->global_state == DSTATE_READY) { in jpeg_read_coefficients()
49 transdecode_master_selection(cinfo); in jpeg_read_coefficients()
50 cinfo->global_state = DSTATE_RDCOEFS; in jpeg_read_coefficients()
52 if (cinfo->global_state == DSTATE_RDCOEFS) { in jpeg_read_coefficients()
57 if (cinfo->progress != NULL) in jpeg_read_coefficients()
58 (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); in jpeg_read_coefficients()
60 retcode = (*cinfo->inputctl->consume_input) (cinfo); in jpeg_read_coefficients()
66 if (cinfo->progress != NULL && in jpeg_read_coefficients()
68 if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { in jpeg_read_coefficients()
70 cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; in jpeg_read_coefficients()
75 cinfo->global_state = DSTATE_STOPPING; in jpeg_read_coefficients()
81 if ((cinfo->global_state == DSTATE_STOPPING || in jpeg_read_coefficients()
82 cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) { in jpeg_read_coefficients()
83 return cinfo->coef->coef_arrays; in jpeg_read_coefficients()
86 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); in jpeg_read_coefficients()
91 jpeg_build_huffman_index_progressive(j_decompress_ptr cinfo, in jpeg_build_huffman_index_progressive() argument
94 if (cinfo->global_state == DSTATE_READY) { in jpeg_build_huffman_index_progressive()
97 transdecode_master_selection(cinfo); in jpeg_build_huffman_index_progressive()
98 cinfo->global_state = DSTATE_RDCOEFS; in jpeg_build_huffman_index_progressive()
100 if (cinfo->global_state == DSTATE_RDCOEFS) { in jpeg_build_huffman_index_progressive()
102 cinfo->marker->get_sos_marker_position(cinfo, index); in jpeg_build_huffman_index_progressive()
105 for (mcu = 0; mcu < cinfo->total_iMCU_rows; mcu++) { in jpeg_build_huffman_index_progressive()
108 if (cinfo->progress != NULL) in jpeg_build_huffman_index_progressive()
109 (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); in jpeg_build_huffman_index_progressive()
111 jinit_phuff_decoder(cinfo); in jpeg_build_huffman_index_progressive()
113 (*cinfo->inputctl->finish_input_pass) (cinfo); in jpeg_build_huffman_index_progressive()
114 jset_input_stream_position(cinfo, index->scan[i].bitstream_offset); in jpeg_build_huffman_index_progressive()
115 cinfo->unread_marker = 0; in jpeg_build_huffman_index_progressive()
116 retcode = (*cinfo->inputctl->consume_input_build_huffman_index) in jpeg_build_huffman_index_progressive()
117 (cinfo, index, i); in jpeg_build_huffman_index_progressive()
120 cinfo->input_iMCU_row = mcu; in jpeg_build_huffman_index_progressive()
122 (*cinfo->entropy->configure_huffman_decoder) in jpeg_build_huffman_index_progressive()
123 (cinfo, index->scan[i].prev_MCU_offset); in jpeg_build_huffman_index_progressive()
124 cinfo->input_scan_number = i; in jpeg_build_huffman_index_progressive()
125 retcode = (*cinfo->inputctl->consume_input_build_huffman_index) in jpeg_build_huffman_index_progressive()
126 (cinfo, index, i); in jpeg_build_huffman_index_progressive()
133 if (cinfo->progress != NULL && in jpeg_build_huffman_index_progressive()
135 if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { in jpeg_build_huffman_index_progressive()
137 cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; in jpeg_build_huffman_index_progressive()
141 cinfo->global_state = DSTATE_STOPPING; in jpeg_build_huffman_index_progressive()
147 if ((cinfo->global_state == DSTATE_STOPPING || in jpeg_build_huffman_index_progressive()
148 cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) { in jpeg_build_huffman_index_progressive()
152 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); in jpeg_build_huffman_index_progressive()
157 jpeg_build_huffman_index_baseline(j_decompress_ptr cinfo, huffman_index *index) in jpeg_build_huffman_index_baseline() argument
159 if (cinfo->global_state == DSTATE_READY) { in jpeg_build_huffman_index_baseline()
162 transdecode_master_selection(cinfo); in jpeg_build_huffman_index_baseline()
163 cinfo->global_state = DSTATE_RDCOEFS; in jpeg_build_huffman_index_baseline()
165 if (cinfo->global_state == DSTATE_RDCOEFS) { in jpeg_build_huffman_index_baseline()
170 if (cinfo->progress != NULL) in jpeg_build_huffman_index_baseline()
171 (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); in jpeg_build_huffman_index_baseline()
173 retcode = (*cinfo->inputctl->consume_input_build_huffman_index) in jpeg_build_huffman_index_baseline()
174 (cinfo, index, 0); in jpeg_build_huffman_index_baseline()
183 if (cinfo->progress != NULL && in jpeg_build_huffman_index_baseline()
185 if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { in jpeg_build_huffman_index_baseline()
187 cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; in jpeg_build_huffman_index_baseline()
192 cinfo->global_state = DSTATE_STOPPING; in jpeg_build_huffman_index_baseline()
198 if ((cinfo->global_state == DSTATE_STOPPING || in jpeg_build_huffman_index_baseline()
199 cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) { in jpeg_build_huffman_index_baseline()
203 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); in jpeg_build_huffman_index_baseline()
208 jpeg_build_huffman_index(j_decompress_ptr cinfo, huffman_index *index) in jpeg_build_huffman_index() argument
210 cinfo->tile_decode = TRUE; in jpeg_build_huffman_index()
211 if (cinfo->progressive_mode) in jpeg_build_huffman_index()
212 return jpeg_build_huffman_index_progressive(cinfo, index); in jpeg_build_huffman_index()
214 return jpeg_build_huffman_index_baseline(cinfo, index); in jpeg_build_huffman_index()
223 transdecode_master_selection (j_decompress_ptr cinfo) in transdecode_master_selection() argument
226 cinfo->buffered_image = TRUE; in transdecode_master_selection()
229 if (cinfo->arith_code) { in transdecode_master_selection()
230 ERREXIT(cinfo, JERR_ARITH_NOTIMPL); in transdecode_master_selection()
232 if (cinfo->progressive_mode) { in transdecode_master_selection()
234 jinit_phuff_decoder(cinfo); in transdecode_master_selection()
236 ERREXIT(cinfo, JERR_NOT_COMPILED); in transdecode_master_selection()
239 jinit_huff_decoder(cinfo); in transdecode_master_selection()
244 jinit_d_coef_controller(cinfo, TRUE); in transdecode_master_selection()
247 (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); in transdecode_master_selection()
250 (*cinfo->inputctl->start_input_pass) (cinfo); in transdecode_master_selection()
253 if (cinfo->progress != NULL) { in transdecode_master_selection()
256 if (cinfo->progressive_mode) { in transdecode_master_selection()
258 nscans = 2 + 3 * cinfo->num_components; in transdecode_master_selection()
259 } else if (cinfo->inputctl->has_multiple_scans) { in transdecode_master_selection()
261 nscans = cinfo->num_components; in transdecode_master_selection()
265 cinfo->progress->pass_counter = 0L; in transdecode_master_selection()
266 cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; in transdecode_master_selection()
267 cinfo->progress->completed_passes = 0; in transdecode_master_selection()
268 cinfo->progress->total_passes = 1; in transdecode_master_selection()