diff options
author | Even Rouault <even.rouault@spatialys.com> | 2021-12-10 17:37:28 +0100 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2021-12-10 17:37:28 +0100 |
commit | 693e150703ac8d2dfe43b134577f556cbd30df35 (patch) | |
tree | 5bf544b8be8b249b734c592f83b12260aeaefe36 | |
parent | 5b665f42a68cc3896573521bed64aaa64be9ffbe (diff) | |
download | libtiff-git-693e150703ac8d2dfe43b134577f556cbd30df35.tar.gz |
JPEG 12bit: make it easier for GDAL's RENAME_INTERNAL_LIBTIFF_SYMBOLS mode
-rw-r--r-- | libtiff/tif_jpeg.c | 6 | ||||
-rw-r--r-- | libtiff/tif_jpeg_12.c | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c index f30fe1dd..dc57b85b 100644 --- a/libtiff/tif_jpeg.c +++ b/libtiff/tif_jpeg.c @@ -947,7 +947,7 @@ static int JPEGSetupDecode(TIFF *tif) { JPEGState *sp = JState(tif); TIFFDirectory *td = &tif->tif_dir; -#if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFInitJPEG) +#if defined(JPEG_DUAL_MODE_8_12) && !defined(FROM_TIF_JPEG_12) if (tif->tif_dir.td_bitspersample == 12) { /* We pass a pointer to a copy of otherSettings, since */ /* TIFFReInitJPEG_12() will clear sp */ @@ -1002,7 +1002,7 @@ int TIFFJPEGIsFullStripRequired(TIFF *tif) { int ret; JPEGState state; -#if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFJPEGIsFullStripRequired) +#if defined(JPEG_DUAL_MODE_8_12) && !defined(FROM_TIF_JPEG_12) if (tif->tif_dir.td_bitspersample == 12) return TIFFJPEGIsFullStripRequired_12(tif); #endif @@ -1675,7 +1675,7 @@ static int JPEGSetupEncode(TIFF *tif) { TIFFDirectory *td = &tif->tif_dir; static const char module[] = "JPEGSetupEncode"; -#if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFInitJPEG) +#if defined(JPEG_DUAL_MODE_8_12) && !defined(FROM_TIF_JPEG_12) if (tif->tif_dir.td_bitspersample == 12) { /* We pass a pointer to a copy of otherSettings, since */ /* TIFFReInitJPEG_12() will clear sp */ diff --git a/libtiff/tif_jpeg_12.c b/libtiff/tif_jpeg_12.c index f71da07e..bec5fb97 100644 --- a/libtiff/tif_jpeg_12.c +++ b/libtiff/tif_jpeg_12.c @@ -3,7 +3,16 @@ #if defined(JPEG_DUAL_MODE_8_12) +#define FROM_TIF_JPEG_12 + +#ifdef TIFFInitJPEG +#undef TIFFInitJPEG +#endif #define TIFFInitJPEG TIFFInitJPEG_12 + +#ifdef TIFFJPEGIsFullStripRequired +#undef TIFFJPEGIsFullStripRequired +#endif #define TIFFJPEGIsFullStripRequired TIFFJPEGIsFullStripRequired_12 int TIFFInitJPEG_12(TIFF *tif, int scheme); |