Pierre Ossman | 82c7f31 | 2009-03-09 13:21:27 +0000 | [diff] [blame] | 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 | * |
| 9 | */ |
| 10 | |
| 11 | /* Bitmask for supported acceleration methods */ |
| 12 | |
| 13 | #define JSIMD_NONE 0x00 |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 14 | #define JSIMD_MMX 0x01 |
Pierre Ossman | 2c2e54b | 2009-03-09 13:28:10 +0000 | [diff] [blame] | 15 | #define JSIMD_3DNOW 0x02 |
Pierre Ossman | 0d37c57 | 2009-03-09 13:31:56 +0000 | [diff] [blame] | 16 | #define JSIMD_SSE 0x04 |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 17 | #define JSIMD_SSE2 0x08 |
Pierre Ossman | 82c7f31 | 2009-03-09 13:21:27 +0000 | [diff] [blame] | 18 | |
| 19 | /* Short forms of external names for systems with brain-damaged linkers. */ |
| 20 | |
| 21 | #ifdef NEED_SHORT_EXTERNAL_NAMES |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 22 | #define jpeg_simd_cpu_support jSiCpuSupport |
| 23 | #define jsimd_rgb_ycc_convert_mmx jSRGBYCCM |
DRC | 8ca81ec | 2009-04-03 12:00:51 +0000 | [diff] [blame] | 24 | #define jsimd_extrgb_ycc_convert_mmx jSEXTRGBYCCM |
| 25 | #define jsimd_extrgbx_ycc_convert_mmx jSEXTRGBXYCCM |
| 26 | #define jsimd_extbgr_ycc_convert_mmx jSEXTBGRYCCM |
| 27 | #define jsimd_extbgrx_ycc_convert_mmx jSEXTBGRXYCCM |
| 28 | #define jsimd_extxbgr_ycc_convert_mmx jSEXTXBGRYCCM |
| 29 | #define jsimd_extxrgb_ycc_convert_mmx jSEXTXRGBYCCM |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 30 | #define jsimd_ycc_rgb_convert_mmx jSYCCRGBM |
DRC | 8ca81ec | 2009-04-03 12:00:51 +0000 | [diff] [blame] | 31 | #define jsimd_ycc_extrgb_convert_mmx jSYCCEXTRGBM |
| 32 | #define jsimd_ycc_extrgbx_convert_mmx jSYCCEXTRGBXM |
| 33 | #define jsimd_ycc_extbgr_convert_mmx jSYCCEXTBGRM |
| 34 | #define jsimd_ycc_extbgrx_convert_mmx jSYCCEXTBGRXM |
| 35 | #define jsimd_ycc_extxbgr_convert_mmx jSYCCEXTXBGRM |
| 36 | #define jsimd_ycc_extxrgb_convert_mmx jSYCCEXTXRGBM |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 37 | #define jconst_rgb_ycc_convert_sse2 jSCRGBYCCS2 |
| 38 | #define jsimd_rgb_ycc_convert_sse2 jSRGBYCCS2 |
DRC | 8ca81ec | 2009-04-03 12:00:51 +0000 | [diff] [blame] | 39 | #define jsimd_extrgb_ycc_convert_sse2 jSEXTRGBYCCS2 |
| 40 | #define jsimd_extrgbx_ycc_convert_sse2 jSEXTRGBXYCCS2 |
| 41 | #define jsimd_extbgr_ycc_convert_sse2 jSEXTBGRYCCS2 |
| 42 | #define jsimd_extbgrx_ycc_convert_sse2 jSEXTBGRXYCCS2 |
| 43 | #define jsimd_extxbgr_ycc_convert_sse2 jSEXTXBGRYCCS2 |
| 44 | #define jsimd_extxrgb_ycc_convert_sse2 jSEXTXRGBYCCS2 |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 45 | #define jconst_ycc_rgb_convert_sse2 jSCYCCRGBS2 |
| 46 | #define jsimd_ycc_rgb_convert_sse2 jSYCCRGBS2 |
DRC | 8ca81ec | 2009-04-03 12:00:51 +0000 | [diff] [blame] | 47 | #define jsimd_ycc_extrgb_convert_sse2 jSYCCEXTRGBS2 |
| 48 | #define jsimd_ycc_extrgbx_convert_sse2 jSYCCEXTRGBXS2 |
| 49 | #define jsimd_ycc_extbgr_convert_sse2 jSYCCEXTBGRS2 |
| 50 | #define jsimd_ycc_extbgrx_convert_sse2 jSYCCEXTBGRXS2 |
| 51 | #define jsimd_ycc_extxbgr_convert_sse2 jSYCCEXTXBGRS2 |
| 52 | #define jsimd_ycc_extxrgb_convert_sse2 jSYCCEXTXRGBS2 |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 53 | #define jsimd_h2v2_downsample_mmx jSDnH2V2M |
| 54 | #define jsimd_h2v1_downsample_mmx jSDnH2V1M |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 55 | #define jsimd_h2v2_downsample_sse2 jSDnH2V2S2 |
| 56 | #define jsimd_h2v1_downsample_sse2 jSDnH2V1S2 |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 57 | #define jsimd_h2v2_upsample_mmx jSUpH2V2M |
| 58 | #define jsimd_h2v1_upsample_mmx jSUpH2V1M |
| 59 | #define jsimd_h2v2_fancy_upsample_mmx jSFUpH2V2M |
| 60 | #define jsimd_h2v1_fancy_upsample_mmx jSFUpH2V1M |
| 61 | #define jsimd_h2v2_merged_upsample_mmx jSMUpH2V2M |
| 62 | #define jsimd_h2v1_merged_upsample_mmx jSMUpH2V1M |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 63 | #define jsimd_h2v2_upsample_sse2 jSUpH2V2S2 |
| 64 | #define jsimd_h2v1_upsample_sse2 jSUpH2V1S2 |
| 65 | #define jconst_fancy_upsample_sse2 jSCFUpS2 |
| 66 | #define jsimd_h2v2_fancy_upsample_sse2 jSFUpH2V2S2 |
| 67 | #define jsimd_h2v1_fancy_upsample_sse2 jSFUpH2V1S2 |
| 68 | #define jconst_merged_upsample_sse2 jSCMUpS2 |
| 69 | #define jsimd_h2v2_merged_upsample_sse2 jSMUpH2V2S2 |
| 70 | #define jsimd_h2v1_merged_upsample_sse2 jSMUpH2V1S2 |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 71 | #define jsimd_convsamp_mmx jSConvM |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 72 | #define jsimd_convsamp_sse2 jSConvS2 |
Pierre Ossman | 2c2e54b | 2009-03-09 13:28:10 +0000 | [diff] [blame] | 73 | #define jsimd_convsamp_float_3dnow jSConvF3D |
Pierre Ossman | 0d37c57 | 2009-03-09 13:31:56 +0000 | [diff] [blame] | 74 | #define jsimd_convsamp_float_sse jSConvFS |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 75 | #define jsimd_convsamp_float_sse2 jSConvFS2 |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 76 | #define jsimd_fdct_islow_mmx jSFDMIS |
| 77 | #define jsimd_fdct_ifast_mmx jSFDMIF |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 78 | #define jconst_fdct_islow_sse2 jSCFDS2IS |
| 79 | #define jsimd_fdct_islow_sse2 jSFDS2IS |
| 80 | #define jconst_fdct_ifast_sse2 jSCFDS2IF |
| 81 | #define jsimd_fdct_ifast_sse2 jSFDS2IF |
Pierre Ossman | 2c2e54b | 2009-03-09 13:28:10 +0000 | [diff] [blame] | 82 | #define jsimd_fdct_float_3dnow jSFD3DF |
Pierre Ossman | 0d37c57 | 2009-03-09 13:31:56 +0000 | [diff] [blame] | 83 | #define jconst_fdct_float_sse jSCFDSF |
| 84 | #define jsimd_fdct_float_sse jSFDSF |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 85 | #define jsimd_quantize_mmx jSQuantM |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 86 | #define jsimd_quantize_sse2 jSQuantS2 |
Pierre Ossman | 2c2e54b | 2009-03-09 13:28:10 +0000 | [diff] [blame] | 87 | #define jsimd_quantize_float_3dnow jSQuantF3D |
Pierre Ossman | 0d37c57 | 2009-03-09 13:31:56 +0000 | [diff] [blame] | 88 | #define jsimd_quantize_float_sse jSQuantFS |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 89 | #define jsimd_quantize_float_sse2 jSQuantFS2 |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 90 | #define jsimd_idct_2x2_mmx jSIDM22 |
| 91 | #define jsimd_idct_4x4_mmx jSIDM44 |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 92 | #define jconst_idct_red_sse2 jSCIDS2R |
| 93 | #define jsimd_idct_2x2_sse2 jSIDS222 |
| 94 | #define jsimd_idct_4x4_sse2 jSIDS244 |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 95 | #define jsimd_idct_islow_mmx jSIDMIS |
| 96 | #define jsimd_idct_ifast_mmx jSIDMIF |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 97 | #define jconst_idct_islow_sse2 jSCIDS2IS |
| 98 | #define jsimd_idct_islow_sse2 jSIDS2IS |
| 99 | #define jconst_idct_ifast_sse2 jSCIDS2IF |
| 100 | #define jsimd_idct_ifast_sse2 jSIDS2IF |
Pierre Ossman | 2c2e54b | 2009-03-09 13:28:10 +0000 | [diff] [blame] | 101 | #define jsimd_idct_float_3dnow jSID3DF |
Pierre Ossman | 0d37c57 | 2009-03-09 13:31:56 +0000 | [diff] [blame] | 102 | #define jconst_fdct_float_sse jSCIDSF |
| 103 | #define jsimd_idct_float_sse jSIDSF |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 104 | #define jconst_fdct_float_sse2 jSCIDS2F |
| 105 | #define jsimd_idct_float_sse2 jSIDS2F |
Pierre Ossman | 82c7f31 | 2009-03-09 13:21:27 +0000 | [diff] [blame] | 106 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ |
| 107 | |
| 108 | /* SIMD Ext: retrieve SIMD/CPU information */ |
| 109 | EXTERN(unsigned int) jpeg_simd_cpu_support JPP((void)); |
| 110 | |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 111 | /* SIMD Color Space Conversion */ |
| 112 | EXTERN(void) jsimd_rgb_ycc_convert_mmx |
| 113 | JPP((JDIMENSION img_width, |
| 114 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 115 | JDIMENSION output_row, int num_rows)); |
DRC | 8ca81ec | 2009-04-03 12:00:51 +0000 | [diff] [blame] | 116 | EXTERN(void) jsimd_extrgb_ycc_convert_mmx |
| 117 | JPP((JDIMENSION img_width, |
| 118 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 119 | JDIMENSION output_row, int num_rows)); |
| 120 | EXTERN(void) jsimd_extrgbx_ycc_convert_mmx |
| 121 | JPP((JDIMENSION img_width, |
| 122 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 123 | JDIMENSION output_row, int num_rows)); |
| 124 | EXTERN(void) jsimd_extbgr_ycc_convert_mmx |
| 125 | JPP((JDIMENSION img_width, |
| 126 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 127 | JDIMENSION output_row, int num_rows)); |
| 128 | EXTERN(void) jsimd_extbgrx_ycc_convert_mmx |
| 129 | JPP((JDIMENSION img_width, |
| 130 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 131 | JDIMENSION output_row, int num_rows)); |
| 132 | EXTERN(void) jsimd_extxbgr_ycc_convert_mmx |
| 133 | JPP((JDIMENSION img_width, |
| 134 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 135 | JDIMENSION output_row, int num_rows)); |
| 136 | EXTERN(void) jsimd_extxrgb_ycc_convert_mmx |
| 137 | JPP((JDIMENSION img_width, |
| 138 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 139 | JDIMENSION output_row, int num_rows)); |
| 140 | |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 141 | EXTERN(void) jsimd_ycc_rgb_convert_mmx |
| 142 | JPP((JDIMENSION out_width, |
| 143 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 144 | JSAMPARRAY output_buf, int num_rows)); |
DRC | 8ca81ec | 2009-04-03 12:00:51 +0000 | [diff] [blame] | 145 | EXTERN(void) jsimd_ycc_extrgb_convert_mmx |
| 146 | JPP((JDIMENSION out_width, |
| 147 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 148 | JSAMPARRAY output_buf, int num_rows)); |
| 149 | EXTERN(void) jsimd_ycc_extrgbx_convert_mmx |
| 150 | JPP((JDIMENSION out_width, |
| 151 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 152 | JSAMPARRAY output_buf, int num_rows)); |
| 153 | EXTERN(void) jsimd_ycc_extbgr_convert_mmx |
| 154 | JPP((JDIMENSION out_width, |
| 155 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 156 | JSAMPARRAY output_buf, int num_rows)); |
| 157 | EXTERN(void) jsimd_ycc_extbgrx_convert_mmx |
| 158 | JPP((JDIMENSION out_width, |
| 159 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 160 | JSAMPARRAY output_buf, int num_rows)); |
| 161 | EXTERN(void) jsimd_ycc_extxbgr_convert_mmx |
| 162 | JPP((JDIMENSION out_width, |
| 163 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 164 | JSAMPARRAY output_buf, int num_rows)); |
| 165 | EXTERN(void) jsimd_ycc_extxrgb_convert_mmx |
| 166 | JPP((JDIMENSION out_width, |
| 167 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 168 | JSAMPARRAY output_buf, int num_rows)); |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 169 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 170 | extern const int jconst_rgb_ycc_convert_sse2[]; |
| 171 | EXTERN(void) jsimd_rgb_ycc_convert_sse2 |
| 172 | JPP((JDIMENSION img_width, |
| 173 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 174 | JDIMENSION output_row, int num_rows)); |
DRC | 8ca81ec | 2009-04-03 12:00:51 +0000 | [diff] [blame] | 175 | EXTERN(void) jsimd_extrgb_ycc_convert_sse2 |
| 176 | JPP((JDIMENSION img_width, |
| 177 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 178 | JDIMENSION output_row, int num_rows)); |
| 179 | EXTERN(void) jsimd_extrgbx_ycc_convert_sse2 |
| 180 | JPP((JDIMENSION img_width, |
| 181 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 182 | JDIMENSION output_row, int num_rows)); |
| 183 | EXTERN(void) jsimd_extbgr_ycc_convert_sse2 |
| 184 | JPP((JDIMENSION img_width, |
| 185 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 186 | JDIMENSION output_row, int num_rows)); |
| 187 | EXTERN(void) jsimd_extbgrx_ycc_convert_sse2 |
| 188 | JPP((JDIMENSION img_width, |
| 189 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 190 | JDIMENSION output_row, int num_rows)); |
| 191 | EXTERN(void) jsimd_extxbgr_ycc_convert_sse2 |
| 192 | JPP((JDIMENSION img_width, |
| 193 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 194 | JDIMENSION output_row, int num_rows)); |
| 195 | EXTERN(void) jsimd_extxrgb_ycc_convert_sse2 |
| 196 | JPP((JDIMENSION img_width, |
| 197 | JSAMPARRAY input_buf, JSAMPIMAGE output_buf, |
| 198 | JDIMENSION output_row, int num_rows)); |
| 199 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 200 | extern const int jconst_ycc_rgb_convert_sse2[]; |
| 201 | EXTERN(void) jsimd_ycc_rgb_convert_sse2 |
| 202 | JPP((JDIMENSION out_width, |
| 203 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 204 | JSAMPARRAY output_buf, int num_rows)); |
DRC | 8ca81ec | 2009-04-03 12:00:51 +0000 | [diff] [blame] | 205 | EXTERN(void) jsimd_ycc_extrgb_convert_sse2 |
| 206 | JPP((JDIMENSION out_width, |
| 207 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 208 | JSAMPARRAY output_buf, int num_rows)); |
| 209 | EXTERN(void) jsimd_ycc_extrgbx_convert_sse2 |
| 210 | JPP((JDIMENSION out_width, |
| 211 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 212 | JSAMPARRAY output_buf, int num_rows)); |
| 213 | EXTERN(void) jsimd_ycc_extbgr_convert_sse2 |
| 214 | JPP((JDIMENSION out_width, |
| 215 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 216 | JSAMPARRAY output_buf, int num_rows)); |
| 217 | EXTERN(void) jsimd_ycc_extbgrx_convert_sse2 |
| 218 | JPP((JDIMENSION out_width, |
| 219 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 220 | JSAMPARRAY output_buf, int num_rows)); |
| 221 | EXTERN(void) jsimd_ycc_extxbgr_convert_sse2 |
| 222 | JPP((JDIMENSION out_width, |
| 223 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 224 | JSAMPARRAY output_buf, int num_rows)); |
| 225 | EXTERN(void) jsimd_ycc_extxrgb_convert_sse2 |
| 226 | JPP((JDIMENSION out_width, |
| 227 | JSAMPIMAGE input_buf, JDIMENSION input_row, |
| 228 | JSAMPARRAY output_buf, int num_rows)); |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 229 | |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 230 | /* SIMD Downsample */ |
| 231 | EXTERN(void) jsimd_h2v2_downsample_mmx |
| 232 | JPP((JDIMENSION image_width, int max_v_samp_factor, |
| 233 | JDIMENSION v_samp_factor, JDIMENSION width_blocks, |
| 234 | JSAMPARRAY input_data, JSAMPARRAY output_data)); |
| 235 | EXTERN(void) jsimd_h2v1_downsample_mmx |
| 236 | JPP((JDIMENSION image_width, int max_v_samp_factor, |
| 237 | JDIMENSION v_samp_factor, JDIMENSION width_blocks, |
| 238 | JSAMPARRAY input_data, JSAMPARRAY output_data)); |
| 239 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 240 | EXTERN(void) jsimd_h2v2_downsample_sse2 |
| 241 | JPP((JDIMENSION image_width, int max_v_samp_factor, |
| 242 | JDIMENSION v_samp_factor, JDIMENSION width_blocks, |
| 243 | JSAMPARRAY input_data, JSAMPARRAY output_data)); |
| 244 | EXTERN(void) jsimd_h2v1_downsample_sse2 |
| 245 | JPP((JDIMENSION image_width, int max_v_samp_factor, |
| 246 | JDIMENSION v_samp_factor, JDIMENSION width_blocks, |
| 247 | JSAMPARRAY input_data, JSAMPARRAY output_data)); |
| 248 | |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 249 | /* SIMD Upsample */ |
| 250 | EXTERN(void) jsimd_h2v2_upsample_mmx |
| 251 | JPP((int max_v_samp_factor, JDIMENSION output_width, |
| 252 | JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); |
| 253 | EXTERN(void) jsimd_h2v1_upsample_mmx |
| 254 | JPP((int max_v_samp_factor, JDIMENSION output_width, |
| 255 | JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); |
| 256 | |
| 257 | EXTERN(void) jsimd_h2v2_fancy_upsample_mmx |
| 258 | JPP((int max_v_samp_factor, JDIMENSION downsampled_width, |
| 259 | JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); |
| 260 | EXTERN(void) jsimd_h2v1_fancy_upsample_mmx |
| 261 | JPP((int max_v_samp_factor, JDIMENSION downsampled_width, |
| 262 | JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); |
| 263 | |
| 264 | EXTERN(void) jsimd_h2v2_merged_upsample_mmx |
| 265 | JPP((JDIMENSION output_width, JSAMPIMAGE input_buf, |
| 266 | JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)); |
| 267 | EXTERN(void) jsimd_h2v1_merged_upsample_mmx |
| 268 | JPP((JDIMENSION output_width, JSAMPIMAGE input_buf, |
| 269 | JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)); |
| 270 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 271 | EXTERN(void) jsimd_h2v2_upsample_sse2 |
| 272 | JPP((int max_v_samp_factor, JDIMENSION output_width, |
| 273 | JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); |
| 274 | EXTERN(void) jsimd_h2v1_upsample_sse2 |
| 275 | JPP((int max_v_samp_factor, JDIMENSION output_width, |
| 276 | JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); |
| 277 | |
| 278 | extern const int jconst_fancy_upsample_sse2[]; |
| 279 | EXTERN(void) jsimd_h2v2_fancy_upsample_sse2 |
| 280 | JPP((int max_v_samp_factor, JDIMENSION downsampled_width, |
| 281 | JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); |
| 282 | EXTERN(void) jsimd_h2v1_fancy_upsample_sse2 |
| 283 | JPP((int max_v_samp_factor, JDIMENSION downsampled_width, |
| 284 | JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); |
| 285 | |
| 286 | extern const int jconst_merged_upsample_sse2[]; |
| 287 | EXTERN(void) jsimd_h2v2_merged_upsample_sse2 |
| 288 | JPP((JDIMENSION output_width, JSAMPIMAGE input_buf, |
| 289 | JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)); |
| 290 | EXTERN(void) jsimd_h2v1_merged_upsample_sse2 |
| 291 | JPP((JDIMENSION output_width, JSAMPIMAGE input_buf, |
| 292 | JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)); |
| 293 | |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 294 | /* SIMD Sample Conversion */ |
| 295 | EXTERN(void) jsimd_convsamp_mmx JPP((JSAMPARRAY sample_data, |
| 296 | JDIMENSION start_col, |
| 297 | DCTELEM * workspace)); |
| 298 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 299 | EXTERN(void) jsimd_convsamp_sse2 JPP((JSAMPARRAY sample_data, |
| 300 | JDIMENSION start_col, |
| 301 | DCTELEM * workspace)); |
| 302 | |
Pierre Ossman | 2c2e54b | 2009-03-09 13:28:10 +0000 | [diff] [blame] | 303 | EXTERN(void) jsimd_convsamp_float_3dnow JPP((JSAMPARRAY sample_data, |
| 304 | JDIMENSION start_col, |
| 305 | FAST_FLOAT * workspace)); |
| 306 | |
Pierre Ossman | 0d37c57 | 2009-03-09 13:31:56 +0000 | [diff] [blame] | 307 | EXTERN(void) jsimd_convsamp_float_sse JPP((JSAMPARRAY sample_data, |
| 308 | JDIMENSION start_col, |
| 309 | FAST_FLOAT * workspace)); |
| 310 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 311 | EXTERN(void) jsimd_convsamp_float_sse2 JPP((JSAMPARRAY sample_data, |
| 312 | JDIMENSION start_col, |
| 313 | FAST_FLOAT * workspace)); |
| 314 | |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 315 | /* SIMD Forward DCT */ |
| 316 | EXTERN(void) jsimd_fdct_islow_mmx JPP((DCTELEM * data)); |
| 317 | EXTERN(void) jsimd_fdct_ifast_mmx JPP((DCTELEM * data)); |
| 318 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 319 | extern const int jconst_fdct_ifast_sse2[]; |
| 320 | EXTERN(void) jsimd_fdct_islow_sse2 JPP((DCTELEM * data)); |
| 321 | extern const int jconst_fdct_islow_sse2[]; |
| 322 | EXTERN(void) jsimd_fdct_ifast_sse2 JPP((DCTELEM * data)); |
| 323 | |
Pierre Ossman | 2c2e54b | 2009-03-09 13:28:10 +0000 | [diff] [blame] | 324 | EXTERN(void) jsimd_fdct_float_3dnow JPP((FAST_FLOAT * data)); |
| 325 | |
Pierre Ossman | 0d37c57 | 2009-03-09 13:31:56 +0000 | [diff] [blame] | 326 | extern const int jconst_fdct_float_sse[]; |
| 327 | EXTERN(void) jsimd_fdct_float_sse JPP((FAST_FLOAT * data)); |
| 328 | |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 329 | /* SIMD Quantization */ |
| 330 | EXTERN(void) jsimd_quantize_mmx JPP((JCOEFPTR coef_block, |
| 331 | DCTELEM * divisors, |
| 332 | DCTELEM * workspace)); |
| 333 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 334 | EXTERN(void) jsimd_quantize_sse2 JPP((JCOEFPTR coef_block, |
| 335 | DCTELEM * divisors, |
| 336 | DCTELEM * workspace)); |
| 337 | |
Pierre Ossman | 2c2e54b | 2009-03-09 13:28:10 +0000 | [diff] [blame] | 338 | EXTERN(void) jsimd_quantize_float_3dnow JPP((JCOEFPTR coef_block, |
| 339 | FAST_FLOAT * divisors, |
| 340 | FAST_FLOAT * workspace)); |
| 341 | |
Pierre Ossman | 0d37c57 | 2009-03-09 13:31:56 +0000 | [diff] [blame] | 342 | EXTERN(void) jsimd_quantize_float_sse JPP((JCOEFPTR coef_block, |
| 343 | FAST_FLOAT * divisors, |
| 344 | FAST_FLOAT * workspace)); |
| 345 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 346 | EXTERN(void) jsimd_quantize_float_sse2 JPP((JCOEFPTR coef_block, |
| 347 | FAST_FLOAT * divisors, |
| 348 | FAST_FLOAT * workspace)); |
| 349 | |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 350 | /* SIMD Reduced Inverse DCT */ |
| 351 | EXTERN(void) jsimd_idct_2x2_mmx JPP((void * dct_table, |
| 352 | JCOEFPTR coef_block, |
| 353 | JSAMPARRAY output_buf, |
| 354 | JDIMENSION output_col)); |
| 355 | EXTERN(void) jsimd_idct_4x4_mmx JPP((void * dct_table, |
| 356 | JCOEFPTR coef_block, |
| 357 | JSAMPARRAY output_buf, |
| 358 | JDIMENSION output_col)); |
| 359 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 360 | extern const int jconst_idct_red_sse2[]; |
| 361 | EXTERN(void) jsimd_idct_2x2_sse2 JPP((void * dct_table, |
| 362 | JCOEFPTR coef_block, |
| 363 | JSAMPARRAY output_buf, |
| 364 | JDIMENSION output_col)); |
| 365 | EXTERN(void) jsimd_idct_4x4_sse2 JPP((void * dct_table, |
| 366 | JCOEFPTR coef_block, |
| 367 | JSAMPARRAY output_buf, |
| 368 | JDIMENSION output_col)); |
| 369 | |
Pierre Ossman | 3e0e2de | 2009-03-09 13:25:30 +0000 | [diff] [blame] | 370 | /* SIMD Inverse DCT */ |
| 371 | EXTERN(void) jsimd_idct_islow_mmx JPP((void * dct_table, |
| 372 | JCOEFPTR coef_block, |
| 373 | JSAMPARRAY output_buf, |
| 374 | JDIMENSION output_col)); |
| 375 | EXTERN(void) jsimd_idct_ifast_mmx JPP((void * dct_table, |
| 376 | JCOEFPTR coef_block, |
| 377 | JSAMPARRAY output_buf, |
| 378 | JDIMENSION output_col)); |
| 379 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 380 | extern const int jconst_idct_islow_sse2[]; |
| 381 | EXTERN(void) jsimd_idct_islow_sse2 JPP((void * dct_table, |
| 382 | JCOEFPTR coef_block, |
| 383 | JSAMPARRAY output_buf, |
| 384 | JDIMENSION output_col)); |
| 385 | extern const int jconst_idct_ifast_sse2[]; |
| 386 | EXTERN(void) jsimd_idct_ifast_sse2 JPP((void * dct_table, |
| 387 | JCOEFPTR coef_block, |
| 388 | JSAMPARRAY output_buf, |
| 389 | JDIMENSION output_col)); |
| 390 | |
Pierre Ossman | 2c2e54b | 2009-03-09 13:28:10 +0000 | [diff] [blame] | 391 | EXTERN(void) jsimd_idct_float_3dnow JPP((void * dct_table, |
| 392 | JCOEFPTR coef_block, |
| 393 | JSAMPARRAY output_buf, |
| 394 | JDIMENSION output_col)); |
| 395 | |
Pierre Ossman | 0d37c57 | 2009-03-09 13:31:56 +0000 | [diff] [blame] | 396 | extern const int jconst_idct_float_sse[]; |
| 397 | EXTERN(void) jsimd_idct_float_sse JPP((void * dct_table, |
| 398 | JCOEFPTR coef_block, |
| 399 | JSAMPARRAY output_buf, |
| 400 | JDIMENSION output_col)); |
| 401 | |
Pierre Ossman | 7469386 | 2009-03-09 13:34:17 +0000 | [diff] [blame] | 402 | extern const int jconst_idct_float_sse2[]; |
| 403 | EXTERN(void) jsimd_idct_float_sse2 JPP((void * dct_table, |
| 404 | JCOEFPTR coef_block, |
| 405 | JSAMPARRAY output_buf, |
| 406 | JDIMENSION output_col)); |
| 407 | |