40 tsize_t bytes = nmemb * elem_size;
45 if (nmemb && elem_size && bytes / elem_size == nmemb)
60 tf[0] = tf[1] = tf[2] = 0;
65 nbytes = n *
sizeof (
uint16);
69 for (i = 1; i <
n; i++) {
70 double t = (double)i/((
double) n-1.);
91 tf[0] = tf[1] = tf[2] = 0;
151 *va_arg(ap,
uint16 *) = 0;
158 *va_arg(ap,
uint16 *) = 4;
184 static float ycbcrcoeffs[] = { 0.299f, 0.587f, 0.114f };
185 *va_arg(ap,
float **) = ycbcrcoeffs;
197 static float whitepoint[2];
204 *va_arg(ap,
float **) = whitepoint;
209 !TIFFDefaultTransferFunction(td)) {
222 static float ycbcr_refblackwhite[] =
223 { 0.0F, 255.0F, 128.0F, 255.0F, 128.0F, 255.0F };
224 static float rgb_refblackwhite[6];
226 for (i = 0; i < 3; i++) {
227 rgb_refblackwhite[2 * i + 0] = 0.0F;
228 rgb_refblackwhite[2 * i + 1] =
238 *va_arg(ap,
float **) = ycbcr_refblackwhite;
243 *va_arg(ap,
float **) = rgb_refblackwhite;
#define TIFFTAG_SUBFILETYPE
#define PHOTOMETRIC_YCBCR
#define TIFFTAG_BITSPERSAMPLE
#define TIFFTAG_ROWSPERSTRIP
#define TIFFTAG_EXTRASAMPLES
#define TIFFTAG_ORIENTATION
#define TIFFTAG_MINSAMPLEVALUE
#define TIFFTAG_FILLORDER
uint16 * td_transferfunction[3]
#define TIFFTAG_THRESHHOLDING
#define TIFFTAG_YCBCRSUBSAMPLING
#define TIFFTAG_REFERENCEBLACKWHITE
#define TIFFTAG_PLANARCONFIG
#define TIFFTAG_YCBCRCOEFFICIENTS
void _TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
#define TIFFTAG_YCBCRPOSITIONING
uint16 td_ycbcrsubsampling[2]
#define TIFFTAG_SAMPLESPERPIXEL
int TIFFGetFieldDefaulted(TIFF *tif, ttag_t tag,...)
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
#define TIFFTAG_TRANSFERFUNCTION
#define TIFFTAG_WHITEPOINT
#define TIFFTAG_NUMBEROFINKS
uint16 td_samplesperpixel
int TIFFVGetField(TIFF *tif, ttag_t tag, va_list ap)
#define TIFFTAG_TILEDEPTH
#define TIFFTAG_IMAGEDEPTH
#define TIFFTAG_RESOLUTIONUNIT
uint16 td_ycbcrpositioning
#define TIFFTAG_PREDICTOR
void * _TIFFmalloc(tsize_t s)
tdata_t _TIFFCheckMalloc(TIFF *tif, size_t nmemb, size_t elem_size, const char *what)
void _TIFFfree(tdata_t p)
#define TIFFTAG_SAMPLEFORMAT
#define EXTRASAMPLE_ASSOCALPHA
#define TIFFTAG_MAXSAMPLEVALUE
int TIFFVGetFieldDefaulted(TIFF *tif, ttag_t tag, va_list ap)