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()
119 (strip % td->td_stripsperimage) * td->td_rowsperstrip; in TIFFWriteScanline()
129 if( td->td_stripbytecount[strip] > 0 ) in TIFFWriteScanline()
132 td->td_stripbytecount[strip] = 0; in TIFFWriteScanline()
154 tif->tif_row = (strip % td->td_stripsperimage) * in TIFFWriteScanline()
155 td->td_rowsperstrip; in TIFFWriteScanline()
187 TIFFDirectory *td = &tif->tif_dir; in TIFFWriteEncodedStrip() local
201 if (strip >= td->td_nstrips) { in TIFFWriteEncodedStrip()
202 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { in TIFFWriteEncodedStrip()
209 td->td_stripsperimage = in TIFFWriteEncodedStrip()
210 TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip); in TIFFWriteEncodedStrip()
223 tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; in TIFFWriteEncodedStrip()
233 if( td->td_stripbytecount[strip] > 0 ) in TIFFWriteEncodedStrip()
241 sample = (uint16)(strip / td->td_stripsperimage); in TIFFWriteEncodedStrip()
252 if (!isFillOrder(tif, td->td_fillorder) && in TIFFWriteEncodedStrip()
272 TIFFDirectory *td = &tif->tif_dir; in TIFFWriteRawStrip() local
285 if (strip >= td->td_nstrips) { in TIFFWriteRawStrip()
286 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { in TIFFWriteRawStrip()
296 if (strip >= td->td_stripsperimage) in TIFFWriteRawStrip()
297 td->td_stripsperimage = in TIFFWriteRawStrip()
298 TIFFhowmany_32(td->td_imagelength,td->td_rowsperstrip); in TIFFWriteRawStrip()
303 tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; in TIFFWriteRawStrip()
343 TIFFDirectory *td; in TIFFWriteEncodedTile() local
348 td = &tif->tif_dir; in TIFFWriteEncodedTile()
349 if (tile >= td->td_nstrips) { in TIFFWriteEncodedTile()
351 (unsigned long) tile, (unsigned long) td->td_nstrips); in TIFFWriteEncodedTile()
368 if( td->td_stripbytecount[tile] > 0 ) in TIFFWriteEncodedTile()
379 tif->tif_row = (tile % TIFFhowmany_32(td->td_imagelength, td->td_tilelength)) in TIFFWriteEncodedTile()
380 * td->td_tilelength; in TIFFWriteEncodedTile()
381 tif->tif_col = (tile % TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth)) in TIFFWriteEncodedTile()
382 * td->td_tilewidth; in TIFFWriteEncodedTile()
390 sample = (uint16)(tile/td->td_stripsperimage); in TIFFWriteEncodedTile()
408 if (!isFillOrder(tif, td->td_fillorder) && in TIFFWriteEncodedTile()
451 TIFFDirectory* td = &tif->tif_dir; in TIFFSetupStrips() local
454 td->td_stripsperimage = in TIFFSetupStrips()
456 td->td_samplesperpixel : TIFFNumberOfTiles(tif); in TIFFSetupStrips()
458 td->td_stripsperimage = in TIFFSetupStrips()
460 td->td_samplesperpixel : TIFFNumberOfStrips(tif); in TIFFSetupStrips()
461 td->td_nstrips = td->td_stripsperimage; in TIFFSetupStrips()
462 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) in TIFFSetupStrips()
463 td->td_stripsperimage /= td->td_samplesperpixel; in TIFFSetupStrips()
464 td->td_stripoffset = (uint64 *) in TIFFSetupStrips()
465 _TIFFmalloc(td->td_nstrips * sizeof (uint64)); in TIFFSetupStrips()
466 td->td_stripbytecount = (uint64 *) in TIFFSetupStrips()
467 _TIFFmalloc(td->td_nstrips * sizeof (uint64)); in TIFFSetupStrips()
468 if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL) in TIFFSetupStrips()
474 _TIFFmemset(td->td_stripoffset, 0, td->td_nstrips*sizeof (uint64)); in TIFFSetupStrips()
475 _TIFFmemset(td->td_stripbytecount, 0, td->td_nstrips*sizeof (uint64)); in TIFFSetupStrips()
604 TIFFDirectory *td = &tif->tif_dir; in TIFFGrowStrips() local
608 assert(td->td_planarconfig == PLANARCONFIG_CONTIG); in TIFFGrowStrips()
609 new_stripoffset = (uint64*)_TIFFrealloc(td->td_stripoffset, in TIFFGrowStrips()
610 (td->td_nstrips + delta) * sizeof (uint64)); in TIFFGrowStrips()
611 new_stripbytecount = (uint64*)_TIFFrealloc(td->td_stripbytecount, in TIFFGrowStrips()
612 (td->td_nstrips + delta) * sizeof (uint64)); in TIFFGrowStrips()
618 td->td_nstrips = 0; in TIFFGrowStrips()
622 td->td_stripoffset = new_stripoffset; in TIFFGrowStrips()
623 td->td_stripbytecount = new_stripbytecount; in TIFFGrowStrips()
624 _TIFFmemset(td->td_stripoffset + td->td_nstrips, in TIFFGrowStrips()
626 _TIFFmemset(td->td_stripbytecount + td->td_nstrips, in TIFFGrowStrips()
628 td->td_nstrips += delta; in TIFFGrowStrips()
641 TIFFDirectory *td = &tif->tif_dir; in TIFFAppendToStrip() local
645 if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) { in TIFFAppendToStrip()
646 assert(td->td_nstrips > 0); in TIFFAppendToStrip()
648 if( td->td_stripbytecount[strip] != 0 in TIFFAppendToStrip()
649 && td->td_stripoffset[strip] != 0 in TIFFAppendToStrip()
650 && td->td_stripbytecount[strip] >= (uint64) cc ) in TIFFAppendToStrip()
659 if (!SeekOK(tif, td->td_stripoffset[strip])) { in TIFFAppendToStrip()
672 td->td_stripoffset[strip] = TIFFSeekFile(tif, 0, SEEK_END); in TIFFAppendToStrip()
676 tif->tif_curoff = td->td_stripoffset[strip]; in TIFFAppendToStrip()
681 old_byte_count = td->td_stripbytecount[strip]; in TIFFAppendToStrip()
682 td->td_stripbytecount[strip] = 0; in TIFFAppendToStrip()
699 td->td_stripbytecount[strip] += cc; in TIFFAppendToStrip()
701 if( (int64) td->td_stripbytecount[strip] != old_byte_count ) in TIFFAppendToStrip()