PageRenderTime 47ms CodeModel.GetById 7ms app.highlight 35ms RepoModel.GetById 1ms app.codeStats 1ms

/media/libjpeg/simd/jsimd.h

http://github.com/zpao/v8monkey
C Header | 504 lines | 444 code | 39 blank | 21 comment | 0 complexity | a151b9002943ff29d46f1d4ef42e663b MD5 | raw file
  1/*
  2 * simd/jsimd.h
  3 *
  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
  9 *
 10 */
 11
 12/* Bitmask for supported acceleration methods */
 13
 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
 19
 20/* Short forms of external names for systems with brain-damaged linkers. */
 21
 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 */
132
133/* SIMD Ext: retrieve SIMD/CPU information */
134EXTERN(unsigned int) jpeg_simd_cpu_support JPP((void));
135
136/* SIMD Color Space Conversion */
137EXTERN(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));
141EXTERN(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));
145EXTERN(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));
149EXTERN(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));
153EXTERN(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));
157EXTERN(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));
161EXTERN(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));
165
166EXTERN(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));
170EXTERN(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));
174EXTERN(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));
178EXTERN(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));
182EXTERN(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));
186EXTERN(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));
190EXTERN(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));
194
195extern const int jconst_rgb_ycc_convert_sse2[];
196EXTERN(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));
200EXTERN(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));
204EXTERN(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));
208EXTERN(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));
212EXTERN(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));
216EXTERN(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));
220EXTERN(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));
224
225extern const int jconst_ycc_rgb_convert_sse2[];
226EXTERN(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));
230EXTERN(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));
234EXTERN(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));
238EXTERN(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));
242EXTERN(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));
246EXTERN(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));
250EXTERN(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));
254
255/* SIMD Downsample */
256EXTERN(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));
260EXTERN(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));
264
265EXTERN(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));
269EXTERN(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));
273
274/* SIMD Upsample */
275EXTERN(void) jsimd_h2v2_upsample_mmx
276        JPP((int max_v_samp_factor, JDIMENSION output_width,
277             JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
278EXTERN(void) jsimd_h2v1_upsample_mmx
279        JPP((int max_v_samp_factor, JDIMENSION output_width,
280             JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
281
282EXTERN(void) jsimd_h2v2_fancy_upsample_mmx
283        JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
284             JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
285EXTERN(void) jsimd_h2v1_fancy_upsample_mmx
286        JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
287             JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
288
289EXTERN(void) jsimd_h2v2_merged_upsample_mmx
290        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
291             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
292EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mmx
293        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
294             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
295EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mmx
296        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
297             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
298EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mmx
299        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
300             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
301EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mmx
302        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
303             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
304EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mmx
305        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
306             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
307EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mmx
308        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
309             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
310EXTERN(void) jsimd_h2v1_merged_upsample_mmx
311        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
312             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
313EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mmx
314        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
315             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
316EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mmx
317        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
318             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
319EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mmx
320        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
321             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
322EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mmx
323        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
324             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
325EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mmx
326        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
327             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
328EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mmx
329        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
330             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
331
332EXTERN(void) jsimd_h2v2_upsample_sse2
333        JPP((int max_v_samp_factor, JDIMENSION output_width,
334             JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
335EXTERN(void) jsimd_h2v1_upsample_sse2
336        JPP((int max_v_samp_factor, JDIMENSION output_width,
337             JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
338
339extern const int jconst_fancy_upsample_sse2[];
340EXTERN(void) jsimd_h2v2_fancy_upsample_sse2
341        JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
342             JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
343EXTERN(void) jsimd_h2v1_fancy_upsample_sse2
344        JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
345             JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
346
347extern const int jconst_merged_upsample_sse2[];
348EXTERN(void) jsimd_h2v2_merged_upsample_sse2
349        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
350             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
351EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_sse2
352        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
353             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
354EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_sse2
355        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
356             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
357EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_sse2
358        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
359             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
360EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_sse2
361        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
362             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
363EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_sse2
364        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
365             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
366EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_sse2
367        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
368             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
369EXTERN(void) jsimd_h2v1_merged_upsample_sse2
370        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
371             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
372EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_sse2
373        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
374             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
375EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_sse2
376        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
377             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
378EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_sse2
379        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
380             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
381EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_sse2
382        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
383             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
384EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_sse2
385        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
386             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
387EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_sse2
388        JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
389             JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
390
391/* SIMD Sample Conversion */
392EXTERN(void) jsimd_convsamp_mmx JPP((JSAMPARRAY sample_data,
393                                     JDIMENSION start_col,
394                                     DCTELEM * workspace));
395
396EXTERN(void) jsimd_convsamp_sse2 JPP((JSAMPARRAY sample_data,
397                                      JDIMENSION start_col,
398                                      DCTELEM * workspace));
399
400EXTERN(void) jsimd_convsamp_float_3dnow JPP((JSAMPARRAY sample_data,
401                                             JDIMENSION start_col,
402                                             FAST_FLOAT * workspace));
403
404EXTERN(void) jsimd_convsamp_float_sse JPP((JSAMPARRAY sample_data,
405                                           JDIMENSION start_col,
406                                           FAST_FLOAT * workspace));
407
408EXTERN(void) jsimd_convsamp_float_sse2 JPP((JSAMPARRAY sample_data,
409                                            JDIMENSION start_col,
410                                            FAST_FLOAT * workspace));
411
412/* SIMD Forward DCT */
413EXTERN(void) jsimd_fdct_islow_mmx JPP((DCTELEM * data));
414EXTERN(void) jsimd_fdct_ifast_mmx JPP((DCTELEM * data));
415
416extern const int jconst_fdct_ifast_sse2[];
417EXTERN(void) jsimd_fdct_islow_sse2 JPP((DCTELEM * data));
418extern const int jconst_fdct_islow_sse2[];
419EXTERN(void) jsimd_fdct_ifast_sse2 JPP((DCTELEM * data));
420
421EXTERN(void) jsimd_fdct_float_3dnow JPP((FAST_FLOAT * data));
422
423extern const int jconst_fdct_float_sse[];
424EXTERN(void) jsimd_fdct_float_sse JPP((FAST_FLOAT * data));
425
426/* SIMD Quantization */
427EXTERN(void) jsimd_quantize_mmx JPP((JCOEFPTR coef_block,
428                                     DCTELEM * divisors,
429                                     DCTELEM * workspace));
430
431EXTERN(void) jsimd_quantize_sse2 JPP((JCOEFPTR coef_block,
432                                      DCTELEM * divisors,
433                                      DCTELEM * workspace));
434
435EXTERN(void) jsimd_quantize_float_3dnow JPP((JCOEFPTR coef_block,
436                                             FAST_FLOAT * divisors,
437                                             FAST_FLOAT * workspace));
438
439EXTERN(void) jsimd_quantize_float_sse JPP((JCOEFPTR coef_block,
440                                           FAST_FLOAT * divisors,
441                                           FAST_FLOAT * workspace));
442
443EXTERN(void) jsimd_quantize_float_sse2 JPP((JCOEFPTR coef_block,
444                                            FAST_FLOAT * divisors,
445                                            FAST_FLOAT * workspace));
446
447/* SIMD Reduced Inverse DCT */
448EXTERN(void) jsimd_idct_2x2_mmx JPP((void * dct_table,
449                                     JCOEFPTR coef_block,
450                                     JSAMPARRAY output_buf,
451                                     JDIMENSION output_col));
452EXTERN(void) jsimd_idct_4x4_mmx JPP((void * dct_table,
453                                     JCOEFPTR coef_block,
454                                     JSAMPARRAY output_buf,
455                                     JDIMENSION output_col));
456
457extern const int jconst_idct_red_sse2[];
458EXTERN(void) jsimd_idct_2x2_sse2 JPP((void * dct_table,
459                                      JCOEFPTR coef_block,
460                                      JSAMPARRAY output_buf,
461                                      JDIMENSION output_col));
462EXTERN(void) jsimd_idct_4x4_sse2 JPP((void * dct_table,
463                                      JCOEFPTR coef_block,
464                                      JSAMPARRAY output_buf,
465                                      JDIMENSION output_col));
466
467/* SIMD Inverse DCT */
468EXTERN(void) jsimd_idct_islow_mmx JPP((void * dct_table,
469                                       JCOEFPTR coef_block,
470                                       JSAMPARRAY output_buf,
471                                       JDIMENSION output_col));
472EXTERN(void) jsimd_idct_ifast_mmx JPP((void * dct_table,
473                                       JCOEFPTR coef_block,
474                                       JSAMPARRAY output_buf,
475                                       JDIMENSION output_col));
476
477extern const int jconst_idct_islow_sse2[];
478EXTERN(void) jsimd_idct_islow_sse2 JPP((void * dct_table,
479                                        JCOEFPTR coef_block,
480                                        JSAMPARRAY output_buf,
481                                        JDIMENSION output_col));
482extern const int jconst_idct_ifast_sse2[];
483EXTERN(void) jsimd_idct_ifast_sse2 JPP((void * dct_table,
484                                        JCOEFPTR coef_block,
485                                        JSAMPARRAY output_buf,
486                                        JDIMENSION output_col));
487
488EXTERN(void) jsimd_idct_float_3dnow JPP((void * dct_table,
489                                         JCOEFPTR coef_block,
490                                         JSAMPARRAY output_buf,
491                                         JDIMENSION output_col));
492
493extern const int jconst_idct_float_sse[];
494EXTERN(void) jsimd_idct_float_sse JPP((void * dct_table,
495                                       JCOEFPTR coef_block,
496                                       JSAMPARRAY output_buf,
497                                       JDIMENSION output_col));
498
499extern const int jconst_idct_float_sse2[];
500EXTERN(void) jsimd_idct_float_sse2 JPP((void * dct_table,
501                                        JCOEFPTR coef_block,
502                                        JSAMPARRAY output_buf,
503                                        JDIMENSION output_col));
504