Home | History | Annotate | Download | only in libtiff

Lines Matching refs:td

52 	register TIFFDirectory *td;
67 td = &tif->tif_dir;
72 if (row >= td->td_imagelength) { /* extend image */
73 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
78 td->td_imagelength = row+1;
84 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
85 if (sample >= td->td_samplesperpixel) {
88 (unsigned long) sample, (unsigned long) td->td_samplesperpixel);
91 strip = sample*td->td_stripsperimage + row/td->td_rowsperstrip;
93 strip = row / td->td_rowsperstrip;
101 if (strip >= td->td_nstrips && !TIFFGrowStrips(tif, 1, module))
115 if (strip >= td->td_stripsperimage && imagegrew)
116 td->td_stripsperimage =
117 TIFFhowmany_32(td->td_imagelength,td->td_rowsperstrip);
118 if (td->td_stripsperimage == 0) {
123 (strip % td->td_stripsperimage) * td->td_rowsperstrip;
133 if( td->td_stripbytecount[strip] > 0 )
136 td->td_stripbytecount[strip] = 0;
158 tif->tif_row = (strip % td->td_stripsperimage) *
159 td->td_rowsperstrip;
191 TIFFDirectory *td = &tif->tif_dir;
205 if (strip >= td->td_nstrips) {
206 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
213 td->td_stripsperimage =
214 TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip);
227 if (td->td_stripsperimage == 0) {
232 tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
239 if( td->td_stripbytecount[strip] > 0 )
245 if( tif->tif_rawdatasize <= (tmsize_t)td->td_stripbytecount[strip] )
248 (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[strip] + 1), 1024))) )
263 if( td->td_compression == COMPRESSION_NONE )
268 if (!isFillOrder(tif, td->td_fillorder) &&
278 sample = (uint16)(strip / td->td_stripsperimage);
289 if (!isFillOrder(tif, td->td_fillorder) &&
309 TIFFDirectory *td = &tif->tif_dir;
322 if (strip >= td->td_nstrips) {
323 if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
333 if (strip >= td->td_stripsperimage)
334 td->td_stripsperimage =
335 TIFFhowmany_32(td->td_imagelength,td->td_rowsperstrip);
340 if (td->td_stripsperimage == 0) {
344 tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
384 TIFFDirectory *td;
390 td = &tif->tif_dir;
391 if (tile >= td->td_nstrips) {
393 (unsigned long) tile, (unsigned long) td->td_nstrips);
407 if( td->td_stripbytecount[tile] > 0 )
413 if( tif->tif_rawdatasize <= (tmsize_t) td->td_stripbytecount[tile] )
416 (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[tile] + 1), 1024))) )
432 howmany32=TIFFhowmany_32(td->td_imagelength, td->td_tilelength);
437 tif->tif_row = (tile % howmany32) * td->td_tilelength;
438 howmany32=TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth);
443 tif->tif_col = (tile % howmany32) * td->td_tilewidth;
461 if( td->td_compression == COMPRESSION_NONE )
466 if (!isFillOrder(tif, td->td_fillorder) &&
476 sample = (uint16)(tile/td->td_stripsperimage);
486 td->td_fillorder) &&
529 TIFFDirectory* td = &tif->tif_dir;
532 td->td_stripsperimage =
534 td->td_samplesperpixel : TIFFNumberOfTiles(tif);
536 td->td_stripsperimage =
538 td->td_samplesperpixel : TIFFNumberOfStrips(tif);
539 td->td_nstrips = td->td_stripsperimage;
540 if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
541 td->td_stripsperimage /= td->td_samplesperpixel;
542 td->td_stripoffset = (uint64 *)
543 _TIFFmalloc(td->td_nstrips * sizeof (uint64));
544 td->td_stripbytecount = (uint64 *)
545 _TIFFmalloc(td->td_nstrips * sizeof (uint64));
546 if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL)
552 _TIFFmemset(td->td_stripoffset, 0, td->td_nstrips*sizeof (uint64));
553 _TIFFmemset(td->td_stripbytecount, 0, td->td_nstrips*sizeof (uint64));
682 TIFFDirectory *td = &tif->tif_dir;
686 assert(td->td_planarconfig == PLANARCONFIG_CONTIG);
687 new_stripoffset = (uint64*)_TIFFrealloc(td->td_stripoffset,
688 (td->td_nstrips + delta) * sizeof (uint64));
689 new_stripbytecount = (uint64*)_TIFFrealloc(td->td_stripbytecount,
690 (td->td_nstrips + delta) * sizeof (uint64));
696 td->td_nstrips = 0;
700 td->td_stripoffset = new_stripoffset;
701 td->td_stripbytecount = new_stripbytecount;
702 _TIFFmemset(td->td_stripoffset + td->td_nstrips,
704 _TIFFmemset(td->td_stripbytecount + td->td_nstrips,
706 td->td_nstrips += delta;
719 TIFFDirectory *td = &tif->tif_dir;
723 if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) {
724 assert(td->td_nstrips > 0);
726 if( td->td_stripbytecount[strip] != 0
727 && td->td_stripoffset[strip] != 0
728 && td->td_stripbytecount[strip] >= (uint64) cc )
737 if (!SeekOK(tif, td->td_stripoffset[strip])) {
750 td->td_stripoffset[strip] = TIFFSeekFile(tif, 0, SEEK_END);
754 tif->tif_curoff = td->td_stripoffset[strip];
759 old_byte_count = td->td_stripbytecount[strip];
760 td->td_stripbytecount[strip] = 0;
777 td->td_stripbytecount[strip] += cc;
779 if( (int64) td->td_stripbytecount[strip] != old_byte_count )