summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libtiff/libtiff/tif_aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libtiff/libtiff/tif_aux.c')
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_aux.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/3rdparty/libtiff/libtiff/tif_aux.c b/src/3rdparty/libtiff/libtiff/tif_aux.c
index 8188db5..c9f1905 100644
--- a/src/3rdparty/libtiff/libtiff/tif_aux.c
+++ b/src/3rdparty/libtiff/libtiff/tif_aux.c
@@ -270,7 +270,7 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap)
return (1);
case TIFFTAG_EXTRASAMPLES:
*va_arg(ap, uint16 *) = td->td_extrasamples;
- *va_arg(ap, uint16 **) = td->td_sampleinfo;
+ *va_arg(ap, const uint16 **) = td->td_sampleinfo;
return (1);
case TIFFTAG_MATTEING:
*va_arg(ap, uint16 *) =
@@ -292,8 +292,8 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap)
case TIFFTAG_YCBCRCOEFFICIENTS:
{
/* defaults are from CCIR Recommendation 601-1 */
- static float ycbcrcoeffs[] = { 0.299f, 0.587f, 0.114f };
- *va_arg(ap, float **) = ycbcrcoeffs;
+ static const float ycbcrcoeffs[] = { 0.299f, 0.587f, 0.114f };
+ *va_arg(ap, const float **) = ycbcrcoeffs;
return 1;
}
case TIFFTAG_YCBCRSUBSAMPLING:
@@ -305,14 +305,14 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap)
return (1);
case TIFFTAG_WHITEPOINT:
{
- static float whitepoint[2];
-
/* TIFF 6.0 specification tells that it is no default
value for the WhitePoint, but AdobePhotoshop TIFF
Technical Note tells that it should be CIE D50. */
- whitepoint[0] = D50_X0 / (D50_X0 + D50_Y0 + D50_Z0);
- whitepoint[1] = D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0);
- *va_arg(ap, float **) = whitepoint;
+ static const float whitepoint[] = {
+ D50_X0 / (D50_X0 + D50_Y0 + D50_Z0),
+ D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0)
+ };
+ *va_arg(ap, const float **) = whitepoint;
return 1;
}
case TIFFTAG_TRANSFERFUNCTION:
@@ -321,16 +321,16 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap)
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "No space for \"TransferFunction\" tag");
return (0);
}
- *va_arg(ap, uint16 **) = td->td_transferfunction[0];
+ *va_arg(ap, const uint16 **) = td->td_transferfunction[0];
if (td->td_samplesperpixel - td->td_extrasamples > 1) {
- *va_arg(ap, uint16 **) = td->td_transferfunction[1];
- *va_arg(ap, uint16 **) = td->td_transferfunction[2];
+ *va_arg(ap, const uint16 **) = td->td_transferfunction[1];
+ *va_arg(ap, const uint16 **) = td->td_transferfunction[2];
}
return (1);
case TIFFTAG_REFERENCEBLACKWHITE:
if (!td->td_refblackwhite && !TIFFDefaultRefBlackWhite(td))
return (0);
- *va_arg(ap, float **) = td->td_refblackwhite;
+ *va_arg(ap, const float **) = td->td_refblackwhite;
return (1);
}
return 0;