jmorecfg.h revision a73e870ad02de20c2b34cb3a5382c2846c2afbe3
136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/*
236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * jmorecfg.h
336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane *
4a73e870ad02de20c2b34cb3a5382c2846c2afbe3DRC * This file was part of the Independent JPEG Group's software:
55ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane * Copyright (C) 1991-1997, Thomas G. Lane.
6a73e870ad02de20c2b34cb3a5382c2846c2afbe3DRC * Modifications:
767ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC * Copyright (C) 2009, 2011, D. R. Commander.
836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * For conditions of distribution and use, see the accompanying README file.
936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane *
1036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * This file contains additional configuration options that customize the
1136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * JPEG software for special applications or support machine-dependent
1236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * optimizations.  Most users will not need to touch this file.
1336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
1436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
1536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
1636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/*
1736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Define BITS_IN_JSAMPLE as either
1836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane *   8   for 8-bit sample values (the usual setting)
1936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane *   12  for 12-bit sample values
2036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Only 8 and 12 are legal data precisions for lossy JPEG according to the
2136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * JPEG standard, and the IJG code does not support anything else!
2236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * We do not support run-time selection of data precision, sorry.
2336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
2436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
2536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
2636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
2736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
2836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/*
2936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Maximum number of components (color channels) allowed in JPEG image.
3036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * To meet the letter of the JPEG spec, set this to 255.  However, darn
3136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * few applications need more than 4 channels (maybe 5 for CMYK + alpha
3236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
3336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * really short on memory.  (Each allowed component costs a hundred or so
3436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * bytes of storage, whether actually used in an image or not.)
3536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
3636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
3736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define MAX_COMPONENTS  10	/* maximum number of image components */
3836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
3936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
4036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/*
4136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Basic data types.
4236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * You may need to change these if you have a machine with unusual data
4336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
4436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
4536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * but it had better be at least 16.
4636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
4736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
4836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Representation of a single sample (pixel element value).
4936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * We frequently allocate large arrays of these, so it's important to keep
5036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * them small.  But if you have memory to burn and access to char or short
5136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * arrays is very slow on your hardware, you might want to change these.
5236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
5336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
5436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#if BITS_IN_JSAMPLE == 8
5536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* JSAMPLE should be the smallest type that will hold the values 0..255.
5636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
5736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
5836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
5936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifdef HAVE_UNSIGNED_CHAR
6036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
6136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef unsigned char JSAMPLE;
6236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define GETJSAMPLE(value)  ((int) (value))
6336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
6436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#else /* not HAVE_UNSIGNED_CHAR */
6536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
6636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef char JSAMPLE;
670ca44258fc43bc44ea31b875001311591cc5634cConstantin Kaplinsky#ifdef __CHAR_UNSIGNED__
6836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define GETJSAMPLE(value)  ((int) (value))
6936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#else
7036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
710ca44258fc43bc44ea31b875001311591cc5634cConstantin Kaplinsky#endif /* __CHAR_UNSIGNED__ */
7236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
7336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif /* HAVE_UNSIGNED_CHAR */
7436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
7536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define MAXJSAMPLE	255
7636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define CENTERJSAMPLE	128
7736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
7836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif /* BITS_IN_JSAMPLE == 8 */
7936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
8036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
8136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#if BITS_IN_JSAMPLE == 12
8236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* JSAMPLE should be the smallest type that will hold the values 0..4095.
8336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * On nearly all machines "short" will do nicely.
8436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
8536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
8636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef short JSAMPLE;
8736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define GETJSAMPLE(value)  ((int) (value))
8836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
8936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define MAXJSAMPLE	4095
9036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define CENTERJSAMPLE	2048
9136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
9236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif /* BITS_IN_JSAMPLE == 12 */
9336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
9436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
9536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Representation of a DCT frequency coefficient.
9636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * This should be a signed value of at least 16 bits; "short" is usually OK.
9736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Again, we allocate large arrays of these, but you can change to int
9836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * if you have memory to burn and "short" is really slow.
9936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
10036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
10136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef short JCOEF;
10236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
10336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
10436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Compressed datastreams are represented as arrays of JOCTET.
10536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * These must be EXACTLY 8 bits wide, at least once they are written to
10636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * external storage.  Note that when using the stdio data source/destination
10736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * managers, this is also the data type passed to fread/fwrite.
10836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
10936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
11036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifdef HAVE_UNSIGNED_CHAR
11136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
11236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef unsigned char JOCTET;
11336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define GETJOCTET(value)  (value)
11436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
11536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#else /* not HAVE_UNSIGNED_CHAR */
11636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
11736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef char JOCTET;
1180ca44258fc43bc44ea31b875001311591cc5634cConstantin Kaplinsky#ifdef __CHAR_UNSIGNED__
11936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define GETJOCTET(value)  (value)
12036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#else
12136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define GETJOCTET(value)  ((value) & 0xFF)
1220ca44258fc43bc44ea31b875001311591cc5634cConstantin Kaplinsky#endif /* __CHAR_UNSIGNED__ */
12336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
12436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif /* HAVE_UNSIGNED_CHAR */
12536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
12636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
12736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* These typedefs are used for various table entries and so forth.
12836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * They must be at least as wide as specified; but making them too big
12936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * won't cost a huge amount of memory, so we don't provide special
13036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * extraction code like we did for JSAMPLE.  (In other words, these
13136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * typedefs live at a different point on the speed/space tradeoff curve.)
13236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
13336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
13436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* UINT8 must hold at least the values 0..255. */
13536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
13636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifdef HAVE_UNSIGNED_CHAR
13736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef unsigned char UINT8;
13836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#else /* not HAVE_UNSIGNED_CHAR */
1390ca44258fc43bc44ea31b875001311591cc5634cConstantin Kaplinsky#ifdef __CHAR_UNSIGNED__
14036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef char UINT8;
1410ca44258fc43bc44ea31b875001311591cc5634cConstantin Kaplinsky#else /* not __CHAR_UNSIGNED__ */
14236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef short UINT8;
1430ca44258fc43bc44ea31b875001311591cc5634cConstantin Kaplinsky#endif /* __CHAR_UNSIGNED__ */
14436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif /* HAVE_UNSIGNED_CHAR */
14536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
14636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* UINT16 must hold at least the values 0..65535. */
14736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
14836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifdef HAVE_UNSIGNED_SHORT
14936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef unsigned short UINT16;
15036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#else /* not HAVE_UNSIGNED_SHORT */
15136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef unsigned int UINT16;
15236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif /* HAVE_UNSIGNED_SHORT */
15336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
15436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* INT16 must hold at least the values -32768..32767. */
15536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
15636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
15736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef short INT16;
15836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
15936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
16036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* INT32 must hold at least signed 32-bit values. */
16136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
16236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
16336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef long INT32;
16436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
16536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
16636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Datatype used for image dimensions.  The JPEG standard only supports
16736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
16836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * "unsigned int" is sufficient on all machines.  However, if you need to
16936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * handle larger images and you don't mind deviating from the spec, you
17036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * can change this datatype.
17136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
17236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
17336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef unsigned int JDIMENSION;
17436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
17536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
17636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
17736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
178489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane/* These macros are used in all function definitions and extern declarations.
179489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane * You could modify them if you need to change function linkage conventions;
180489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane * in particular, you'll need to do that to make the library a Windows DLL.
18136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Another application is to make all functions global for use with debuggers
18236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * or code profilers that require it.
18336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
18436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
185489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane/* a function called through method pointers: */
186489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane#define METHODDEF(type)		static type
187489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane/* a function used only in its module: */
188489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane#define LOCAL(type)		static type
189489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane/* a function referenced thru EXTERNs: */
190489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane#define GLOBAL(type)		type
191489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane/* a reference to a GLOBAL function: */
192489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane#define EXTERN(type)		extern type
193489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane
194489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane
195489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane/* This macro is used to declare a "method", that is, a function pointer.
196489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane * We want to supply prototype parameters if the compiler can cope.
197489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane * Note that the arglist parameter must be parenthesized!
198489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane * Again, you can customize this if you need special linkage keywords.
199489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane */
200489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane
201489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane#ifdef HAVE_PROTOTYPES
202489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
203489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane#else
204489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
205489583f5165e05d37302e8eeec58104ea0109127Thomas G. Lane#endif
20636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
20736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
20836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Here is the pseudo-keyword for declaring pointers that must be "far"
20936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
21036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * by just saying "FAR *" where such a pointer is needed.  In a few places
21136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
21236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
21336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
21436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifdef NEED_FAR_POINTERS
21536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define FAR  far
21636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#else
21736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define FAR
21836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
21936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
22036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
22136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/*
22236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * On a few systems, type boolean and/or its values FALSE, TRUE may appear
22336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * in standard header files.  Or you may have conflicts with application-
22436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * specific header files that you want to include together with these files.
22536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
22636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
22736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
22836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifndef HAVE_BOOLEAN
22936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lanetypedef int boolean;
23036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
23136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifndef FALSE			/* in case these macros already exist */
23236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define FALSE	0		/* values of boolean */
23336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
23436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifndef TRUE
23536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define TRUE	1
23636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
23736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
23836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
23936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/*
24036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * The remaining options affect code selection within the JPEG library,
24136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * but they don't need to be visible to most applications using the library.
24236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * To minimize application namespace pollution, the symbols won't be
24336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
24436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
24536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
24636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifdef JPEG_INTERNALS
24736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define JPEG_INTERNAL_OPTIONS
24836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
24936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
25036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifdef JPEG_INTERNAL_OPTIONS
25136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
25236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
25336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/*
25436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * These defines indicate whether to include various optional functions.
25536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Undefining some of these symbols will produce a smaller but less capable
25636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * library.  Note that you can leave certain source files out of the
25736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * compilation/linking process if you've #undef'd the corresponding symbols.
25836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * (You may HAVE to do that if your compiler doesn't like null source files.)
25936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
26036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
26136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Capability options common to encoder and decoder: */
26236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
26336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
26436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
26536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
26636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
26736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Encoder capability options: */
26836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
269bc79e0680a45d1ca330d690dae0340c8e17ab5e3Thomas G. Lane#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
270bc79e0680a45d1ca330d690dae0340c8e17ab5e3Thomas G. Lane#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
27136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
27236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Note: if you selected 12-bit data precision, it is dangerous to turn off
27336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
27436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * precision, so jchuff.c normally uses entropy optimization to compute
27536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * usable tables for higher precision.  If you don't want to do optimization,
27636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * you'll have to supply different default Huffman tables.
277bc79e0680a45d1ca330d690dae0340c8e17ab5e3Thomas G. Lane * The exact same statements apply for progressive JPEG: the default tables
278bc79e0680a45d1ca330d690dae0340c8e17ab5e3Thomas G. Lane * don't work for progressive mode.  (This may get fixed, however.)
27936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
28036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
28136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
28236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Decoder capability options: */
28336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
28436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
285bc79e0680a45d1ca330d690dae0340c8e17ab5e3Thomas G. Lane#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
2865ead57a34a398aa798f35bd7a6abad19b2e453e2Thomas G. Lane#define SAVE_MARKERS_SUPPORTED	    /* jpeg_save_markers() needed? */
287bc79e0680a45d1ca330d690dae0340c8e17ab5e3Thomas G. Lane#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
28836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
28936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
29036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
29136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
29236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
29336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
29436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* more capability options later, no doubt */
29536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
29636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
29736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/*
29836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Ordering of RGB data in scanlines passed to or from the application.
29936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * If your application wants to deal with data in the order B,G,R, just
30036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * change these macros.  You can also deal with formats such as R,G,B,X
30136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
30236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * the offsets will also change the order in which colormap data is organized.
30336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * RESTRICTIONS:
30436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
30536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
30636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
30736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
30836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane *    is not 3 (they don't understand about dummy color components!).  So you
30936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane *    can't use color quantization if you change that value.
31036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
31136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
31236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define RGB_RED		0	/* Offset of Red in an RGB scanline element */
31336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define RGB_GREEN	1	/* Offset of Green */
31436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define RGB_BLUE	2	/* Offset of Blue */
31536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
31636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
31767ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC#define JPEG_NUMCS 16
318f25c071eb745268452206bb633561b770c4d62eaDRC
319b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_RGB_RED        0
320b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_RGB_GREEN      1
321b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_RGB_BLUE       2
322b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_RGB_PIXELSIZE  3
323b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC
324b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_RGBX_RED       0
325b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_RGBX_GREEN     1
326b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_RGBX_BLUE      2
327b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_RGBX_PIXELSIZE 4
328b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC
329b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_BGR_RED        2
330b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_BGR_GREEN      1
331b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_BGR_BLUE       0
332b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_BGR_PIXELSIZE  3
333b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC
334b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_BGRX_RED       2
335b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_BGRX_GREEN     1
336b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_BGRX_BLUE      0
337b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_BGRX_PIXELSIZE 4
338b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC
339b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_XBGR_RED       3
340b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_XBGR_GREEN     2
341b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_XBGR_BLUE      1
342b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_XBGR_PIXELSIZE 4
343b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC
344b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_XRGB_RED       1
345b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_XRGB_GREEN     2
346b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_XRGB_BLUE      3
347b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC#define EXT_XRGB_PIXELSIZE 4
348b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC
349f25c071eb745268452206bb633561b770c4d62eaDRCstatic const int rgb_red[JPEG_NUMCS] = {
350b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC  -1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED,
35167ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC  EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED,
35267ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC  EXT_RGBX_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED
353f25c071eb745268452206bb633561b770c4d62eaDRC};
354f25c071eb745268452206bb633561b770c4d62eaDRC
355f25c071eb745268452206bb633561b770c4d62eaDRCstatic const int rgb_green[JPEG_NUMCS] = {
356b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC  -1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN,
35767ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC  EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN,
35867ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC  EXT_RGBX_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN
359f25c071eb745268452206bb633561b770c4d62eaDRC};
360f25c071eb745268452206bb633561b770c4d62eaDRC
361f25c071eb745268452206bb633561b770c4d62eaDRCstatic const int rgb_blue[JPEG_NUMCS] = {
362b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC  -1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE,
36367ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC  EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE,
36467ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC  EXT_RGBX_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE
365f25c071eb745268452206bb633561b770c4d62eaDRC};
366f25c071eb745268452206bb633561b770c4d62eaDRC
367f25c071eb745268452206bb633561b770c4d62eaDRCstatic const int rgb_pixelsize[JPEG_NUMCS] = {
368b4570bbf8cb3045e2b3cbf3d6a80d31735871d10DRC  -1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE,
36967ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC  EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE,
37067ce3b2352fe1f7511edbfed74ec6960e41e97dcDRC  EXT_RGBX_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE
371f25c071eb745268452206bb633561b770c4d62eaDRC};
37236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
37336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* Definitions for speed-related optimizations. */
37436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
37536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
37636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
37736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
37836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
37936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
38036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifndef MULTIPLIER
3815eb84ff97f00c02aadfdce0cb30ab3e899c1b113Pierre Ossman#ifndef WITH_SIMD
38236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define MULTIPLIER  int		/* type for fastest integer multiply */
3835eb84ff97f00c02aadfdce0cb30ab3e899c1b113Pierre Ossman#else
3845eb84ff97f00c02aadfdce0cb30ab3e899c1b113Pierre Ossman#define MULTIPLIER short  /* prefer 16-bit with SIMD for parellelism */
3855eb84ff97f00c02aadfdce0cb30ab3e899c1b113Pierre Ossman#endif
38636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
38736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
38836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
38936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane/* FAST_FLOAT should be either float or double, whichever is done faster
39036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * by your compiler.  (Note that this type is only used in the floating point
39136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
39236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * Typically, float is faster in ANSI C compilers, while double is faster in
39336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * pre-ANSI compilers (because they insist on converting to double anyway).
39436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane * The code below therefore chooses float if we have ANSI-style prototypes.
39536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane */
39636a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
39736a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifndef FAST_FLOAT
39836a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#ifdef HAVE_PROTOTYPES
39936a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define FAST_FLOAT  float
40036a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#else
40136a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#define FAST_FLOAT  double
40236a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
40336a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif
40436a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane
40536a4ccccd33f5cc9df62949554af87129ced7f84Thomas G. Lane#endif /* JPEG_INTERNAL_OPTIONS */
406