Lines Matching refs:main

8  * This file contains the main buffer controller for compression.
9 * The main buffer lies between the pre-processor and the JPEG
71 my_main_ptr main = (my_main_ptr) cinfo->main;
77 main->cur_iMCU_row = 0; /* initialize counters */
78 main->rowgroup_ctr = 0;
79 main->suspended = FALSE;
80 main->pass_mode = pass_mode; /* save mode for use by process_data */
85 if (main->whole_image[0] != NULL)
88 main->pub.process_data = process_data_simple_main;
94 if (main->whole_image[0] == NULL)
96 main->pub.process_data = process_data_buffer_main;
117 my_main_ptr main = (my_main_ptr) cinfo->main;
119 while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
120 /* Read input data if we haven't filled the main buffer yet */
121 if (main->rowgroup_ctr < DCTSIZE)
124 main->buffer, &main->rowgroup_ctr,
131 if (main->rowgroup_ctr != DCTSIZE)
135 if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
142 if (! main->suspended) {
144 main->suspended = TRUE;
149 * call suspended; then mark the main buffer empty.
151 if (main->suspended) {
153 main->suspended = FALSE;
155 main->rowgroup_ctr = 0;
156 main->cur_iMCU_row++;
173 my_main_ptr main = (my_main_ptr) cinfo->main;
176 boolean writing = (main->pass_mode != JBUF_CRANK_DEST);
178 while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
180 if (main->rowgroup_ctr == 0) {
183 main->buffer[ci] = (*cinfo->mem->access_virt_sarray)
184 ((j_common_ptr) cinfo, main->whole_image[ci],
185 main->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE),
191 main->rowgroup_ctr = DCTSIZE;
200 main->buffer, &main->rowgroup_ctr,
203 if (main->rowgroup_ctr < DCTSIZE)
208 if (main->pass_mode != JBUF_SAVE_SOURCE) {
209 if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {
216 if (! main->suspended) {
218 main->suspended = TRUE;
223 * call suspended; then mark the main buffer empty.
225 if (main->suspended) {
227 main->suspended = FALSE;
232 main->rowgroup_ctr = 0;
233 main->cur_iMCU_row++;
241 * Initialize main buffer controller.
247 my_main_ptr main;
251 main = (my_main_ptr)
254 cinfo->main = (struct jpeg_c_main_controller *) main;
255 main->pub.start_pass = start_pass_main;
270 main->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
282 main->whole_image[0] = NULL; /* flag for no virtual arrays */
287 main->buffer[ci] = (*cinfo->mem->alloc_sarray)