From d2f7d7964dc50f608d93b3974982e50e9f0c0dab Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Tue, 4 May 2021 14:09:43 +0200 Subject: Update bundled libtiff to version 4.3.0 [ChangeLog][Third-Party Code] Bundled libtiff was updated to version 4.3.0 Change-Id: I4be8884394db6de7a2aedd4c41abc49a1e565917 Reviewed-by: Qt CI Bot Reviewed-by: Paul Olav Tvete (cherry picked from commit 2d8573f44106bda16466c210d32cc867d2bea227) Reviewed-by: Eirik Aavitsland --- src/3rdparty/libtiff/libtiff/tif_jpeg.c | 180 ++++++++++++++++---------------- 1 file changed, 90 insertions(+), 90 deletions(-) (limited to 'src/3rdparty/libtiff/libtiff/tif_jpeg.c') diff --git a/src/3rdparty/libtiff/libtiff/tif_jpeg.c b/src/3rdparty/libtiff/libtiff/tif_jpeg.c index 6711137..6076c11 100644 --- a/src/3rdparty/libtiff/libtiff/tif_jpeg.c +++ b/src/3rdparty/libtiff/libtiff/tif_jpeg.c @@ -44,8 +44,8 @@ */ #include -int TIFFFillStrip(TIFF* tif, uint32 strip); -int TIFFFillTile(TIFF* tif, uint32 tile); +int TIFFFillStrip(TIFF* tif, uint32_t strip); +int TIFFFillTile(TIFF* tif, uint32_t tile); int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode ); int TIFFJPEGIsFullStripRequired_12(TIFF* tif); @@ -156,9 +156,9 @@ typedef struct { jpeg_source_mgr src; /* data source for decompression */ /* private state */ TIFF* tif; /* back link needed by some code */ - uint16 photometric; /* copy of PhotometricInterpretation */ - uint16 h_sampling; /* luminance sampling factors */ - uint16 v_sampling; + uint16_t photometric; /* copy of PhotometricInterpretation */ + uint16_t h_sampling; /* luminance sampling factors */ + uint16_t v_sampling; tmsize_t bytesperline; /* decompressed bytes per scanline */ /* pointers to intermediate buffers when processing downsampled data */ JSAMPARRAY ds_buffer[MAX_COMPONENTS]; @@ -172,7 +172,7 @@ typedef struct { TIFFTileMethod deftparent; /* super-class method */ /* pseudo-tag fields */ void* jpegtables; /* JPEGTables tag value, or NULL */ - uint32 jpegtables_length; /* number of bytes in same */ + uint32_t jpegtables_length; /* number of bytes in same */ int jpegquality; /* Compression quality level */ int jpegcolormode; /* Auto RGB<=>YCbCr convert? */ int jpegtablesmode; /* What to put in JPEGTables */ @@ -183,12 +183,12 @@ typedef struct { #define JState(tif) ((JPEGState*)(tif)->tif_data) -static int JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); -static int JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); -static int JPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); -static int JPEGEncodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); +static int JPEGDecode(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s); +static int JPEGDecodeRaw(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s); +static int JPEGEncode(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s); +static int JPEGEncodeRaw(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s); static int JPEGInitializeLibJPEG(TIFF * tif, int decode ); -static int DecodeRowError(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); +static int DecodeRowError(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s); #define FIELD_JPEGTABLES (FIELD_CODEC+0) @@ -480,7 +480,7 @@ std_term_destination(j_compress_ptr cinfo) JPEGState* sp = (JPEGState*) cinfo; TIFF* tif = sp->tif; - tif->tif_rawcp = (uint8*) sp->dest.next_output_byte; + tif->tif_rawcp = (uint8_t*) sp->dest.next_output_byte; tif->tif_rawcc = tif->tif_rawdatasize - (tmsize_t) sp->dest.free_in_buffer; /* NB: libtiff does the final buffer flush */ @@ -534,7 +534,7 @@ tables_term_destination(j_compress_ptr cinfo) JPEGState* sp = (JPEGState*) cinfo; /* set tables length to number of bytes actually emitted */ - sp->jpegtables_length -= (uint32) sp->dest.free_in_buffer; + sp->jpegtables_length -= (uint32_t) sp->dest.free_in_buffer; } static int @@ -724,18 +724,18 @@ struct JPEGFixupTagsSubsamplingData { TIFF* tif; void* buffer; - uint32 buffersize; - uint8* buffercurrentbyte; - uint32 bufferbytesleft; - uint64 fileoffset; - uint64 filebytesleft; - uint8 filepositioned; + uint32_t buffersize; + uint8_t* buffercurrentbyte; + uint32_t bufferbytesleft; + uint64_t fileoffset; + uint64_t filebytesleft; + uint8_t filepositioned; }; static void JPEGFixupTagsSubsampling(TIFF* tif); static int JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data); -static int JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint8* result); -static int JPEGFixupTagsSubsamplingReadWord(struct JPEGFixupTagsSubsamplingData* data, uint16* result); -static void JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData* data, uint16 skiplength); +static int JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint8_t* result); +static int JPEGFixupTagsSubsamplingReadWord(struct JPEGFixupTagsSubsamplingData* data, uint16_t* result); +static void JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData* data, uint16_t skiplength); #endif @@ -781,7 +781,7 @@ JPEGFixupTagsSubsampling(TIFF* tif) */ static const char module[] = "JPEGFixupTagsSubsampling"; struct JPEGFixupTagsSubsamplingData m; - uint64 fileoffset = TIFFGetStrileOffset(tif, 0); + uint64_t fileoffset = TIFFGetStrileOffset(tif, 0); if( fileoffset == 0 ) { @@ -815,7 +815,7 @@ static int JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data) { static const char module[] = "JPEGFixupTagsSubsamplingSec"; - uint8 m; + uint8_t m; while (1) { while (1) @@ -860,7 +860,7 @@ JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data) case JPEG_MARKER_DRI: /* this type of marker has data, but it has no use to us and should be skipped */ { - uint16 n; + uint16_t n; if (!JPEGFixupTagsSubsamplingReadWord(data,&n)) return(0); if (n<2) @@ -877,10 +877,10 @@ JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data) case JPEG_MARKER_SOF10: /* Progressive arithmetic: normally not allowed by TechNote, but that doesn't hurt supporting it */ /* this marker contains the subsampling factors we're scanning for */ { - uint16 n; - uint16 o; - uint8 p; - uint8 ph,pv; + uint16_t n; + uint16_t o; + uint8_t p; + uint8_t ph,pv; if (!JPEGFixupTagsSubsamplingReadWord(data,&n)) return(0); if (n!=8+data->tif->tif_dir.td_samplesperpixel*3) @@ -913,10 +913,10 @@ JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data) if ((ph!=data->tif->tif_dir.td_ycbcrsubsampling[0])||(pv!=data->tif->tif_dir.td_ycbcrsubsampling[1])) { TIFFWarningExt(data->tif->tif_clientdata,module, - "Auto-corrected former TIFF subsampling values [%d,%d] to match subsampling values inside JPEG compressed data [%d,%d]", - (int)data->tif->tif_dir.td_ycbcrsubsampling[0], - (int)data->tif->tif_dir.td_ycbcrsubsampling[1], - (int)ph,(int)pv); + "Auto-corrected former TIFF subsampling values [%"PRIu16",%"PRIu16"] to match subsampling values inside JPEG compressed data [%"PRIu8",%"PRIu8"]", + data->tif->tif_dir.td_ycbcrsubsampling[0], + data->tif->tif_dir.td_ycbcrsubsampling[1], + ph, pv); data->tif->tif_dir.td_ycbcrsubsampling[0]=ph; data->tif->tif_dir.td_ycbcrsubsampling[1]=pv; } @@ -929,11 +929,11 @@ JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data) } static int -JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint8* result) +JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint8_t* result) { if (data->bufferbytesleft==0) { - uint32 m; + uint32_t m; if (data->filebytesleft==0) return(0); if (!data->filepositioned) @@ -945,8 +945,8 @@ JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint data->filepositioned=1; } m=data->buffersize; - if ((uint64)m>data->filebytesleft) - m=(uint32)data->filebytesleft; + if ((uint64_t)m > data->filebytesleft) + m=(uint32_t)data->filebytesleft; assert(m<0x80000000UL); if (TIFFReadFile(data->tif,data->buffer,(tmsize_t)m)!=(tmsize_t)m) return(0); @@ -962,10 +962,10 @@ JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint } static int -JPEGFixupTagsSubsamplingReadWord(struct JPEGFixupTagsSubsamplingData* data, uint16* result) +JPEGFixupTagsSubsamplingReadWord(struct JPEGFixupTagsSubsamplingData* data, uint16_t* result) { - uint8 ma; - uint8 mb; + uint8_t ma; + uint8_t mb; if (!JPEGFixupTagsSubsamplingReadByte(data,&ma)) return(0); if (!JPEGFixupTagsSubsamplingReadByte(data,&mb)) @@ -975,17 +975,17 @@ JPEGFixupTagsSubsamplingReadWord(struct JPEGFixupTagsSubsamplingData* data, uint } static void -JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData* data, uint16 skiplength) +JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData* data, uint16_t skiplength) { - if ((uint32)skiplength<=data->bufferbytesleft) + if ((uint32_t)skiplength <= data->bufferbytesleft) { data->buffercurrentbyte+=skiplength; data->bufferbytesleft-=skiplength; } else { - uint16 m; - m=(uint16)(skiplength-data->bufferbytesleft); + uint16_t m; + m=(uint16_t)(skiplength - data->bufferbytesleft); if (m<=data->filebytesleft) { data->bufferbytesleft=0; @@ -1089,12 +1089,12 @@ int TIFFJPEGIsFullStripRequired(TIFF* tif) * Set up for decoding a strip or tile. */ /*ARGSUSED*/ static int -JPEGPreDecode(TIFF* tif, uint16 s) +JPEGPreDecode(TIFF* tif, uint16_t s) { JPEGState *sp = JState(tif); TIFFDirectory *td = &tif->tif_dir; static const char module[] = "JPEGPreDecode"; - uint32 segment_width, segment_height; + uint32_t segment_width, segment_height; int downsampled_output; int ci; @@ -1119,7 +1119,7 @@ JPEGPreDecode(TIFF* tif, uint16 s) if (TIFFjpeg_read_header(sp, TRUE) != JPEG_HEADER_OK) return (0); - tif->tif_rawcp = (uint8*) sp->src.next_input_byte; + tif->tif_rawcp = (uint8_t*) sp->src.next_input_byte; tif->tif_rawcc = sp->src.bytes_in_buffer; /* @@ -1148,7 +1148,7 @@ JPEGPreDecode(TIFF* tif, uint16 s) sp->cinfo.d.image_height < segment_height) { TIFFWarningExt(tif->tif_clientdata, module, "Improper JPEG strip/tile size, " - "expected %dx%d, got %dx%d", + "expected %"PRIu32"x%"PRIu32", got %ux%u", segment_width, segment_height, sp->cinfo.d.image_width, sp->cinfo.d.image_height); @@ -1163,7 +1163,7 @@ JPEGPreDecode(TIFF* tif, uint16 s) /* we can safely recover from that. */ TIFFWarningExt(tif->tif_clientdata, module, "JPEG strip size exceeds expected dimensions," - " expected %dx%d, got %dx%d", + " expected %"PRIu32"x%"PRIu32", got %ux%u", segment_width, segment_height, sp->cinfo.d.image_width, sp->cinfo.d.image_height); } @@ -1177,7 +1177,7 @@ JPEGPreDecode(TIFF* tif, uint16 s) */ TIFFErrorExt(tif->tif_clientdata, module, "JPEG strip/tile size exceeds expected dimensions," - " expected %dx%d, got %dx%d", + " expected %"PRIu32"x%"PRIu32", got %ux%u", segment_width, segment_height, sp->cinfo.d.image_width, sp->cinfo.d.image_height); return (0); @@ -1231,15 +1231,15 @@ JPEGPreDecode(TIFF* tif, uint16 s) { TIFFErrorExt(tif->tif_clientdata, module, "Reading this image would require libjpeg to allocate " - "at least %u bytes. " - "This is disabled since above the %u threshold. " + "at least %"PRIu64" bytes. " + "This is disabled since above the %ld threshold. " "You may override this restriction by defining the " "LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, " "or setting the JPEGMEM environment variable to a value greater " - "or equal to '%uM'", - (unsigned)(nRequiredMemory), - (unsigned)(sp->cinfo.d.mem->max_memory_to_use), - (unsigned)((nRequiredMemory + 1000000 - 1) / 1000000)); + "or equal to '%"PRIu64"M'", + nRequiredMemory, + sp->cinfo.d.mem->max_memory_to_use, + (nRequiredMemory + 1000000u - 1u) / 1000000u); return 0; } } @@ -1250,7 +1250,7 @@ JPEGPreDecode(TIFF* tif, uint16 s) sp->cinfo.d.comp_info[0].v_samp_factor != sp->v_sampling) { TIFFErrorExt(tif->tif_clientdata, module, "Improper JPEG sampling factors %d,%d\n" - "Apparently should be %d,%d.", + "Apparently should be %"PRIu16",%"PRIu16".", sp->cinfo.d.comp_info[0].h_samp_factor, sp->cinfo.d.comp_info[0].v_samp_factor, sp->h_sampling, sp->v_sampling); @@ -1323,7 +1323,7 @@ JPEGPreDecode(TIFF* tif, uint16 s) */ #if !JPEG_LIB_MK1_OR_12BIT static int -JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) +JPEGDecode(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s) { JPEGState *sp = JState(tif); tmsize_t nrows; @@ -1368,7 +1368,7 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) } /* Update information on consumed data */ - tif->tif_rawcp = (uint8*) sp->src.next_input_byte; + tif->tif_rawcp = (uint8_t*) sp->src.next_input_byte; tif->tif_rawcc = sp->src.bytes_in_buffer; /* Close down the decompressor if we've finished the strip or tile. */ @@ -1379,7 +1379,7 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) #if JPEG_LIB_MK1_OR_12BIT /*ARGSUSED*/ static int -JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) +JPEGDecode(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s) { JPEGState *sp = JState(tif); tmsize_t nrows; @@ -1474,7 +1474,7 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) } /* Update information on consumed data */ - tif->tif_rawcp = (uint8*) sp->src.next_input_byte; + tif->tif_rawcp = (uint8_t*) sp->src.next_input_byte; tif->tif_rawcc = sp->src.bytes_in_buffer; /* Close down the decompressor if we've finished the strip or tile. */ @@ -1484,7 +1484,7 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) #endif /* JPEG_LIB_MK1_OR_12BIT */ /*ARGSUSED*/ static int -DecodeRowError(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) +DecodeRowError(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s) { (void) buf; @@ -1501,7 +1501,7 @@ DecodeRowError(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) * Returned data is downsampled per sampling factors. */ /*ARGSUSED*/ static int -JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) +JPEGDecodeRaw(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s) { JPEGState *sp = JState(tif); tmsize_t nrows; @@ -1512,7 +1512,7 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) /* For last strip, limit number of rows to its truncated height */ /* even if the codestream height is larger (which is not compliant, */ /* but that we tolerate) */ - if( (uint32)nrows > td->td_imagelength - tif->tif_row && !isTiled(tif) ) + if((uint32_t)nrows > td->td_imagelength - tif->tif_row && !isTiled(tif) ) nrows = td->td_imagelength - tif->tif_row; /* data is expected to be read in multiples of a scanline */ @@ -1784,7 +1784,7 @@ JPEGSetupEncode(TIFF* tif) if( td->td_bitspersample > 16 ) { TIFFErrorExt(tif->tif_clientdata, module, - "BitsPerSample %d not allowed for JPEG", + "BitsPerSample %"PRIu16" not allowed for JPEG", td->td_bitspersample); return (0); } @@ -1814,8 +1814,8 @@ JPEGSetupEncode(TIFF* tif) case PHOTOMETRIC_PALETTE: /* disallowed by Tech Note */ case PHOTOMETRIC_MASK: TIFFErrorExt(tif->tif_clientdata, module, - "PhotometricInterpretation %d not allowed for JPEG", - (int) sp->photometric); + "PhotometricInterpretation %"PRIu16" not allowed for JPEG", + sp->photometric); return (0); default: /* TIFF 6.0 forbids subsampling of all other color spaces */ @@ -1838,8 +1838,8 @@ JPEGSetupEncode(TIFF* tif) if (td->td_bitspersample != BITS_IN_JSAMPLE ) #endif { - TIFFErrorExt(tif->tif_clientdata, module, "BitsPerSample %d not allowed for JPEG", - (int) td->td_bitspersample); + TIFFErrorExt(tif->tif_clientdata, module, "BitsPerSample %"PRIu16" not allowed for JPEG", + td->td_bitspersample); return (0); } sp->cinfo.c.data_precision = td->td_bitspersample; @@ -1849,22 +1849,22 @@ JPEGSetupEncode(TIFF* tif) if (isTiled(tif)) { if ((td->td_tilelength % (sp->v_sampling * DCTSIZE)) != 0) { TIFFErrorExt(tif->tif_clientdata, module, - "JPEG tile height must be multiple of %d", - sp->v_sampling * DCTSIZE); + "JPEG tile height must be multiple of %"PRIu32, + (uint32_t)(sp->v_sampling * DCTSIZE)); return (0); } if ((td->td_tilewidth % (sp->h_sampling * DCTSIZE)) != 0) { TIFFErrorExt(tif->tif_clientdata, module, - "JPEG tile width must be multiple of %d", - sp->h_sampling * DCTSIZE); + "JPEG tile width must be multiple of %"PRIu32, + (uint32_t)(sp->h_sampling * DCTSIZE)); return (0); } } else { if (td->td_rowsperstrip < td->td_imagelength && (td->td_rowsperstrip % (sp->v_sampling * DCTSIZE)) != 0) { TIFFErrorExt(tif->tif_clientdata, module, - "RowsPerStrip must be multiple of %d for JPEG", - sp->v_sampling * DCTSIZE); + "RowsPerStrip must be multiple of %"PRIu32" for JPEG", + (uint32_t)(sp->v_sampling * DCTSIZE)); return (0); } } @@ -1897,12 +1897,12 @@ JPEGSetupEncode(TIFF* tif) * Set encoding state at the start of a strip or tile. */ static int -JPEGPreEncode(TIFF* tif, uint16 s) +JPEGPreEncode(TIFF* tif, uint16_t s) { JPEGState *sp = JState(tif); TIFFDirectory *td = &tif->tif_dir; static const char module[] = "JPEGPreEncode"; - uint32 segment_width, segment_height; + uint32_t segment_width, segment_height; int downsampled_input; assert(sp != NULL); @@ -2034,7 +2034,7 @@ JPEGPreEncode(TIFF* tif, uint16 s) * "Standard" case: incoming data is not downsampled. */ static int -JPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) +JPEGEncode(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s) { JPEGState *sp = JState(tif); tmsize_t nrows; @@ -2112,7 +2112,7 @@ JPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) * Incoming data is expected to be downsampled per sampling factors. */ static int -JPEGEncodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) +JPEGEncodeRaw(TIFF* tif, uint8_t* buf, tmsize_t cc, uint16_t s) { JPEGState *sp = JState(tif); JSAMPLE* inptr; @@ -2286,17 +2286,17 @@ JPEGResetUpsampled( TIFF* tif ) } static int -JPEGVSetField(TIFF* tif, uint32 tag, va_list ap) +JPEGVSetField(TIFF* tif, uint32_t tag, va_list ap) { JPEGState* sp = JState(tif); const TIFFField* fip; - uint32 v32; + uint32_t v32; assert(sp != NULL); switch (tag) { case TIFFTAG_JPEGTABLES: - v32 = (uint32) va_arg(ap, uint32); + v32 = (uint32_t) va_arg(ap, uint32_t); if (v32 == 0) { /* XXX */ return (0); @@ -2341,7 +2341,7 @@ JPEGVSetField(TIFF* tif, uint32 tag, va_list ap) } static int -JPEGVGetField(TIFF* tif, uint32 tag, va_list ap) +JPEGVGetField(TIFF* tif, uint32_t tag, va_list ap) { JPEGState* sp = JState(tif); @@ -2349,7 +2349,7 @@ JPEGVGetField(TIFF* tif, uint32 tag, va_list ap) switch (tag) { case TIFFTAG_JPEGTABLES: - *va_arg(ap, uint32*) = sp->jpegtables_length; + *va_arg(ap, uint32_t*) = sp->jpegtables_length; *va_arg(ap, const void**) = sp->jpegtables; break; case TIFFTAG_JPEGQUALITY: @@ -2377,15 +2377,15 @@ JPEGPrintDir(TIFF* tif, FILE* fd, long flags) if( sp != NULL ) { if (TIFFFieldSet(tif,FIELD_JPEGTABLES)) - fprintf(fd, " JPEG Tables: (%lu bytes)\n", - (unsigned long) sp->jpegtables_length); + fprintf(fd, " JPEG Tables: (%"PRIu32" bytes)\n", + sp->jpegtables_length); if (sp->printdir) (*sp->printdir)(tif, fd, flags); } } -static uint32 -JPEGDefaultStripSize(TIFF* tif, uint32 s) +static uint32_t +JPEGDefaultStripSize(TIFF* tif, uint32_t s) { JPEGState* sp = JState(tif); TIFFDirectory *td = &tif->tif_dir; @@ -2397,7 +2397,7 @@ JPEGDefaultStripSize(TIFF* tif, uint32 s) } static void -JPEGDefaultTileSize(TIFF* tif, uint32* tw, uint32* th) +JPEGDefaultTileSize(TIFF* tif, uint32_t* tw, uint32_t* th) { JPEGState* sp = JState(tif); TIFFDirectory *td = &tif->tif_dir; @@ -2501,7 +2501,7 @@ TIFFInitJPEG(TIFF* tif, int scheme) /* * Allocate state block so tag methods have storage to record values. */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof (JPEGState)); + tif->tif_data = (uint8_t*) _TIFFmalloc(sizeof (JPEGState)); if (tif->tif_data == NULL) { TIFFErrorExt(tif->tif_clientdata, -- cgit v1.2.3