29 #define MAX_COMPONENTS 10
46 #if BITS_IN_JSAMPLE == 8
51 #ifdef HAVE_UNSIGNED_CHAR
54 #define GETJSAMPLE(value) ((int) (value))
59 #ifdef __CHAR_UNSIGNED__
60 #define GETJSAMPLE(value) ((int) (value))
62 #define GETJSAMPLE(value) ((int) (value) & 0xFF)
67 #define MAXJSAMPLE 255
68 #define CENTERJSAMPLE 128
73 #if BITS_IN_JSAMPLE == 12
79 #define GETJSAMPLE(value) ((int) (value))
81 #define MAXJSAMPLE 4095
82 #define CENTERJSAMPLE 2048
102 #ifdef HAVE_UNSIGNED_CHAR
104 typedef unsigned char JOCTET;
105 #define GETJOCTET(value) (value)
110 #ifdef __CHAR_UNSIGNED__
111 #define GETJOCTET(value) (value)
113 #define GETJOCTET(value) ((value) & 0xFF)
128 #ifdef HAVE_UNSIGNED_CHAR
129 typedef unsigned char UINT8;
131 #ifdef __CHAR_UNSIGNED__
140 #ifdef HAVE_UNSIGNED_SHORT
141 typedef unsigned short UINT16;
198 #define JPEG_MAX_DIMENSION 65500L
209 #define METHODDEF(type) static type
211 #define LOCAL(type) static type
213 #define GLOBAL(type) type
215 #define EXTERN(type) extern type
225 #define JMETHOD(type,methodname,arglist) type (*methodname) arglist
261 #ifdef JPEG_INTERNALS
262 #define JPEG_INTERNAL_OPTIONS
265 #ifdef JPEG_INTERNAL_OPTIONS
278 #define DCT_ISLOW_SUPPORTED
279 #define DCT_IFAST_SUPPORTED
280 #define DCT_FLOAT_SUPPORTED
284 #define C_MULTISCAN_FILES_SUPPORTED
285 #define C_PROGRESSIVE_SUPPORTED
286 #define ENTROPY_OPT_SUPPORTED
295 #define INPUT_SMOOTHING_SUPPORTED
299 #define D_MULTISCAN_FILES_SUPPORTED
300 #define D_PROGRESSIVE_SUPPORTED
301 #define SAVE_MARKERS_SUPPORTED
302 #define BLOCK_SMOOTHING_SUPPORTED
303 #define IDCT_SCALING_SUPPORTED
304 #undef UPSAMPLE_SCALING_SUPPORTED
305 #define UPSAMPLE_MERGING_SUPPORTED
306 #define QUANT_1PASS_SUPPORTED
307 #define QUANT_2PASS_SUPPORTED
336 #define RGB_PIXELSIZE 3
338 #define JPEG_NUMCS 17
340 #define EXT_RGB_RED 0
341 #define EXT_RGB_GREEN 1
342 #define EXT_RGB_BLUE 2
343 #define EXT_RGB_PIXELSIZE 3
345 #define EXT_RGBX_RED 0
346 #define EXT_RGBX_GREEN 1
347 #define EXT_RGBX_BLUE 2
348 #define EXT_RGBX_PIXELSIZE 4
350 #define EXT_BGR_RED 2
351 #define EXT_BGR_GREEN 1
352 #define EXT_BGR_BLUE 0
353 #define EXT_BGR_PIXELSIZE 3
355 #define EXT_BGRX_RED 2
356 #define EXT_BGRX_GREEN 1
357 #define EXT_BGRX_BLUE 0
358 #define EXT_BGRX_PIXELSIZE 4
360 #define EXT_XBGR_RED 3
361 #define EXT_XBGR_GREEN 2
362 #define EXT_XBGR_BLUE 1
363 #define EXT_XBGR_PIXELSIZE 4
365 #define EXT_XRGB_RED 1
366 #define EXT_XRGB_GREEN 2
367 #define EXT_XRGB_BLUE 3
368 #define EXT_XRGB_PIXELSIZE 4
370 static const int rgb_red[JPEG_NUMCS] = {
371 -1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED,
372 EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED,
373 EXT_RGBX_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED,
377 static const int rgb_green[JPEG_NUMCS] = {
378 -1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN,
379 EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN,
380 EXT_RGBX_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN,
384 static const int rgb_blue[JPEG_NUMCS] = {
385 -1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE,
386 EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE,
387 EXT_RGBX_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE,
391 static const int rgb_pixelsize[JPEG_NUMCS] = {
392 -1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE,
393 EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE,
394 EXT_RGBX_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE,
407 #define MULTIPLIER int
409 #define MULTIPLIER short
420 #define FAST_FLOAT float