LOCAL(void)
initial_setup(j_decompress_ptr cinfo) /* Called once, when first SOS marker is reached */
{ int ci;
jpeg_component_info *compptr; int data_unit = cinfo->master->lossless ? 1 : DCTSIZE;
/* Make sure image isn't bigger than I can handle */ if ((long)cinfo->image_height > (long)JPEG_MAX_DIMENSION ||
(long)cinfo->image_width > (long)JPEG_MAX_DIMENSION)
ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsignedint)JPEG_MAX_DIMENSION);
/* Lossy JPEG images must have 8 or 12 bits per sample. Lossless JPEG images *canhave2to16bitspersample.
*/ #ifdef D_LOSSLESS_SUPPORTED if (cinfo->master->lossless) { if (cinfo->data_precision < 2 || cinfo->data_precision > 16)
ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);
} else #endif
{ if (cinfo->data_precision != 8 && cinfo->data_precision != 12)
ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);
}
/* Check that number of components won't exceed internal array sizes */ if (cinfo->num_components > MAX_COMPONENTS)
ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
MAX_COMPONENTS);
LOCAL(void)
per_scan_setup(j_decompress_ptr cinfo) /* Do computations that are needed before processing a JPEG scan */ /* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */
{ int ci, mcublks, tmp;
jpeg_component_info *compptr; int data_unit = cinfo->master->lossless ? 1 : DCTSIZE;
METHODDEF(int)
consume_markers(j_decompress_ptr cinfo)
{
my_inputctl_ptr inputctl = (my_inputctl_ptr)cinfo->inputctl; int val;
if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */ return JPEG_REACHED_EOI;
val = (*cinfo->marker->read_markers) (cinfo);
switch (val) { case JPEG_REACHED_SOS: /* Found SOS */ if (inputctl->inheaders) { /* 1st SOS */
initial_setup(cinfo);
inputctl->inheaders = FALSE; /* Note: start_input_pass must be called by jdmaster.c *beforeanymoreinputcanbeconsumed.jdapimin.cis *responsibleforenforcingthissequencing.
*/
} else { /* 2nd or later SOS marker */ if (!inputctl->pub.has_multiple_scans)
ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */
start_input_pass(cinfo);
} break; case JPEG_REACHED_EOI: /* Found EOI */
inputctl->pub.eoi_reached = TRUE; if (inputctl->inheaders) { /* Tables-only datastream, apparently */ if (cinfo->marker->saw_SOF)
ERREXIT(cinfo, JERR_SOF_NO_SOS);
} else { /* Prevent infinite loop in coef ctlr's decompress_data routine *ifusersetoutput_scan_numberlargerthannumberofscans.
*/ if (cinfo->output_scan_number > cinfo->input_scan_number)
cinfo->output_scan_number = cinfo->input_scan_number;
} break; case JPEG_SUSPENDED: break;
}
inputctl->pub.consume_input = consume_markers;
inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */
inputctl->pub.eoi_reached = FALSE;
inputctl->inheaders = TRUE; /* Reset other modules */
(*cinfo->err->reset_error_mgr) ((j_common_ptr)cinfo);
(*cinfo->marker->reset_marker_reader) (cinfo); /* Reset progression state -- would be cleaner if entropy decoder did this */
cinfo->coef_bits = NULL;
}
/* Create subobject in permanent pool */
inputctl = (my_inputctl_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_PERMANENT, sizeof(my_input_controller));
cinfo->inputctl = (struct jpeg_input_controller *)inputctl; /* Initialize method pointers */
inputctl->pub.consume_input = consume_markers;
inputctl->pub.reset_input_controller = reset_input_controller;
inputctl->pub.start_input_pass = start_input_pass;
inputctl->pub.finish_input_pass = finish_input_pass; /* Initialize state: can't use reset_input_controller since we don't *wanttotrytoresetothermodulesyet.
*/
inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */
inputctl->pub.eoi_reached = FALSE;
inputctl->inheaders = TRUE;
}
Messung V0.5 in Prozent
¤ 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.0.14Bemerkung:
(vorverarbeitet am 2026-09-29)
¤
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.