1 /*
2  * simd/jsimd.h
3  *
4  * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
5  * Copyright (C) 2011, 2014-2016, D. R. Commander.
6  * Copyright (C) 2013-2014, MIPS Technologies, Inc., California.
7  * Copyright (C) 2014, Linaro Limited.
8  * Copyright (C) 2015-2016, Matthieu Darbois.
9  *
10  * Based on the x86 SIMD extension for IJG JPEG library,
11  * Copyright (C) 1999-2006, MIYASAKA Masaru.
12  * For conditions of distribution and use, see copyright notice in jsimdext.inc
13  *
14  */
15 
16 /* Bitmask for supported acceleration methods */
17 
18 #define JSIMD_NONE       0x00
19 #define JSIMD_MMX        0x01
20 #define JSIMD_3DNOW      0x02
21 #define JSIMD_SSE        0x04
22 #define JSIMD_SSE2       0x08
23 #define JSIMD_ARM_NEON   0x10
24 #define JSIMD_MIPS_DSPR2 0x20
25 #define JSIMD_ALTIVEC    0x40
26 
27 /* SIMD Ext: retrieve SIMD/CPU information */
28 EXTERN(unsigned int) jpeg_simd_cpu_support (void);
29 
30 /* RGB & extended RGB --> YCC Colorspace Conversion */
31 EXTERN(void) jsimd_rgb_ycc_convert_mmx
32         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
33          JDIMENSION output_row, int num_rows);
34 EXTERN(void) jsimd_extrgb_ycc_convert_mmx
35         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
36          JDIMENSION output_row, int num_rows);
37 EXTERN(void) jsimd_extrgbx_ycc_convert_mmx
38         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
39          JDIMENSION output_row, int num_rows);
40 EXTERN(void) jsimd_extbgr_ycc_convert_mmx
41         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
42          JDIMENSION output_row, int num_rows);
43 EXTERN(void) jsimd_extbgrx_ycc_convert_mmx
44         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
45          JDIMENSION output_row, int num_rows);
46 EXTERN(void) jsimd_extxbgr_ycc_convert_mmx
47         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
48          JDIMENSION output_row, int num_rows);
49 EXTERN(void) jsimd_extxrgb_ycc_convert_mmx
50         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
51          JDIMENSION output_row, int num_rows);
52 
53 extern const int jconst_rgb_ycc_convert_sse2[];
54 EXTERN(void) jsimd_rgb_ycc_convert_sse2
55         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
56          JDIMENSION output_row, int num_rows);
57 EXTERN(void) jsimd_extrgb_ycc_convert_sse2
58         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
59          JDIMENSION output_row, int num_rows);
60 EXTERN(void) jsimd_extrgbx_ycc_convert_sse2
61         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
62          JDIMENSION output_row, int num_rows);
63 EXTERN(void) jsimd_extbgr_ycc_convert_sse2
64         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
65          JDIMENSION output_row, int num_rows);
66 EXTERN(void) jsimd_extbgrx_ycc_convert_sse2
67         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
68          JDIMENSION output_row, int num_rows);
69 EXTERN(void) jsimd_extxbgr_ycc_convert_sse2
70         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
71          JDIMENSION output_row, int num_rows);
72 EXTERN(void) jsimd_extxrgb_ycc_convert_sse2
73         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
74          JDIMENSION output_row, int num_rows);
75 
76 EXTERN(void) jsimd_rgb_ycc_convert_neon
77         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
78          JDIMENSION output_row, int num_rows);
79 EXTERN(void) jsimd_extrgb_ycc_convert_neon
80         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
81          JDIMENSION output_row, int num_rows);
82 EXTERN(void) jsimd_extrgbx_ycc_convert_neon
83         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
84          JDIMENSION output_row, int num_rows);
85 EXTERN(void) jsimd_extbgr_ycc_convert_neon
86         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
87          JDIMENSION output_row, int num_rows);
88 EXTERN(void) jsimd_extbgrx_ycc_convert_neon
89         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
90          JDIMENSION output_row, int num_rows);
91 EXTERN(void) jsimd_extxbgr_ycc_convert_neon
92         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
93          JDIMENSION output_row, int num_rows);
94 EXTERN(void) jsimd_extxrgb_ycc_convert_neon
95         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
96          JDIMENSION output_row, int num_rows);
97 
98 EXTERN(void) jsimd_extrgb_ycc_convert_neon_slowld3
99         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
100          JDIMENSION output_row, int num_rows);
101 EXTERN(void) jsimd_extbgr_ycc_convert_neon_slowld3
102         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
103          JDIMENSION output_row, int num_rows);
104 
105 EXTERN(void) jsimd_rgb_ycc_convert_mips_dspr2
106         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
107          JDIMENSION output_row, int num_rows);
108 EXTERN(void) jsimd_extrgb_ycc_convert_mips_dspr2
109         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
110          JDIMENSION output_row, int num_rows);
111 EXTERN(void) jsimd_extrgbx_ycc_convert_mips_dspr2
112         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
113          JDIMENSION output_row, int num_rows);
114 EXTERN(void) jsimd_extbgr_ycc_convert_mips_dspr2
115         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
116          JDIMENSION output_row, int num_rows);
117 EXTERN(void) jsimd_extbgrx_ycc_convert_mips_dspr2
118         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
119          JDIMENSION output_row, int num_rows);
120 EXTERN(void) jsimd_extxbgr_ycc_convert_mips_dspr2
121         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
122          JDIMENSION output_row, int num_rows);
123 EXTERN(void) jsimd_extxrgb_ycc_convert_mips_dspr2
124         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
125          JDIMENSION output_row, int num_rows);
126 
127 EXTERN(void) jsimd_rgb_ycc_convert_altivec
128         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
129          JDIMENSION output_row, int num_rows);
130 EXTERN(void) jsimd_extrgb_ycc_convert_altivec
131         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
132          JDIMENSION output_row, int num_rows);
133 EXTERN(void) jsimd_extrgbx_ycc_convert_altivec
134         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
135          JDIMENSION output_row, int num_rows);
136 EXTERN(void) jsimd_extbgr_ycc_convert_altivec
137         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
138          JDIMENSION output_row, int num_rows);
139 EXTERN(void) jsimd_extbgrx_ycc_convert_altivec
140         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
141          JDIMENSION output_row, int num_rows);
142 EXTERN(void) jsimd_extxbgr_ycc_convert_altivec
143         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
144          JDIMENSION output_row, int num_rows);
145 EXTERN(void) jsimd_extxrgb_ycc_convert_altivec
146         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
147          JDIMENSION output_row, int num_rows);
148 
149 /* RGB & extended RGB --> Grayscale Colorspace Conversion */
150 EXTERN(void) jsimd_rgb_gray_convert_mmx
151         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
152          JDIMENSION output_row, int num_rows);
153 EXTERN(void) jsimd_extrgb_gray_convert_mmx
154         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
155          JDIMENSION output_row, int num_rows);
156 EXTERN(void) jsimd_extrgbx_gray_convert_mmx
157         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
158          JDIMENSION output_row, int num_rows);
159 EXTERN(void) jsimd_extbgr_gray_convert_mmx
160         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
161          JDIMENSION output_row, int num_rows);
162 EXTERN(void) jsimd_extbgrx_gray_convert_mmx
163         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
164          JDIMENSION output_row, int num_rows);
165 EXTERN(void) jsimd_extxbgr_gray_convert_mmx
166         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
167          JDIMENSION output_row, int num_rows);
168 EXTERN(void) jsimd_extxrgb_gray_convert_mmx
169         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
170          JDIMENSION output_row, int num_rows);
171 
172 extern const int jconst_rgb_gray_convert_sse2[];
173 EXTERN(void) jsimd_rgb_gray_convert_sse2
174         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
175          JDIMENSION output_row, int num_rows);
176 EXTERN(void) jsimd_extrgb_gray_convert_sse2
177         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
178          JDIMENSION output_row, int num_rows);
179 EXTERN(void) jsimd_extrgbx_gray_convert_sse2
180         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
181          JDIMENSION output_row, int num_rows);
182 EXTERN(void) jsimd_extbgr_gray_convert_sse2
183         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
184          JDIMENSION output_row, int num_rows);
185 EXTERN(void) jsimd_extbgrx_gray_convert_sse2
186         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
187          JDIMENSION output_row, int num_rows);
188 EXTERN(void) jsimd_extxbgr_gray_convert_sse2
189         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
190          JDIMENSION output_row, int num_rows);
191 EXTERN(void) jsimd_extxrgb_gray_convert_sse2
192         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
193          JDIMENSION output_row, int num_rows);
194 
195 EXTERN(void) jsimd_rgb_gray_convert_mips_dspr2
196         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
197          JDIMENSION output_row, int num_rows);
198 EXTERN(void) jsimd_extrgb_gray_convert_mips_dspr2
199         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
200          JDIMENSION output_row, int num_rows);
201 EXTERN(void) jsimd_extrgbx_gray_convert_mips_dspr2
202         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
203          JDIMENSION output_row, int num_rows);
204 EXTERN(void) jsimd_extbgr_gray_convert_mips_dspr2
205         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
206          JDIMENSION output_row, int num_rows);
207 EXTERN(void) jsimd_extbgrx_gray_convert_mips_dspr2
208         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
209          JDIMENSION output_row, int num_rows);
210 EXTERN(void) jsimd_extxbgr_gray_convert_mips_dspr2
211         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
212          JDIMENSION output_row, int num_rows);
213 EXTERN(void) jsimd_extxrgb_gray_convert_mips_dspr2
214         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
215          JDIMENSION output_row, int num_rows);
216 
217 EXTERN(void) jsimd_rgb_gray_convert_altivec
218         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
219          JDIMENSION output_row, int num_rows);
220 EXTERN(void) jsimd_extrgb_gray_convert_altivec
221         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
222          JDIMENSION output_row, int num_rows);
223 EXTERN(void) jsimd_extrgbx_gray_convert_altivec
224         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
225          JDIMENSION output_row, int num_rows);
226 EXTERN(void) jsimd_extbgr_gray_convert_altivec
227         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
228          JDIMENSION output_row, int num_rows);
229 EXTERN(void) jsimd_extbgrx_gray_convert_altivec
230         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
231          JDIMENSION output_row, int num_rows);
232 EXTERN(void) jsimd_extxbgr_gray_convert_altivec
233         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
234          JDIMENSION output_row, int num_rows);
235 EXTERN(void) jsimd_extxrgb_gray_convert_altivec
236         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
237          JDIMENSION output_row, int num_rows);
238 
239 /* YCC --> RGB & extended RGB Colorspace Conversion */
240 EXTERN(void) jsimd_ycc_rgb_convert_mmx
241         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
242          JSAMPARRAY output_buf, int num_rows);
243 EXTERN(void) jsimd_ycc_extrgb_convert_mmx
244         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
245          JSAMPARRAY output_buf, int num_rows);
246 EXTERN(void) jsimd_ycc_extrgbx_convert_mmx
247         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
248          JSAMPARRAY output_buf, int num_rows);
249 EXTERN(void) jsimd_ycc_extbgr_convert_mmx
250         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
251          JSAMPARRAY output_buf, int num_rows);
252 EXTERN(void) jsimd_ycc_extbgrx_convert_mmx
253         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
254          JSAMPARRAY output_buf, int num_rows);
255 EXTERN(void) jsimd_ycc_extxbgr_convert_mmx
256         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
257          JSAMPARRAY output_buf, int num_rows);
258 EXTERN(void) jsimd_ycc_extxrgb_convert_mmx
259         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
260          JSAMPARRAY output_buf, int num_rows);
261 
262 extern const int jconst_ycc_rgb_convert_sse2[];
263 EXTERN(void) jsimd_ycc_rgb_convert_sse2
264         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
265          JSAMPARRAY output_buf, int num_rows);
266 EXTERN(void) jsimd_ycc_extrgb_convert_sse2
267         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
268          JSAMPARRAY output_buf, int num_rows);
269 EXTERN(void) jsimd_ycc_extrgbx_convert_sse2
270         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
271          JSAMPARRAY output_buf, int num_rows);
272 EXTERN(void) jsimd_ycc_extbgr_convert_sse2
273         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
274          JSAMPARRAY output_buf, int num_rows);
275 EXTERN(void) jsimd_ycc_extbgrx_convert_sse2
276         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
277          JSAMPARRAY output_buf, int num_rows);
278 EXTERN(void) jsimd_ycc_extxbgr_convert_sse2
279         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
280          JSAMPARRAY output_buf, int num_rows);
281 EXTERN(void) jsimd_ycc_extxrgb_convert_sse2
282         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
283          JSAMPARRAY output_buf, int num_rows);
284 
285 EXTERN(void) jsimd_ycc_rgb_convert_neon
286         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
287          JSAMPARRAY output_buf, int num_rows);
288 EXTERN(void) jsimd_ycc_extrgb_convert_neon
289         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
290          JSAMPARRAY output_buf, int num_rows);
291 EXTERN(void) jsimd_ycc_extrgbx_convert_neon
292         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
293          JSAMPARRAY output_buf, int num_rows);
294 EXTERN(void) jsimd_ycc_extbgr_convert_neon
295         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
296          JSAMPARRAY output_buf, int num_rows);
297 EXTERN(void) jsimd_ycc_extbgrx_convert_neon
298         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
299          JSAMPARRAY output_buf, int num_rows);
300 EXTERN(void) jsimd_ycc_extxbgr_convert_neon
301         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
302          JSAMPARRAY output_buf, int num_rows);
303 EXTERN(void) jsimd_ycc_extxrgb_convert_neon
304         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
305          JSAMPARRAY output_buf, int num_rows);
306 EXTERN(void) jsimd_ycc_rgb565_convert_neon
307         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
308          JSAMPARRAY output_buf, int num_rows);
309 
310 EXTERN(void) jsimd_ycc_extrgb_convert_neon_slowst3
311         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
312          JSAMPARRAY output_buf, int num_rows);
313 EXTERN(void) jsimd_ycc_extbgr_convert_neon_slowst3
314         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
315          JSAMPARRAY output_buf, int num_rows);
316 
317 EXTERN(void) jsimd_ycc_rgb_convert_mips_dspr2
318         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
319          JSAMPARRAY output_buf, int num_rows);
320 EXTERN(void) jsimd_ycc_extrgb_convert_mips_dspr2
321         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
322          JSAMPARRAY output_buf, int num_rows);
323 EXTERN(void) jsimd_ycc_extrgbx_convert_mips_dspr2
324         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
325          JSAMPARRAY output_buf, int num_rows);
326 EXTERN(void) jsimd_ycc_extbgr_convert_mips_dspr2
327         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
328          JSAMPARRAY output_buf, int num_rows);
329 EXTERN(void) jsimd_ycc_extbgrx_convert_mips_dspr2
330         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
331          JSAMPARRAY output_buf, int num_rows);
332 EXTERN(void) jsimd_ycc_extxbgr_convert_mips_dspr2
333         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
334          JSAMPARRAY output_buf, int num_rows);
335 EXTERN(void) jsimd_ycc_extxrgb_convert_mips_dspr2
336         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
337          JSAMPARRAY output_buf, int num_rows);
338 
339 EXTERN(void) jsimd_ycc_rgb_convert_altivec
340         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
341          JSAMPARRAY output_buf, int num_rows);
342 EXTERN(void) jsimd_ycc_extrgb_convert_altivec
343         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
344          JSAMPARRAY output_buf, int num_rows);
345 EXTERN(void) jsimd_ycc_extrgbx_convert_altivec
346         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
347          JSAMPARRAY output_buf, int num_rows);
348 EXTERN(void) jsimd_ycc_extbgr_convert_altivec
349         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
350          JSAMPARRAY output_buf, int num_rows);
351 EXTERN(void) jsimd_ycc_extbgrx_convert_altivec
352         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
353          JSAMPARRAY output_buf, int num_rows);
354 EXTERN(void) jsimd_ycc_extxbgr_convert_altivec
355         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
356          JSAMPARRAY output_buf, int num_rows);
357 EXTERN(void) jsimd_ycc_extxrgb_convert_altivec
358         (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
359          JSAMPARRAY output_buf, int num_rows);
360 
361 /* NULL Colorspace Conversion */
362 EXTERN(void) jsimd_c_null_convert_mips_dspr2
363         (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
364          JDIMENSION output_row, int num_rows, int num_components);
365 
366 /* h2v1 Downsampling */
367 EXTERN(void) jsimd_h2v1_downsample_mmx
368         (JDIMENSION image_width, int max_v_samp_factor,
369          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
370          JSAMPARRAY input_data, JSAMPARRAY output_data);
371 
372 EXTERN(void) jsimd_h2v1_downsample_sse2
373         (JDIMENSION image_width, int max_v_samp_factor,
374          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
375          JSAMPARRAY input_data, JSAMPARRAY output_data);
376 
377 EXTERN(void) jsimd_h2v1_downsample_neon
378         (JDIMENSION image_width, int max_v_samp_factor,
379          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
380          JSAMPARRAY input_data, JSAMPARRAY output_data);
381 
382 EXTERN(void) jsimd_h2v1_downsample_mips_dspr2
383         (JDIMENSION image_width, int max_v_samp_factor,
384          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
385          JSAMPARRAY input_data, JSAMPARRAY output_data);
386 
387 EXTERN(void) jsimd_h2v1_downsample_altivec
388         (JDIMENSION image_width, int max_v_samp_factor,
389          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
390          JSAMPARRAY input_data, JSAMPARRAY output_data);
391 
392 /* h2v2 Downsampling */
393 EXTERN(void) jsimd_h2v2_downsample_mmx
394         (JDIMENSION image_width, int max_v_samp_factor,
395          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
396          JSAMPARRAY input_data, JSAMPARRAY output_data);
397 
398 EXTERN(void) jsimd_h2v2_downsample_sse2
399         (JDIMENSION image_width, int max_v_samp_factor,
400          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
401          JSAMPARRAY input_data, JSAMPARRAY output_data);
402 
403 EXTERN(void) jsimd_h2v2_downsample_neon
404         (JDIMENSION image_width, int max_v_samp_factor,
405          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
406          JSAMPARRAY input_data, JSAMPARRAY output_data);
407 
408 EXTERN(void) jsimd_h2v2_downsample_mips_dspr2
409         (JDIMENSION image_width, int max_v_samp_factor,
410          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
411          JSAMPARRAY input_data, JSAMPARRAY output_data);
412 
413 EXTERN(void) jsimd_h2v2_downsample_altivec
414         (JDIMENSION image_width, int max_v_samp_factor,
415          JDIMENSION v_samp_factor, JDIMENSION width_blocks,
416          JSAMPARRAY input_data, JSAMPARRAY output_data);
417 
418 /* h2v2 Smooth Downsampling */
419 EXTERN(void) jsimd_h2v2_smooth_downsample_mips_dspr2
420         (JSAMPARRAY input_data, JSAMPARRAY output_data,
421          JDIMENSION v_samp_factor, int max_v_samp_factor,
422          int smoothing_factor, JDIMENSION width_blocks,
423          JDIMENSION image_width);
424 
425 
426 /* Upsampling */
427 EXTERN(void) jsimd_h2v1_upsample_mmx
428         (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
429          JSAMPARRAY *output_data_ptr);
430 EXTERN(void) jsimd_h2v2_upsample_mmx
431         (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
432          JSAMPARRAY *output_data_ptr);
433 
434 EXTERN(void) jsimd_h2v1_upsample_sse2
435         (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
436          JSAMPARRAY *output_data_ptr);
437 EXTERN(void) jsimd_h2v2_upsample_sse2
438         (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
439          JSAMPARRAY *output_data_ptr);
440 
441 EXTERN(void) jsimd_h2v1_upsample_mips_dspr2
442         (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
443          JSAMPARRAY *output_data_ptr);
444 EXTERN(void) jsimd_h2v2_upsample_mips_dspr2
445         (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
446          JSAMPARRAY *output_data_ptr);
447 
448 EXTERN(void) jsimd_int_upsample_mips_dspr2
449         (UINT8 h_expand, UINT8 v_expand, JSAMPARRAY input_data,
450          JSAMPARRAY *output_data_ptr, JDIMENSION output_width,
451          int max_v_samp_factor);
452 
453 EXTERN(void) jsimd_h2v1_upsample_altivec
454         (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
455          JSAMPARRAY *output_data_ptr);
456 EXTERN(void) jsimd_h2v2_upsample_altivec
457         (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
458          JSAMPARRAY *output_data_ptr);
459 
460 /* Fancy Upsampling */
461 EXTERN(void) jsimd_h2v1_fancy_upsample_mmx
462         (int max_v_samp_factor, JDIMENSION downsampled_width,
463          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
464 EXTERN(void) jsimd_h2v2_fancy_upsample_mmx
465         (int max_v_samp_factor, JDIMENSION downsampled_width,
466          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
467 
468 extern const int jconst_fancy_upsample_sse2[];
469 EXTERN(void) jsimd_h2v1_fancy_upsample_sse2
470         (int max_v_samp_factor, JDIMENSION downsampled_width,
471          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
472 EXTERN(void) jsimd_h2v2_fancy_upsample_sse2
473         (int max_v_samp_factor, JDIMENSION downsampled_width,
474          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
475 
476 EXTERN(void) jsimd_h2v1_fancy_upsample_neon
477         (int max_v_samp_factor, JDIMENSION downsampled_width,
478          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
479 
480 EXTERN(void) jsimd_h2v1_fancy_upsample_mips_dspr2
481         (int max_v_samp_factor, JDIMENSION downsampled_width,
482          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
483 EXTERN(void) jsimd_h2v2_fancy_upsample_mips_dspr2
484         (int max_v_samp_factor, JDIMENSION downsampled_width,
485          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
486 
487 EXTERN(void) jsimd_h2v1_fancy_upsample_altivec
488         (int max_v_samp_factor, JDIMENSION downsampled_width,
489          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
490 EXTERN(void) jsimd_h2v2_fancy_upsample_altivec
491         (int max_v_samp_factor, JDIMENSION downsampled_width,
492          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
493 
494 /* Merged Upsampling */
495 EXTERN(void) jsimd_h2v1_merged_upsample_mmx
496         (JDIMENSION output_width, JSAMPIMAGE input_buf,
497          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
498 EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mmx
499         (JDIMENSION output_width, JSAMPIMAGE input_buf,
500          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
501 EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mmx
502         (JDIMENSION output_width, JSAMPIMAGE input_buf,
503          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
504 EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mmx
505         (JDIMENSION output_width, JSAMPIMAGE input_buf,
506          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
507 EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mmx
508         (JDIMENSION output_width, JSAMPIMAGE input_buf,
509          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
510 EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mmx
511         (JDIMENSION output_width, JSAMPIMAGE input_buf,
512          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
513 EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mmx
514         (JDIMENSION output_width, JSAMPIMAGE input_buf,
515          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
516 
517 EXTERN(void) jsimd_h2v2_merged_upsample_mmx
518         (JDIMENSION output_width, JSAMPIMAGE input_buf,
519          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
520 EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mmx
521         (JDIMENSION output_width, JSAMPIMAGE input_buf,
522          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
523 EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mmx
524         (JDIMENSION output_width, JSAMPIMAGE input_buf,
525          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
526 EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mmx
527         (JDIMENSION output_width, JSAMPIMAGE input_buf,
528          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
529 EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mmx
530         (JDIMENSION output_width, JSAMPIMAGE input_buf,
531          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
532 EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mmx
533         (JDIMENSION output_width, JSAMPIMAGE input_buf,
534          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
535 EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mmx
536         (JDIMENSION output_width, JSAMPIMAGE input_buf,
537          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
538 
539 extern const int jconst_merged_upsample_sse2[];
540 EXTERN(void) jsimd_h2v1_merged_upsample_sse2
541         (JDIMENSION output_width, JSAMPIMAGE input_buf,
542          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
543 EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_sse2
544         (JDIMENSION output_width, JSAMPIMAGE input_buf,
545          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
546 EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_sse2
547         (JDIMENSION output_width, JSAMPIMAGE input_buf,
548          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
549 EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_sse2
550         (JDIMENSION output_width, JSAMPIMAGE input_buf,
551          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
552 EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_sse2
553         (JDIMENSION output_width, JSAMPIMAGE input_buf,
554          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
555 EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_sse2
556         (JDIMENSION output_width, JSAMPIMAGE input_buf,
557          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
558 EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_sse2
559         (JDIMENSION output_width, JSAMPIMAGE input_buf,
560          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
561 
562 EXTERN(void) jsimd_h2v2_merged_upsample_sse2
563         (JDIMENSION output_width, JSAMPIMAGE input_buf,
564          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
565 EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_sse2
566         (JDIMENSION output_width, JSAMPIMAGE input_buf,
567          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
568 EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_sse2
569         (JDIMENSION output_width, JSAMPIMAGE input_buf,
570          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
571 EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_sse2
572         (JDIMENSION output_width, JSAMPIMAGE input_buf,
573          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
574 EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_sse2
575         (JDIMENSION output_width, JSAMPIMAGE input_buf,
576          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
577 EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_sse2
578         (JDIMENSION output_width, JSAMPIMAGE input_buf,
579          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
580 EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_sse2
581         (JDIMENSION output_width, JSAMPIMAGE input_buf,
582          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
583 
584 EXTERN(void) jsimd_h2v1_merged_upsample_mips_dspr2
585         (JDIMENSION output_width, JSAMPIMAGE input_buf,
586          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
587 EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mips_dspr2
588         (JDIMENSION output_width, JSAMPIMAGE input_buf,
589          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
590 EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mips_dspr2
591         (JDIMENSION output_width, JSAMPIMAGE input_buf,
592          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
593 EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mips_dspr2
594         (JDIMENSION output_width, JSAMPIMAGE input_buf,
595          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
596 EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mips_dspr2
597         (JDIMENSION output_width, JSAMPIMAGE input_buf,
598          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
599 EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mips_dspr2
600         (JDIMENSION output_width, JSAMPIMAGE input_buf,
601          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
602 EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mips_dspr2
603         (JDIMENSION output_width, JSAMPIMAGE input_buf,
604          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
605 
606 EXTERN(void) jsimd_h2v2_merged_upsample_mips_dspr2
607         (JDIMENSION output_width, JSAMPIMAGE input_buf,
608          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
609 EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mips_dspr2
610         (JDIMENSION output_width, JSAMPIMAGE input_buf,
611          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
612 EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mips_dspr2
613         (JDIMENSION output_width, JSAMPIMAGE input_buf,
614          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
615 EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mips_dspr2
616         (JDIMENSION output_width, JSAMPIMAGE input_buf,
617          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
618 EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mips_dspr2
619         (JDIMENSION output_width, JSAMPIMAGE input_buf,
620          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
621 EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mips_dspr2
622         (JDIMENSION output_width, JSAMPIMAGE input_buf,
623          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
624 EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mips_dspr2
625         (JDIMENSION output_width, JSAMPIMAGE input_buf,
626          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
627 
628 EXTERN(void) jsimd_h2v1_merged_upsample_altivec
629         (JDIMENSION output_width, JSAMPIMAGE input_buf,
630          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
631 EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_altivec
632         (JDIMENSION output_width, JSAMPIMAGE input_buf,
633          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
634 EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_altivec
635         (JDIMENSION output_width, JSAMPIMAGE input_buf,
636          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
637 EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_altivec
638         (JDIMENSION output_width, JSAMPIMAGE input_buf,
639          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
640 EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_altivec
641         (JDIMENSION output_width, JSAMPIMAGE input_buf,
642          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
643 EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_altivec
644         (JDIMENSION output_width, JSAMPIMAGE input_buf,
645          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
646 EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_altivec
647         (JDIMENSION output_width, JSAMPIMAGE input_buf,
648          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
649 
650 EXTERN(void) jsimd_h2v2_merged_upsample_altivec
651         (JDIMENSION output_width, JSAMPIMAGE input_buf,
652          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
653 EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_altivec
654         (JDIMENSION output_width, JSAMPIMAGE input_buf,
655          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
656 EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_altivec
657         (JDIMENSION output_width, JSAMPIMAGE input_buf,
658          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
659 EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_altivec
660         (JDIMENSION output_width, JSAMPIMAGE input_buf,
661          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
662 EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_altivec
663         (JDIMENSION output_width, JSAMPIMAGE input_buf,
664          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
665 EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_altivec
666         (JDIMENSION output_width, JSAMPIMAGE input_buf,
667          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
668 EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_altivec
669         (JDIMENSION output_width, JSAMPIMAGE input_buf,
670          JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
671 
672 /* Sample Conversion */
673 EXTERN(void) jsimd_convsamp_mmx
674         (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
675 
676 EXTERN(void) jsimd_convsamp_sse2
677         (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
678 
679 EXTERN(void) jsimd_convsamp_neon
680         (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
681 
682 EXTERN(void) jsimd_convsamp_mips_dspr2
683         (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
684 
685 EXTERN(void) jsimd_convsamp_altivec
686         (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
687 
688 /* Floating Point Sample Conversion */
689 EXTERN(void) jsimd_convsamp_float_3dnow
690         (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
691 
692 EXTERN(void) jsimd_convsamp_float_sse
693         (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
694 
695 EXTERN(void) jsimd_convsamp_float_sse2
696         (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
697 
698 EXTERN(void) jsimd_convsamp_float_mips_dspr2
699         (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
700 
701 /* Slow Integer Forward DCT */
702 EXTERN(void) jsimd_fdct_islow_mmx (DCTELEM *data);
703 
704 extern const int jconst_fdct_islow_sse2[];
705 EXTERN(void) jsimd_fdct_islow_sse2 (DCTELEM *data);
706 
707 EXTERN(void) jsimd_fdct_islow_neon (DCTELEM *data);
708 
709 EXTERN(void) jsimd_fdct_islow_mips_dspr2 (DCTELEM *data);
710 
711 EXTERN(void) jsimd_fdct_islow_altivec (DCTELEM *data);
712 
713 /* Fast Integer Forward DCT */
714 EXTERN(void) jsimd_fdct_ifast_mmx (DCTELEM *data);
715 
716 extern const int jconst_fdct_ifast_sse2[];
717 EXTERN(void) jsimd_fdct_ifast_sse2 (DCTELEM *data);
718 
719 EXTERN(void) jsimd_fdct_ifast_neon (DCTELEM *data);
720 
721 EXTERN(void) jsimd_fdct_ifast_mips_dspr2 (DCTELEM *data);
722 
723 EXTERN(void) jsimd_fdct_ifast_altivec (DCTELEM *data);
724 
725 /* Floating Point Forward DCT */
726 EXTERN(void) jsimd_fdct_float_3dnow (FAST_FLOAT *data);
727 
728 extern const int jconst_fdct_float_sse[];
729 EXTERN(void) jsimd_fdct_float_sse (FAST_FLOAT *data);
730 
731 /* Quantization */
732 EXTERN(void) jsimd_quantize_mmx
733         (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
734 
735 EXTERN(void) jsimd_quantize_sse2
736         (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
737 
738 EXTERN(void) jsimd_quantize_neon
739         (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
740 
741 EXTERN(void) jsimd_quantize_mips_dspr2
742         (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
743 
744 EXTERN(void) jsimd_quantize_altivec
745         (JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
746 
747 /* Floating Point Quantization */
748 EXTERN(void) jsimd_quantize_float_3dnow
749         (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
750 
751 EXTERN(void) jsimd_quantize_float_sse
752         (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
753 
754 EXTERN(void) jsimd_quantize_float_sse2
755         (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
756 
757 EXTERN(void) jsimd_quantize_float_mips_dspr2
758         (JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
759 
760 /* Scaled Inverse DCT */
761 EXTERN(void) jsimd_idct_2x2_mmx
762         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
763          JDIMENSION output_col);
764 EXTERN(void) jsimd_idct_4x4_mmx
765         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
766          JDIMENSION output_col);
767 
768 extern const int jconst_idct_red_sse2[];
769 EXTERN(void) jsimd_idct_2x2_sse2
770         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
771          JDIMENSION output_col);
772 EXTERN(void) jsimd_idct_4x4_sse2
773         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
774          JDIMENSION output_col);
775 
776 EXTERN(void) jsimd_idct_2x2_neon
777         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
778          JDIMENSION output_col);
779 EXTERN(void) jsimd_idct_4x4_neon
780         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
781          JDIMENSION output_col);
782 
783 EXTERN(void) jsimd_idct_2x2_mips_dspr2
784         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
785          JDIMENSION output_col);
786 EXTERN(void) jsimd_idct_4x4_mips_dspr2
787         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
788          JDIMENSION output_col, int *workspace);
789 EXTERN(void) jsimd_idct_6x6_mips_dspr2
790         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
791          JDIMENSION output_col);
792 EXTERN(void) jsimd_idct_12x12_pass1_mips_dspr2
793         (JCOEFPTR coef_block, void *dct_table, int *workspace);
794 EXTERN(void) jsimd_idct_12x12_pass2_mips_dspr2
795         (int *workspace, int *output);
796 
797 /* Slow Integer Inverse DCT */
798 EXTERN(void) jsimd_idct_islow_mmx
799         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
800          JDIMENSION output_col);
801 
802 extern const int jconst_idct_islow_sse2[];
803 EXTERN(void) jsimd_idct_islow_sse2
804         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
805          JDIMENSION output_col);
806 
807 EXTERN(void) jsimd_idct_islow_neon
808         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
809          JDIMENSION output_col);
810 
811 EXTERN(void) jsimd_idct_islow_mips_dspr2
812         (void *dct_table, JCOEFPTR coef_block, int *output_buf,
813          JSAMPLE *output_col);
814 
815 EXTERN(void) jsimd_idct_islow_altivec
816         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
817          JDIMENSION output_col);
818 
819 /* Fast Integer Inverse DCT */
820 EXTERN(void) jsimd_idct_ifast_mmx
821         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
822          JDIMENSION output_col);
823 
824 extern const int jconst_idct_ifast_sse2[];
825 EXTERN(void) jsimd_idct_ifast_sse2
826         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
827          JDIMENSION output_col);
828 
829 EXTERN(void) jsimd_idct_ifast_neon
830         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
831          JDIMENSION output_col);
832 
833 EXTERN(void) jsimd_idct_ifast_cols_mips_dspr2
834         (JCOEF *inptr, IFAST_MULT_TYPE *quantptr, DCTELEM *wsptr,
835          const int *idct_coefs);
836 EXTERN(void) jsimd_idct_ifast_rows_mips_dspr2
837         (DCTELEM *wsptr, JSAMPARRAY output_buf, JDIMENSION output_col,
838          const int *idct_coefs);
839 
840 EXTERN(void) jsimd_idct_ifast_altivec
841         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
842          JDIMENSION output_col);
843 
844 /* Floating Point Inverse DCT */
845 EXTERN(void) jsimd_idct_float_3dnow
846         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
847          JDIMENSION output_col);
848 
849 extern const int jconst_idct_float_sse[];
850 EXTERN(void) jsimd_idct_float_sse
851         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
852          JDIMENSION output_col);
853 
854 extern const int jconst_idct_float_sse2[];
855 EXTERN(void) jsimd_idct_float_sse2
856         (void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
857          JDIMENSION output_col);
858 
859 /* Huffman coding */
860 extern const int jconst_huff_encode_one_block[];
861 EXTERN(JOCTET*) jsimd_huff_encode_one_block_sse2
862         (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
863          c_derived_tbl *dctbl, c_derived_tbl *actbl);
864 
865 EXTERN(JOCTET*) jsimd_huff_encode_one_block_neon
866         (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
867          c_derived_tbl *dctbl, c_derived_tbl *actbl);
868 
869 EXTERN(JOCTET*) jsimd_huff_encode_one_block_neon_slowtbl
870         (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
871          c_derived_tbl *dctbl, c_derived_tbl *actbl);
872