Lines Matching refs:td
90 setExtraSamples(TIFFDirectory* td, va_list ap, uint32* v) in setExtraSamples() argument
99 if ((uint16) *v > td->td_samplesperpixel) in setExtraSamples()
118 td->td_extrasamples = (uint16) *v; in setExtraSamples()
119 _TIFFsetShortArray(&td->td_sampleinfo, va, td->td_extrasamples); in setExtraSamples()
132 TIFFDirectory* td = &tif->tif_dir; in checkInkNamesString() local
133 uint16 i = td->td_samplesperpixel; in checkInkNamesString()
150 td->td_samplesperpixel, in checkInkNamesString()
151 td->td_samplesperpixel-i); in checkInkNamesString()
160 TIFFDirectory* td = &tif->tif_dir; in _TIFFVSetField() local
181 td->td_subfiletype = (uint32) va_arg(ap, uint32); in _TIFFVSetField()
184 td->td_imagewidth = (uint32) va_arg(ap, uint32); in _TIFFVSetField()
187 td->td_imagelength = (uint32) va_arg(ap, uint32); in _TIFFVSetField()
190 td->td_bitspersample = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
199 if (td->td_bitspersample == 8) in _TIFFVSetField()
201 else if (td->td_bitspersample == 16) in _TIFFVSetField()
203 else if (td->td_bitspersample == 24) in _TIFFVSetField()
205 else if (td->td_bitspersample == 32) in _TIFFVSetField()
207 else if (td->td_bitspersample == 64) in _TIFFVSetField()
209 else if (td->td_bitspersample == 128) /* two 64's */ in _TIFFVSetField()
221 if ((uint32)td->td_compression == v) in _TIFFVSetField()
230 td->td_compression = (uint16) v; in _TIFFVSetField()
235 td->td_photometric = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
238 td->td_threshholding = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
244 td->td_fillorder = (uint16) v; in _TIFFVSetField()
251 td->td_orientation = (uint16) v; in _TIFFVSetField()
257 td->td_samplesperpixel = (uint16) v; in _TIFFVSetField()
263 td->td_rowsperstrip = v32; in _TIFFVSetField()
265 td->td_tilelength = v32; in _TIFFVSetField()
266 td->td_tilewidth = td->td_imagewidth; in _TIFFVSetField()
270 td->td_minsamplevalue = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
273 td->td_maxsamplevalue = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
277 _TIFFsetDoubleArray(&td->td_sminsamplevalue, va_arg(ap, double*), td->td_samplesperpixel); in _TIFFVSetField()
279 setDoubleArrayOneValue(&td->td_sminsamplevalue, va_arg(ap, double), td->td_samplesperpixel); in _TIFFVSetField()
283 _TIFFsetDoubleArray(&td->td_smaxsamplevalue, va_arg(ap, double*), td->td_samplesperpixel); in _TIFFVSetField()
285 setDoubleArrayOneValue(&td->td_smaxsamplevalue, va_arg(ap, double), td->td_samplesperpixel); in _TIFFVSetField()
291 td->td_xresolution = (float) dblval; in _TIFFVSetField()
297 td->td_yresolution = (float) dblval; in _TIFFVSetField()
303 td->td_planarconfig = (uint16) v; in _TIFFVSetField()
306 td->td_xposition = (float) va_arg(ap, double); in _TIFFVSetField()
309 td->td_yposition = (float) va_arg(ap, double); in _TIFFVSetField()
315 td->td_resolutionunit = (uint16) v; in _TIFFVSetField()
318 td->td_pagenumber[0] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
319 td->td_pagenumber[1] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
322 td->td_halftonehints[0] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
323 td->td_halftonehints[1] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
326 v32 = (uint32)(1L<<td->td_bitspersample); in _TIFFVSetField()
327 _TIFFsetShortArray(&td->td_colormap[0], va_arg(ap, uint16*), v32); in _TIFFVSetField()
328 _TIFFsetShortArray(&td->td_colormap[1], va_arg(ap, uint16*), v32); in _TIFFVSetField()
329 _TIFFsetShortArray(&td->td_colormap[2], va_arg(ap, uint16*), v32); in _TIFFVSetField()
332 if (!setExtraSamples(td, ap, &v)) in _TIFFVSetField()
336 td->td_extrasamples = (((uint16) va_arg(ap, uint16_vap)) != 0); in _TIFFVSetField()
337 if (td->td_extrasamples) { in _TIFFVSetField()
339 _TIFFsetShortArray(&td->td_sampleinfo, &sv, 1); in _TIFFVSetField()
350 td->td_tilewidth = v32; in _TIFFVSetField()
361 td->td_tilelength = v32; in _TIFFVSetField()
368 td->td_tiledepth = v32; in _TIFFVSetField()
379 td->td_sampleformat = (uint16) v; in _TIFFVSetField()
385 td->td_sampleformat = (uint16) v; in _TIFFVSetField()
388 if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT in _TIFFVSetField()
389 && td->td_bitspersample == 32 in _TIFFVSetField()
392 else if( (td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT in _TIFFVSetField()
393 || td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP) in _TIFFVSetField()
394 && td->td_bitspersample == 64 in _TIFFVSetField()
399 td->td_imagedepth = (uint32) va_arg(ap, uint32); in _TIFFVSetField()
403 td->td_nsubifd = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
404 _TIFFsetLong8Array(&td->td_subifd, (uint64*) va_arg(ap, uint64*), in _TIFFVSetField()
405 (long) td->td_nsubifd); in _TIFFVSetField()
414 td->td_ycbcrpositioning = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
417 td->td_ycbcrsubsampling[0] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
418 td->td_ycbcrsubsampling[1] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
421 v = (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1; in _TIFFVSetField()
423 _TIFFsetShortArray(&td->td_transferfunction[i], in _TIFFVSetField()
424 va_arg(ap, uint16*), 1L<<td->td_bitspersample); in _TIFFVSetField()
428 _TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6); in _TIFFVSetField()
436 _TIFFsetNString(&td->td_inknames, s, v); in _TIFFVSetField()
437 td->td_inknameslen = v; in _TIFFVSetField()
473 for (iCustom = 0; iCustom < td->td_customValueCount; iCustom++) { in _TIFFVSetField()
474 if (td->td_customValues[iCustom].info->field_tag == tag) { in _TIFFVSetField()
475 tv = td->td_customValues + iCustom; in _TIFFVSetField()
490 td->td_customValueCount++; in _TIFFVSetField()
492 _TIFFrealloc(td->td_customValues, in _TIFFVSetField()
493 sizeof(TIFFTagValue) * td->td_customValueCount); in _TIFFVSetField()
502 td->td_customValues = new_customValues; in _TIFFVSetField()
504 tv = td->td_customValues + (td->td_customValueCount - 1); in _TIFFVSetField()
552 tv->count = td->td_samplesperpixel; in _TIFFVSetField()
776 TIFFDirectory* td = &tif->tif_dir; in TIFFUnsetField() local
788 for (i = 0; i < td->td_customValueCount; i++) { in TIFFUnsetField()
790 tv = td->td_customValues + i; in TIFFUnsetField()
795 if( i < td->td_customValueCount ) in TIFFUnsetField()
798 for( ; i < td->td_customValueCount-1; i++) { in TIFFUnsetField()
799 td->td_customValues[i] = td->td_customValues[i+1]; in TIFFUnsetField()
801 td->td_customValueCount--; in TIFFUnsetField()
826 TIFFDirectory* td = &tif->tif_dir; in _TIFFVGetField() local
845 *va_arg(ap, uint32*) = td->td_subfiletype; in _TIFFVGetField()
848 *va_arg(ap, uint32*) = td->td_imagewidth; in _TIFFVGetField()
851 *va_arg(ap, uint32*) = td->td_imagelength; in _TIFFVGetField()
854 *va_arg(ap, uint16*) = td->td_bitspersample; in _TIFFVGetField()
857 *va_arg(ap, uint16*) = td->td_compression; in _TIFFVGetField()
860 *va_arg(ap, uint16*) = td->td_photometric; in _TIFFVGetField()
863 *va_arg(ap, uint16*) = td->td_threshholding; in _TIFFVGetField()
866 *va_arg(ap, uint16*) = td->td_fillorder; in _TIFFVGetField()
869 *va_arg(ap, uint16*) = td->td_orientation; in _TIFFVGetField()
872 *va_arg(ap, uint16*) = td->td_samplesperpixel; in _TIFFVGetField()
875 *va_arg(ap, uint32*) = td->td_rowsperstrip; in _TIFFVGetField()
878 *va_arg(ap, uint16*) = td->td_minsamplevalue; in _TIFFVGetField()
881 *va_arg(ap, uint16*) = td->td_maxsamplevalue; in _TIFFVGetField()
885 *va_arg(ap, double**) = td->td_sminsamplevalue; in _TIFFVGetField()
890 double v = td->td_sminsamplevalue[0]; in _TIFFVGetField()
891 for (i=1; i < td->td_samplesperpixel; ++i) in _TIFFVGetField()
892 if( td->td_sminsamplevalue[i] < v ) in _TIFFVGetField()
893 v = td->td_sminsamplevalue[i]; in _TIFFVGetField()
899 *va_arg(ap, double**) = td->td_smaxsamplevalue; in _TIFFVGetField()
904 double v = td->td_smaxsamplevalue[0]; in _TIFFVGetField()
905 for (i=1; i < td->td_samplesperpixel; ++i) in _TIFFVGetField()
906 if( td->td_smaxsamplevalue[i] > v ) in _TIFFVGetField()
907 v = td->td_smaxsamplevalue[i]; in _TIFFVGetField()
912 *va_arg(ap, float*) = td->td_xresolution; in _TIFFVGetField()
915 *va_arg(ap, float*) = td->td_yresolution; in _TIFFVGetField()
918 *va_arg(ap, uint16*) = td->td_planarconfig; in _TIFFVGetField()
921 *va_arg(ap, float*) = td->td_xposition; in _TIFFVGetField()
924 *va_arg(ap, float*) = td->td_yposition; in _TIFFVGetField()
927 *va_arg(ap, uint16*) = td->td_resolutionunit; in _TIFFVGetField()
930 *va_arg(ap, uint16*) = td->td_pagenumber[0]; in _TIFFVGetField()
931 *va_arg(ap, uint16*) = td->td_pagenumber[1]; in _TIFFVGetField()
934 *va_arg(ap, uint16*) = td->td_halftonehints[0]; in _TIFFVGetField()
935 *va_arg(ap, uint16*) = td->td_halftonehints[1]; in _TIFFVGetField()
938 *va_arg(ap, uint16**) = td->td_colormap[0]; in _TIFFVGetField()
939 *va_arg(ap, uint16**) = td->td_colormap[1]; in _TIFFVGetField()
940 *va_arg(ap, uint16**) = td->td_colormap[2]; in _TIFFVGetField()
945 *va_arg(ap, uint64**) = td->td_stripoffset; in _TIFFVGetField()
950 *va_arg(ap, uint64**) = td->td_stripbytecount; in _TIFFVGetField()
954 (td->td_extrasamples == 1 && in _TIFFVGetField()
955 td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA); in _TIFFVGetField()
958 *va_arg(ap, uint16*) = td->td_extrasamples; in _TIFFVGetField()
959 *va_arg(ap, uint16**) = td->td_sampleinfo; in _TIFFVGetField()
962 *va_arg(ap, uint32*) = td->td_tilewidth; in _TIFFVGetField()
965 *va_arg(ap, uint32*) = td->td_tilelength; in _TIFFVGetField()
968 *va_arg(ap, uint32*) = td->td_tiledepth; in _TIFFVGetField()
971 switch (td->td_sampleformat) { in _TIFFVGetField()
987 *va_arg(ap, uint16*) = td->td_sampleformat; in _TIFFVGetField()
990 *va_arg(ap, uint32*) = td->td_imagedepth; in _TIFFVGetField()
993 *va_arg(ap, uint16*) = td->td_nsubifd; in _TIFFVGetField()
994 *va_arg(ap, uint64**) = td->td_subifd; in _TIFFVGetField()
997 *va_arg(ap, uint16*) = td->td_ycbcrpositioning; in _TIFFVGetField()
1000 *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[0]; in _TIFFVGetField()
1001 *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[1]; in _TIFFVGetField()
1004 *va_arg(ap, uint16**) = td->td_transferfunction[0]; in _TIFFVGetField()
1005 if (td->td_samplesperpixel - td->td_extrasamples > 1) { in _TIFFVGetField()
1006 *va_arg(ap, uint16**) = td->td_transferfunction[1]; in _TIFFVGetField()
1007 *va_arg(ap, uint16**) = td->td_transferfunction[2]; in _TIFFVGetField()
1011 *va_arg(ap, float**) = td->td_refblackwhite; in _TIFFVGetField()
1014 *va_arg(ap, char**) = td->td_inknames; in _TIFFVGetField()
1045 for (i = 0; i < td->td_customValueCount; i++) { in _TIFFVGetField()
1046 TIFFTagValue *tv = td->td_customValues + i; in _TIFFVGetField()
1178 if (td->member) { \
1179 _TIFFfree(td->member); \
1180 td->member = 0; \
1190 TIFFDirectory *td = &tif->tif_dir; in TIFFFreeDirectory() local
1193 _TIFFmemset(td->td_fieldsset, 0, FIELD_SETLONGS); in TIFFFreeDirectory()
1212 for( i = 0; i < td->td_customValueCount; i++ ) { in TIFFFreeDirectory()
1213 if (td->td_customValues[i].value) in TIFFFreeDirectory()
1214 _TIFFfree(td->td_customValues[i].value); in TIFFFreeDirectory()
1217 td->td_customValueCount = 0; in TIFFFreeDirectory()
1221 _TIFFmemset( &(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry)); in TIFFFreeDirectory()
1222 _TIFFmemset( &(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry)); in TIFFFreeDirectory()
1295 register TIFFDirectory* td = &tif->tif_dir; in TIFFDefaultDirectory() local
1301 _TIFFmemset(td, 0, sizeof (*td)); in TIFFDefaultDirectory()
1302 td->td_fillorder = FILLORDER_MSB2LSB; in TIFFDefaultDirectory()
1303 td->td_bitspersample = 1; in TIFFDefaultDirectory()
1304 td->td_threshholding = THRESHHOLD_BILEVEL; in TIFFDefaultDirectory()
1305 td->td_orientation = ORIENTATION_TOPLEFT; in TIFFDefaultDirectory()
1306 td->td_samplesperpixel = 1; in TIFFDefaultDirectory()
1307 td->td_rowsperstrip = (uint32) -1; in TIFFDefaultDirectory()
1308 td->td_tilewidth = 0; in TIFFDefaultDirectory()
1309 td->td_tilelength = 0; in TIFFDefaultDirectory()
1310 td->td_tiledepth = 1; in TIFFDefaultDirectory()
1311 td->td_stripbytecountsorted = 1; /* Our own arrays always sorted. */ in TIFFDefaultDirectory()
1312 td->td_resolutionunit = RESUNIT_INCH; in TIFFDefaultDirectory()
1313 td->td_sampleformat = SAMPLEFORMAT_UINT; in TIFFDefaultDirectory()
1314 td->td_imagedepth = 1; in TIFFDefaultDirectory()
1315 td->td_ycbcrsubsampling[0] = 2; in TIFFDefaultDirectory()
1316 td->td_ycbcrsubsampling[1] = 2; in TIFFDefaultDirectory()
1317 td->td_ycbcrpositioning = YCBCRPOSITION_CENTERED; in TIFFDefaultDirectory()