Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 422843
Collapse All | Expand All

(-)libtiff/tif_jpeg.c (+3 lines)
Lines 1138-1143 Link Here
1138
	if (downsampled_output) {
1138
	if (downsampled_output) {
1139
		/* Need to use raw-data interface to libjpeg */
1139
		/* Need to use raw-data interface to libjpeg */
1140
		sp->cinfo.d.raw_data_out = TRUE;
1140
		sp->cinfo.d.raw_data_out = TRUE;
1141
#if JPEG_LIB_VERSION >= 70
1142
		sp->cinfo.d.do_fancy_upsampling = FALSE;
1143
#endif /* JPEG_LIB_VERSION >= 70 */
1141
		tif->tif_decoderow = DecodeRowError;
1144
		tif->tif_decoderow = DecodeRowError;
1142
		tif->tif_decodestrip = JPEGDecodeRaw;
1145
		tif->tif_decodestrip = JPEGDecodeRaw;
1143
		tif->tif_decodetile = JPEGDecodeRaw;
1146
		tif->tif_decodetile = JPEGDecodeRaw;
(-)test/raw_decode.c (-10 / +25 lines)
Lines 42-47 Link Here
42
42
43
#include "tiffio.h"
43
#include "tiffio.h"
44
44
45
#include "jpeglib.h" /* Needed for JPEG_LIB_VERSION */
46
45
static unsigned char cluster_0[] = { 0, 0, 2, 0, 138, 139 };
47
static unsigned char cluster_0[] = { 0, 0, 2, 0, 138, 139 };
46
static unsigned char cluster_64[] = { 0, 0, 9, 6, 134, 119 };
48
static unsigned char cluster_64[] = { 0, 0, 9, 6, 134, 119 };
47
static unsigned char cluster_128[] = { 44, 40, 63, 59, 230, 95 };
49
static unsigned char cluster_128[] = { 44, 40, 63, 59, 230, 95 };
Lines 111-116 Link Here
111
	unsigned char *buffer;
113
	unsigned char *buffer;
112
	uint32 *rgba_buffer;
114
	uint32 *rgba_buffer;
113
	tsize_t sz, szout;
115
	tsize_t sz, szout;
116
	unsigned int pixel_status = 0;
114
117
115
        (void) argc;
118
        (void) argc;
116
        (void) argv;
119
        (void) argv;
Lines 188-198 Link Here
188
		return 1;
191
		return 1;
189
	}
192
	}
190
193
191
	if (check_rgb_pixel( 0, 15, 0, 18, buffer )
194
#if JPEG_LIB_VERSION >= 70
192
	    || check_rgb_pixel( 64, 0, 0, 2, buffer )
195
	pixel_status |= check_rgb_pixel( 0, 18, 0, 41, buffer );
193
	    || check_rgb_pixel( 512, 6, 36, 182, buffer ) ) {
196
	pixel_status |= check_rgb_pixel( 64, 0, 0, 0, buffer );
194
		exit(1);
197
	pixel_status |= check_rgb_pixel( 512, 5, 34, 196, buffer );
195
	}	
198
#else
199
	pixel_status |= check_rgb_pixel( 0, 15, 0, 18, buffer );
200
	pixel_status |= check_rgb_pixel( 64, 0, 0, 2, buffer );
201
	pixel_status |= check_rgb_pixel( 512, 6, 36, 182, buffer );
202
#endif
196
203
197
	free( buffer );
204
	free( buffer );
198
205
Lines 217-230 Link Here
217
	 * accomplish it from the YCbCr subsampled buffer ourselves in which
224
	 * accomplish it from the YCbCr subsampled buffer ourselves in which
218
	 * case the results may be subtly different but similar.
225
	 * case the results may be subtly different but similar.
219
	 */
226
	 */
220
	if (check_rgba_pixel( 0, 15, 0, 18, 255, buffer )
227
#if JPEG_LIB_VERSION >= 70
221
	    || check_rgba_pixel( 64, 0, 0, 2, 255, buffer )
228
	pixel_status |= check_rgba_pixel( 0, 18, 0, 41, 255, buffer );
222
	    || check_rgba_pixel( 512, 6, 36, 182, 255, buffer ) ) {
229
	pixel_status |= check_rgba_pixel( 64, 0, 0, 0, 255, buffer );
223
		exit(1);
230
	pixel_status |= check_rgba_pixel( 512, 5, 34, 196, 255, buffer );
224
	}	
231
#else
232
	pixel_status |= check_rgba_pixel( 0, 15, 0, 18, 255, buffer );
233
	pixel_status |= check_rgba_pixel( 64, 0, 0, 2, 255, buffer );
234
	pixel_status |= check_rgba_pixel( 512, 6, 36, 182, 255, buffer );
235
#endif
225
236
226
	free( buffer );
237
	free( buffer );
227
	TIFFClose(tif);
238
	TIFFClose(tif);
239
240
	if (pixel_status) {
241
		exit(1);
242
	}
228
	
243
	
229
	exit( 0 );
244
	exit( 0 );
230
}
245
}

Return to bug 422843