diff options
author | erouault <erouault> | 2015-06-08 08:44:37 +0000 |
---|---|---|
committer | erouault <erouault> | 2015-06-08 08:44:37 +0000 |
commit | b685c71d2ca33c674739d65e5d3cc75d384eb44f (patch) | |
tree | 8cdbb1f550b9a0633e4e4f6ec3db674df04cc89d | |
parent | 08584685d338ec3f835fb377fa8e4d313638198e (diff) | |
download | libtiff-b685c71d2ca33c674739d65e5d3cc75d384eb44f.tar.gz |
* libtiff/tif_jpeg.c: Fix compilation in BITS_IN_JSAMPLE == 12
case
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | libtiff/tif_jpeg.c | 18 |
2 files changed, 16 insertions, 7 deletions
@@ -1,3 +1,8 @@ +2015-06-08 Even Rouault <even.rouault at spatialys.com> + + * libtiff/tif_jpeg.c: Fix compilation in BITS_IN_JSAMPLE == 12 + case + 2015-06-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us> * libtiff/tif_write.c (TIFFWriteEncodedStrip): Fix Coverity 715975 diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c index d2448522..28833060 100644 --- a/libtiff/tif_jpeg.c +++ b/libtiff/tif_jpeg.c @@ -1,4 +1,4 @@ -/* $Id: tif_jpeg.c,v 1.116 2015-05-31 15:44:40 bfriesen Exp $ */ +/* $Id: tif_jpeg.c,v 1.117 2015-06-08 08:44:37 erouault Exp $ */ /* * Copyright (c) 1994-1997 Sam Leffler @@ -1203,20 +1203,22 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) { #if JPEG_LIB_MK1_OR_12BIT /* BITS_IN_JSAMPLE 12 or 16 */ JSAMPROW line_work_buf = NULL; +#endif /* * For 6B, only use temporary buffer for 12 bit imagery. * For Mk1 always use it. */ +#if JPEG_LIB_MK1_OR_12BIT /* BITS_IN_JSAMPLE 12 or 16 */ #if !defined(JPEG_LIB_MK1) - if( sp->cinfo.d.data_precision == 12 ) + if( sp->cinfo.d.data_precision == 12 ) #endif - { + { line_work_buf = (JSAMPROW) _TIFFmalloc(sizeof(short) * sp->cinfo.d.output_width * sp->cinfo.d.num_components ); } -#endif /* JPEG_LIB_MK1_OR_12BIT */ +#endif do { #if JPEG_LIB_MK1_OR_12BIT /* BITS_IN_JSAMPLE 12 or 16 */ @@ -1261,9 +1263,11 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) } } } - /* else */ +#if !defined(JPEG_LIB_MK1) + else +#endif /* !defined(JPEG_LIB_MK1) */ #endif /* JPEG_LIB_MK1_OR_12BIT */ -#if !JPEG_LIB_MK1_OR_12BIT +#if !defined(JPEG_LIB_MK1) { /* * In the libjpeg6b 8bit case. We read directly into the @@ -1274,7 +1278,7 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1) return (0); } -#endif /* !JPEG_LIB_MK1_OR_12BIT */ +#endif /* !defined(JPEG_LIB_MK1) */ ++tif->tif_row; buf += sp->bytesperline; |