image_compressor_pack 1.0.0.1-universal-darwin-16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/lib/.paths.yml +12 -0
- data/lib/image_compressor_pack/dynamically_linked_recipes.yml +102 -0
- data/lib/image_compressor_pack/recipes.rb +42 -0
- data/lib/image_compressor_pack/statically_linked_recipes.yml +109 -0
- data/lib/image_compressor_pack/version.rb +3 -0
- data/lib/image_compressor_pack.rb +24 -0
- data/ports/advancecomp-1.22-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/gifsicle-1.88-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/jhead-3.0-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/jpeg-archive-2.1.1-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/jpegoptim-1.4.4-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/lcms2-2.8-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/libpng-1.6.26-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/mozjpeg-3.1-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/nasm-2.12.02-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/optipng-0.7.6-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/pngcrush-1.8.10-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/pngquant-2.8.0-x86_64-apple-darwin16.1.0.installed +0 -0
- data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/bin/advdef +0 -0
- data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/bin/advmng +0 -0
- data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/bin/advpng +0 -0
- data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/bin/advzip +0 -0
- data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/share/man/man1/advdef.1 +83 -0
- data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/share/man/man1/advmng.1 +197 -0
- data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/share/man/man1/advpng.1 +93 -0
- data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/share/man/man1/advzip.1 +116 -0
- data/ports/x86_64-apple-darwin16.1.0/gifsicle/1.88/bin/gifsicle +0 -0
- data/ports/x86_64-apple-darwin16.1.0/gifsicle/1.88/share/man/man1/gifsicle.1 +1318 -0
- data/ports/x86_64-apple-darwin16.1.0/jhead/3.0/bin/jhead +0 -0
- data/ports/x86_64-apple-darwin16.1.0/jpeg-archive/2.1.1/bin/jpeg-archive +40 -0
- data/ports/x86_64-apple-darwin16.1.0/jpeg-archive/2.1.1/bin/jpeg-compare +0 -0
- data/ports/x86_64-apple-darwin16.1.0/jpeg-archive/2.1.1/bin/jpeg-hash +0 -0
- data/ports/x86_64-apple-darwin16.1.0/jpeg-archive/2.1.1/bin/jpeg-recompress +0 -0
- data/ports/x86_64-apple-darwin16.1.0/jpegoptim/1.4.4/bin/jpegoptim +0 -0
- data/ports/x86_64-apple-darwin16.1.0/jpegoptim/1.4.4/share/man/man1/jpegoptim.1 +186 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/bin/linkicc +0 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/bin/psicc +0 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/bin/transicc +0 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/include/lcms2.h +1903 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/include/lcms2_plugin.h +665 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/lib/liblcms2.a +0 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/lib/liblcms2.la +41 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/lib/pkgconfig/lcms2.pc +11 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/share/man/man1/jpgicc.1 +122 -0
- data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/share/man/man1/tificc.1 +117 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/libpng16/png.h +3266 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/libpng16/pngconf.h +622 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/libpng16/pnglibconf.h +213 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/png.h +3266 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/pngconf.h +622 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/pnglibconf.h +213 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/libpng.a +0 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/libpng.la +41 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/libpng16.a +0 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/libpng16.la +41 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/pkgconfig/libpng16.pc +11 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/share/man/man3/libpng.3 +6179 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/share/man/man3/libpngpf.3 +18 -0
- data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/share/man/man5/png.5 +74 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/cjpeg +0 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/djpeg +0 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/jpegtran +0 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/rdjpgcom +0 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/tjbench +0 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/wrjpgcom +0 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/jconfig.h +71 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/jerror.h +320 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/jmorecfg.h +390 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/jpeglib.h +1185 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/turbojpeg.h +1538 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/lib/libjpeg.a +0 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/lib/libjpeg.la +41 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/lib/libturbojpeg.a +0 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/lib/libturbojpeg.la +41 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/README +281 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/README-mozilla.txt +194 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/README-turbo.txt +363 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/example.c +433 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/libjpeg.txt +3015 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/structure.txt +906 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/usage.txt +649 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/wizard.txt +211 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/cjpeg.1 +352 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/djpeg.1 +278 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/jpegtran.1 +269 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/rdjpgcom.1 +63 -0
- data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/wrjpgcom.1 +103 -0
- data/ports/x86_64-apple-darwin16.1.0/nasm/2.12.02/bin/nasm +0 -0
- data/ports/x86_64-apple-darwin16.1.0/nasm/2.12.02/bin/ndisasm +0 -0
- data/ports/x86_64-apple-darwin16.1.0/nasm/2.12.02/share/man/man1/nasm.1 +429 -0
- data/ports/x86_64-apple-darwin16.1.0/nasm/2.12.02/share/man/man1/ndisasm.1 +120 -0
- data/ports/x86_64-apple-darwin16.1.0/optipng/0.7.6/bin/optipng +0 -0
- data/ports/x86_64-apple-darwin16.1.0/optipng/0.7.6/man/man1/optipng.1 +343 -0
- data/ports/x86_64-apple-darwin16.1.0/pngcrush/1.8.10/bin/pngcrush +0 -0
- data/ports/x86_64-apple-darwin16.1.0/pngquant/2.8.0/bin/pngquant +0 -0
- data/ports/x86_64-apple-darwin16.1.0/pngquant/2.8.0/share/man/man1/pngquant.1 +127 -0
- data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/include/zconf.h +511 -0
- data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/include/zlib.h +1768 -0
- data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/lib/libz.a +0 -0
- data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/lib/pkgconfig/zlib.pc +13 -0
- data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/share/man/man3/zlib.3 +151 -0
- data/ports/zlib-1.2.8-x86_64-apple-darwin16.1.0.installed +0 -0
- metadata +219 -0
@@ -0,0 +1,390 @@
|
|
1
|
+
/*
|
2
|
+
* jmorecfg.h
|
3
|
+
*
|
4
|
+
* This file was part of the Independent JPEG Group's software:
|
5
|
+
* Copyright (C) 1991-1997, Thomas G. Lane.
|
6
|
+
* libjpeg-turbo Modifications:
|
7
|
+
* Copyright (C) 2009, 2011, 2014, D. R. Commander.
|
8
|
+
* For conditions of distribution and use, see the accompanying README file.
|
9
|
+
*
|
10
|
+
* This file contains additional configuration options that customize the
|
11
|
+
* JPEG software for special applications or support machine-dependent
|
12
|
+
* optimizations. Most users will not need to touch this file.
|
13
|
+
*/
|
14
|
+
|
15
|
+
|
16
|
+
/*
|
17
|
+
* Maximum number of components (color channels) allowed in JPEG image.
|
18
|
+
* To meet the letter of the JPEG spec, set this to 255. However, darn
|
19
|
+
* few applications need more than 4 channels (maybe 5 for CMYK + alpha
|
20
|
+
* mask). We recommend 10 as a reasonable compromise; use 4 if you are
|
21
|
+
* really short on memory. (Each allowed component costs a hundred or so
|
22
|
+
* bytes of storage, whether actually used in an image or not.)
|
23
|
+
*/
|
24
|
+
|
25
|
+
#define MAX_COMPONENTS 10 /* maximum number of image components */
|
26
|
+
|
27
|
+
|
28
|
+
/*
|
29
|
+
* Basic data types.
|
30
|
+
* You may need to change these if you have a machine with unusual data
|
31
|
+
* type sizes; for example, "char" not 8 bits, "short" not 16 bits,
|
32
|
+
* or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits,
|
33
|
+
* but it had better be at least 16.
|
34
|
+
*/
|
35
|
+
|
36
|
+
/* Representation of a single sample (pixel element value).
|
37
|
+
* We frequently allocate large arrays of these, so it's important to keep
|
38
|
+
* them small. But if you have memory to burn and access to char or short
|
39
|
+
* arrays is very slow on your hardware, you might want to change these.
|
40
|
+
*/
|
41
|
+
|
42
|
+
#if BITS_IN_JSAMPLE == 8
|
43
|
+
/* JSAMPLE should be the smallest type that will hold the values 0..255.
|
44
|
+
* You can use a signed char by having GETJSAMPLE mask it with 0xFF.
|
45
|
+
*/
|
46
|
+
|
47
|
+
#ifdef HAVE_UNSIGNED_CHAR
|
48
|
+
|
49
|
+
typedef unsigned char JSAMPLE;
|
50
|
+
#define GETJSAMPLE(value) ((int) (value))
|
51
|
+
|
52
|
+
#else /* not HAVE_UNSIGNED_CHAR */
|
53
|
+
|
54
|
+
typedef char JSAMPLE;
|
55
|
+
#ifdef __CHAR_UNSIGNED__
|
56
|
+
#define GETJSAMPLE(value) ((int) (value))
|
57
|
+
#else
|
58
|
+
#define GETJSAMPLE(value) ((int) (value) & 0xFF)
|
59
|
+
#endif /* __CHAR_UNSIGNED__ */
|
60
|
+
|
61
|
+
#endif /* HAVE_UNSIGNED_CHAR */
|
62
|
+
|
63
|
+
#define MAXJSAMPLE 255
|
64
|
+
#define CENTERJSAMPLE 128
|
65
|
+
|
66
|
+
#endif /* BITS_IN_JSAMPLE == 8 */
|
67
|
+
|
68
|
+
|
69
|
+
#if BITS_IN_JSAMPLE == 12
|
70
|
+
/* JSAMPLE should be the smallest type that will hold the values 0..4095.
|
71
|
+
* On nearly all machines "short" will do nicely.
|
72
|
+
*/
|
73
|
+
|
74
|
+
typedef short JSAMPLE;
|
75
|
+
#define GETJSAMPLE(value) ((int) (value))
|
76
|
+
|
77
|
+
#define MAXJSAMPLE 4095
|
78
|
+
#define CENTERJSAMPLE 2048
|
79
|
+
|
80
|
+
#endif /* BITS_IN_JSAMPLE == 12 */
|
81
|
+
|
82
|
+
|
83
|
+
/* Representation of a DCT frequency coefficient.
|
84
|
+
* This should be a signed value of at least 16 bits; "short" is usually OK.
|
85
|
+
* Again, we allocate large arrays of these, but you can change to int
|
86
|
+
* if you have memory to burn and "short" is really slow.
|
87
|
+
*/
|
88
|
+
|
89
|
+
typedef short JCOEF;
|
90
|
+
|
91
|
+
|
92
|
+
/* Compressed datastreams are represented as arrays of JOCTET.
|
93
|
+
* These must be EXACTLY 8 bits wide, at least once they are written to
|
94
|
+
* external storage. Note that when using the stdio data source/destination
|
95
|
+
* managers, this is also the data type passed to fread/fwrite.
|
96
|
+
*/
|
97
|
+
|
98
|
+
#ifdef HAVE_UNSIGNED_CHAR
|
99
|
+
|
100
|
+
typedef unsigned char JOCTET;
|
101
|
+
#define GETJOCTET(value) (value)
|
102
|
+
|
103
|
+
#else /* not HAVE_UNSIGNED_CHAR */
|
104
|
+
|
105
|
+
typedef char JOCTET;
|
106
|
+
#ifdef __CHAR_UNSIGNED__
|
107
|
+
#define GETJOCTET(value) (value)
|
108
|
+
#else
|
109
|
+
#define GETJOCTET(value) ((value) & 0xFF)
|
110
|
+
#endif /* __CHAR_UNSIGNED__ */
|
111
|
+
|
112
|
+
#endif /* HAVE_UNSIGNED_CHAR */
|
113
|
+
|
114
|
+
|
115
|
+
/* These typedefs are used for various table entries and so forth.
|
116
|
+
* They must be at least as wide as specified; but making them too big
|
117
|
+
* won't cost a huge amount of memory, so we don't provide special
|
118
|
+
* extraction code like we did for JSAMPLE. (In other words, these
|
119
|
+
* typedefs live at a different point on the speed/space tradeoff curve.)
|
120
|
+
*/
|
121
|
+
|
122
|
+
/* UINT8 must hold at least the values 0..255. */
|
123
|
+
|
124
|
+
#ifdef HAVE_UNSIGNED_CHAR
|
125
|
+
typedef unsigned char UINT8;
|
126
|
+
#else /* not HAVE_UNSIGNED_CHAR */
|
127
|
+
#ifdef __CHAR_UNSIGNED__
|
128
|
+
typedef char UINT8;
|
129
|
+
#else /* not __CHAR_UNSIGNED__ */
|
130
|
+
typedef short UINT8;
|
131
|
+
#endif /* __CHAR_UNSIGNED__ */
|
132
|
+
#endif /* HAVE_UNSIGNED_CHAR */
|
133
|
+
|
134
|
+
/* UINT16 must hold at least the values 0..65535. */
|
135
|
+
|
136
|
+
#ifdef HAVE_UNSIGNED_SHORT
|
137
|
+
typedef unsigned short UINT16;
|
138
|
+
#else /* not HAVE_UNSIGNED_SHORT */
|
139
|
+
typedef unsigned int UINT16;
|
140
|
+
#endif /* HAVE_UNSIGNED_SHORT */
|
141
|
+
|
142
|
+
/* INT16 must hold at least the values -32768..32767. */
|
143
|
+
|
144
|
+
#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */
|
145
|
+
typedef short INT16;
|
146
|
+
#endif
|
147
|
+
|
148
|
+
/* INT32 must hold at least signed 32-bit values. */
|
149
|
+
|
150
|
+
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
|
151
|
+
typedef long INT32;
|
152
|
+
#endif
|
153
|
+
|
154
|
+
/* Datatype used for image dimensions. The JPEG standard only supports
|
155
|
+
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
|
156
|
+
* "unsigned int" is sufficient on all machines. However, if you need to
|
157
|
+
* handle larger images and you don't mind deviating from the spec, you
|
158
|
+
* can change this datatype. (Note that changing this datatype will
|
159
|
+
* potentially require modifying the SIMD code. The x86-64 SIMD extensions,
|
160
|
+
* in particular, assume a 32-bit JDIMENSION.)
|
161
|
+
*/
|
162
|
+
|
163
|
+
typedef unsigned int JDIMENSION;
|
164
|
+
|
165
|
+
#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */
|
166
|
+
|
167
|
+
|
168
|
+
/* These macros are used in all function definitions and extern declarations.
|
169
|
+
* You could modify them if you need to change function linkage conventions;
|
170
|
+
* in particular, you'll need to do that to make the library a Windows DLL.
|
171
|
+
* Another application is to make all functions global for use with debuggers
|
172
|
+
* or code profilers that require it.
|
173
|
+
*/
|
174
|
+
|
175
|
+
/* a function called through method pointers: */
|
176
|
+
#define METHODDEF(type) static type
|
177
|
+
/* a function used only in its module: */
|
178
|
+
#define LOCAL(type) static type
|
179
|
+
/* a function referenced thru EXTERNs: */
|
180
|
+
#define GLOBAL(type) type
|
181
|
+
/* a reference to a GLOBAL function: */
|
182
|
+
#define EXTERN(type) extern type
|
183
|
+
|
184
|
+
|
185
|
+
/* Originally, this macro was used as a way of defining function prototypes
|
186
|
+
* for both modern compilers as well as older compilers that did not support
|
187
|
+
* prototype parameters. libjpeg-turbo has never supported these older,
|
188
|
+
* non-ANSI compilers, but the macro is still included because there is some
|
189
|
+
* software out there that uses it.
|
190
|
+
*/
|
191
|
+
|
192
|
+
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
|
193
|
+
|
194
|
+
|
195
|
+
/* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS),
|
196
|
+
* but again, some software relies on this macro.
|
197
|
+
*/
|
198
|
+
|
199
|
+
#undef FAR
|
200
|
+
#define FAR
|
201
|
+
|
202
|
+
|
203
|
+
/*
|
204
|
+
* On a few systems, type boolean and/or its values FALSE, TRUE may appear
|
205
|
+
* in standard header files. Or you may have conflicts with application-
|
206
|
+
* specific header files that you want to include together with these files.
|
207
|
+
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
|
208
|
+
*/
|
209
|
+
|
210
|
+
#ifndef HAVE_BOOLEAN
|
211
|
+
typedef int boolean;
|
212
|
+
#endif
|
213
|
+
#ifndef FALSE /* in case these macros already exist */
|
214
|
+
#define FALSE 0 /* values of boolean */
|
215
|
+
#endif
|
216
|
+
#ifndef TRUE
|
217
|
+
#define TRUE 1
|
218
|
+
#endif
|
219
|
+
|
220
|
+
|
221
|
+
/*
|
222
|
+
* The remaining options affect code selection within the JPEG library,
|
223
|
+
* but they don't need to be visible to most applications using the library.
|
224
|
+
* To minimize application namespace pollution, the symbols won't be
|
225
|
+
* defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
|
226
|
+
*/
|
227
|
+
|
228
|
+
#ifdef JPEG_INTERNALS
|
229
|
+
#define JPEG_INTERNAL_OPTIONS
|
230
|
+
#endif
|
231
|
+
|
232
|
+
#ifdef JPEG_INTERNAL_OPTIONS
|
233
|
+
|
234
|
+
|
235
|
+
/*
|
236
|
+
* These defines indicate whether to include various optional functions.
|
237
|
+
* Undefining some of these symbols will produce a smaller but less capable
|
238
|
+
* library. Note that you can leave certain source files out of the
|
239
|
+
* compilation/linking process if you've #undef'd the corresponding symbols.
|
240
|
+
* (You may HAVE to do that if your compiler doesn't like null source files.)
|
241
|
+
*/
|
242
|
+
|
243
|
+
/* Capability options common to encoder and decoder: */
|
244
|
+
|
245
|
+
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
|
246
|
+
#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
|
247
|
+
#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
|
248
|
+
|
249
|
+
/* Encoder capability options: */
|
250
|
+
|
251
|
+
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
252
|
+
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
253
|
+
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
|
254
|
+
/* Note: if you selected 12-bit data precision, it is dangerous to turn off
|
255
|
+
* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit
|
256
|
+
* precision, so jchuff.c normally uses entropy optimization to compute
|
257
|
+
* usable tables for higher precision. If you don't want to do optimization,
|
258
|
+
* you'll have to supply different default Huffman tables.
|
259
|
+
* The exact same statements apply for progressive JPEG: the default tables
|
260
|
+
* don't work for progressive mode. (This may get fixed, however.)
|
261
|
+
*/
|
262
|
+
#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
|
263
|
+
|
264
|
+
/* Decoder capability options: */
|
265
|
+
|
266
|
+
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
267
|
+
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
268
|
+
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
|
269
|
+
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
|
270
|
+
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
|
271
|
+
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
|
272
|
+
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
|
273
|
+
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
|
274
|
+
#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
|
275
|
+
|
276
|
+
/* more capability options later, no doubt */
|
277
|
+
|
278
|
+
|
279
|
+
/*
|
280
|
+
* The RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros are a vestigial
|
281
|
+
* feature of libjpeg. The idea was that, if an application developer needed
|
282
|
+
* to compress from/decompress to a BGR/BGRX/RGBX/XBGR/XRGB buffer, they could
|
283
|
+
* change these macros, rebuild libjpeg, and link their application statically
|
284
|
+
* with it. In reality, few people ever did this, because there were some
|
285
|
+
* severe restrictions involved (cjpeg and djpeg no longer worked properly,
|
286
|
+
* compressing/decompressing RGB JPEGs no longer worked properly, and the color
|
287
|
+
* quantizer wouldn't work with pixel sizes other than 3.) Further, since all
|
288
|
+
* of the O/S-supplied versions of libjpeg were built with the default values
|
289
|
+
* of RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE, many applications have
|
290
|
+
* come to regard these values as immutable.
|
291
|
+
*
|
292
|
+
* The libjpeg-turbo colorspace extensions provide a much cleaner way of
|
293
|
+
* compressing from/decompressing to buffers with arbitrary component orders
|
294
|
+
* and pixel sizes. Thus, we do not support changing the values of RGB_RED,
|
295
|
+
* RGB_GREEN, RGB_BLUE, or RGB_PIXELSIZE. In addition to the restrictions
|
296
|
+
* listed above, changing these values will also break the SIMD extensions and
|
297
|
+
* the regression tests.
|
298
|
+
*/
|
299
|
+
|
300
|
+
#define RGB_RED 0 /* Offset of Red in an RGB scanline element */
|
301
|
+
#define RGB_GREEN 1 /* Offset of Green */
|
302
|
+
#define RGB_BLUE 2 /* Offset of Blue */
|
303
|
+
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
|
304
|
+
|
305
|
+
#define JPEG_NUMCS 17
|
306
|
+
|
307
|
+
#define EXT_RGB_RED 0
|
308
|
+
#define EXT_RGB_GREEN 1
|
309
|
+
#define EXT_RGB_BLUE 2
|
310
|
+
#define EXT_RGB_PIXELSIZE 3
|
311
|
+
|
312
|
+
#define EXT_RGBX_RED 0
|
313
|
+
#define EXT_RGBX_GREEN 1
|
314
|
+
#define EXT_RGBX_BLUE 2
|
315
|
+
#define EXT_RGBX_PIXELSIZE 4
|
316
|
+
|
317
|
+
#define EXT_BGR_RED 2
|
318
|
+
#define EXT_BGR_GREEN 1
|
319
|
+
#define EXT_BGR_BLUE 0
|
320
|
+
#define EXT_BGR_PIXELSIZE 3
|
321
|
+
|
322
|
+
#define EXT_BGRX_RED 2
|
323
|
+
#define EXT_BGRX_GREEN 1
|
324
|
+
#define EXT_BGRX_BLUE 0
|
325
|
+
#define EXT_BGRX_PIXELSIZE 4
|
326
|
+
|
327
|
+
#define EXT_XBGR_RED 3
|
328
|
+
#define EXT_XBGR_GREEN 2
|
329
|
+
#define EXT_XBGR_BLUE 1
|
330
|
+
#define EXT_XBGR_PIXELSIZE 4
|
331
|
+
|
332
|
+
#define EXT_XRGB_RED 1
|
333
|
+
#define EXT_XRGB_GREEN 2
|
334
|
+
#define EXT_XRGB_BLUE 3
|
335
|
+
#define EXT_XRGB_PIXELSIZE 4
|
336
|
+
|
337
|
+
static const int rgb_red[JPEG_NUMCS] = {
|
338
|
+
-1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED,
|
339
|
+
EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED,
|
340
|
+
EXT_RGBX_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED,
|
341
|
+
-1
|
342
|
+
};
|
343
|
+
|
344
|
+
static const int rgb_green[JPEG_NUMCS] = {
|
345
|
+
-1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN,
|
346
|
+
EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN,
|
347
|
+
EXT_RGBX_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN,
|
348
|
+
-1
|
349
|
+
};
|
350
|
+
|
351
|
+
static const int rgb_blue[JPEG_NUMCS] = {
|
352
|
+
-1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE,
|
353
|
+
EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE,
|
354
|
+
EXT_RGBX_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE,
|
355
|
+
-1
|
356
|
+
};
|
357
|
+
|
358
|
+
static const int rgb_pixelsize[JPEG_NUMCS] = {
|
359
|
+
-1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE,
|
360
|
+
EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE,
|
361
|
+
EXT_RGBX_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE,
|
362
|
+
-1
|
363
|
+
};
|
364
|
+
|
365
|
+
/* Definitions for speed-related optimizations. */
|
366
|
+
|
367
|
+
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
|
368
|
+
* two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER
|
369
|
+
* as short on such a machine. MULTIPLIER must be at least 16 bits wide.
|
370
|
+
*/
|
371
|
+
|
372
|
+
#ifndef MULTIPLIER
|
373
|
+
#ifndef WITH_SIMD
|
374
|
+
#define MULTIPLIER int /* type for fastest integer multiply */
|
375
|
+
#else
|
376
|
+
#define MULTIPLIER short /* prefer 16-bit with SIMD for parellelism */
|
377
|
+
#endif
|
378
|
+
#endif
|
379
|
+
|
380
|
+
|
381
|
+
/* FAST_FLOAT should be either float or double, whichever is done faster
|
382
|
+
* by your compiler. (Note that this type is only used in the floating point
|
383
|
+
* DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
|
384
|
+
*/
|
385
|
+
|
386
|
+
#ifndef FAST_FLOAT
|
387
|
+
#define FAST_FLOAT float
|
388
|
+
#endif
|
389
|
+
|
390
|
+
#endif /* JPEG_INTERNAL_OPTIONS */
|