Bug 573948 - Part 1: Use libjpeg-turbo instead of libjpeg. r=jmuizelaar
[gecko.git] / jpeg / simd / jsimd.h
blob89ac1b75ebfb7e8c429320663b7e769bab0244e8
1 /*
2 * simd/jsimd.h
4 * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
5 *
6 * Based on the x86 SIMD extension for IJG JPEG library,
7 * Copyright (C) 1999-2006, MIYASAKA Masaru.
8 * For conditions of distribution and use, see copyright notice in jsimdext.inc
12 /* Bitmask for supported acceleration methods */
14 #define JSIMD_NONE 0x00
15 #define JSIMD_MMX 0x01
16 #define JSIMD_3DNOW 0x02
17 #define JSIMD_SSE 0x04
18 #define JSIMD_SSE2 0x08
20 /* Short forms of external names for systems with brain-damaged linkers. */
22 #ifdef NEED_SHORT_EXTERNAL_NAMES
23 #define jpeg_simd_cpu_support jSiCpuSupport
24 #define jsimd_rgb_ycc_convert_mmx jSRGBYCCM
25 #define jsimd_extrgb_ycc_convert_mmx jSEXTRGBYCCM
26 #define jsimd_extrgbx_ycc_convert_mmx jSEXTRGBXYCCM
27 #define jsimd_extbgr_ycc_convert_mmx jSEXTBGRYCCM
28 #define jsimd_extbgrx_ycc_convert_mmx jSEXTBGRXYCCM
29 #define jsimd_extxbgr_ycc_convert_mmx jSEXTXBGRYCCM
30 #define jsimd_extxrgb_ycc_convert_mmx jSEXTXRGBYCCM
31 #define jsimd_ycc_rgb_convert_mmx jSYCCRGBM
32 #define jsimd_ycc_extrgb_convert_mmx jSYCCEXTRGBM
33 #define jsimd_ycc_extrgbx_convert_mmx jSYCCEXTRGBXM
34 #define jsimd_ycc_extbgr_convert_mmx jSYCCEXTBGRM
35 #define jsimd_ycc_extbgrx_convert_mmx jSYCCEXTBGRXM
36 #define jsimd_ycc_extxbgr_convert_mmx jSYCCEXTXBGRM
37 #define jsimd_ycc_extxrgb_convert_mmx jSYCCEXTXRGBM
38 #define jconst_rgb_ycc_convert_sse2 jSCRGBYCCS2
39 #define jsimd_rgb_ycc_convert_sse2 jSRGBYCCS2
40 #define jsimd_extrgb_ycc_convert_sse2 jSEXTRGBYCCS2
41 #define jsimd_extrgbx_ycc_convert_sse2 jSEXTRGBXYCCS2
42 #define jsimd_extbgr_ycc_convert_sse2 jSEXTBGRYCCS2
43 #define jsimd_extbgrx_ycc_convert_sse2 jSEXTBGRXYCCS2
44 #define jsimd_extxbgr_ycc_convert_sse2 jSEXTXBGRYCCS2
45 #define jsimd_extxrgb_ycc_convert_sse2 jSEXTXRGBYCCS2
46 #define jconst_ycc_rgb_convert_sse2 jSCYCCRGBS2
47 #define jsimd_ycc_rgb_convert_sse2 jSYCCRGBS2
48 #define jsimd_ycc_extrgb_convert_sse2 jSYCCEXTRGBS2
49 #define jsimd_ycc_extrgbx_convert_sse2 jSYCCEXTRGBXS2
50 #define jsimd_ycc_extbgr_convert_sse2 jSYCCEXTBGRS2
51 #define jsimd_ycc_extbgrx_convert_sse2 jSYCCEXTBGRXS2
52 #define jsimd_ycc_extxbgr_convert_sse2 jSYCCEXTXBGRS2
53 #define jsimd_ycc_extxrgb_convert_sse2 jSYCCEXTXRGBS2
54 #define jsimd_h2v2_downsample_mmx jSDnH2V2M
55 #define jsimd_h2v1_downsample_mmx jSDnH2V1M
56 #define jsimd_h2v2_downsample_sse2 jSDnH2V2S2
57 #define jsimd_h2v1_downsample_sse2 jSDnH2V1S2
58 #define jsimd_h2v2_upsample_mmx jSUpH2V2M
59 #define jsimd_h2v1_upsample_mmx jSUpH2V1M
60 #define jsimd_h2v2_fancy_upsample_mmx jSFUpH2V2M
61 #define jsimd_h2v1_fancy_upsample_mmx jSFUpH2V1M
62 #define jsimd_h2v2_merged_upsample_mmx jSMUpH2V2M
63 #define jsimd_h2v2_extrgb_merged_upsample_mmx jSMUpH2V2EXTRGBM
64 #define jsimd_h2v2_extrgbx_merged_upsample_mmx jSMUpH2V2EXTRGBXM
65 #define jsimd_h2v2_extbgr_merged_upsample_mmx jSMUpH2V2EXTBGRM
66 #define jsimd_h2v2_extbgrx_merged_upsample_mmx jSMUpH2V2EXTBGRXM
67 #define jsimd_h2v2_extxbgr_merged_upsample_mmx jSMUpH2V2EXTXBGRM
68 #define jsimd_h2v2_extxrgb_merged_upsample_mmx jSMUpH2V2EXTXRGBM
69 #define jsimd_h2v1_merged_upsample_mmx jSMUpH2V1M
70 #define jsimd_h2v1_extrgb_merged_upsample_mmx jSMUpH2V1EXTRGBM
71 #define jsimd_h2v1_extrgbx_merged_upsample_mmx jSMUpH2V1EXTRGBXM
72 #define jsimd_h2v1_extbgr_merged_upsample_mmx jSMUpH2V1EXTBGRM
73 #define jsimd_h2v1_extbgrx_merged_upsample_mmx jSMUpH2V1EXTBGRXM
74 #define jsimd_h2v1_extxbgr_merged_upsample_mmx jSMUpH2V1EXTXBGRM
75 #define jsimd_h2v1_extxrgb_merged_upsample_mmx jSMUpH2V1EXTXRGBM
76 #define jsimd_h2v2_upsample_sse2 jSUpH2V2S2
77 #define jsimd_h2v1_upsample_sse2 jSUpH2V1S2
78 #define jconst_fancy_upsample_sse2 jSCFUpS2
79 #define jsimd_h2v2_fancy_upsample_sse2 jSFUpH2V2S2
80 #define jsimd_h2v1_fancy_upsample_sse2 jSFUpH2V1S2
81 #define jconst_merged_upsample_sse2 jSCMUpS2
82 #define jsimd_h2v2_merged_upsample_sse2 jSMUpH2V2S2
83 #define jsimd_h2v2_extrgb_merged_upsample_sse2 jSMUpH2V2EXTRGBS2
84 #define jsimd_h2v2_extrgbx_merged_upsample_sse2 jSMUpH2V2EXTRGBXS2
85 #define jsimd_h2v2_extbgr_merged_upsample_sse2 jSMUpH2V2EXTBGRS2
86 #define jsimd_h2v2_extbgrx_merged_upsample_sse2 jSMUpH2V2EXTBGRXS2
87 #define jsimd_h2v2_extxbgr_merged_upsample_sse2 jSMUpH2V2EXTXBGRS2
88 #define jsimd_h2v2_extxrgb_merged_upsample_sse2 jSMUpH2V2EXTXRGBS2
89 #define jsimd_h2v1_merged_upsample_sse2 jSMUpH2V1S2
90 #define jsimd_h2v1_extrgb_merged_upsample_sse2 jSMUpH2V1EXTRGBS2
91 #define jsimd_h2v1_extrgbx_merged_upsample_sse2 jSMUpH2V1EXTRGBXS2
92 #define jsimd_h2v1_extbgr_merged_upsample_sse2 jSMUpH2V1EXTBGRS2
93 #define jsimd_h2v1_extbgrx_merged_upsample_sse2 jSMUpH2V1EXTBGRXS2
94 #define jsimd_h2v1_extxbgr_merged_upsample_sse2 jSMUpH2V1EXTXBGRS2
95 #define jsimd_h2v1_extxrgb_merged_upsample_sse2 jSMUpH2V1EXTXRGBS2
96 #define jsimd_convsamp_mmx jSConvM
97 #define jsimd_convsamp_sse2 jSConvS2
98 #define jsimd_convsamp_float_3dnow jSConvF3D
99 #define jsimd_convsamp_float_sse jSConvFS
100 #define jsimd_convsamp_float_sse2 jSConvFS2
101 #define jsimd_fdct_islow_mmx jSFDMIS
102 #define jsimd_fdct_ifast_mmx jSFDMIF
103 #define jconst_fdct_islow_sse2 jSCFDS2IS
104 #define jsimd_fdct_islow_sse2 jSFDS2IS
105 #define jconst_fdct_ifast_sse2 jSCFDS2IF
106 #define jsimd_fdct_ifast_sse2 jSFDS2IF
107 #define jsimd_fdct_float_3dnow jSFD3DF
108 #define jconst_fdct_float_sse jSCFDSF
109 #define jsimd_fdct_float_sse jSFDSF
110 #define jsimd_quantize_mmx jSQuantM
111 #define jsimd_quantize_sse2 jSQuantS2
112 #define jsimd_quantize_float_3dnow jSQuantF3D
113 #define jsimd_quantize_float_sse jSQuantFS
114 #define jsimd_quantize_float_sse2 jSQuantFS2
115 #define jsimd_idct_2x2_mmx jSIDM22
116 #define jsimd_idct_4x4_mmx jSIDM44
117 #define jconst_idct_red_sse2 jSCIDS2R
118 #define jsimd_idct_2x2_sse2 jSIDS222
119 #define jsimd_idct_4x4_sse2 jSIDS244
120 #define jsimd_idct_islow_mmx jSIDMIS
121 #define jsimd_idct_ifast_mmx jSIDMIF
122 #define jconst_idct_islow_sse2 jSCIDS2IS
123 #define jsimd_idct_islow_sse2 jSIDS2IS
124 #define jconst_idct_ifast_sse2 jSCIDS2IF
125 #define jsimd_idct_ifast_sse2 jSIDS2IF
126 #define jsimd_idct_float_3dnow jSID3DF
127 #define jconst_fdct_float_sse jSCIDSF
128 #define jsimd_idct_float_sse jSIDSF
129 #define jconst_fdct_float_sse2 jSCIDS2F
130 #define jsimd_idct_float_sse2 jSIDS2F
131 #endif /* NEED_SHORT_EXTERNAL_NAMES */
133 /* SIMD Ext: retrieve SIMD/CPU information */
134 EXTERN(unsigned int) jpeg_simd_cpu_support JPP((void));
136 /* SIMD Color Space Conversion */
137 EXTERN(void) jsimd_rgb_ycc_convert_mmx
138 JPP((JDIMENSION img_width,
139 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
140 JDIMENSION output_row, int num_rows));
141 EXTERN(void) jsimd_extrgb_ycc_convert_mmx
142 JPP((JDIMENSION img_width,
143 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
144 JDIMENSION output_row, int num_rows));
145 EXTERN(void) jsimd_extrgbx_ycc_convert_mmx
146 JPP((JDIMENSION img_width,
147 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
148 JDIMENSION output_row, int num_rows));
149 EXTERN(void) jsimd_extbgr_ycc_convert_mmx
150 JPP((JDIMENSION img_width,
151 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
152 JDIMENSION output_row, int num_rows));
153 EXTERN(void) jsimd_extbgrx_ycc_convert_mmx
154 JPP((JDIMENSION img_width,
155 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
156 JDIMENSION output_row, int num_rows));
157 EXTERN(void) jsimd_extxbgr_ycc_convert_mmx
158 JPP((JDIMENSION img_width,
159 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
160 JDIMENSION output_row, int num_rows));
161 EXTERN(void) jsimd_extxrgb_ycc_convert_mmx
162 JPP((JDIMENSION img_width,
163 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
164 JDIMENSION output_row, int num_rows));
166 EXTERN(void) jsimd_ycc_rgb_convert_mmx
167 JPP((JDIMENSION out_width,
168 JSAMPIMAGE input_buf, JDIMENSION input_row,
169 JSAMPARRAY output_buf, int num_rows));
170 EXTERN(void) jsimd_ycc_extrgb_convert_mmx
171 JPP((JDIMENSION out_width,
172 JSAMPIMAGE input_buf, JDIMENSION input_row,
173 JSAMPARRAY output_buf, int num_rows));
174 EXTERN(void) jsimd_ycc_extrgbx_convert_mmx
175 JPP((JDIMENSION out_width,
176 JSAMPIMAGE input_buf, JDIMENSION input_row,
177 JSAMPARRAY output_buf, int num_rows));
178 EXTERN(void) jsimd_ycc_extbgr_convert_mmx
179 JPP((JDIMENSION out_width,
180 JSAMPIMAGE input_buf, JDIMENSION input_row,
181 JSAMPARRAY output_buf, int num_rows));
182 EXTERN(void) jsimd_ycc_extbgrx_convert_mmx
183 JPP((JDIMENSION out_width,
184 JSAMPIMAGE input_buf, JDIMENSION input_row,
185 JSAMPARRAY output_buf, int num_rows));
186 EXTERN(void) jsimd_ycc_extxbgr_convert_mmx
187 JPP((JDIMENSION out_width,
188 JSAMPIMAGE input_buf, JDIMENSION input_row,
189 JSAMPARRAY output_buf, int num_rows));
190 EXTERN(void) jsimd_ycc_extxrgb_convert_mmx
191 JPP((JDIMENSION out_width,
192 JSAMPIMAGE input_buf, JDIMENSION input_row,
193 JSAMPARRAY output_buf, int num_rows));
195 extern const int jconst_rgb_ycc_convert_sse2[];
196 EXTERN(void) jsimd_rgb_ycc_convert_sse2
197 JPP((JDIMENSION img_width,
198 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
199 JDIMENSION output_row, int num_rows));
200 EXTERN(void) jsimd_extrgb_ycc_convert_sse2
201 JPP((JDIMENSION img_width,
202 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
203 JDIMENSION output_row, int num_rows));
204 EXTERN(void) jsimd_extrgbx_ycc_convert_sse2
205 JPP((JDIMENSION img_width,
206 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
207 JDIMENSION output_row, int num_rows));
208 EXTERN(void) jsimd_extbgr_ycc_convert_sse2
209 JPP((JDIMENSION img_width,
210 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
211 JDIMENSION output_row, int num_rows));
212 EXTERN(void) jsimd_extbgrx_ycc_convert_sse2
213 JPP((JDIMENSION img_width,
214 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
215 JDIMENSION output_row, int num_rows));
216 EXTERN(void) jsimd_extxbgr_ycc_convert_sse2
217 JPP((JDIMENSION img_width,
218 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
219 JDIMENSION output_row, int num_rows));
220 EXTERN(void) jsimd_extxrgb_ycc_convert_sse2
221 JPP((JDIMENSION img_width,
222 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
223 JDIMENSION output_row, int num_rows));
225 extern const int jconst_ycc_rgb_convert_sse2[];
226 EXTERN(void) jsimd_ycc_rgb_convert_sse2
227 JPP((JDIMENSION out_width,
228 JSAMPIMAGE input_buf, JDIMENSION input_row,
229 JSAMPARRAY output_buf, int num_rows));
230 EXTERN(void) jsimd_ycc_extrgb_convert_sse2
231 JPP((JDIMENSION out_width,
232 JSAMPIMAGE input_buf, JDIMENSION input_row,
233 JSAMPARRAY output_buf, int num_rows));
234 EXTERN(void) jsimd_ycc_extrgbx_convert_sse2
235 JPP((JDIMENSION out_width,
236 JSAMPIMAGE input_buf, JDIMENSION input_row,
237 JSAMPARRAY output_buf, int num_rows));
238 EXTERN(void) jsimd_ycc_extbgr_convert_sse2
239 JPP((JDIMENSION out_width,
240 JSAMPIMAGE input_buf, JDIMENSION input_row,
241 JSAMPARRAY output_buf, int num_rows));
242 EXTERN(void) jsimd_ycc_extbgrx_convert_sse2
243 JPP((JDIMENSION out_width,
244 JSAMPIMAGE input_buf, JDIMENSION input_row,
245 JSAMPARRAY output_buf, int num_rows));
246 EXTERN(void) jsimd_ycc_extxbgr_convert_sse2
247 JPP((JDIMENSION out_width,
248 JSAMPIMAGE input_buf, JDIMENSION input_row,
249 JSAMPARRAY output_buf, int num_rows));
250 EXTERN(void) jsimd_ycc_extxrgb_convert_sse2
251 JPP((JDIMENSION out_width,
252 JSAMPIMAGE input_buf, JDIMENSION input_row,
253 JSAMPARRAY output_buf, int num_rows));
255 /* SIMD Downsample */
256 EXTERN(void) jsimd_h2v2_downsample_mmx
257 JPP((JDIMENSION image_width, int max_v_samp_factor,
258 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
259 JSAMPARRAY input_data, JSAMPARRAY output_data));
260 EXTERN(void) jsimd_h2v1_downsample_mmx
261 JPP((JDIMENSION image_width, int max_v_samp_factor,
262 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
263 JSAMPARRAY input_data, JSAMPARRAY output_data));
265 EXTERN(void) jsimd_h2v2_downsample_sse2
266 JPP((JDIMENSION image_width, int max_v_samp_factor,
267 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
268 JSAMPARRAY input_data, JSAMPARRAY output_data));
269 EXTERN(void) jsimd_h2v1_downsample_sse2
270 JPP((JDIMENSION image_width, int max_v_samp_factor,
271 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
272 JSAMPARRAY input_data, JSAMPARRAY output_data));
274 /* SIMD Upsample */
275 EXTERN(void) jsimd_h2v2_upsample_mmx
276 JPP((int max_v_samp_factor, JDIMENSION output_width,
277 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
278 EXTERN(void) jsimd_h2v1_upsample_mmx
279 JPP((int max_v_samp_factor, JDIMENSION output_width,
280 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
282 EXTERN(void) jsimd_h2v2_fancy_upsample_mmx
283 JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
284 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
285 EXTERN(void) jsimd_h2v1_fancy_upsample_mmx
286 JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
287 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
289 EXTERN(void) jsimd_h2v2_merged_upsample_mmx
290 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
291 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
292 EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mmx
293 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
294 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
295 EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mmx
296 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
297 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
298 EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mmx
299 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
300 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
301 EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mmx
302 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
303 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
304 EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mmx
305 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
306 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
307 EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mmx
308 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
309 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
310 EXTERN(void) jsimd_h2v1_merged_upsample_mmx
311 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
312 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
313 EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mmx
314 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
315 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
316 EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mmx
317 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
318 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
319 EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mmx
320 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
321 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
322 EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mmx
323 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
324 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
325 EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mmx
326 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
327 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
328 EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mmx
329 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
330 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
332 EXTERN(void) jsimd_h2v2_upsample_sse2
333 JPP((int max_v_samp_factor, JDIMENSION output_width,
334 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
335 EXTERN(void) jsimd_h2v1_upsample_sse2
336 JPP((int max_v_samp_factor, JDIMENSION output_width,
337 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
339 extern const int jconst_fancy_upsample_sse2[];
340 EXTERN(void) jsimd_h2v2_fancy_upsample_sse2
341 JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
342 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
343 EXTERN(void) jsimd_h2v1_fancy_upsample_sse2
344 JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
345 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
347 extern const int jconst_merged_upsample_sse2[];
348 EXTERN(void) jsimd_h2v2_merged_upsample_sse2
349 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
350 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
351 EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_sse2
352 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
353 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
354 EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_sse2
355 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
356 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
357 EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_sse2
358 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
359 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
360 EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_sse2
361 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
362 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
363 EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_sse2
364 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
365 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
366 EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_sse2
367 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
368 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
369 EXTERN(void) jsimd_h2v1_merged_upsample_sse2
370 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
371 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
372 EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_sse2
373 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
374 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
375 EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_sse2
376 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
377 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
378 EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_sse2
379 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
380 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
381 EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_sse2
382 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
383 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
384 EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_sse2
385 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
386 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
387 EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_sse2
388 JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
389 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
391 /* SIMD Sample Conversion */
392 EXTERN(void) jsimd_convsamp_mmx JPP((JSAMPARRAY sample_data,
393 JDIMENSION start_col,
394 DCTELEM * workspace));
396 EXTERN(void) jsimd_convsamp_sse2 JPP((JSAMPARRAY sample_data,
397 JDIMENSION start_col,
398 DCTELEM * workspace));
400 EXTERN(void) jsimd_convsamp_float_3dnow JPP((JSAMPARRAY sample_data,
401 JDIMENSION start_col,
402 FAST_FLOAT * workspace));
404 EXTERN(void) jsimd_convsamp_float_sse JPP((JSAMPARRAY sample_data,
405 JDIMENSION start_col,
406 FAST_FLOAT * workspace));
408 EXTERN(void) jsimd_convsamp_float_sse2 JPP((JSAMPARRAY sample_data,
409 JDIMENSION start_col,
410 FAST_FLOAT * workspace));
412 /* SIMD Forward DCT */
413 EXTERN(void) jsimd_fdct_islow_mmx JPP((DCTELEM * data));
414 EXTERN(void) jsimd_fdct_ifast_mmx JPP((DCTELEM * data));
416 extern const int jconst_fdct_ifast_sse2[];
417 EXTERN(void) jsimd_fdct_islow_sse2 JPP((DCTELEM * data));
418 extern const int jconst_fdct_islow_sse2[];
419 EXTERN(void) jsimd_fdct_ifast_sse2 JPP((DCTELEM * data));
421 EXTERN(void) jsimd_fdct_float_3dnow JPP((FAST_FLOAT * data));
423 extern const int jconst_fdct_float_sse[];
424 EXTERN(void) jsimd_fdct_float_sse JPP((FAST_FLOAT * data));
426 /* SIMD Quantization */
427 EXTERN(void) jsimd_quantize_mmx JPP((JCOEFPTR coef_block,
428 DCTELEM * divisors,
429 DCTELEM * workspace));
431 EXTERN(void) jsimd_quantize_sse2 JPP((JCOEFPTR coef_block,
432 DCTELEM * divisors,
433 DCTELEM * workspace));
435 EXTERN(void) jsimd_quantize_float_3dnow JPP((JCOEFPTR coef_block,
436 FAST_FLOAT * divisors,
437 FAST_FLOAT * workspace));
439 EXTERN(void) jsimd_quantize_float_sse JPP((JCOEFPTR coef_block,
440 FAST_FLOAT * divisors,
441 FAST_FLOAT * workspace));
443 EXTERN(void) jsimd_quantize_float_sse2 JPP((JCOEFPTR coef_block,
444 FAST_FLOAT * divisors,
445 FAST_FLOAT * workspace));
447 /* SIMD Reduced Inverse DCT */
448 EXTERN(void) jsimd_idct_2x2_mmx JPP((void * dct_table,
449 JCOEFPTR coef_block,
450 JSAMPARRAY output_buf,
451 JDIMENSION output_col));
452 EXTERN(void) jsimd_idct_4x4_mmx JPP((void * dct_table,
453 JCOEFPTR coef_block,
454 JSAMPARRAY output_buf,
455 JDIMENSION output_col));
457 extern const int jconst_idct_red_sse2[];
458 EXTERN(void) jsimd_idct_2x2_sse2 JPP((void * dct_table,
459 JCOEFPTR coef_block,
460 JSAMPARRAY output_buf,
461 JDIMENSION output_col));
462 EXTERN(void) jsimd_idct_4x4_sse2 JPP((void * dct_table,
463 JCOEFPTR coef_block,
464 JSAMPARRAY output_buf,
465 JDIMENSION output_col));
467 /* SIMD Inverse DCT */
468 EXTERN(void) jsimd_idct_islow_mmx JPP((void * dct_table,
469 JCOEFPTR coef_block,
470 JSAMPARRAY output_buf,
471 JDIMENSION output_col));
472 EXTERN(void) jsimd_idct_ifast_mmx JPP((void * dct_table,
473 JCOEFPTR coef_block,
474 JSAMPARRAY output_buf,
475 JDIMENSION output_col));
477 extern const int jconst_idct_islow_sse2[];
478 EXTERN(void) jsimd_idct_islow_sse2 JPP((void * dct_table,
479 JCOEFPTR coef_block,
480 JSAMPARRAY output_buf,
481 JDIMENSION output_col));
482 extern const int jconst_idct_ifast_sse2[];
483 EXTERN(void) jsimd_idct_ifast_sse2 JPP((void * dct_table,
484 JCOEFPTR coef_block,
485 JSAMPARRAY output_buf,
486 JDIMENSION output_col));
488 EXTERN(void) jsimd_idct_float_3dnow JPP((void * dct_table,
489 JCOEFPTR coef_block,
490 JSAMPARRAY output_buf,
491 JDIMENSION output_col));
493 extern const int jconst_idct_float_sse[];
494 EXTERN(void) jsimd_idct_float_sse JPP((void * dct_table,
495 JCOEFPTR coef_block,
496 JSAMPARRAY output_buf,
497 JDIMENSION output_col));
499 extern const int jconst_idct_float_sse2[];
500 EXTERN(void) jsimd_idct_float_sse2 JPP((void * dct_table,
501 JCOEFPTR coef_block,
502 JSAMPARRAY output_buf,
503 JDIMENSION output_col));