Home | History | Annotate | Download | only in libjpeg-turbo

Lines Matching full:maxval

70   JSAMPLE *rescale;             /* => maxval-remapping array, or NULL */
71 int maxval;
95 read_pbm_integer (j_compress_ptr cinfo, FILE * infile, int maxval)
120 if (val > maxval)
134 * maxval = MAXJSAMPLE, which is the normal case for 8-bit data.
140 /* This version is for reading text-format PGM files with any maxval */
147 int maxval = source->maxval;
151 *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)];
159 /* This version is for reading text-format PPM files with any maxval */
166 int maxval = source->maxval;
170 *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)];
171 *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)];
172 *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)];
180 /* This version is for reading raw-byte-format PGM files with any maxval */
201 /* This version is for reading raw-byte-format PPM files with any maxval */
224 /* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE.
239 /* This version is for reading raw-word-format PGM files with any maxval */
263 /* This version is for reading raw-word-format PPM files with any maxval */
300 unsigned int w, h, maxval;
323 maxval = read_pbm_integer(cinfo, source->pub.input_file, 65535);
325 if (w <= 0 || h <= 0 || maxval <= 0) /* error check */
331 source->maxval = maxval;
359 if (maxval > 255) {
361 } else if (maxval == MAXJSAMPLE && sizeof(JSAMPLE) == sizeof(U_CHAR)) {
374 if (maxval > 255) {
376 } else if (maxval == MAXJSAMPLE && sizeof(JSAMPLE) == sizeof(U_CHAR)) {
389 ((maxval<=255) ? sizeof(U_CHAR) : (2*sizeof(U_CHAR)));
414 /* On 16-bit-int machines we have to be careful of maxval = 65535 */
417 (size_t) (((long) maxval + 1L) * sizeof(JSAMPLE)));
418 half_maxval = maxval / 2;
419 for (val = 0; val <= (INT32) maxval; val++) {
421 source->rescale[val] = (JSAMPLE) ((val*MAXJSAMPLE + half_maxval)/maxval);