/src/libjpeg-turbo.main/jsamplecomp.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * jsamplecomp.h |
3 | | * |
4 | | * Copyright (C) 2022, D. R. Commander. |
5 | | * For conditions of distribution and use, see the accompanying README.ijg |
6 | | * file. |
7 | | */ |
8 | | |
9 | | /* In source files that must be compiled for multiple data precisions, we |
10 | | * prefix all precision-dependent data types, macros, methods, fields, and |
11 | | * function names with an underscore. Including this file replaces those |
12 | | * precision-independent tokens with their precision-dependent equivalents, |
13 | | * based on the value of BITS_IN_JSAMPLE. |
14 | | */ |
15 | | |
16 | | #ifndef JSAMPLECOMP_H |
17 | | #define JSAMPLECOMP_H |
18 | | |
19 | | #if BITS_IN_JSAMPLE == 16 |
20 | | |
21 | | /* Sample data types and macros (jmorecfg.h) */ |
22 | | #define _JSAMPLE J16SAMPLE |
23 | | |
24 | 0 | #define _MAXJSAMPLE MAXJ16SAMPLE |
25 | | #define _CENTERJSAMPLE CENTERJ16SAMPLE |
26 | | |
27 | | #define _JSAMPROW J16SAMPROW |
28 | | #define _JSAMPARRAY J16SAMPARRAY |
29 | | #define _JSAMPIMAGE J16SAMPIMAGE |
30 | | |
31 | | /* External functions (jpeglib.h) */ |
32 | | #define _jpeg_write_scanlines jpeg16_write_scanlines |
33 | | #define _jpeg_read_scanlines jpeg16_read_scanlines |
34 | | |
35 | | /* Internal methods (jpegint.h) */ |
36 | | |
37 | | #ifdef C_LOSSLESS_SUPPORTED |
38 | | /* Use the 16-bit method in the jpeg_c_main_controller structure. */ |
39 | | #define _process_data process_data_16 |
40 | | /* Use the 16-bit method in the jpeg_c_prep_controller structure. */ |
41 | 0 | #define _pre_process_data pre_process_data_16 |
42 | | /* Use the 16-bit method in the jpeg_c_coef_controller structure. */ |
43 | | #define _compress_data compress_data_16 |
44 | | /* Use the 16-bit method in the jpeg_color_converter structure. */ |
45 | | #define _color_convert color_convert_16 |
46 | | /* Use the 16-bit method in the jpeg_downsampler structure. */ |
47 | 0 | #define _downsample downsample_16 |
48 | | #endif |
49 | | #ifdef D_LOSSLESS_SUPPORTED |
50 | | /* Use the 16-bit method in the jpeg_d_main_controller structure. */ |
51 | 8.90M | #define _process_data process_data_16 |
52 | | /* Use the 16-bit method in the jpeg_d_coef_controller structure. */ |
53 | 5.44k | #define _decompress_data decompress_data_16 |
54 | | /* Use the 16-bit method in the jpeg_d_post_controller structure. */ |
55 | | #define _post_process_data post_process_data_16 |
56 | | /* Use the 16-bit method in the jpeg_upsampler structure. */ |
57 | 5.59k | #define _upsample upsample_16 |
58 | | /* Use the 16-bit method in the jpeg_color_converter structure. */ |
59 | 5.64k | #define _color_convert color_convert_16 |
60 | | /* Use the 16-bit method in the jpeg_color_quantizer structure. */ |
61 | | #define _color_quantize color_quantize_16 |
62 | | #endif |
63 | | |
64 | | /* Global internal functions (jpegint.h) */ |
65 | | #ifdef C_LOSSLESS_SUPPORTED |
66 | | #define _jinit_c_main_controller j16init_c_main_controller |
67 | | #define _jinit_c_prep_controller j16init_c_prep_controller |
68 | | #define _jinit_color_converter j16init_color_converter |
69 | | #define _jinit_downsampler j16init_downsampler |
70 | | #define _jinit_c_diff_controller j16init_c_diff_controller |
71 | | #define _jinit_lossless_compressor j16init_lossless_compressor |
72 | | #endif |
73 | | |
74 | | #ifdef D_LOSSLESS_SUPPORTED |
75 | | #define _jinit_d_main_controller j16init_d_main_controller |
76 | | #define _jinit_d_post_controller j16init_d_post_controller |
77 | | #define _jinit_upsampler j16init_upsampler |
78 | | #define _jinit_color_deconverter j16init_color_deconverter |
79 | | #define _jinit_1pass_quantizer j16init_1pass_quantizer |
80 | | #define _jinit_2pass_quantizer j16init_2pass_quantizer |
81 | | #define _jinit_merged_upsampler j16init_merged_upsampler |
82 | | #define _jinit_d_diff_controller j16init_d_diff_controller |
83 | | #define _jinit_lossless_decompressor j16init_lossless_decompressor |
84 | | #endif |
85 | | |
86 | | #if defined(C_LOSSLESS_SUPPORTED) || defined(D_LOSSLESS_SUPPORTED) |
87 | | #define _jcopy_sample_rows j16copy_sample_rows |
88 | | #endif |
89 | | |
90 | | /* Internal fields (cdjpeg.h) */ |
91 | | |
92 | | #if defined(C_LOSSLESS_SUPPORTED) || defined(D_LOSSLESS_SUPPORTED) |
93 | | /* Use the 16-bit buffer in the cjpeg_source_struct and djpeg_dest_struct |
94 | | structures. */ |
95 | 0 | #define _buffer buffer16 |
96 | | #endif |
97 | | |
98 | | /* Image I/O functions (cdjpeg.h) */ |
99 | | #ifdef C_LOSSLESS_SUPPORTED |
100 | | #define _jinit_read_gif j16init_read_gif |
101 | | #define _jinit_read_ppm j16init_read_ppm |
102 | | #endif |
103 | | |
104 | | #ifdef D_LOSSLESS_SUPPORTED |
105 | | #define _jinit_write_gif j16init_write_gif |
106 | | #define _jinit_write_ppm j16init_write_ppm |
107 | | |
108 | | #define _read_color_map read_color_map_16 |
109 | | #endif |
110 | | |
111 | | #elif BITS_IN_JSAMPLE == 12 |
112 | | |
113 | | /* Sample data types and macros (jmorecfg.h) */ |
114 | 211M | #define _JSAMPLE J12SAMPLE |
115 | | |
116 | 868M | #define _MAXJSAMPLE MAXJ12SAMPLE |
117 | 33.9M | #define _CENTERJSAMPLE CENTERJ12SAMPLE |
118 | | |
119 | 103M | #define _JSAMPROW J12SAMPROW |
120 | 89.5M | #define _JSAMPARRAY J12SAMPARRAY |
121 | | #define _JSAMPIMAGE J12SAMPIMAGE |
122 | | |
123 | | /* External functions (jpeglib.h) */ |
124 | | #define _jpeg_write_scanlines jpeg12_write_scanlines |
125 | | #define _jpeg_write_raw_data jpeg12_write_raw_data |
126 | 0 | #define _jpeg_read_scanlines jpeg12_read_scanlines |
127 | | #define _jpeg_skip_scanlines jpeg12_skip_scanlines |
128 | | #define _jpeg_crop_scanline jpeg12_crop_scanline |
129 | | #define _jpeg_read_raw_data jpeg12_read_raw_data |
130 | | |
131 | | /* Internal methods (jpegint.h) */ |
132 | | |
133 | | /* Use the 12-bit method in the jpeg_c_main_controller structure. */ |
134 | | #define _process_data process_data_12 |
135 | | /* Use the 12-bit method in the jpeg_c_prep_controller structure. */ |
136 | 0 | #define _pre_process_data pre_process_data_12 |
137 | | /* Use the 12-bit method in the jpeg_c_coef_controller structure. */ |
138 | 0 | #define _compress_data compress_data_12 |
139 | | /* Use the 12-bit method in the jpeg_color_converter structure. */ |
140 | | #define _color_convert color_convert_12 |
141 | | /* Use the 12-bit method in the jpeg_downsampler structure. */ |
142 | 0 | #define _downsample downsample_12 |
143 | | /* Use the 12-bit method in the jpeg_forward_dct structure. */ |
144 | 0 | #define _forward_DCT forward_DCT_12 |
145 | | /* Use the 12-bit method in the jpeg_d_main_controller structure. */ |
146 | 25.6M | #define _process_data process_data_12 |
147 | | /* Use the 12-bit method in the jpeg_d_coef_controller structure. */ |
148 | 30.1M | #define _decompress_data decompress_data_12 |
149 | | /* Use the 12-bit method in the jpeg_d_post_controller structure. */ |
150 | 63.6M | #define _post_process_data post_process_data_12 |
151 | | /* Use the 12-bit method in the jpeg_inverse_dct structure. */ |
152 | 5.17M | #define _inverse_DCT_method_ptr inverse_DCT_12_method_ptr |
153 | 27.2M | #define _inverse_DCT inverse_DCT_12 |
154 | | /* Use the 12-bit method in the jpeg_upsampler structure. */ |
155 | 82.8k | #define _upsample upsample_12 |
156 | | /* Use the 12-bit method in the jpeg_color_converter structure. */ |
157 | 47.1M | #define _color_convert color_convert_12 |
158 | | /* Use the 12-bit method in the jpeg_color_quantizer structure. */ |
159 | 0 | #define _color_quantize color_quantize_12 |
160 | | |
161 | | /* Global internal functions (jpegint.h) */ |
162 | | #define _jinit_c_main_controller j12init_c_main_controller |
163 | | #define _jinit_c_prep_controller j12init_c_prep_controller |
164 | | #define _jinit_c_coef_controller j12init_c_coef_controller |
165 | | #define _jinit_color_converter j12init_color_converter |
166 | | #define _jinit_downsampler j12init_downsampler |
167 | | #define _jinit_forward_dct j12init_forward_dct |
168 | | #ifdef C_LOSSLESS_SUPPORTED |
169 | | #define _jinit_c_diff_controller j12init_c_diff_controller |
170 | | #define _jinit_lossless_compressor j12init_lossless_compressor |
171 | | #endif |
172 | | |
173 | | #define _jinit_d_main_controller j12init_d_main_controller |
174 | | #define _jinit_d_coef_controller j12init_d_coef_controller |
175 | | #define _jinit_d_post_controller j12init_d_post_controller |
176 | | #define _jinit_inverse_dct j12init_inverse_dct |
177 | 0 | #define _jinit_upsampler j12init_upsampler |
178 | | #define _jinit_color_deconverter j12init_color_deconverter |
179 | | #define _jinit_1pass_quantizer j12init_1pass_quantizer |
180 | | #define _jinit_2pass_quantizer j12init_2pass_quantizer |
181 | | #define _jinit_merged_upsampler j12init_merged_upsampler |
182 | | #ifdef D_LOSSLESS_SUPPORTED |
183 | | #define _jinit_d_diff_controller j12init_d_diff_controller |
184 | | #define _jinit_lossless_decompressor j12init_lossless_decompressor |
185 | | #endif |
186 | | |
187 | 41.5M | #define _jcopy_sample_rows j12copy_sample_rows |
188 | | |
189 | | /* Global internal functions (jdct.h) */ |
190 | 0 | #define _jpeg_fdct_islow jpeg12_fdct_islow |
191 | 0 | #define _jpeg_fdct_ifast jpeg12_fdct_ifast |
192 | | |
193 | 10.7k | #define _jpeg_idct_islow jpeg12_idct_islow |
194 | 26.7k | #define _jpeg_idct_ifast jpeg12_idct_ifast |
195 | 0 | #define _jpeg_idct_float jpeg12_idct_float |
196 | 0 | #define _jpeg_idct_7x7 jpeg12_idct_7x7 |
197 | 0 | #define _jpeg_idct_6x6 jpeg12_idct_6x6 |
198 | 0 | #define _jpeg_idct_5x5 jpeg12_idct_5x5 |
199 | 4.83k | #define _jpeg_idct_4x4 jpeg12_idct_4x4 |
200 | 0 | #define _jpeg_idct_3x3 jpeg12_idct_3x3 |
201 | 0 | #define _jpeg_idct_2x2 jpeg12_idct_2x2 |
202 | 0 | #define _jpeg_idct_1x1 jpeg12_idct_1x1 |
203 | 0 | #define _jpeg_idct_9x9 jpeg12_idct_9x9 |
204 | 0 | #define _jpeg_idct_10x10 jpeg12_idct_10x10 |
205 | 0 | #define _jpeg_idct_11x11 jpeg12_idct_11x11 |
206 | 0 | #define _jpeg_idct_12x12 jpeg12_idct_12x12 |
207 | 0 | #define _jpeg_idct_13x13 jpeg12_idct_13x13 |
208 | 0 | #define _jpeg_idct_14x14 jpeg12_idct_14x14 |
209 | 0 | #define _jpeg_idct_15x15 jpeg12_idct_15x15 |
210 | 0 | #define _jpeg_idct_16x16 jpeg12_idct_16x16 |
211 | | |
212 | | /* Internal fields (cdjpeg.h) */ |
213 | | |
214 | | /* Use the 12-bit buffer in the cjpeg_source_struct and djpeg_dest_struct |
215 | | structures. */ |
216 | 0 | #define _buffer buffer12 |
217 | | |
218 | | /* Image I/O functions (cdjpeg.h) */ |
219 | | #define _jinit_read_gif j12init_read_gif |
220 | | #define _jinit_write_gif j12init_write_gif |
221 | | #define _jinit_read_ppm j12init_read_ppm |
222 | | #define _jinit_write_ppm j12init_write_ppm |
223 | | |
224 | | #define _read_color_map read_color_map_12 |
225 | | |
226 | | #else /* BITS_IN_JSAMPLE */ |
227 | | |
228 | | /* Sample data types and macros (jmorecfg.h) */ |
229 | 0 | #define _JSAMPLE JSAMPLE |
230 | | |
231 | 0 | #define _MAXJSAMPLE MAXJSAMPLE |
232 | 0 | #define _CENTERJSAMPLE CENTERJSAMPLE |
233 | | |
234 | 0 | #define _JSAMPROW JSAMPROW |
235 | 0 | #define _JSAMPARRAY JSAMPARRAY |
236 | | #define _JSAMPIMAGE JSAMPIMAGE |
237 | | |
238 | | /* External functions (jpeglib.h) */ |
239 | | #define _jpeg_write_scanlines jpeg_write_scanlines |
240 | | #define _jpeg_write_raw_data jpeg_write_raw_data |
241 | | #define _jpeg_read_scanlines jpeg_read_scanlines |
242 | | #define _jpeg_skip_scanlines jpeg_skip_scanlines |
243 | | #define _jpeg_crop_scanline jpeg_crop_scanline |
244 | | #define _jpeg_read_raw_data jpeg_read_raw_data |
245 | | |
246 | | /* Internal methods (jpegint.h) */ |
247 | | |
248 | | /* Use the 8-bit method in the jpeg_c_main_controller structure. */ |
249 | | #define _process_data process_data |
250 | | /* Use the 8-bit method in the jpeg_c_prep_controller structure. */ |
251 | 0 | #define _pre_process_data pre_process_data |
252 | | /* Use the 8-bit method in the jpeg_c_coef_controller structure. */ |
253 | 0 | #define _compress_data compress_data |
254 | | /* Use the 8-bit method in the jpeg_color_converter structure. */ |
255 | | #define _color_convert color_convert |
256 | | /* Use the 8-bit method in the jpeg_downsampler structure. */ |
257 | 0 | #define _downsample downsample |
258 | | /* Use the 8-bit method in the jpeg_forward_dct structure. */ |
259 | 0 | #define _forward_DCT forward_DCT |
260 | | /* Use the 8-bit method in the jpeg_d_main_controller structure. */ |
261 | 28.7M | #define _process_data process_data |
262 | | /* Use the 8-bit method in the jpeg_d_coef_controller structure. */ |
263 | 52.0k | #define _decompress_data decompress_data |
264 | | /* Use the 8-bit method in the jpeg_d_post_controller structure. */ |
265 | | #define _post_process_data post_process_data |
266 | | /* Use the 8-bit method in the jpeg_inverse_dct structure. */ |
267 | | #define _inverse_DCT_method_ptr inverse_DCT_method_ptr |
268 | | #define _inverse_DCT inverse_DCT |
269 | | /* Use the 8-bit method in the jpeg_upsampler structure. */ |
270 | 52.2k | #define _upsample upsample |
271 | | /* Use the 8-bit method in the jpeg_color_converter structure. */ |
272 | 37.7k | #define _color_convert color_convert |
273 | | /* Use the 8-bit method in the jpeg_color_quantizer structure. */ |
274 | | #define _color_quantize color_quantize |
275 | | |
276 | | /* Global internal functions (jpegint.h) */ |
277 | | #define _jinit_c_main_controller jinit_c_main_controller |
278 | | #define _jinit_c_prep_controller jinit_c_prep_controller |
279 | | #define _jinit_c_coef_controller jinit_c_coef_controller |
280 | | #define _jinit_color_converter jinit_color_converter |
281 | | #define _jinit_downsampler jinit_downsampler |
282 | | #define _jinit_forward_dct jinit_forward_dct |
283 | | #ifdef C_LOSSLESS_SUPPORTED |
284 | | #define _jinit_c_diff_controller jinit_c_diff_controller |
285 | | #define _jinit_lossless_compressor jinit_lossless_compressor |
286 | | #endif |
287 | | |
288 | | #define _jinit_d_main_controller jinit_d_main_controller |
289 | | #define _jinit_d_coef_controller jinit_d_coef_controller |
290 | | #define _jinit_d_post_controller jinit_d_post_controller |
291 | | #define _jinit_inverse_dct jinit_inverse_dct |
292 | 0 | #define _jinit_upsampler jinit_upsampler |
293 | | #define _jinit_color_deconverter jinit_color_deconverter |
294 | | #define _jinit_1pass_quantizer jinit_1pass_quantizer |
295 | | #define _jinit_2pass_quantizer jinit_2pass_quantizer |
296 | | #define _jinit_merged_upsampler jinit_merged_upsampler |
297 | | #ifdef D_LOSSLESS_SUPPORTED |
298 | | #define _jinit_d_diff_controller jinit_d_diff_controller |
299 | | #define _jinit_lossless_decompressor jinit_lossless_decompressor |
300 | | #endif |
301 | | |
302 | 0 | #define _jcopy_sample_rows jcopy_sample_rows |
303 | | |
304 | | /* Global internal functions (jdct.h) */ |
305 | 0 | #define _jpeg_fdct_islow jpeg_fdct_islow |
306 | 0 | #define _jpeg_fdct_ifast jpeg_fdct_ifast |
307 | | |
308 | | #define _jpeg_idct_islow jpeg_idct_islow |
309 | | #define _jpeg_idct_ifast jpeg_idct_ifast |
310 | | #define _jpeg_idct_float jpeg_idct_float |
311 | | #define _jpeg_idct_7x7 jpeg_idct_7x7 |
312 | | #define _jpeg_idct_6x6 jpeg_idct_6x6 |
313 | | #define _jpeg_idct_5x5 jpeg_idct_5x5 |
314 | | #define _jpeg_idct_4x4 jpeg_idct_4x4 |
315 | | #define _jpeg_idct_3x3 jpeg_idct_3x3 |
316 | | #define _jpeg_idct_2x2 jpeg_idct_2x2 |
317 | | #define _jpeg_idct_1x1 jpeg_idct_1x1 |
318 | | #define _jpeg_idct_9x9 jpeg_idct_9x9 |
319 | | #define _jpeg_idct_10x10 jpeg_idct_10x10 |
320 | | #define _jpeg_idct_11x11 jpeg_idct_11x11 |
321 | | #define _jpeg_idct_12x12 jpeg_idct_12x12 |
322 | | #define _jpeg_idct_13x13 jpeg_idct_13x13 |
323 | | #define _jpeg_idct_14x14 jpeg_idct_14x14 |
324 | | #define _jpeg_idct_15x15 jpeg_idct_15x15 |
325 | | #define _jpeg_idct_16x16 jpeg_idct_16x16 |
326 | | |
327 | | /* Internal fields (cdjpeg.h) */ |
328 | | |
329 | | /* Use the 8-bit buffer in the cjpeg_source_struct and djpeg_dest_struct |
330 | | structures. */ |
331 | 0 | #define _buffer buffer |
332 | | |
333 | | /* Image I/O functions (cdjpeg.h) */ |
334 | | #define _jinit_read_gif jinit_read_gif |
335 | | #define _jinit_write_gif jinit_write_gif |
336 | | #define _jinit_read_ppm jinit_read_ppm |
337 | | #define _jinit_write_ppm jinit_write_ppm |
338 | | |
339 | | #define _read_color_map read_color_map |
340 | | |
341 | | #endif /* BITS_IN_JSAMPLE */ |
342 | | |
343 | | #endif /* JSAMPLECOMP_H */ |