• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/jpeg/

Lines Matching refs:cinfo

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