typedefstruct { struct jpeg_c_main_controller pub; /* public fields */
JDIMENSION cur_iMCU_row; /* number of current iMCU row */
JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */
boolean suspended; /* remember if we suspended output */
J_BUF_MODE pass_mode; /* current operating mode */
/* If using just a strip buffer, this points to the entire set of buffers *(weallocateoneforeachcomponent).Inthefull-imagecase,this *pointstothecurrentlyaccessiblestripsofthevirtualarrays.
*/
_JSAMPARRAY buffer[MAX_COMPONENTS];
} my_main_controller;
while (main_ptr->cur_iMCU_row < cinfo->total_iMCU_rows) { /* Read input data if we haven't filled the main buffer yet */ if (main_ptr->rowgroup_ctr < data_unit)
(*cinfo->prep->_pre_process_data) (cinfo, input_buf, in_row_ctr,
in_rows_avail, main_ptr->buffer,
&main_ptr->rowgroup_ctr, data_unit);
/* If we don't have a full iMCU row buffered, return to application for *moredata.NotethatpreprocessorwillalwayspadtofilltheiMCUrow *atthebottomoftheimage.
*/ if (main_ptr->rowgroup_ctr != data_unit) return;
/* Send the completed row to the compressor */ if (!(*cinfo->coef->_compress_data) (cinfo, main_ptr->buffer)) { /* If compressor did not consume the whole row, then we must need to *suspendprocessingandreturntotheapplication.Inthissituation *wepretendwedidn'tyetconsumethelastinputrow;otherwise,if *ithappenedtobethelastrowoftheimage,theapplicationwould *thinkweweredone.
*/ if (!main_ptr->suspended) {
(*in_row_ctr)--;
main_ptr->suspended = TRUE;
} return;
} /* We did finish the row. Undo our little suspension hack if a previous *callsuspended;thenmarkthemainbufferempty.
*/ if (main_ptr->suspended) {
(*in_row_ctr)++;
main_ptr->suspended = FALSE;
}
main_ptr->rowgroup_ctr = 0;
main_ptr->cur_iMCU_row++;
}
}
/* *Initializemainbuffercontroller.
*/
GLOBAL(void)
_jinit_c_main_controller(j_compress_ptr cinfo, boolean need_full_buffer)
{
my_main_ptr main_ptr; int ci;
jpeg_component_info *compptr; int data_unit = cinfo->master->lossless ? 1 : DCTSIZE;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.