]>
Commit | Line | Data |
---|---|---|
dd2bac0f JB |
1 | --- jpeg-9d/jcomapi.c.orig 2019-01-23 21:18:26.000000000 +0100 |
2 | +++ jpeg-9d/jcomapi.c 2020-08-22 18:12:39.274326726 +0200 | |
3 | @@ -109,7 +109,6 @@ | |
8ce4543c | 4 | |
dd2bac0f JB |
5 | /* |
6 | * Set up the standard Huffman tables (cf. JPEG standard section K.3). | |
7 | - * IMPORTANT: these are only valid for 8-bit data precision! | |
8 | * (Would jutils.c be a more reasonable place to put this?) | |
9 | */ | |
10 | ||
11 | @@ -120,6 +119,9 @@ | |
12 | const UINT8 *bits, *val; | |
13 | int nsymbols, len; | |
8ce4543c JB |
14 | |
15 | +#if BITS_IN_JSAMPLE == 8 | |
dd2bac0f | 16 | +/* IMPORTANT: these are only valid for 8-bit data precision! */ |
8ce4543c | 17 | + |
dd2bac0f JB |
18 | static const UINT8 bits_dc_luminance[17] = |
19 | { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; | |
20 | static const UINT8 val_dc_luminance[] = | |
21 | @@ -179,6 +181,95 @@ | |
22 | 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, | |
23 | 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, | |
24 | 0xf9, 0xfa }; | |
25 | +#elif BITS_IN_JSAMPLE == 12 | |
8ce4543c JB |
26 | +/* |
27 | + * Note: these are not really "standard" since the specification includes | |
28 | + * no 12bit tables. But they should work with any image, and at least | |
29 | + * moderately adequate as default tables. | |
30 | + * https://sourceforge.net/tracker/?func=detail&aid=2809979&group_id=159521&atid=812162 | |
31 | + */ | |
8ce4543c | 32 | + static const UINT8 bits_dc_luminance[17] = |
dd2bac0f | 33 | + { /* 0-base */ 0, 0, 2, 3, 1, 0, 3, 1, 0, 3, 1, 1, 1, 0, 0, 0 }; |
8ce4543c | 34 | + static const UINT8 val_dc_luminance[] = |
dd2bac0f | 35 | + { 11, 12, 9, 10, 13, 8, 6, 7, 14, 5, 0, 3, 4, 1, 15, 2 }; |
8ce4543c JB |
36 | + |
37 | + static const UINT8 bits_dc_chrominance[17] = | |
dd2bac0f | 38 | + { /* 0-base */ 0, 0, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }; |
8ce4543c | 39 | + static const UINT8 val_dc_chrominance[] = |
dd2bac0f | 40 | + { 9, 10, 8, 11, 7, 12, 5, 6, 13, 14, 4, 3, 2, 1, 0, 15 }; |
8ce4543c JB |
41 | + |
42 | + static const UINT8 bits_ac_luminance[17] = | |
dd2bac0f | 43 | + { /* 0-base */ 0, 0, 1, 4, 2, 2, 2, 1, 4, 1, 2, 0, 1, 0, 1, 0, 235 }; |
8ce4543c | 44 | + static const UINT8 val_ac_luminance[] = |
dd2bac0f JB |
45 | + { 0x02, 0x01, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
46 | + 0x12, 0x09, 0x11, 0x13, 0x00, 0x14, 0x21, 0x22, | |
47 | + 0x15, 0x0a, 0x23, 0x31, 0x16, 0x32, 0x17, 0x24, | |
48 | + 0x33, 0x41, 0x18, 0x25, 0x42, 0x51, 0x0b, 0x26, | |
49 | + 0x19, 0x43, 0x52, 0x61, 0x35, 0x62, 0x71, 0x0c, | |
50 | + 0x0d, 0x0e, 0x0f, 0x10, 0x1a, 0x1b, 0x1c, 0x1d, | |
51 | + 0x1e, 0x1f, 0x20, 0x27, 0x28, 0x29, 0x2a, 0x2b, | |
52 | + 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x34, 0x36, 0x37, | |
53 | + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, | |
54 | + 0x40, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, | |
55 | + 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x53, 0x54, | |
56 | + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, | |
57 | + 0x5d, 0x5e, 0x5f, 0x60, 0x63, 0x64, 0x65, 0x66, | |
58 | + 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, | |
59 | + 0x6f, 0x70, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, | |
60 | + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, | |
61 | + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, | |
62 | + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, | |
63 | + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, | |
64 | + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, | |
65 | + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, | |
66 | + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, | |
67 | + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, | |
68 | + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, | |
69 | + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, | |
70 | + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, | |
71 | + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, | |
72 | + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, | |
73 | + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, | |
74 | + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, | |
75 | + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, | |
76 | + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }; | |
8ce4543c JB |
77 | + |
78 | + static const UINT8 bits_ac_chrominance[17] = | |
dd2bac0f JB |
79 | + { /* 0-base */ 0, 0, 1, 3, 2, 5, 1, 5, 5, 3, 7, 4, 4, 3, 4, 6, 203 }; |
80 | + static const UINT8 val_ac_chrominance[] = | |
81 | + { 0x01, 0x02, 0x03, 0x11, 0x04, 0x21, 0x00, 0x05, | |
82 | + 0x06,0x12,0x31,0x41,0x07,0x13,0x22,0x51, | |
83 | + 0x61,0x08,0x14,0x32,0x71,0x81,0x42,0x91, | |
84 | + 0xa1,0x09,0x15,0x23,0x52,0xb1,0xc1,0xf0, | |
85 | + 0x16,0x62,0xd1,0xe1,0x0a,0x24,0x72,0xf1, | |
86 | + 0x17,0x82,0x92,0x33,0x43,0x53,0xb2,0x0b, | |
87 | + 0x0c,0x18,0x35,0xa2,0xc2,0x0d,0x0e,0x0f, | |
88 | + 0x10,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f, | |
89 | + 0x20,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b, | |
90 | + 0x2c,0x2d,0x2e,0x2f,0x30,0x34,0x36,0x37, | |
91 | + 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f, | |
92 | + 0x40,0x44,0x45,0x46,0x47,0x48,0x49,0x4a, | |
93 | + 0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x54,0x55, | |
94 | + 0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d, | |
95 | + 0x5e,0x5f,0x60,0x63,0x64,0x65,0x66,0x67, | |
96 | + 0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f, | |
97 | + 0x70,0x73,0x74,0x75,0x76,0x77,0x78,0x79, | |
98 | + 0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,0x80,0x83, | |
99 | + 0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b, | |
100 | + 0x8c,0x8d,0x8e,0x8f,0x90,0x93,0x94,0x95, | |
101 | + 0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d, | |
102 | + 0x9e,0x9f,0xa0,0xa3,0xa4,0xa5,0xa6,0xa7, | |
103 | + 0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf, | |
104 | + 0xb0,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9, | |
105 | + 0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc3, | |
106 | + 0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb, | |
107 | + 0xcc,0xcd,0xce,0xcf,0xd0,0xd2,0xd3,0xd4, | |
108 | + 0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc, | |
109 | + 0xdd,0xde,0xdf,0xe0,0xe2,0xe3,0xe4,0xe5, | |
110 | + 0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed, | |
111 | + 0xee,0xef,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7, | |
112 | + 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff }; | |
113 | +#endif | |
8ce4543c | 114 | |
dd2bac0f JB |
115 | if (cinfo->is_decompressor) { |
116 | if (isDC) | |
8ce4543c JB |
117 | --- jpeg-8d.orig/jdct.h 2004-03-06 20:18:30.000000000 +0100 |
118 | +++ jpeg-8d/jdct.h 2012-01-30 18:50:43.737392477 +0100 | |
119 | @@ -160,6 +160,77 @@ | |
120 | #define jpeg_idct_1x2 jRD1x2 | |
121 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ | |
122 | ||
123 | +#ifdef NEED_12_BIT_NAMES | |
124 | +#define jpeg_fdct_islow jpeg_fdct_islow_12 | |
125 | +#define jpeg_fdct_ifast jpeg_fdct_ifast_12 | |
126 | +#define jpeg_fdct_float jpeg_fdct_float_12 | |
127 | +#define jpeg_fdct_7x7 jpeg_fdct_7x7_12 | |
128 | +#define jpeg_fdct_6x6 jpeg_fdct_6x6_12 | |
129 | +#define jpeg_fdct_5x5 jpeg_fdct_5x5_12 | |
130 | +#define jpeg_fdct_4x4 jpeg_fdct_4x4_12 | |
131 | +#define jpeg_fdct_3x3 jpeg_fdct_3x3_12 | |
132 | +#define jpeg_fdct_2x2 jpeg_fdct_2x2_12 | |
133 | +#define jpeg_fdct_1x1 jpeg_fdct_1x1_12 | |
134 | +#define jpeg_fdct_9x9 jpeg_fdct_9x9_12 | |
135 | +#define jpeg_fdct_10x10 jpeg_fdct_10x10_12 | |
136 | +#define jpeg_fdct_11x11 jpeg_fdct_11x11_12 | |
137 | +#define jpeg_fdct_12x12 jpeg_fdct_12x12_12 | |
138 | +#define jpeg_fdct_13x13 jpeg_fdct_13x13_12 | |
139 | +#define jpeg_fdct_14x14 jpeg_fdct_14x14_12 | |
140 | +#define jpeg_fdct_15x15 jpeg_fdct_15x15_12 | |
141 | +#define jpeg_fdct_16x16 jpeg_fdct_16x16_12 | |
142 | +#define jpeg_fdct_16x8 jpeg_fdct_16x8_12 | |
143 | +#define jpeg_fdct_14x7 jpeg_fdct_14x7_12 | |
144 | +#define jpeg_fdct_12x6 jpeg_fdct_12x6_12 | |
145 | +#define jpeg_fdct_10x5 jpeg_fdct_10x5_12 | |
146 | +#define jpeg_fdct_8x4 jpeg_fdct_8x4_12 | |
147 | +#define jpeg_fdct_6x3 jpeg_fdct_6x3_12 | |
148 | +#define jpeg_fdct_4x2 jpeg_fdct_4x2_12 | |
149 | +#define jpeg_fdct_2x1 jpeg_fdct_2x1_12 | |
150 | +#define jpeg_fdct_8x16 jpeg_fdct_8x16_12 | |
151 | +#define jpeg_fdct_7x14 jpeg_fdct_7x14_12 | |
152 | +#define jpeg_fdct_6x12 jpeg_fdct_6x12_12 | |
153 | +#define jpeg_fdct_5x10 jpeg_fdct_5x10_12 | |
154 | +#define jpeg_fdct_4x8 jpeg_fdct_4x8_12 | |
155 | +#define jpeg_fdct_3x6 jpeg_fdct_3x6_12 | |
156 | +#define jpeg_fdct_2x4 jpeg_fdct_2x4_12 | |
157 | +#define jpeg_fdct_1x2 jpeg_fdct_1x2_12 | |
158 | +#define jpeg_idct_islow jpeg_idct_islow_12 | |
159 | +#define jpeg_idct_ifast jpeg_idct_ifast_12 | |
160 | +#define jpeg_idct_float jpeg_idct_float_12 | |
161 | +#define jpeg_idct_7x7 jpeg_idct_7x7_12 | |
162 | +#define jpeg_idct_6x6 jpeg_idct_6x6_12 | |
163 | +#define jpeg_idct_5x5 jpeg_idct_5x5_12 | |
164 | +#define jpeg_idct_4x4 jpeg_idct_4x4_12 | |
165 | +#define jpeg_idct_3x3 jpeg_idct_3x3_12 | |
166 | +#define jpeg_idct_2x2 jpeg_idct_2x2_12 | |
167 | +#define jpeg_idct_1x1 jpeg_idct_1x1_12 | |
168 | +#define jpeg_idct_9x9 jpeg_idct_9x9_12 | |
169 | +#define jpeg_idct_10x10 jpeg_idct_10x10_12 | |
170 | +#define jpeg_idct_11x11 jpeg_idct_11x11_12 | |
171 | +#define jpeg_idct_12x12 jpeg_idct_12x12_12 | |
172 | +#define jpeg_idct_13x13 jpeg_idct_13x13_12 | |
173 | +#define jpeg_idct_14x14 jpeg_idct_14x14_12 | |
174 | +#define jpeg_idct_15x15 jpeg_idct_15x15_12 | |
175 | +#define jpeg_idct_16x16 jpeg_idct_16x16_12 | |
176 | +#define jpeg_idct_16x8 jpeg_idct_16x8_12 | |
177 | +#define jpeg_idct_14x7 jpeg_idct_14x7_12 | |
178 | +#define jpeg_idct_12x6 jpeg_idct_12x6_12 | |
179 | +#define jpeg_idct_10x5 jpeg_idct_10x5_12 | |
180 | +#define jpeg_idct_8x4 jpeg_idct_8x4_12 | |
181 | +#define jpeg_idct_6x3 jpeg_idct_6x3_12 | |
182 | +#define jpeg_idct_4x2 jpeg_idct_4x2_12 | |
183 | +#define jpeg_idct_2x1 jpeg_idct_2x1_12 | |
184 | +#define jpeg_idct_8x16 jpeg_idct_8x16_12 | |
185 | +#define jpeg_idct_7x14 jpeg_idct_7x14_12 | |
186 | +#define jpeg_idct_6x12 jpeg_idct_6x12_12 | |
187 | +#define jpeg_idct_5x10 jpeg_idct_5x10_12 | |
188 | +#define jpeg_idct_4x8 jpeg_idct_4x8_12 | |
189 | +#define jpeg_idct_3x6 jpeg_idct_3x6_12 | |
190 | +#define jpeg_idct_2x4 jpeg_idct_2x4_12 | |
191 | +#define jpeg_idct_1x2 jpeg_idct_1x2_12 | |
192 | +#endif /* NEED_12_BIT_NAMES */ | |
193 | + | |
194 | /* Extern declarations for the forward and inverse DCT routines. */ | |
195 | ||
196 | EXTERN(void) jpeg_fdct_islow | |
197 | --- jpeg-8d.orig/jerror.c 1998-02-21 20:03:16.000000000 +0100 | |
198 | +++ jpeg-8d/jerror.c 2012-01-30 19:01:55.664081643 +0100 | |
199 | @@ -45,6 +45,10 @@ | |
200 | #define jpeg_std_message_table jMsgTable | |
201 | #endif | |
202 | ||
203 | +#ifdef NEED_12_BIT_NAMES | |
204 | +#define jpeg_std_message_table jpeg_std_message_table_12 | |
205 | +#endif | |
206 | + | |
207 | #define JMESSAGE(code,string) string , | |
208 | ||
209 | const char * const jpeg_std_message_table[] = { | |
210 | --- jpeg-8d.orig/jmemsys.h 1997-08-03 20:58:36.000000000 +0200 | |
211 | +++ jpeg-8d/jmemsys.h 2012-01-30 19:16:32.444111001 +0100 | |
212 | @@ -32,6 +32,17 @@ | |
213 | #define jpeg_mem_term jMemTerm | |
214 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ | |
215 | ||
216 | +#ifdef NEED_12_BIT_NAMES | |
217 | +#define jpeg_get_small jpeg_get_small_12 | |
218 | +#define jpeg_free_small jpeg_free_small_12 | |
219 | +#define jpeg_get_large jpeg_get_large_12 | |
220 | +#define jpeg_free_large jpeg_free_large_12 | |
221 | +#define jpeg_mem_available jpeg_mem_available_12 | |
222 | +#define jpeg_open_backing_store jpeg_open_backing_store_12 | |
223 | +#define jpeg_mem_init jpeg_mem_init_12 | |
224 | +#define jpeg_mem_term jpeg_mem_term_12 | |
225 | +#endif /* NEED_12_BIT_NAMES */ | |
226 | + | |
227 | ||
228 | /* | |
229 | * These two functions are used to allocate and release small chunks of | |
16b64150 JB |
230 | --- jpeg-9a/jmorecfg.h.orig 2014-01-26 17:31:32.791654317 +0100 |
231 | +++ jpeg-9a/jmorecfg.h 2014-01-26 17:32:43.334984688 +0100 | |
232 | @@ -30,7 +30,8 @@ | |
233 | * in all cases (see below). | |
8ce4543c JB |
234 | */ |
235 | ||
16b64150 JB |
236 | -#define BITS_IN_JSAMPLE 8 /* use 8, 9, 10, 11, or 12 */ |
237 | +#define BITS_IN_JSAMPLE 12 /* use 8, 9, 10, 11, or 12 */ | |
8ce4543c JB |
238 | +#define NEED_12_BIT_NAMES |
239 | ||
240 | ||
241 | /* | |
242 | --- jpeg-8d.orig/jpegint.h 2011-10-13 10:53:56.000000000 +0200 | |
243 | +++ jpeg-8d/jpegint.h 2012-01-30 19:17:54.740780423 +0100 | |
244 | @@ -335,6 +335,49 @@ | |
245 | #define jpeg_aritab jAriTab | |
246 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ | |
247 | ||
248 | +#ifdef NEED_12_BIT_NAMES | |
249 | +#define jinit_compress_master jinit_compress_master_12 | |
250 | +#define jinit_c_master_control jinit_c_master_control_12 | |
251 | +#define jinit_c_main_controller jinit_c_main_controller_12 | |
252 | +#define jinit_c_prep_controller jinit_c_prep_controller_12 | |
253 | +#define jinit_c_coef_controller jinit_c_coef_controller_12 | |
254 | +#define jinit_color_converter jinit_color_converter_12 | |
255 | +#define jinit_downsampler jinit_downsampler_12 | |
256 | +#define jinit_forward_dct jinit_forward_dct_12 | |
257 | +#define jinit_huff_encoder jinit_huff_encoder_12 | |
258 | +#define jinit_arith_encoder jinit_arith_encoder_12 | |
259 | +#define jinit_marker_writer jinit_marker_writer_12 | |
260 | +#define jinit_master_decompress jinit_master_decompress_12 | |
261 | +#define jinit_d_main_controller jinit_d_main_controller_12 | |
262 | +#define jinit_d_coef_controller jinit_d_coef_controller_12 | |
263 | +#define jinit_d_post_controller jinit_d_post_controller_12 | |
264 | +#define jinit_input_controller jinit_input_controller_12 | |
265 | +#define jinit_marker_reader jinit_marker_reader_12 | |
266 | +#define jinit_huff_decoder jinit_huff_decoder_12 | |
267 | +#define jinit_arith_decoder jinit_arith_decoder_12 | |
268 | +#define jinit_inverse_dct jinit_inverse_dct_12 | |
269 | +#define jinit_upsampler jinit_upsampler_12 | |
270 | +#define jinit_color_deconverter jinit_color_deconverter_12 | |
271 | +#define jinit_1pass_quantizer jinit_1pass_quantizer_12 | |
272 | +#define jinit_2pass_quantizer jinit_2pass_quantizer_12 | |
273 | +#define jinit_merged_upsampler jinit_merged_upsampler_12 | |
274 | +#define jinit_memory_mgr jinit_memory_mgr_12 | |
275 | +#define jdiv_round_up jdiv_round_up_12 | |
276 | +#define jround_up jround_up_12 | |
277 | +#define jzero_far jzero_far_12 | |
278 | +#define jcopy_sample_rows jcopy_sample_rows_12 | |
279 | +#define jcopy_block_row jcopy_block_row_12 | |
280 | +#define jpeg_zigzag_order jpeg_zigzag_order_12 | |
281 | +#define jpeg_natural_order jpeg_natural_order_12 | |
282 | +#define jpeg_natural_order7 jpeg_natural_order7_12 | |
283 | +#define jpeg_natural_order6 jpeg_natural_order6_12 | |
284 | +#define jpeg_natural_order5 jpeg_natural_order5_12 | |
285 | +#define jpeg_natural_order4 jpeg_natural_order4_12 | |
286 | +#define jpeg_natural_order3 jpeg_natural_order3_12 | |
287 | +#define jpeg_natural_order2 jpeg_natural_order2_12 | |
288 | +#define jpeg_aritab jpeg_aritab_12 | |
289 | +#endif /* NEED_12_BIT_NAMES */ | |
290 | + | |
291 | ||
292 | /* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays | |
293 | * and coefficient-block arrays. This won't work on 80x86 because the arrays | |
294 | --- jpeg-8d.orig/jpeglib.h 2011-08-27 18:15:42.000000000 +0200 | |
295 | +++ jpeg-8d/jpeglib.h 2012-01-30 19:19:05.244116117 +0100 | |
296 | @@ -923,6 +923,65 @@ | |
297 | #define jpeg_resync_to_restart jResyncRestart | |
298 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ | |
299 | ||
300 | +/* Sometimes it is desirable to build with special external names for 12bit, so that 8bit and 12bit | |
301 | + jpeg DLLs can be used in the same applications. */ | |
302 | + | |
303 | +#ifdef NEED_12_BIT_NAMES | |
304 | +#define jpeg_std_error jpeg_std_error_12 | |
305 | +#define jpeg_CreateCompress jpeg_CreateCompress_12 | |
306 | +#define jpeg_CreateDecompress jpeg_CreateDecompress_12 | |
307 | +#define jpeg_destroy_compress jpeg_destroy_compress_12 | |
308 | +#define jpeg_destroy_decompress jpeg_destroy_decompress_12 | |
309 | +#define jpeg_stdio_dest jpeg_stdio_dest_12 | |
310 | +#define jpeg_stdio_src jpeg_stdio_src_12 | |
311 | +#define jpeg_mem_dest jpeg_mem_dest_12 | |
312 | +#define jpeg_mem_src jpeg_mem_src_12 | |
313 | +#define jpeg_set_defaults jpeg_set_defaults_12 | |
314 | +#define jpeg_set_colorspace jpeg_set_colorspace_12 | |
315 | +#define jpeg_default_colorspace jpeg_default_colorspace_12 | |
316 | +#define jpeg_set_quality jpeg_set_quality_12 | |
317 | +#define jpeg_set_linear_quality jpeg_set_linear_quality_12 | |
318 | +#define jpeg_default_qtables jpeg_default_qtables_12 | |
319 | +#define jpeg_add_quant_table jpeg_add_quant_table_12 | |
320 | +#define jpeg_quality_scaling jpeg_quality_scaling_12 | |
321 | +#define jpeg_simple_progression jpeg_simple_progression_12 | |
322 | +#define jpeg_suppress_tables jpeg_suppress_tables_12 | |
323 | +#define jpeg_alloc_quant_table jpeg_alloc_quant_table_12 | |
324 | +#define jpeg_alloc_huff_table jpeg_alloc_huff_table_12 | |
325 | +#define jpeg_start_compress jpeg_start_compress_12 | |
326 | +#define jpeg_write_scanlines jpeg_write_scanlines_12 | |
327 | +#define jpeg_finish_compress jpeg_finish_compress_12 | |
328 | +#define jpeg_calc_jpeg_dimensions jpeg_calc_jpeg_dimensions_12 | |
329 | +#define jpeg_write_raw_data jpeg_write_raw_data_12 | |
330 | +#define jpeg_write_marker jpeg_write_marker_12 | |
331 | +#define jpeg_write_m_header jpeg_write_m_header_12 | |
332 | +#define jpeg_write_m_byte jpeg_write_m_byte_12 | |
333 | +#define jpeg_write_tables jpeg_write_tables_12 | |
334 | +#define jpeg_read_header jpeg_read_header_12 | |
335 | +#define jpeg_start_decompress jpeg_start_decompress_12 | |
336 | +#define jpeg_read_scanlines jpeg_read_scanlines_12 | |
337 | +#define jpeg_finish_decompress jpeg_finish_decompress_12 | |
338 | +#define jpeg_read_raw_data jpeg_read_raw_data_12 | |
339 | +#define jpeg_has_multiple_scans jpeg_has_multiple_scans_12 | |
340 | +#define jpeg_start_output jpeg_start_output_12 | |
341 | +#define jpeg_finish_output jpeg_finish_output_12 | |
342 | +#define jpeg_input_complete jpeg_input_complete_12 | |
343 | +#define jpeg_new_colormap jpeg_new_colormap_12 | |
344 | +#define jpeg_consume_input jpeg_consume_input_12 | |
345 | +#define jpeg_core_output_dimensions jpeg_core_output_dimensions_12 | |
346 | +#define jpeg_calc_output_dimensions jpeg_calc_output_dimensions_12 | |
347 | +#define jpeg_save_markers jpeg_save_markers_12 | |
348 | +#define jpeg_set_marker_processor jpeg_set_marker_processor_12 | |
349 | +#define jpeg_read_coefficients jpeg_read_coefficients_12 | |
350 | +#define jpeg_write_coefficients jpeg_write_coefficients_12 | |
351 | +#define jpeg_copy_critical_parameters jpeg_copy_critical_parameters_12 | |
352 | +#define jpeg_abort_compress jpeg_abort_compress_12 | |
353 | +#define jpeg_abort_decompress jpeg_abort_decompress_12 | |
354 | +#define jpeg_abort jpeg_abort_12 | |
355 | +#define jpeg_destroy jpeg_destroy_12 | |
356 | +#define jpeg_resync_to_restart jpeg_resync_to_restart_12 | |
357 | +#endif /* NEED_12_BIT_NAMES */ | |
358 | + | |
359 | ||
360 | /* Default error-management setup */ | |
361 | EXTERN(struct jpeg_error_mgr *) jpeg_std_error | |
362 | --- jpeg-8d.orig/Makefile.am 2010-05-02 17:39:46.000000000 +0200 | |
363 | +++ jpeg-8d/Makefile.am 2012-01-30 19:22:33.734123099 +0100 | |
364 | @@ -62,17 +62,17 @@ | |
365 | testimgp.jpg | |
366 | ||
367 | # libtool libraries to build | |
368 | -lib_LTLIBRARIES = libjpeg.la | |
369 | +lib_LTLIBRARIES = libjpeg12.la | |
370 | ||
371 | # Library sources for libjpeg.la | |
372 | -libjpeg_la_SOURCES = $(LIBSOURCES) | |
373 | +libjpeg12_la_SOURCES = $(LIBSOURCES) | |
374 | ||
375 | # LDFLAGS for libjpeg.la | |
376 | -libjpeg_la_LDFLAGS = -no-undefined \ | |
377 | +libjpeg12_la_LDFLAGS = -no-undefined \ | |
378 | -version-info $(JPEG_LIB_VERSION) | |
379 | ||
380 | if HAVE_LD_VERSION_SCRIPT | |
381 | - libjpeg_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libjpeg.map | |
382 | + libjpeg12_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libjpeg.map | |
383 | endif | |
384 | ||
385 | # Executables to build | |
386 | @@ -81,12 +81,12 @@ | |
387 | # Executable sources & libs | |
388 | cjpeg_SOURCES = cjpeg.c rdppm.c rdgif.c rdtarga.c rdrle.c rdbmp.c \ | |
389 | rdswitch.c cdjpeg.c | |
390 | -cjpeg_LDADD = libjpeg.la | |
391 | +cjpeg_LDADD = libjpeg12.la | |
392 | djpeg_SOURCES = djpeg.c wrppm.c wrgif.c wrtarga.c wrrle.c wrbmp.c \ | |
393 | rdcolmap.c cdjpeg.c | |
394 | -djpeg_LDADD = libjpeg.la | |
395 | +djpeg_LDADD = libjpeg12.la | |
396 | jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c | |
397 | -jpegtran_LDADD = libjpeg.la | |
398 | +jpegtran_LDADD = libjpeg12.la | |
399 | rdjpgcom_SOURCES = rdjpgcom.c | |
400 | wrjpgcom_SOURCES = wrjpgcom.c | |
401 | ||
a8770424 JB |
402 | --- jpeg-9c/Makefile.am.orig 2018-04-14 08:53:59.934089520 +0200 |
403 | +++ jpeg-9c/Makefile.am 2018-04-14 08:56:45.650754295 +0200 | |
404 | @@ -105,7 +105,7 @@ | |
405 | ||
406 | # pkg-config file | |
407 | pkgconfigdir = $(libdir)/pkgconfig | |
408 | -nodist_pkgconfig_DATA = libjpeg.pc | |
409 | +nodist_pkgconfig_DATA = libjpeg12.pc | |
410 | ||
411 | # Files to be cleaned | |
412 | CLEANFILES = testout.ppm testout.bmp testout.jpg testoutp.ppm testoutp.jpg \ | |
413 | --- jpeg-9c/configure.ac.orig 2018-04-14 08:57:46.364086935 +0200 | |
414 | +++ jpeg-9c/configure.ac 2018-04-14 08:57:49.737420232 +0200 | |
415 | @@ -361,5 +361,5 @@ | |
416 | [`expr $major + $minor`:0:$minor]) | |
417 | AC_MSG_RESULT([$JPEG_LIB_VERSION]) | |
418 | ||
419 | -AC_CONFIG_FILES([Makefile libjpeg.pc]) | |
420 | +AC_CONFIG_FILES([Makefile libjpeg12.pc:libjpeg.pc.in]) | |
421 | AC_OUTPUT | |
dd2bac0f JB |
422 | --- jpeg-9d/libjpeg.pc.in.orig |
423 | +++ jpeg-9d/libjpeg.pc.in | |
a8770424 JB |
424 | @@ -4,7 +4,7 @@ |
425 | includedir=@includedir@ | |
426 | ||
427 | Name: libjpeg | |
428 | -Description: Reads and writes JPEG files | |
429 | +Description: Reads and writes JPEG files, 12bpp | |
dd2bac0f | 430 | Version: @JPEG_LIB_VERSION_MAJOR@.@JPEG_LIB_VERSION_MINOR@.0 |
a8770424 JB |
431 | -Libs: -L${libdir} -ljpeg |
432 | +Libs: -L${libdir} -ljpeg12 | |
433 | Cflags: -I${includedir} |