File: jmorecfg_8h-source.html

package info (click to toggle)
paintlib 2.6.2-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,900 kB
  • ctags: 3,875
  • sloc: cpp: 25,209; sh: 10,600; ansic: 1,891; makefile: 119
file content (388 lines) | stat: -rw-r--r-- 29,979 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>paintlib: jmorecfg.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a></div>
<h1>jmorecfg.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment"> * jmorecfg.h</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * Copyright (C) 1991-1997, Thomas G. Lane.</span>
00005 <span class="comment"> * This file is part of the Independent JPEG Group's software.</span>
00006 <span class="comment"> * For conditions of distribution and use, see the accompanying README file.</span>
00007 <span class="comment"> *</span>
00008 <span class="comment"> * This file contains additional configuration options that customize the</span>
00009 <span class="comment"> * JPEG software for special applications or support machine-dependent</span>
00010 <span class="comment"> * optimizations.  Most users will not need to touch this file.</span>
00011 <span class="comment"> */</span>
00012 
00013 
00014 <span class="comment">/*</span>
00015 <span class="comment"> * Define BITS_IN_JSAMPLE as either</span>
00016 <span class="comment"> *   8   for 8-bit sample values (the usual setting)</span>
00017 <span class="comment"> *   12  for 12-bit sample values</span>
00018 <span class="comment"> * Only 8 and 12 are legal data precisions for lossy JPEG according to the</span>
00019 <span class="comment"> * JPEG standard, and the IJG code does not support anything else!</span>
00020 <span class="comment"> * We do not support run-time selection of data precision, sorry.</span>
00021 <span class="comment"> */</span>
00022 
00023 <span class="preprocessor">#define BITS_IN_JSAMPLE  8  </span><span class="comment">/* use 8 or 12 */</span>
00024 
00025 
00026 <span class="comment">/*</span>
00027 <span class="comment"> * Maximum number of components (color channels) allowed in JPEG image.</span>
00028 <span class="comment"> * To meet the letter of the JPEG spec, set this to 255.  However, darn</span>
00029 <span class="comment"> * few applications need more than 4 channels (maybe 5 for CMYK + alpha</span>
00030 <span class="comment"> * mask).  We recommend 10 as a reasonable compromise; use 4 if you are</span>
00031 <span class="comment"> * really short on memory.  (Each allowed component costs a hundred or so</span>
00032 <span class="comment"> * bytes of storage, whether actually used in an image or not.)</span>
00033 <span class="comment"> */</span>
00034 
00035 <span class="preprocessor">#define MAX_COMPONENTS  10  </span><span class="comment">/* maximum number of image components */</span>
00036 
00037 
00038 <span class="comment">/*</span>
00039 <span class="comment"> * Basic data types.</span>
00040 <span class="comment"> * You may need to change these if you have a machine with unusual data</span>
00041 <span class="comment"> * type sizes; for example, "char" not 8 bits, "short" not 16 bits,</span>
00042 <span class="comment"> * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,</span>
00043 <span class="comment"> * but it had better be at least 16.</span>
00044 <span class="comment"> */</span>
00045 
00046 <span class="comment">/* Representation of a single sample (pixel element value).</span>
00047 <span class="comment"> * We frequently allocate large arrays of these, so it's important to keep</span>
00048 <span class="comment"> * them small.  But if you have memory to burn and access to char or short</span>
00049 <span class="comment"> * arrays is very slow on your hardware, you might want to change these.</span>
00050 <span class="comment"> */</span>
00051 
00052 <span class="preprocessor">#if BITS_IN_JSAMPLE == 8</span>
00053 <span class="preprocessor"></span><span class="comment">/* JSAMPLE should be the smallest type that will hold the values 0..255.</span>
00054 <span class="comment"> * You can use a signed char by having GETJSAMPLE mask it with 0xFF.</span>
00055 <span class="comment"> */</span>
00056 
00057 <span class="preprocessor">#ifdef HAVE_UNSIGNED_CHAR</span>
00058 <span class="preprocessor"></span>
00059 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> JSAMPLE;
00060 <span class="preprocessor">#define GETJSAMPLE(value)  ((int) (value))</span>
00061 <span class="preprocessor"></span>
00062 <span class="preprocessor">#else </span><span class="comment">/* not HAVE_UNSIGNED_CHAR */</span>
00063 
00064 <span class="keyword">typedef</span> <span class="keywordtype">char</span> JSAMPLE;
00065 <span class="preprocessor">#ifdef CHAR_IS_UNSIGNED</span>
00066 <span class="preprocessor"></span><span class="preprocessor">#define GETJSAMPLE(value)  ((int) (value))</span>
00067 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00068 <span class="preprocessor"></span><span class="preprocessor">#define GETJSAMPLE(value)  ((int) (value) &amp; 0xFF)</span>
00069 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* CHAR_IS_UNSIGNED */</span>
00070 
00071 <span class="preprocessor">#endif </span><span class="comment">/* HAVE_UNSIGNED_CHAR */</span>
00072 
00073 <span class="preprocessor">#define MAXJSAMPLE  255</span>
00074 <span class="preprocessor"></span><span class="preprocessor">#define CENTERJSAMPLE 128</span>
00075 <span class="preprocessor"></span>
00076 <span class="preprocessor">#endif </span><span class="comment">/* BITS_IN_JSAMPLE == 8 */</span>
00077 
00078 <span class="preprocessor">#if BITS_IN_JSAMPLE == 12</span>
00079 <span class="preprocessor"></span><span class="comment">/* JSAMPLE should be the smallest type that will hold the values 0..4095.</span>
00080 <span class="comment"> * On nearly all machines "short" will do nicely.</span>
00081 <span class="comment"> */</span>
00082 
00083 <span class="keyword">typedef</span> <span class="keywordtype">short</span> JSAMPLE;
00084 <span class="preprocessor">#define GETJSAMPLE(value)  ((int) (value))</span>
00085 <span class="preprocessor"></span>
00086 <span class="preprocessor">#define MAXJSAMPLE  4095</span>
00087 <span class="preprocessor"></span><span class="preprocessor">#define CENTERJSAMPLE 2048</span>
00088 <span class="preprocessor"></span>
00089 <span class="preprocessor">#endif </span><span class="comment">/* BITS_IN_JSAMPLE == 12 */</span>
00090 
00091 
00092 <span class="comment">/* Representation of a DCT frequency coefficient.</span>
00093 <span class="comment"> * This should be a signed value of at least 16 bits; "short" is usually OK.</span>
00094 <span class="comment"> * Again, we allocate large arrays of these, but you can change to int</span>
00095 <span class="comment"> * if you have memory to burn and "short" is really slow.</span>
00096 <span class="comment"> */</span>
00097 
00098 <span class="keyword">typedef</span> <span class="keywordtype">short</span> JCOEF;
00099 
00100 
00101 <span class="comment">/* Compressed datastreams are represented as arrays of JOCTET.</span>
00102 <span class="comment"> * These must be EXACTLY 8 bits wide, at least once they are written to</span>
00103 <span class="comment"> * external storage.  Note that when using the stdio data source/destination</span>
00104 <span class="comment"> * managers, this is also the data type passed to fread/fwrite.</span>
00105 <span class="comment"> */</span>
00106 
00107 <span class="preprocessor">#ifdef HAVE_UNSIGNED_CHAR</span>
00108 <span class="preprocessor"></span>
00109 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> JOCTET;
00110 <span class="preprocessor">#define GETJOCTET(value)  (value)</span>
00111 <span class="preprocessor"></span>
00112 <span class="preprocessor">#else </span><span class="comment">/* not HAVE_UNSIGNED_CHAR */</span>
00113 
00114 <span class="keyword">typedef</span> <span class="keywordtype">char</span> JOCTET;
00115 <span class="preprocessor">#ifdef CHAR_IS_UNSIGNED</span>
00116 <span class="preprocessor"></span><span class="preprocessor">#define GETJOCTET(value)  (value)</span>
00117 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00118 <span class="preprocessor"></span><span class="preprocessor">#define GETJOCTET(value)  ((value) &amp; 0xFF)</span>
00119 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* CHAR_IS_UNSIGNED */</span>
00120 
00121 <span class="preprocessor">#endif </span><span class="comment">/* HAVE_UNSIGNED_CHAR */</span>
00122 
00123 
00124 <span class="comment">/* These typedefs are used for various table entries and so forth.</span>
00125 <span class="comment"> * They must be at least as wide as specified; but making them too big</span>
00126 <span class="comment"> * won't cost a huge amount of memory, so we don't provide special</span>
00127 <span class="comment"> * extraction code like we did for JSAMPLE.  (In other words, these</span>
00128 <span class="comment"> * typedefs live at a different point on the speed/space tradeoff curve.)</span>
00129 <span class="comment"> */</span>
00130 
00131 <span class="comment">/* UINT8 must hold at least the values 0..255. */</span>
00132 
00133 <span class="preprocessor">#ifdef HAVE_UNSIGNED_CHAR</span>
00134 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> UINT8;
00135 <span class="preprocessor">#else </span><span class="comment">/* not HAVE_UNSIGNED_CHAR */</span>
00136 <span class="preprocessor">#ifdef CHAR_IS_UNSIGNED</span>
00137 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">char</span> UINT8;
00138 <span class="preprocessor">#else </span><span class="comment">/* not CHAR_IS_UNSIGNED */</span>
00139 <span class="keyword">typedef</span> <span class="keywordtype">short</span> UINT8;
00140 <span class="preprocessor">#endif </span><span class="comment">/* CHAR_IS_UNSIGNED */</span>
00141 <span class="preprocessor">#endif </span><span class="comment">/* HAVE_UNSIGNED_CHAR */</span>
00142 
00143 <span class="comment">/* UINT16 must hold at least the values 0..65535. */</span>
00144 
00145 <span class="preprocessor">#ifdef HAVE_UNSIGNED_SHORT</span>
00146 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> UINT16;
00147 <span class="preprocessor">#else </span><span class="comment">/* not HAVE_UNSIGNED_SHORT */</span>
00148 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> UINT16;
00149 <span class="preprocessor">#endif </span><span class="comment">/* HAVE_UNSIGNED_SHORT */</span>
00150 <span class="comment">/* INT16 must hold at least the values -32768..32767. */</span>
00151 
00152 <span class="preprocessor">#ifndef XMD_H     </span><span class="comment">/* X11/xmd.h correctly defines INT16 */</span>
00153 <span class="keyword">typedef</span> <span class="keywordtype">short</span> INT16;
00154 <span class="preprocessor">#endif</span>
00155 <span class="preprocessor"></span>
00156 <span class="comment">/* INT32 must hold at least signed 32-bit values. */</span>
00157 
00158 <span class="preprocessor">#if !defined( XMD_H ) &amp;&amp; !defined( _BASETSD_H_ )</span>
00159 <span class="preprocessor"></span>     <span class="comment">/* X11/xmd.h and MS VC++ 6.0 correctly define INT32 */</span>
00160 <span class="keyword">typedef</span> <span class="keywordtype">long</span> INT32;
00161 <span class="preprocessor">#endif</span>
00162 <span class="preprocessor"></span>
00163 <span class="comment">/* Datatype used for image dimensions.  The JPEG standard only supports</span>
00164 <span class="comment"> * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore</span>
00165 <span class="comment"> * "unsigned int" is sufficient on all machines.  However, if you need to</span>
00166 <span class="comment"> * handle larger images and you don't mind deviating from the spec, you</span>
00167 <span class="comment"> * can change this datatype.</span>
00168 <span class="comment"> */</span>
00169 
00170 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> JDIMENSION;
00171 
00172 <span class="preprocessor">#define JPEG_MAX_DIMENSION  65500L  </span><span class="comment">/* a tad under 64K to prevent overflows */</span>
00173 
00174 
00175 <span class="comment">/* These macros are used in all function definitions and extern declarations.</span>
00176 <span class="comment"> * You could modify them if you need to change function linkage conventions;</span>
00177 <span class="comment"> * in particular, you'll need to do that to make the library a Windows DLL.</span>
00178 <span class="comment"> * Another application is to make all functions global for use with debuggers</span>
00179 <span class="comment"> * or code profilers that require it.</span>
00180 <span class="comment"> */</span>
00181 
00182 <span class="comment">/* a function called through method pointers: */</span>
00183 <span class="preprocessor">#define METHODDEF(type)   static type</span>
00184 <span class="preprocessor"></span><span class="comment">/* a function used only in its module: */</span>
00185 <span class="preprocessor">#define LOCAL(type)   static type</span>
00186 <span class="preprocessor"></span><span class="comment">/* a function referenced thru EXTERNs: */</span>
00187 <span class="preprocessor">#define GLOBAL(type)    type</span>
00188 <span class="preprocessor"></span><span class="comment">/* a reference to a GLOBAL function: */</span>
00189 <span class="preprocessor">#define EXTERN(type)    extern type</span>
00190 <span class="preprocessor"></span>
00191 
00192 <span class="comment">/* This macro is used to declare a "method", that is, a function pointer.</span>
00193 <span class="comment"> * We want to supply prototype parameters if the compiler can cope.</span>
00194 <span class="comment"> * Note that the arglist parameter must be parenthesized!</span>
00195 <span class="comment"> * Again, you can customize this if you need special linkage keywords.</span>
00196 <span class="comment"> */</span>
00197 
00198 <span class="preprocessor">#ifdef HAVE_PROTOTYPES</span>
00199 <span class="preprocessor"></span><span class="preprocessor">  #define JMETHOD(type,methodname,arglist)  type (*methodname) arglist</span>
00200 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
00201 <span class="preprocessor"></span><span class="preprocessor">  #define JMETHOD(type,methodname,arglist)  type (*methodname) ()</span>
00202 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00203 <span class="preprocessor"></span>
00204 
00205 <span class="comment">/* Here is the pseudo-keyword for declaring pointers that must be "far"</span>
00206 <span class="comment"> * on 80x86 machines.  Most of the specialized coding for 80x86 is handled</span>
00207 <span class="comment"> * by just saying "FAR *" where such a pointer is needed.  In a few places</span>
00208 <span class="comment"> * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.</span>
00209 <span class="comment"> */</span>
00210 <span class="comment">/* Change Ulrich von Zadow 9/96:</span>
00211 <span class="comment"> *   The WIN32 headers define FAR as empty already. To prevent warnings,</span>
00212 <span class="comment"> *   we shouldn't do it here.</span>
00213 <span class="comment"> */</span>
00214 <span class="preprocessor">#ifdef NEED_FAR_POINTERS</span>
00215 <span class="preprocessor"></span><span class="preprocessor">  #define FAR  far</span>
00216 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
00217 <span class="preprocessor"></span><span class="preprocessor">  #ifndef FAR</span>
00218 <span class="preprocessor"></span><span class="preprocessor">   #define FAR</span>
00219 <span class="preprocessor"></span><span class="preprocessor">  #endif</span>
00220 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00221 <span class="preprocessor"></span>
00222 <span class="comment">/*</span>
00223 <span class="comment"> * On a few systems, type boolean and/or its values false, true may appear</span>
00224 <span class="comment"> * in standard header files.  Or you may have conflicts with application-</span>
00225 <span class="comment"> * specific header files that you want to include together with these files.</span>
00226 <span class="comment"> * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.</span>
00227 <span class="comment"> */</span>
00228 
00229 <span class="preprocessor">#ifndef HAVE_BOOLEAN</span>
00230 <span class="preprocessor"></span><span class="preprocessor">  #ifndef __RPCNDR_H__  </span><span class="comment">/* don't conflict if rpcndr.h already read */</span>
00231   <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <span class="keywordtype">boolean</span>;
00232 <span class="preprocessor">  #endif</span>
00233 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00234 <span class="preprocessor"></span><span class="preprocessor">#ifndef FALSE     </span><span class="comment">/* in case these macros already exist */</span>
00235 <span class="preprocessor">#define FALSE 0   </span><span class="comment">/* values of boolean */</span>
00236 <span class="preprocessor">#endif</span>
00237 <span class="preprocessor"></span><span class="preprocessor">#ifndef TRUE</span>
00238 <span class="preprocessor"></span><span class="preprocessor">#define TRUE  1</span>
00239 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00240 <span class="preprocessor"></span>
00241 
00242 <span class="comment">/*</span>
00243 <span class="comment"> * The remaining options affect code selection within the JPEG library,</span>
00244 <span class="comment"> * but they don't need to be visible to most applications using the library.</span>
00245 <span class="comment"> * To minimize application namespace pollution, the symbols won't be</span>
00246 <span class="comment"> * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.</span>
00247 <span class="comment"> */</span>
00248 
00249 <span class="preprocessor">#ifdef JPEG_INTERNALS</span>
00250 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_INTERNAL_OPTIONS</span>
00251 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00252 <span class="preprocessor"></span>
00253 <span class="preprocessor">#ifdef JPEG_INTERNAL_OPTIONS</span>
00254 <span class="preprocessor"></span>
00255 
00256 <span class="comment">/*</span>
00257 <span class="comment"> * These defines indicate whether to include various optional functions.</span>
00258 <span class="comment"> * Undefining some of these symbols will produce a smaller but less capable</span>
00259 <span class="comment"> * library.  Note that you can leave certain source files out of the</span>
00260 <span class="comment"> * compilation/linking process if you've #undef'd the corresponding symbols.</span>
00261 <span class="comment"> * (You may HAVE to do that if your compiler doesn't like null source files.)</span>
00262 <span class="comment"> */</span>
00263 
00264 <span class="comment">/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */</span>
00265 
00266 <span class="comment">/* Capability options common to encoder and decoder: */</span>
00267 
00268 <span class="preprocessor">#define DCT_ISLOW_SUPPORTED </span><span class="comment">/* slow but accurate integer algorithm */</span>
00269 <span class="preprocessor">#define DCT_IFAST_SUPPORTED </span><span class="comment">/* faster, less accurate integer method */</span>
00270 <span class="preprocessor">#define DCT_FLOAT_SUPPORTED </span><span class="comment">/* floating-point: accurate, fast on fast HW */</span>
00271 
00272 <span class="comment">/* Encoder capability options: */</span>
00273 
00274 <span class="preprocessor">#undef  C_ARITH_CODING_SUPPORTED    </span><span class="comment">/* Arithmetic coding back end? */</span>
00275 <span class="preprocessor">#define C_MULTISCAN_FILES_SUPPORTED </span><span class="comment">/* Multiple-scan JPEG files? */</span>
00276 <span class="preprocessor">#define C_PROGRESSIVE_SUPPORTED     </span><span class="comment">/* Progressive JPEG? (Requires MULTISCAN)*/</span>
00277 <span class="preprocessor">#define ENTROPY_OPT_SUPPORTED     </span><span class="comment">/* Optimization of entropy coding parms? */</span>
00278 <span class="comment">/* Note: if you selected 12-bit data precision, it is dangerous to turn off</span>
00279 <span class="comment"> * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit</span>
00280 <span class="comment"> * precision, so jchuff.c normally uses entropy optimization to compute</span>
00281 <span class="comment"> * usable tables for higher precision.  If you don't want to do optimization,</span>
00282 <span class="comment"> * you'll have to supply different default Huffman tables.</span>
00283 <span class="comment"> * The exact same statements apply for progressive JPEG: the default tables</span>
00284 <span class="comment"> * don't work for progressive mode.  (This may get fixed, however.)</span>
00285 <span class="comment"> */</span>
00286 <span class="preprocessor">#undef INPUT_SMOOTHING_SUPPORTED   </span><span class="comment">/* Input image smoothing option? */</span>
00287 
00288 <span class="comment">/* Decoder capability options: */</span>
00289 
00290 <span class="preprocessor">#undef  D_ARITH_CODING_SUPPORTED    </span><span class="comment">/* Arithmetic coding back end? */</span>
00291 <span class="preprocessor">#define D_MULTISCAN_FILES_SUPPORTED </span><span class="comment">/* Multiple-scan JPEG files? */</span>
00292 <span class="preprocessor">#define D_PROGRESSIVE_SUPPORTED     </span><span class="comment">/* Progressive JPEG? (Requires MULTISCAN)*/</span>
00293 <span class="preprocessor">#undef BLOCK_SMOOTHING_SUPPORTED   </span><span class="comment">/* Block smoothing? (Progressive only) */</span>
00294 <span class="preprocessor">#define IDCT_SCALING_SUPPORTED      </span><span class="comment">/* Output rescaling via IDCT? */</span>
00295 <span class="preprocessor">#undef  UPSAMPLE_SCALING_SUPPORTED  </span><span class="comment">/* Output rescaling at upsample stage? */</span>
00296 <span class="preprocessor">#define UPSAMPLE_MERGING_SUPPORTED  </span><span class="comment">/* Fast path for sloppy upsampling? */</span>
00297 <span class="preprocessor">#define QUANT_1PASS_SUPPORTED     </span><span class="comment">/* 1-pass color quantization? */</span>
00298 <span class="preprocessor">#define QUANT_2PASS_SUPPORTED     </span><span class="comment">/* 2-pass color quantization? */</span>
00299 <span class="preprocessor">#define SAVE_MARKERS_SUPPORTED</span>
00300 <span class="preprocessor"></span>
00301 <span class="comment">/* more capability options later, no doubt */</span>
00302 
00303 
00304 <span class="comment">/*</span>
00305 <span class="comment"> * Ordering of RGB data in scanlines passed to or from the application.</span>
00306 <span class="comment"> * If your application wants to deal with data in the order B,G,R, just</span>
00307 <span class="comment"> * change these macros.  You can also deal with formats such as R,G,B,X</span>
00308 <span class="comment"> * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing</span>
00309 <span class="comment"> * the offsets will also change the order in which colormap data is organized.</span>
00310 <span class="comment"> * RESTRICTIONS:</span>
00311 <span class="comment"> * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.</span>
00312 <span class="comment"> * 2. These macros only affect RGB&lt;=&gt;YCbCr color conversion, so they are not</span>
00313 <span class="comment"> *    useful if you are using JPEG color spaces other than YCbCr or grayscale.</span>
00314 <span class="comment"> * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE</span>
00315 <span class="comment"> *    is not 3 (they don't understand about dummy color components!).  So you</span>
00316 <span class="comment"> *    can't use color quantization if you change that value.</span>
00317 <span class="comment"> */</span>
00318 
00319 <span class="preprocessor">#define RGB_RED   2 </span><span class="comment">/* Offset of Red in an RGB scanline element */</span>
00320 <span class="preprocessor">#define RGB_GREEN 1 </span><span class="comment">/* Offset of Green */</span>
00321 <span class="preprocessor">#define RGB_BLUE  0 </span><span class="comment">/* Offset of Blue */</span>
00322 <span class="preprocessor">#define RGB_PIXELSIZE 4 </span><span class="comment">/* JSAMPLEs per RGB scanline element */</span>
00323 
00324 
00325 <span class="comment">/* Definitions for speed-related optimizations. */</span>
00326 
00327 
00328 <span class="comment">/* If your compiler supports inline functions, define INLINE</span>
00329 <span class="comment"> * as the inline keyword; otherwise define it as empty.</span>
00330 <span class="comment"> */</span>
00331 
00332 <span class="preprocessor">#ifndef INLINE</span>
00333 <span class="preprocessor"></span><span class="preprocessor">  #ifdef __GNUC__         </span><span class="comment">/* for instance, GNU C knows about inline */</span>
00334 <span class="preprocessor">    #define INLINE __inline__</span>
00335 <span class="preprocessor"></span><span class="preprocessor">  #endif</span>
00336 <span class="preprocessor"></span><span class="preprocessor">  #ifndef INLINE</span>
00337 <span class="preprocessor"></span><span class="preprocessor">    #define INLINE          </span><span class="comment">/* default is to define it as empty */</span>
00338 <span class="preprocessor">  #endif</span>
00339 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00340 <span class="preprocessor"></span>
00341 
00342 <span class="comment">/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying</span>
00343 <span class="comment"> * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER</span>
00344 <span class="comment"> * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.</span>
00345 <span class="comment"> */</span>
00346 
00347 <span class="preprocessor">#ifndef MULTIPLIER</span>
00348 <span class="preprocessor"></span><span class="preprocessor">  #define MULTIPLIER  int     </span><span class="comment">/* type for fastest integer multiply */</span>
00349 <span class="preprocessor">#endif</span>
00350 <span class="preprocessor"></span>
00351 
00352 <span class="comment">/* FAST_FLOAT should be either float or double, whichever is done faster</span>
00353 <span class="comment"> * by your compiler.  (Note that this type is only used in the floating point</span>
00354 <span class="comment"> * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)</span>
00355 <span class="comment"> * Typically, float is faster in ANSI C compilers, while double is faster in</span>
00356 <span class="comment"> * pre-ANSI compilers (because they insist on converting to double anyway).</span>
00357 <span class="comment"> * The code below therefore chooses float if we have ANSI-style prototypes.</span>
00358 <span class="comment"> */</span>
00359 <span class="comment">/* Change Ulrich von Zadow 9/96:</span>
00360 <span class="comment"> *   Double is the native pentium floating point type, so it's</span>
00361 <span class="comment"> *   definitely the fastest in this configuration.</span>
00362 <span class="comment"> */</span>
00363 <span class="preprocessor">#ifndef FAST_FLOAT</span>
00364 <span class="preprocessor"></span><span class="preprocessor">  #ifdef HAVE_PROTOTYPES</span>
00365 <span class="preprocessor"></span><span class="preprocessor">    #ifdef WIN32</span>
00366 <span class="preprocessor"></span><span class="preprocessor">      #define FAST_FLOAT  double</span>
00367 <span class="preprocessor"></span><span class="preprocessor">     #else</span>
00368 <span class="preprocessor"></span><span class="preprocessor">      #define FAST_FLOAT  float</span>
00369 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
00370 <span class="preprocessor"></span><span class="preprocessor">   #else</span>
00371 <span class="preprocessor"></span><span class="preprocessor">    #define FAST_FLOAT  double</span>
00372 <span class="preprocessor"></span><span class="preprocessor">  #endif</span>
00373 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00374 <span class="preprocessor"></span>
00375 <span class="preprocessor">#endif </span><span class="comment">/* JPEG_INTERNAL_OPTIONS */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Sep 13 16:16:40 2004 for paintlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.2 </small></address>
</body>
</html>