Lines Matching refs:td

52 	register TIFFDirectory *td;  in TIFFWriteScanline()  local
67 td = &tif->tif_dir; in TIFFWriteScanline()
72 if (row >= td->td_imagelength) { /* extend image */ in TIFFWriteScanline()
73 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { in TIFFWriteScanline()
78 td->td_imagelength = row+1; in TIFFWriteScanline()
84 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { in TIFFWriteScanline()
85 if (sample >= td->td_samplesperpixel) { in TIFFWriteScanline()
88 (unsigned long) sample, (unsigned long) td->td_samplesperpixel); in TIFFWriteScanline()
91 strip = sample*td->td_stripsperimage + row/td->td_rowsperstrip; in TIFFWriteScanline()
93 strip = row / td->td_rowsperstrip; in TIFFWriteScanline()
101 if (strip >= td->td_nstrips && !TIFFGrowStrips(tif, 1, module)) in TIFFWriteScanline()
115 if (strip >= td->td_stripsperimage && imagegrew) in TIFFWriteScanline()
116 td->td_stripsperimage = in TIFFWriteScanline()
117 TIFFhowmany_32(td->td_imagelength,td->td_rowsperstrip); in TIFFWriteScanline()
118 if (td->td_stripsperimage == 0) { in TIFFWriteScanline()
123 (strip % td->td_stripsperimage) * td->td_rowsperstrip; in TIFFWriteScanline()
133 if( td->td_stripbytecount[strip] > 0 ) in TIFFWriteScanline()
136 td->td_stripbytecount[strip] = 0; in TIFFWriteScanline()
158 tif->tif_row = (strip % td->td_stripsperimage) * in TIFFWriteScanline()
159 td->td_rowsperstrip; in TIFFWriteScanline()
191 TIFFDirectory *td = &tif->tif_dir; in TIFFWriteEncodedStrip() local
205 if (strip >= td->td_nstrips) { in TIFFWriteEncodedStrip()
206 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { in TIFFWriteEncodedStrip()
213 td->td_stripsperimage = in TIFFWriteEncodedStrip()
214 TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip); in TIFFWriteEncodedStrip()
227 if (td->td_stripsperimage == 0) { in TIFFWriteEncodedStrip()
232 tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; in TIFFWriteEncodedStrip()
239 if( td->td_stripbytecount[strip] > 0 ) in TIFFWriteEncodedStrip()
245 if( tif->tif_rawdatasize <= (tmsize_t)td->td_stripbytecount[strip] ) in TIFFWriteEncodedStrip()
248 (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[strip] + 1), 1024))) ) in TIFFWriteEncodedStrip()
261 sample = (uint16)(strip / td->td_stripsperimage); in TIFFWriteEncodedStrip()
272 if (!isFillOrder(tif, td->td_fillorder) && in TIFFWriteEncodedStrip()
292 TIFFDirectory *td = &tif->tif_dir; in TIFFWriteRawStrip() local
305 if (strip >= td->td_nstrips) { in TIFFWriteRawStrip()
306 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { in TIFFWriteRawStrip()
316 if (strip >= td->td_stripsperimage) in TIFFWriteRawStrip()
317 td->td_stripsperimage = in TIFFWriteRawStrip()
318 TIFFhowmany_32(td->td_imagelength,td->td_rowsperstrip); in TIFFWriteRawStrip()
323 if (td->td_stripsperimage == 0) { in TIFFWriteRawStrip()
327 tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; in TIFFWriteRawStrip()
367 TIFFDirectory *td; in TIFFWriteEncodedTile() local
373 td = &tif->tif_dir; in TIFFWriteEncodedTile()
374 if (tile >= td->td_nstrips) { in TIFFWriteEncodedTile()
376 (unsigned long) tile, (unsigned long) td->td_nstrips); in TIFFWriteEncodedTile()
390 if( td->td_stripbytecount[tile] > 0 ) in TIFFWriteEncodedTile()
396 if( tif->tif_rawdatasize <= (tmsize_t) td->td_stripbytecount[tile] ) in TIFFWriteEncodedTile()
399 (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[tile] + 1), 1024))) ) in TIFFWriteEncodedTile()
415 howmany32=TIFFhowmany_32(td->td_imagelength, td->td_tilelength); in TIFFWriteEncodedTile()
420 tif->tif_row = (tile % howmany32) * td->td_tilelength; in TIFFWriteEncodedTile()
421 howmany32=TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth); in TIFFWriteEncodedTile()
426 tif->tif_col = (tile % howmany32) * td->td_tilewidth; in TIFFWriteEncodedTile()
434 sample = (uint16)(tile/td->td_stripsperimage); in TIFFWriteEncodedTile()
452 if (!isFillOrder(tif, td->td_fillorder) && in TIFFWriteEncodedTile()
495 TIFFDirectory* td = &tif->tif_dir; in TIFFSetupStrips() local
498 td->td_stripsperimage = in TIFFSetupStrips()
500 td->td_samplesperpixel : TIFFNumberOfTiles(tif); in TIFFSetupStrips()
502 td->td_stripsperimage = in TIFFSetupStrips()
504 td->td_samplesperpixel : TIFFNumberOfStrips(tif); in TIFFSetupStrips()
505 td->td_nstrips = td->td_stripsperimage; in TIFFSetupStrips()
506 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) in TIFFSetupStrips()
507 td->td_stripsperimage /= td->td_samplesperpixel; in TIFFSetupStrips()
508 td->td_stripoffset = (uint64 *) in TIFFSetupStrips()
509 _TIFFmalloc(td->td_nstrips * sizeof (uint64)); in TIFFSetupStrips()
510 td->td_stripbytecount = (uint64 *) in TIFFSetupStrips()
511 _TIFFmalloc(td->td_nstrips * sizeof (uint64)); in TIFFSetupStrips()
512 if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL) in TIFFSetupStrips()
518 _TIFFmemset(td->td_stripoffset, 0, td->td_nstrips*sizeof (uint64)); in TIFFSetupStrips()
519 _TIFFmemset(td->td_stripbytecount, 0, td->td_nstrips*sizeof (uint64)); in TIFFSetupStrips()
648 TIFFDirectory *td = &tif->tif_dir; in TIFFGrowStrips() local
652 assert(td->td_planarconfig == PLANARCONFIG_CONTIG); in TIFFGrowStrips()
653 new_stripoffset = (uint64*)_TIFFrealloc(td->td_stripoffset, in TIFFGrowStrips()
654 (td->td_nstrips + delta) * sizeof (uint64)); in TIFFGrowStrips()
655 new_stripbytecount = (uint64*)_TIFFrealloc(td->td_stripbytecount, in TIFFGrowStrips()
656 (td->td_nstrips + delta) * sizeof (uint64)); in TIFFGrowStrips()
662 td->td_nstrips = 0; in TIFFGrowStrips()
666 td->td_stripoffset = new_stripoffset; in TIFFGrowStrips()
667 td->td_stripbytecount = new_stripbytecount; in TIFFGrowStrips()
668 _TIFFmemset(td->td_stripoffset + td->td_nstrips, in TIFFGrowStrips()
670 _TIFFmemset(td->td_stripbytecount + td->td_nstrips, in TIFFGrowStrips()
672 td->td_nstrips += delta; in TIFFGrowStrips()
685 TIFFDirectory *td = &tif->tif_dir; in TIFFAppendToStrip() local
689 if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) { in TIFFAppendToStrip()
690 assert(td->td_nstrips > 0); in TIFFAppendToStrip()
692 if( td->td_stripbytecount[strip] != 0 in TIFFAppendToStrip()
693 && td->td_stripoffset[strip] != 0 in TIFFAppendToStrip()
694 && td->td_stripbytecount[strip] >= (uint64) cc ) in TIFFAppendToStrip()
703 if (!SeekOK(tif, td->td_stripoffset[strip])) { in TIFFAppendToStrip()
716 td->td_stripoffset[strip] = TIFFSeekFile(tif, 0, SEEK_END); in TIFFAppendToStrip()
720 tif->tif_curoff = td->td_stripoffset[strip]; in TIFFAppendToStrip()
725 old_byte_count = td->td_stripbytecount[strip]; in TIFFAppendToStrip()
726 td->td_stripbytecount[strip] = 0; in TIFFAppendToStrip()
743 td->td_stripbytecount[strip] += cc; in TIFFAppendToStrip()
745 if( (int64) td->td_stripbytecount[strip] != old_byte_count ) in TIFFAppendToStrip()