Lines Matching refs:cinfo

30 jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)  in jpeg_CreateCompress()  argument
35 cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ in jpeg_CreateCompress()
37 ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); in jpeg_CreateCompress()
39 ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, in jpeg_CreateCompress()
49 struct jpeg_error_mgr * err = cinfo->err; in jpeg_CreateCompress()
50 void * client_data = cinfo->client_data; /* ignore Purify complaint here */ in jpeg_CreateCompress()
51 MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct)); in jpeg_CreateCompress()
52 cinfo->err = err; in jpeg_CreateCompress()
53 cinfo->client_data = client_data; in jpeg_CreateCompress()
55 cinfo->is_decompressor = FALSE; in jpeg_CreateCompress()
58 jinit_memory_mgr((j_common_ptr) cinfo); in jpeg_CreateCompress()
61 cinfo->progress = NULL; in jpeg_CreateCompress()
62 cinfo->dest = NULL; in jpeg_CreateCompress()
64 cinfo->comp_info = NULL; in jpeg_CreateCompress()
67 cinfo->quant_tbl_ptrs[i] = NULL; in jpeg_CreateCompress()
70 cinfo->dc_huff_tbl_ptrs[i] = NULL; in jpeg_CreateCompress()
71 cinfo->ac_huff_tbl_ptrs[i] = NULL; in jpeg_CreateCompress()
74 cinfo->script_space = NULL; in jpeg_CreateCompress()
76 cinfo->input_gamma = 1.0; /* in case application forgets */ in jpeg_CreateCompress()
79 cinfo->global_state = CSTATE_START; in jpeg_CreateCompress()
88 jpeg_destroy_compress (j_compress_ptr cinfo) in jpeg_destroy_compress() argument
90 jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ in jpeg_destroy_compress()
100 jpeg_abort_compress (j_compress_ptr cinfo) in jpeg_abort_compress() argument
102 jpeg_abort((j_common_ptr) cinfo); /* use common routine */ in jpeg_abort_compress()
119 jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress) in jpeg_suppress_tables() argument
126 if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL) in jpeg_suppress_tables()
131 if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL) in jpeg_suppress_tables()
133 if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL) in jpeg_suppress_tables()
147 jpeg_finish_compress (j_compress_ptr cinfo) in jpeg_finish_compress() argument
151 if (cinfo->global_state == CSTATE_SCANNING || in jpeg_finish_compress()
152 cinfo->global_state == CSTATE_RAW_OK) { in jpeg_finish_compress()
154 if (cinfo->next_scanline < cinfo->image_height) in jpeg_finish_compress()
155 ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); in jpeg_finish_compress()
156 (*cinfo->master->finish_pass) (cinfo); in jpeg_finish_compress()
157 } else if (cinfo->global_state != CSTATE_WRCOEFS) in jpeg_finish_compress()
158 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); in jpeg_finish_compress()
160 while (! cinfo->master->is_last_pass) { in jpeg_finish_compress()
161 (*cinfo->master->prepare_for_pass) (cinfo); in jpeg_finish_compress()
162 for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) { in jpeg_finish_compress()
163 if (cinfo->progress != NULL) { in jpeg_finish_compress()
164 cinfo->progress->pass_counter = (long) iMCU_row; in jpeg_finish_compress()
165 cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows; in jpeg_finish_compress()
166 (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); in jpeg_finish_compress()
171 if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL)) in jpeg_finish_compress()
172 ERREXIT(cinfo, JERR_CANT_SUSPEND); in jpeg_finish_compress()
174 (*cinfo->master->finish_pass) (cinfo); in jpeg_finish_compress()
177 (*cinfo->marker->write_file_trailer) (cinfo); in jpeg_finish_compress()
178 (*cinfo->dest->term_destination) (cinfo); in jpeg_finish_compress()
180 jpeg_abort((j_common_ptr) cinfo); in jpeg_finish_compress()
192 jpeg_write_marker (j_compress_ptr cinfo, int marker, in jpeg_write_marker() argument
197 if (cinfo->next_scanline != 0 || in jpeg_write_marker()
198 (cinfo->global_state != CSTATE_SCANNING && in jpeg_write_marker()
199 cinfo->global_state != CSTATE_RAW_OK && in jpeg_write_marker()
200 cinfo->global_state != CSTATE_WRCOEFS)) in jpeg_write_marker()
201 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); in jpeg_write_marker()
203 (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); in jpeg_write_marker()
204 write_marker_byte = cinfo->marker->write_marker_byte; /* copy for speed */ in jpeg_write_marker()
206 (*write_marker_byte) (cinfo, *dataptr); in jpeg_write_marker()
214 jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen) in jpeg_write_m_header() argument
216 if (cinfo->next_scanline != 0 || in jpeg_write_m_header()
217 (cinfo->global_state != CSTATE_SCANNING && in jpeg_write_m_header()
218 cinfo->global_state != CSTATE_RAW_OK && in jpeg_write_m_header()
219 cinfo->global_state != CSTATE_WRCOEFS)) in jpeg_write_m_header()
220 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); in jpeg_write_m_header()
222 (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); in jpeg_write_m_header()
226 jpeg_write_m_byte (j_compress_ptr cinfo, int val) in jpeg_write_m_byte() argument
228 (*cinfo->marker->write_marker_byte) (cinfo, val); in jpeg_write_m_byte()
254 jpeg_write_tables (j_compress_ptr cinfo) in jpeg_write_tables() argument
256 if (cinfo->global_state != CSTATE_START) in jpeg_write_tables()
257 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); in jpeg_write_tables()
260 (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); in jpeg_write_tables()
261 (*cinfo->dest->init_destination) (cinfo); in jpeg_write_tables()
263 jinit_marker_writer(cinfo); in jpeg_write_tables()
265 (*cinfo->marker->write_tables_only) (cinfo); in jpeg_write_tables()
267 (*cinfo->dest->term_destination) (cinfo); in jpeg_write_tables()