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
179 td->td_subfiletype = (uint32) va_arg(ap, uint32); in _TIFFVSetField()
182 td->td_imagewidth = (uint32) va_arg(ap, uint32); in _TIFFVSetField()
185 td->td_imagelength = (uint32) va_arg(ap, uint32); in _TIFFVSetField()
188 td->td_bitspersample = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
197 if (td->td_bitspersample == 8) in _TIFFVSetField()
199 else if (td->td_bitspersample == 16) in _TIFFVSetField()
201 else if (td->td_bitspersample == 24) in _TIFFVSetField()
203 else if (td->td_bitspersample == 32) in _TIFFVSetField()
205 else if (td->td_bitspersample == 64) in _TIFFVSetField()
207 else if (td->td_bitspersample == 128) /* two 64's */ in _TIFFVSetField()
219 if ((uint32)td->td_compression == v) in _TIFFVSetField()
228 td->td_compression = (uint16) v; in _TIFFVSetField()
233 td->td_photometric = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
236 td->td_threshholding = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
242 td->td_fillorder = (uint16) v; in _TIFFVSetField()
249 td->td_orientation = (uint16) v; in _TIFFVSetField()
255 td->td_samplesperpixel = (uint16) v; in _TIFFVSetField()
261 td->td_rowsperstrip = v32; in _TIFFVSetField()
263 td->td_tilelength = v32; in _TIFFVSetField()
264 td->td_tilewidth = td->td_imagewidth; in _TIFFVSetField()
268 td->td_minsamplevalue = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
271 td->td_maxsamplevalue = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
275 … _TIFFsetDoubleArray(&td->td_sminsamplevalue, va_arg(ap, double*), td->td_samplesperpixel); in _TIFFVSetField()
277 … setDoubleArrayOneValue(&td->td_sminsamplevalue, va_arg(ap, double), td->td_samplesperpixel); in _TIFFVSetField()
281 … _TIFFsetDoubleArray(&td->td_smaxsamplevalue, va_arg(ap, double*), td->td_samplesperpixel); in _TIFFVSetField()
283 … setDoubleArrayOneValue(&td->td_smaxsamplevalue, va_arg(ap, double), td->td_samplesperpixel); in _TIFFVSetField()
286 td->td_xresolution = (float) va_arg(ap, double); in _TIFFVSetField()
289 td->td_yresolution = (float) va_arg(ap, double); in _TIFFVSetField()
295 td->td_planarconfig = (uint16) v; in _TIFFVSetField()
298 td->td_xposition = (float) va_arg(ap, double); in _TIFFVSetField()
301 td->td_yposition = (float) va_arg(ap, double); in _TIFFVSetField()
307 td->td_resolutionunit = (uint16) v; in _TIFFVSetField()
310 td->td_pagenumber[0] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
311 td->td_pagenumber[1] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
314 td->td_halftonehints[0] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
315 td->td_halftonehints[1] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
318 v32 = (uint32)(1L<<td->td_bitspersample); in _TIFFVSetField()
319 _TIFFsetShortArray(&td->td_colormap[0], va_arg(ap, uint16*), v32); in _TIFFVSetField()
320 _TIFFsetShortArray(&td->td_colormap[1], va_arg(ap, uint16*), v32); in _TIFFVSetField()
321 _TIFFsetShortArray(&td->td_colormap[2], va_arg(ap, uint16*), v32); in _TIFFVSetField()
324 if (!setExtraSamples(td, ap, &v)) in _TIFFVSetField()
328 td->td_extrasamples = (((uint16) va_arg(ap, uint16_vap)) != 0); in _TIFFVSetField()
329 if (td->td_extrasamples) { in _TIFFVSetField()
331 _TIFFsetShortArray(&td->td_sampleinfo, &sv, 1); in _TIFFVSetField()
342 td->td_tilewidth = v32; in _TIFFVSetField()
353 td->td_tilelength = v32; in _TIFFVSetField()
360 td->td_tiledepth = v32; in _TIFFVSetField()
371 td->td_sampleformat = (uint16) v; in _TIFFVSetField()
377 td->td_sampleformat = (uint16) v; in _TIFFVSetField()
380 if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT in _TIFFVSetField()
381 && td->td_bitspersample == 32 in _TIFFVSetField()
384 else if( (td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT in _TIFFVSetField()
385 || td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP) in _TIFFVSetField()
386 && td->td_bitspersample == 64 in _TIFFVSetField()
391 td->td_imagedepth = (uint32) va_arg(ap, uint32); in _TIFFVSetField()
395 td->td_nsubifd = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
396 _TIFFsetLong8Array(&td->td_subifd, (uint64*) va_arg(ap, uint64*), in _TIFFVSetField()
397 (long) td->td_nsubifd); in _TIFFVSetField()
406 td->td_ycbcrpositioning = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
409 td->td_ycbcrsubsampling[0] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
410 td->td_ycbcrsubsampling[1] = (uint16) va_arg(ap, uint16_vap); in _TIFFVSetField()
413 v = (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1; in _TIFFVSetField()
415 _TIFFsetShortArray(&td->td_transferfunction[i], in _TIFFVSetField()
416 va_arg(ap, uint16*), 1L<<td->td_bitspersample); in _TIFFVSetField()
420 _TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6); in _TIFFVSetField()
428 _TIFFsetNString(&td->td_inknames, s, v); in _TIFFVSetField()
429 td->td_inknameslen = v; in _TIFFVSetField()
465 for (iCustom = 0; iCustom < td->td_customValueCount; iCustom++) { in _TIFFVSetField()
466 if (td->td_customValues[iCustom].info->field_tag == tag) { in _TIFFVSetField()
467 tv = td->td_customValues + iCustom; in _TIFFVSetField()
482 td->td_customValueCount++; in _TIFFVSetField()
484 _TIFFrealloc(td->td_customValues, in _TIFFVSetField()
485 sizeof(TIFFTagValue) * td->td_customValueCount); in _TIFFVSetField()
494 td->td_customValues = new_customValues; in _TIFFVSetField()
496 tv = td->td_customValues + (td->td_customValueCount - 1); in _TIFFVSetField()
544 tv->count = td->td_samplesperpixel; in _TIFFVSetField()
758 TIFFDirectory* td = &tif->tif_dir; in TIFFUnsetField() local
770 for (i = 0; i < td->td_customValueCount; i++) { in TIFFUnsetField()
772 tv = td->td_customValues + i; in TIFFUnsetField()
777 if( i < td->td_customValueCount ) in TIFFUnsetField()
780 for( ; i < td->td_customValueCount-1; i++) { in TIFFUnsetField()
781 td->td_customValues[i] = td->td_customValues[i+1]; in TIFFUnsetField()
783 td->td_customValueCount--; in TIFFUnsetField()
808 TIFFDirectory* td = &tif->tif_dir; in _TIFFVGetField() local
825 *va_arg(ap, uint32*) = td->td_subfiletype; in _TIFFVGetField()
828 *va_arg(ap, uint32*) = td->td_imagewidth; in _TIFFVGetField()
831 *va_arg(ap, uint32*) = td->td_imagelength; in _TIFFVGetField()
834 *va_arg(ap, uint16*) = td->td_bitspersample; in _TIFFVGetField()
837 *va_arg(ap, uint16*) = td->td_compression; in _TIFFVGetField()
840 *va_arg(ap, uint16*) = td->td_photometric; in _TIFFVGetField()
843 *va_arg(ap, uint16*) = td->td_threshholding; in _TIFFVGetField()
846 *va_arg(ap, uint16*) = td->td_fillorder; in _TIFFVGetField()
849 *va_arg(ap, uint16*) = td->td_orientation; in _TIFFVGetField()
852 *va_arg(ap, uint16*) = td->td_samplesperpixel; in _TIFFVGetField()
855 *va_arg(ap, uint32*) = td->td_rowsperstrip; in _TIFFVGetField()
858 *va_arg(ap, uint16*) = td->td_minsamplevalue; in _TIFFVGetField()
861 *va_arg(ap, uint16*) = td->td_maxsamplevalue; in _TIFFVGetField()
865 *va_arg(ap, double**) = td->td_sminsamplevalue; in _TIFFVGetField()
870 double v = td->td_sminsamplevalue[0]; in _TIFFVGetField()
871 for (i=1; i < td->td_samplesperpixel; ++i) in _TIFFVGetField()
872 if( td->td_sminsamplevalue[i] < v ) in _TIFFVGetField()
873 v = td->td_sminsamplevalue[i]; in _TIFFVGetField()
879 *va_arg(ap, double**) = td->td_smaxsamplevalue; in _TIFFVGetField()
884 double v = td->td_smaxsamplevalue[0]; in _TIFFVGetField()
885 for (i=1; i < td->td_samplesperpixel; ++i) in _TIFFVGetField()
886 if( td->td_smaxsamplevalue[i] > v ) in _TIFFVGetField()
887 v = td->td_smaxsamplevalue[i]; in _TIFFVGetField()
892 *va_arg(ap, float*) = td->td_xresolution; in _TIFFVGetField()
895 *va_arg(ap, float*) = td->td_yresolution; in _TIFFVGetField()
898 *va_arg(ap, uint16*) = td->td_planarconfig; in _TIFFVGetField()
901 *va_arg(ap, float*) = td->td_xposition; in _TIFFVGetField()
904 *va_arg(ap, float*) = td->td_yposition; in _TIFFVGetField()
907 *va_arg(ap, uint16*) = td->td_resolutionunit; in _TIFFVGetField()
910 *va_arg(ap, uint16*) = td->td_pagenumber[0]; in _TIFFVGetField()
911 *va_arg(ap, uint16*) = td->td_pagenumber[1]; in _TIFFVGetField()
914 *va_arg(ap, uint16*) = td->td_halftonehints[0]; in _TIFFVGetField()
915 *va_arg(ap, uint16*) = td->td_halftonehints[1]; in _TIFFVGetField()
918 *va_arg(ap, uint16**) = td->td_colormap[0]; in _TIFFVGetField()
919 *va_arg(ap, uint16**) = td->td_colormap[1]; in _TIFFVGetField()
920 *va_arg(ap, uint16**) = td->td_colormap[2]; in _TIFFVGetField()
925 *va_arg(ap, uint64**) = td->td_stripoffset; in _TIFFVGetField()
930 *va_arg(ap, uint64**) = td->td_stripbytecount; in _TIFFVGetField()
934 (td->td_extrasamples == 1 && in _TIFFVGetField()
935 td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA); in _TIFFVGetField()
938 *va_arg(ap, uint16*) = td->td_extrasamples; in _TIFFVGetField()
939 *va_arg(ap, uint16**) = td->td_sampleinfo; in _TIFFVGetField()
942 *va_arg(ap, uint32*) = td->td_tilewidth; in _TIFFVGetField()
945 *va_arg(ap, uint32*) = td->td_tilelength; in _TIFFVGetField()
948 *va_arg(ap, uint32*) = td->td_tiledepth; in _TIFFVGetField()
951 switch (td->td_sampleformat) { in _TIFFVGetField()
967 *va_arg(ap, uint16*) = td->td_sampleformat; in _TIFFVGetField()
970 *va_arg(ap, uint32*) = td->td_imagedepth; in _TIFFVGetField()
973 *va_arg(ap, uint16*) = td->td_nsubifd; in _TIFFVGetField()
974 *va_arg(ap, uint64**) = td->td_subifd; in _TIFFVGetField()
977 *va_arg(ap, uint16*) = td->td_ycbcrpositioning; in _TIFFVGetField()
980 *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[0]; in _TIFFVGetField()
981 *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[1]; in _TIFFVGetField()
984 *va_arg(ap, uint16**) = td->td_transferfunction[0]; in _TIFFVGetField()
985 if (td->td_samplesperpixel - td->td_extrasamples > 1) { in _TIFFVGetField()
986 *va_arg(ap, uint16**) = td->td_transferfunction[1]; in _TIFFVGetField()
987 *va_arg(ap, uint16**) = td->td_transferfunction[2]; in _TIFFVGetField()
991 *va_arg(ap, float**) = td->td_refblackwhite; in _TIFFVGetField()
994 *va_arg(ap, char**) = td->td_inknames; in _TIFFVGetField()
1025 for (i = 0; i < td->td_customValueCount; i++) { in _TIFFVGetField()
1026 TIFFTagValue *tv = td->td_customValues + i; in _TIFFVGetField()
1158 if (td->member) { \
1159 _TIFFfree(td->member); \
1160 td->member = 0; \
1170 TIFFDirectory *td = &tif->tif_dir; in TIFFFreeDirectory() local
1173 _TIFFmemset(td->td_fieldsset, 0, FIELD_SETLONGS); in TIFFFreeDirectory()
1192 for( i = 0; i < td->td_customValueCount; i++ ) { in TIFFFreeDirectory()
1193 if (td->td_customValues[i].value) in TIFFFreeDirectory()
1194 _TIFFfree(td->td_customValues[i].value); in TIFFFreeDirectory()
1197 td->td_customValueCount = 0; in TIFFFreeDirectory()
1201 _TIFFmemset( &(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry)); in TIFFFreeDirectory()
1202 _TIFFmemset( &(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry)); in TIFFFreeDirectory()
1275 register TIFFDirectory* td = &tif->tif_dir; in TIFFDefaultDirectory() local
1281 _TIFFmemset(td, 0, sizeof (*td)); in TIFFDefaultDirectory()
1282 td->td_fillorder = FILLORDER_MSB2LSB; in TIFFDefaultDirectory()
1283 td->td_bitspersample = 1; in TIFFDefaultDirectory()
1284 td->td_threshholding = THRESHHOLD_BILEVEL; in TIFFDefaultDirectory()
1285 td->td_orientation = ORIENTATION_TOPLEFT; in TIFFDefaultDirectory()
1286 td->td_samplesperpixel = 1; in TIFFDefaultDirectory()
1287 td->td_rowsperstrip = (uint32) -1; in TIFFDefaultDirectory()
1288 td->td_tilewidth = 0; in TIFFDefaultDirectory()
1289 td->td_tilelength = 0; in TIFFDefaultDirectory()
1290 td->td_tiledepth = 1; in TIFFDefaultDirectory()
1291 td->td_stripbytecountsorted = 1; /* Our own arrays always sorted. */ in TIFFDefaultDirectory()
1292 td->td_resolutionunit = RESUNIT_INCH; in TIFFDefaultDirectory()
1293 td->td_sampleformat = SAMPLEFORMAT_UINT; in TIFFDefaultDirectory()
1294 td->td_imagedepth = 1; in TIFFDefaultDirectory()
1295 td->td_ycbcrsubsampling[0] = 2; in TIFFDefaultDirectory()
1296 td->td_ycbcrsubsampling[1] = 2; in TIFFDefaultDirectory()
1297 td->td_ycbcrpositioning = YCBCRPOSITION_CENTERED; in TIFFDefaultDirectory()