blob: 3522903b4f076a85498135b61ccfef1fee3d0bdb [file] [log] [blame]
Pierre Ossman2ae181c2009-03-09 13:21:27 +00001/*
2 * simd/jsimd.h
3 *
4 * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
DRC52a4ec62015-01-13 09:02:29 +00005 * Copyright (C) 2011, 2014-2015 D. R. Commander
DRC34347862014-05-06 09:53:21 +00006 * Copyright (C) 2013-2014, MIPS Technologies, Inc., California
DRCd729f4d2014-08-23 15:47:51 +00007 * Copyright (C) 2014 Linaro Limited
DRC49eaa752013-09-27 17:39:57 +00008 *
Pierre Ossman2ae181c2009-03-09 13:21:27 +00009 * Based on the x86 SIMD extension for IJG JPEG library,
10 * Copyright (C) 1999-2006, MIYASAKA Masaru.
DRCaf1ca9b2011-02-02 05:42:37 +000011 * For conditions of distribution and use, see copyright notice in jsimdext.inc
Pierre Ossman2ae181c2009-03-09 13:21:27 +000012 *
13 */
14
15/* Bitmask for supported acceleration methods */
16
DRC321e0682011-05-03 08:47:43 +000017#define JSIMD_NONE 0x00
18#define JSIMD_MMX 0x01
19#define JSIMD_3DNOW 0x02
20#define JSIMD_SSE 0x04
21#define JSIMD_SSE2 0x08
22#define JSIMD_ARM_NEON 0x10
DRC0be9fa52013-07-24 21:50:20 +000023#define JSIMD_MIPS_DSPR2 0x20
DRCcd2d8e12014-09-05 06:33:42 +000024#define JSIMD_ALTIVEC 0x40
Pierre Ossman2ae181c2009-03-09 13:21:27 +000025
Pierre Ossman2ae181c2009-03-09 13:21:27 +000026/* SIMD Ext: retrieve SIMD/CPU information */
DRCbc56b752014-05-16 10:43:44 +000027EXTERN(unsigned int) jpeg_simd_cpu_support (void);
Pierre Ossman2ae181c2009-03-09 13:21:27 +000028
DRCbc56b752014-05-16 10:43:44 +000029/* RGB & extended RGB --> YCC Colorspace Conversion */
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000030EXTERN(void) jsimd_rgb_ycc_convert_mmx
DRCbc56b752014-05-16 10:43:44 +000031 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
32 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000033EXTERN(void) jsimd_extrgb_ycc_convert_mmx
DRCbc56b752014-05-16 10:43:44 +000034 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
35 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000036EXTERN(void) jsimd_extrgbx_ycc_convert_mmx
DRCbc56b752014-05-16 10:43:44 +000037 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
38 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000039EXTERN(void) jsimd_extbgr_ycc_convert_mmx
DRCbc56b752014-05-16 10:43:44 +000040 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
41 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000042EXTERN(void) jsimd_extbgrx_ycc_convert_mmx
DRCbc56b752014-05-16 10:43:44 +000043 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
44 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000045EXTERN(void) jsimd_extxbgr_ycc_convert_mmx
DRCbc56b752014-05-16 10:43:44 +000046 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
47 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000048EXTERN(void) jsimd_extxrgb_ycc_convert_mmx
DRCbc56b752014-05-16 10:43:44 +000049 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
50 JDIMENSION output_row, int num_rows);
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000051
Pierre Ossmaneea72152009-03-09 13:34:17 +000052extern const int jconst_rgb_ycc_convert_sse2[];
53EXTERN(void) jsimd_rgb_ycc_convert_sse2
DRCbc56b752014-05-16 10:43:44 +000054 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
55 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000056EXTERN(void) jsimd_extrgb_ycc_convert_sse2
DRCbc56b752014-05-16 10:43:44 +000057 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
58 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000059EXTERN(void) jsimd_extrgbx_ycc_convert_sse2
DRCbc56b752014-05-16 10:43:44 +000060 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
61 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000062EXTERN(void) jsimd_extbgr_ycc_convert_sse2
DRCbc56b752014-05-16 10:43:44 +000063 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
64 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000065EXTERN(void) jsimd_extbgrx_ycc_convert_sse2
DRCbc56b752014-05-16 10:43:44 +000066 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
67 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000068EXTERN(void) jsimd_extxbgr_ycc_convert_sse2
DRCbc56b752014-05-16 10:43:44 +000069 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
70 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +000071EXTERN(void) jsimd_extxrgb_ycc_convert_sse2
DRCbc56b752014-05-16 10:43:44 +000072 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
73 JDIMENSION output_row, int num_rows);
74
75EXTERN(void) jsimd_rgb_ycc_convert_neon
76 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
77 JDIMENSION output_row, int num_rows);
78EXTERN(void) jsimd_extrgb_ycc_convert_neon
79 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
80 JDIMENSION output_row, int num_rows);
81EXTERN(void) jsimd_extrgbx_ycc_convert_neon
82 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
83 JDIMENSION output_row, int num_rows);
84EXTERN(void) jsimd_extbgr_ycc_convert_neon
85 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
86 JDIMENSION output_row, int num_rows);
87EXTERN(void) jsimd_extbgrx_ycc_convert_neon
88 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
89 JDIMENSION output_row, int num_rows);
90EXTERN(void) jsimd_extxbgr_ycc_convert_neon
91 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
92 JDIMENSION output_row, int num_rows);
93EXTERN(void) jsimd_extxrgb_ycc_convert_neon
94 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
95 JDIMENSION output_row, int num_rows);
96
97EXTERN(void) jsimd_rgb_ycc_convert_mips_dspr2
98 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
99 JDIMENSION output_row, int num_rows);
100EXTERN(void) jsimd_extrgb_ycc_convert_mips_dspr2
101 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
102 JDIMENSION output_row, int num_rows);
103EXTERN(void) jsimd_extrgbx_ycc_convert_mips_dspr2
104 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
105 JDIMENSION output_row, int num_rows);
106EXTERN(void) jsimd_extbgr_ycc_convert_mips_dspr2
107 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
108 JDIMENSION output_row, int num_rows);
109EXTERN(void) jsimd_extbgrx_ycc_convert_mips_dspr2
110 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
111 JDIMENSION output_row, int num_rows);
112EXTERN(void) jsimd_extxbgr_ycc_convert_mips_dspr2
113 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
114 JDIMENSION output_row, int num_rows);
115EXTERN(void) jsimd_extxrgb_ycc_convert_mips_dspr2
116 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
117 JDIMENSION output_row, int num_rows);
118
DRC62bae202014-12-22 13:42:26 +0000119EXTERN(void) jsimd_rgb_ycc_convert_altivec
120 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
121 JDIMENSION output_row, int num_rows);
122EXTERN(void) jsimd_extrgb_ycc_convert_altivec
123 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
124 JDIMENSION output_row, int num_rows);
125EXTERN(void) jsimd_extrgbx_ycc_convert_altivec
126 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
127 JDIMENSION output_row, int num_rows);
128EXTERN(void) jsimd_extbgr_ycc_convert_altivec
129 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
130 JDIMENSION output_row, int num_rows);
131EXTERN(void) jsimd_extbgrx_ycc_convert_altivec
132 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
133 JDIMENSION output_row, int num_rows);
134EXTERN(void) jsimd_extxbgr_ycc_convert_altivec
135 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
136 JDIMENSION output_row, int num_rows);
137EXTERN(void) jsimd_extxrgb_ycc_convert_altivec
138 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
139 JDIMENSION output_row, int num_rows);
140
DRCbc56b752014-05-16 10:43:44 +0000141/* RGB & extended RGB --> Grayscale Colorspace Conversion */
142EXTERN(void) jsimd_rgb_gray_convert_mmx
143 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
144 JDIMENSION output_row, int num_rows);
145EXTERN(void) jsimd_extrgb_gray_convert_mmx
146 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
147 JDIMENSION output_row, int num_rows);
148EXTERN(void) jsimd_extrgbx_gray_convert_mmx
149 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
150 JDIMENSION output_row, int num_rows);
151EXTERN(void) jsimd_extbgr_gray_convert_mmx
152 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
153 JDIMENSION output_row, int num_rows);
154EXTERN(void) jsimd_extbgrx_gray_convert_mmx
155 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
156 JDIMENSION output_row, int num_rows);
157EXTERN(void) jsimd_extxbgr_gray_convert_mmx
158 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
159 JDIMENSION output_row, int num_rows);
160EXTERN(void) jsimd_extxrgb_gray_convert_mmx
161 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
162 JDIMENSION output_row, int num_rows);
DRCf25c0712009-04-03 12:00:51 +0000163
DRCc8666332011-02-18 11:23:45 +0000164extern const int jconst_rgb_gray_convert_sse2[];
165EXTERN(void) jsimd_rgb_gray_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000166 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
167 JDIMENSION output_row, int num_rows);
DRCc8666332011-02-18 11:23:45 +0000168EXTERN(void) jsimd_extrgb_gray_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000169 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
170 JDIMENSION output_row, int num_rows);
DRCc8666332011-02-18 11:23:45 +0000171EXTERN(void) jsimd_extrgbx_gray_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000172 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
173 JDIMENSION output_row, int num_rows);
DRCc8666332011-02-18 11:23:45 +0000174EXTERN(void) jsimd_extbgr_gray_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000175 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
176 JDIMENSION output_row, int num_rows);
DRCc8666332011-02-18 11:23:45 +0000177EXTERN(void) jsimd_extbgrx_gray_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000178 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
179 JDIMENSION output_row, int num_rows);
DRCc8666332011-02-18 11:23:45 +0000180EXTERN(void) jsimd_extxbgr_gray_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000181 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
182 JDIMENSION output_row, int num_rows);
DRCc8666332011-02-18 11:23:45 +0000183EXTERN(void) jsimd_extxrgb_gray_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000184 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
185 JDIMENSION output_row, int num_rows);
186
187EXTERN(void) jsimd_rgb_gray_convert_mips_dspr2
188 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
189 JDIMENSION output_row, int num_rows);
190EXTERN(void) jsimd_extrgb_gray_convert_mips_dspr2
191 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
192 JDIMENSION output_row, int num_rows);
193EXTERN(void) jsimd_extrgbx_gray_convert_mips_dspr2
194 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
195 JDIMENSION output_row, int num_rows);
196EXTERN(void) jsimd_extbgr_gray_convert_mips_dspr2
197 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
198 JDIMENSION output_row, int num_rows);
199EXTERN(void) jsimd_extbgrx_gray_convert_mips_dspr2
200 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
201 JDIMENSION output_row, int num_rows);
202EXTERN(void) jsimd_extxbgr_gray_convert_mips_dspr2
203 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
204 JDIMENSION output_row, int num_rows);
205EXTERN(void) jsimd_extxrgb_gray_convert_mips_dspr2
206 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
207 JDIMENSION output_row, int num_rows);
208
DRCb1fec4f2014-12-22 14:10:33 +0000209EXTERN(void) jsimd_rgb_gray_convert_altivec
210 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
211 JDIMENSION output_row, int num_rows);
212EXTERN(void) jsimd_extrgb_gray_convert_altivec
213 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
214 JDIMENSION output_row, int num_rows);
215EXTERN(void) jsimd_extrgbx_gray_convert_altivec
216 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
217 JDIMENSION output_row, int num_rows);
218EXTERN(void) jsimd_extbgr_gray_convert_altivec
219 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
220 JDIMENSION output_row, int num_rows);
221EXTERN(void) jsimd_extbgrx_gray_convert_altivec
222 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
223 JDIMENSION output_row, int num_rows);
224EXTERN(void) jsimd_extxbgr_gray_convert_altivec
225 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
226 JDIMENSION output_row, int num_rows);
227EXTERN(void) jsimd_extxrgb_gray_convert_altivec
228 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
229 JDIMENSION output_row, int num_rows);
230
DRCbc56b752014-05-16 10:43:44 +0000231/* YCC --> RGB & extended RGB Colorspace Conversion */
232EXTERN(void) jsimd_ycc_rgb_convert_mmx
233 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
234 JSAMPARRAY output_buf, int num_rows);
235EXTERN(void) jsimd_ycc_extrgb_convert_mmx
236 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
237 JSAMPARRAY output_buf, int num_rows);
238EXTERN(void) jsimd_ycc_extrgbx_convert_mmx
239 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
240 JSAMPARRAY output_buf, int num_rows);
241EXTERN(void) jsimd_ycc_extbgr_convert_mmx
242 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
243 JSAMPARRAY output_buf, int num_rows);
244EXTERN(void) jsimd_ycc_extbgrx_convert_mmx
245 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
246 JSAMPARRAY output_buf, int num_rows);
247EXTERN(void) jsimd_ycc_extxbgr_convert_mmx
248 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
249 JSAMPARRAY output_buf, int num_rows);
250EXTERN(void) jsimd_ycc_extxrgb_convert_mmx
251 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
252 JSAMPARRAY output_buf, int num_rows);
DRCc8666332011-02-18 11:23:45 +0000253
Pierre Ossmaneea72152009-03-09 13:34:17 +0000254extern const int jconst_ycc_rgb_convert_sse2[];
255EXTERN(void) jsimd_ycc_rgb_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000256 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
257 JSAMPARRAY output_buf, int num_rows);
DRCf25c0712009-04-03 12:00:51 +0000258EXTERN(void) jsimd_ycc_extrgb_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000259 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
260 JSAMPARRAY output_buf, int num_rows);
DRCf25c0712009-04-03 12:00:51 +0000261EXTERN(void) jsimd_ycc_extrgbx_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000262 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
263 JSAMPARRAY output_buf, int num_rows);
DRCf25c0712009-04-03 12:00:51 +0000264EXTERN(void) jsimd_ycc_extbgr_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000265 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
266 JSAMPARRAY output_buf, int num_rows);
DRCf25c0712009-04-03 12:00:51 +0000267EXTERN(void) jsimd_ycc_extbgrx_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000268 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
269 JSAMPARRAY output_buf, int num_rows);
DRCf25c0712009-04-03 12:00:51 +0000270EXTERN(void) jsimd_ycc_extxbgr_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000271 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
272 JSAMPARRAY output_buf, int num_rows);
DRCf25c0712009-04-03 12:00:51 +0000273EXTERN(void) jsimd_ycc_extxrgb_convert_sse2
DRCbc56b752014-05-16 10:43:44 +0000274 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
275 JSAMPARRAY output_buf, int num_rows);
DRC7a9376c2011-08-12 19:27:20 +0000276
DRC321e0682011-05-03 08:47:43 +0000277EXTERN(void) jsimd_ycc_rgb_convert_neon
DRCbc56b752014-05-16 10:43:44 +0000278 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
279 JSAMPARRAY output_buf, int num_rows);
DRC321e0682011-05-03 08:47:43 +0000280EXTERN(void) jsimd_ycc_extrgb_convert_neon
DRCbc56b752014-05-16 10:43:44 +0000281 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
282 JSAMPARRAY output_buf, int num_rows);
DRC321e0682011-05-03 08:47:43 +0000283EXTERN(void) jsimd_ycc_extrgbx_convert_neon
DRCbc56b752014-05-16 10:43:44 +0000284 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
285 JSAMPARRAY output_buf, int num_rows);
DRC321e0682011-05-03 08:47:43 +0000286EXTERN(void) jsimd_ycc_extbgr_convert_neon
DRCbc56b752014-05-16 10:43:44 +0000287 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
288 JSAMPARRAY output_buf, int num_rows);
DRC321e0682011-05-03 08:47:43 +0000289EXTERN(void) jsimd_ycc_extbgrx_convert_neon
DRCbc56b752014-05-16 10:43:44 +0000290 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
291 JSAMPARRAY output_buf, int num_rows);
DRC321e0682011-05-03 08:47:43 +0000292EXTERN(void) jsimd_ycc_extxbgr_convert_neon
DRCbc56b752014-05-16 10:43:44 +0000293 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
294 JSAMPARRAY output_buf, int num_rows);
DRC321e0682011-05-03 08:47:43 +0000295EXTERN(void) jsimd_ycc_extxrgb_convert_neon
DRCbc56b752014-05-16 10:43:44 +0000296 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
297 JSAMPARRAY output_buf, int num_rows);
DRCd729f4d2014-08-23 15:47:51 +0000298EXTERN(void) jsimd_ycc_rgb565_convert_neon
299 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
300 JSAMPARRAY output_buf, int num_rows);
DRC321e0682011-05-03 08:47:43 +0000301
DRCbc56b752014-05-16 10:43:44 +0000302EXTERN(void) jsimd_ycc_rgb_convert_mips_dspr2
303 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
304 JSAMPARRAY output_buf, int num_rows);
DRC0be9fa52013-07-24 21:50:20 +0000305EXTERN(void) jsimd_ycc_extrgb_convert_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000306 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
307 JSAMPARRAY output_buf, int num_rows);
DRC0be9fa52013-07-24 21:50:20 +0000308EXTERN(void) jsimd_ycc_extrgbx_convert_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000309 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
310 JSAMPARRAY output_buf, int num_rows);
DRC0be9fa52013-07-24 21:50:20 +0000311EXTERN(void) jsimd_ycc_extbgr_convert_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000312 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
313 JSAMPARRAY output_buf, int num_rows);
DRC0be9fa52013-07-24 21:50:20 +0000314EXTERN(void) jsimd_ycc_extbgrx_convert_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000315 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
316 JSAMPARRAY output_buf, int num_rows);
DRC0be9fa52013-07-24 21:50:20 +0000317EXTERN(void) jsimd_ycc_extxbgr_convert_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000318 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
319 JSAMPARRAY output_buf, int num_rows);
DRC0be9fa52013-07-24 21:50:20 +0000320EXTERN(void) jsimd_ycc_extxrgb_convert_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000321 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
322 JSAMPARRAY output_buf, int num_rows);
DRC0be9fa52013-07-24 21:50:20 +0000323
DRCac4daa72015-01-10 22:56:26 +0000324EXTERN(void) jsimd_ycc_rgb_convert_altivec
325 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
326 JSAMPARRAY output_buf, int num_rows);
327EXTERN(void) jsimd_ycc_extrgb_convert_altivec
328 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
329 JSAMPARRAY output_buf, int num_rows);
330EXTERN(void) jsimd_ycc_extrgbx_convert_altivec
331 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
332 JSAMPARRAY output_buf, int num_rows);
333EXTERN(void) jsimd_ycc_extbgr_convert_altivec
334 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
335 JSAMPARRAY output_buf, int num_rows);
336EXTERN(void) jsimd_ycc_extbgrx_convert_altivec
337 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
338 JSAMPARRAY output_buf, int num_rows);
339EXTERN(void) jsimd_ycc_extxbgr_convert_altivec
340 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
341 JSAMPARRAY output_buf, int num_rows);
342EXTERN(void) jsimd_ycc_extxrgb_convert_altivec
343 (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
344 JSAMPARRAY output_buf, int num_rows);
345
DRCbc56b752014-05-16 10:43:44 +0000346/* NULL Colorspace Conversion */
DRC1b3fd7e2014-05-15 18:26:01 +0000347EXTERN(void) jsimd_c_null_convert_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000348 (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
349 JDIMENSION output_row, int num_rows, int num_components);
DRC1b3fd7e2014-05-15 18:26:01 +0000350
DRCbc56b752014-05-16 10:43:44 +0000351/* h2v1 Downsampling */
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000352EXTERN(void) jsimd_h2v1_downsample_mmx
DRCbc56b752014-05-16 10:43:44 +0000353 (JDIMENSION image_width, int max_v_samp_factor,
354 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
355 JSAMPARRAY input_data, JSAMPARRAY output_data);
356
357EXTERN(void) jsimd_h2v1_downsample_sse2
358 (JDIMENSION image_width, int max_v_samp_factor,
359 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
360 JSAMPARRAY input_data, JSAMPARRAY output_data);
361
362EXTERN(void) jsimd_h2v1_downsample_mips_dspr2
363 (JDIMENSION image_width, int max_v_samp_factor,
364 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
365 JSAMPARRAY input_data, JSAMPARRAY output_data);
366
DRC22048202015-01-08 06:18:33 +0000367EXTERN(void) jsimd_h2v1_downsample_altivec
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
DRCbc56b752014-05-16 10:43:44 +0000372/* h2v2 Downsampling */
373EXTERN(void) jsimd_h2v2_downsample_mmx
374 (JDIMENSION image_width, int max_v_samp_factor,
375 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
376 JSAMPARRAY input_data, JSAMPARRAY output_data);
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000377
Pierre Ossmaneea72152009-03-09 13:34:17 +0000378EXTERN(void) jsimd_h2v2_downsample_sse2
DRCbc56b752014-05-16 10:43:44 +0000379 (JDIMENSION image_width, int max_v_samp_factor,
380 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
381 JSAMPARRAY input_data, JSAMPARRAY output_data);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000382
DRC6f2d3c22013-07-27 21:48:18 +0000383EXTERN(void) jsimd_h2v2_downsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000384 (JDIMENSION image_width, int max_v_samp_factor,
385 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
386 JSAMPARRAY input_data, JSAMPARRAY output_data);
387
DRC22048202015-01-08 06:18:33 +0000388EXTERN(void) jsimd_h2v2_downsample_altivec
389 (JDIMENSION image_width, int max_v_samp_factor,
390 JDIMENSION v_samp_factor, JDIMENSION width_blocks,
391 JSAMPARRAY input_data, JSAMPARRAY output_data);
392
DRCbc56b752014-05-16 10:43:44 +0000393/* h2v2 Smooth Downsampling */
DRC6a61c1e2014-05-14 15:00:10 +0000394EXTERN(void) jsimd_h2v2_smooth_downsample_mips_dspr2
DRCc728cfd2014-05-18 19:36:05 +0000395 (JSAMPARRAY input_data, JSAMPARRAY output_data,
396 JDIMENSION v_samp_factor, int max_v_samp_factor,
397 int smoothing_factor, JDIMENSION width_blocks,
398 JDIMENSION image_width);
399
DRC6f2d3c22013-07-27 21:48:18 +0000400
DRCbc56b752014-05-16 10:43:44 +0000401/* Upsampling */
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000402EXTERN(void) jsimd_h2v1_upsample_mmx
DRCbc56b752014-05-16 10:43:44 +0000403 (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
404 JSAMPARRAY * output_data_ptr);
405EXTERN(void) jsimd_h2v2_upsample_mmx
406 (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
407 JSAMPARRAY * output_data_ptr);
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000408
Pierre Ossmaneea72152009-03-09 13:34:17 +0000409EXTERN(void) jsimd_h2v1_upsample_sse2
DRCbc56b752014-05-16 10:43:44 +0000410 (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
411 JSAMPARRAY * output_data_ptr);
412EXTERN(void) jsimd_h2v2_upsample_sse2
413 (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
414 JSAMPARRAY * output_data_ptr);
415
416EXTERN(void) jsimd_h2v1_upsample_mips_dspr2
417 (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
418 JSAMPARRAY * output_data_ptr);
419EXTERN(void) jsimd_h2v2_upsample_mips_dspr2
420 (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
421 JSAMPARRAY * output_data_ptr);
422
DRC5ef46302014-05-18 20:04:47 +0000423EXTERN(void) jsimd_int_upsample_mips_dspr2
424 (UINT8 h_expand, UINT8 v_expand, JSAMPARRAY input_data,
425 JSAMPARRAY * output_data_ptr, JDIMENSION output_width,
426 int max_v_samp_factor);
427
428
DRCbc56b752014-05-16 10:43:44 +0000429/* Fancy Upsampling */
430EXTERN(void) jsimd_h2v1_fancy_upsample_mmx
431 (int max_v_samp_factor, JDIMENSION downsampled_width,
432 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
433EXTERN(void) jsimd_h2v2_fancy_upsample_mmx
434 (int max_v_samp_factor, JDIMENSION downsampled_width,
435 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000436
437extern const int jconst_fancy_upsample_sse2[];
Pierre Ossmaneea72152009-03-09 13:34:17 +0000438EXTERN(void) jsimd_h2v1_fancy_upsample_sse2
DRCbc56b752014-05-16 10:43:44 +0000439 (int max_v_samp_factor, JDIMENSION downsampled_width,
440 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
441EXTERN(void) jsimd_h2v2_fancy_upsample_sse2
442 (int max_v_samp_factor, JDIMENSION downsampled_width,
443 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000444
DRC316617f2012-06-13 05:17:03 +0000445EXTERN(void) jsimd_h2v1_fancy_upsample_neon
DRCbc56b752014-05-16 10:43:44 +0000446 (int max_v_samp_factor, JDIMENSION downsampled_width,
447 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
DRC316617f2012-06-13 05:17:03 +0000448
DRC86fbf352013-07-27 21:44:14 +0000449EXTERN(void) jsimd_h2v1_fancy_upsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000450 (int max_v_samp_factor, JDIMENSION downsampled_width,
451 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
DRC86fbf352013-07-27 21:44:14 +0000452EXTERN(void) jsimd_h2v2_fancy_upsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000453 (int max_v_samp_factor, JDIMENSION downsampled_width,
454 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
455
DRC52a4ec62015-01-13 09:02:29 +0000456EXTERN(void) jsimd_h2v1_fancy_upsample_altivec
457 (int max_v_samp_factor, JDIMENSION downsampled_width,
458 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
459EXTERN(void) jsimd_h2v2_fancy_upsample_altivec
460 (int max_v_samp_factor, JDIMENSION downsampled_width,
461 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
462
DRCbc56b752014-05-16 10:43:44 +0000463/* Merged Upsampling */
464EXTERN(void) jsimd_h2v1_merged_upsample_mmx
465 (JDIMENSION output_width, JSAMPIMAGE input_buf,
466 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
467EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mmx
468 (JDIMENSION output_width, JSAMPIMAGE input_buf,
469 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
470EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mmx
471 (JDIMENSION output_width, JSAMPIMAGE input_buf,
472 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
473EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mmx
474 (JDIMENSION output_width, JSAMPIMAGE input_buf,
475 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
476EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mmx
477 (JDIMENSION output_width, JSAMPIMAGE input_buf,
478 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
479EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mmx
480 (JDIMENSION output_width, JSAMPIMAGE input_buf,
481 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
482EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mmx
483 (JDIMENSION output_width, JSAMPIMAGE input_buf,
484 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
485
486EXTERN(void) jsimd_h2v2_merged_upsample_mmx
487 (JDIMENSION output_width, JSAMPIMAGE input_buf,
488 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
489EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mmx
490 (JDIMENSION output_width, JSAMPIMAGE input_buf,
491 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
492EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mmx
493 (JDIMENSION output_width, JSAMPIMAGE input_buf,
494 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
495EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mmx
496 (JDIMENSION output_width, JSAMPIMAGE input_buf,
497 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
498EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mmx
499 (JDIMENSION output_width, JSAMPIMAGE input_buf,
500 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
501EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mmx
502 (JDIMENSION output_width, JSAMPIMAGE input_buf,
503 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
504EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mmx
505 (JDIMENSION output_width, JSAMPIMAGE input_buf,
506 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
507
508extern const int jconst_merged_upsample_sse2[];
509EXTERN(void) jsimd_h2v1_merged_upsample_sse2
510 (JDIMENSION output_width, JSAMPIMAGE input_buf,
511 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
512EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_sse2
513 (JDIMENSION output_width, JSAMPIMAGE input_buf,
514 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
515EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_sse2
516 (JDIMENSION output_width, JSAMPIMAGE input_buf,
517 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
518EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_sse2
519 (JDIMENSION output_width, JSAMPIMAGE input_buf,
520 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
521EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_sse2
522 (JDIMENSION output_width, JSAMPIMAGE input_buf,
523 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
524EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_sse2
525 (JDIMENSION output_width, JSAMPIMAGE input_buf,
526 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
527EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_sse2
528 (JDIMENSION output_width, JSAMPIMAGE input_buf,
529 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
530
531EXTERN(void) jsimd_h2v2_merged_upsample_sse2
532 (JDIMENSION output_width, JSAMPIMAGE input_buf,
533 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
534EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_sse2
535 (JDIMENSION output_width, JSAMPIMAGE input_buf,
536 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
537EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_sse2
538 (JDIMENSION output_width, JSAMPIMAGE input_buf,
539 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
540EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_sse2
541 (JDIMENSION output_width, JSAMPIMAGE input_buf,
542 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
543EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_sse2
544 (JDIMENSION output_width, JSAMPIMAGE input_buf,
545 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
546EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_sse2
547 (JDIMENSION output_width, JSAMPIMAGE input_buf,
548 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
549EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_sse2
550 (JDIMENSION output_width, JSAMPIMAGE input_buf,
551 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
552
553EXTERN(void) jsimd_h2v1_merged_upsample_mips_dspr2
554 (JDIMENSION output_width, JSAMPIMAGE input_buf,
555 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
556EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mips_dspr2
557 (JDIMENSION output_width, JSAMPIMAGE input_buf,
558 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
559EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mips_dspr2
560 (JDIMENSION output_width, JSAMPIMAGE input_buf,
561 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
562EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mips_dspr2
563 (JDIMENSION output_width, JSAMPIMAGE input_buf,
564 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
565EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mips_dspr2
566 (JDIMENSION output_width, JSAMPIMAGE input_buf,
567 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
568EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mips_dspr2
569 (JDIMENSION output_width, JSAMPIMAGE input_buf,
570 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
571EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mips_dspr2
572 (JDIMENSION output_width, JSAMPIMAGE input_buf,
573 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
DRC86fbf352013-07-27 21:44:14 +0000574
DRCb844eaa2014-05-13 18:40:14 +0000575EXTERN(void) jsimd_h2v2_merged_upsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000576 (JDIMENSION output_width, JSAMPIMAGE input_buf,
577 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
DRCb844eaa2014-05-13 18:40:14 +0000578EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000579 (JDIMENSION output_width, JSAMPIMAGE input_buf,
580 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
DRCb844eaa2014-05-13 18:40:14 +0000581EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000582 (JDIMENSION output_width, JSAMPIMAGE input_buf,
583 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
DRCb844eaa2014-05-13 18:40:14 +0000584EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000585 (JDIMENSION output_width, JSAMPIMAGE input_buf,
586 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
DRCb844eaa2014-05-13 18:40:14 +0000587EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000588 (JDIMENSION output_width, JSAMPIMAGE input_buf,
589 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
DRCb844eaa2014-05-13 18:40:14 +0000590EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000591 (JDIMENSION output_width, JSAMPIMAGE input_buf,
592 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
DRCb844eaa2014-05-13 18:40:14 +0000593EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mips_dspr2
DRCbc56b752014-05-16 10:43:44 +0000594 (JDIMENSION output_width, JSAMPIMAGE input_buf,
595 JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
DRCb844eaa2014-05-13 18:40:14 +0000596
DRCbc56b752014-05-16 10:43:44 +0000597/* Sample Conversion */
598EXTERN(void) jsimd_convsamp_mmx
599 (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace);
DRC16962c12013-07-27 21:50:02 +0000600
DRCbc56b752014-05-16 10:43:44 +0000601EXTERN(void) jsimd_convsamp_sse2
602 (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace);
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000603
DRCbc56b752014-05-16 10:43:44 +0000604EXTERN(void) jsimd_convsamp_neon
605 (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000606
DRCbc56b752014-05-16 10:43:44 +0000607EXTERN(void) jsimd_convsamp_mips_dspr2
608 (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace);
DRCb7400542011-08-10 23:31:13 +0000609
DRC577ecd92014-12-23 04:14:54 +0000610EXTERN(void) jsimd_convsamp_altivec
611 (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace);
612
DRCbc56b752014-05-16 10:43:44 +0000613/* Floating Point Sample Conversion */
614EXTERN(void) jsimd_convsamp_float_3dnow
615 (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT * workspace);
DRCfff6c232013-10-12 21:39:20 +0000616
DRCbc56b752014-05-16 10:43:44 +0000617EXTERN(void) jsimd_convsamp_float_sse
618 (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT * workspace);
Pierre Ossman65d03172009-03-09 13:28:10 +0000619
DRCbc56b752014-05-16 10:43:44 +0000620EXTERN(void) jsimd_convsamp_float_sse2
621 (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT * workspace);
Pierre Ossman018fc422009-03-09 13:31:56 +0000622
DRCbc56b752014-05-16 10:43:44 +0000623EXTERN(void) jsimd_convsamp_float_mips_dspr2
624 (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT * workspace);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000625
DRCbc56b752014-05-16 10:43:44 +0000626/* Slow Integer Forward DCT */
627EXTERN(void) jsimd_fdct_islow_mmx (DCTELEM * data);
DRC3d727282013-10-09 18:39:44 +0000628
DRCbc56b752014-05-16 10:43:44 +0000629extern const int jconst_fdct_islow_sse2[];
630EXTERN(void) jsimd_fdct_islow_sse2 (DCTELEM * data);
631
632EXTERN(void) jsimd_fdct_islow_mips_dspr2 (DCTELEM * data);
633
DRCfb0c3942014-12-17 08:04:39 +0000634EXTERN(void) jsimd_fdct_islow_altivec (DCTELEM * data);
635
DRCbc56b752014-05-16 10:43:44 +0000636/* Fast Integer Forward DCT */
637EXTERN(void) jsimd_fdct_ifast_mmx (DCTELEM * data);
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000638
Pierre Ossmaneea72152009-03-09 13:34:17 +0000639extern const int jconst_fdct_ifast_sse2[];
DRCbc56b752014-05-16 10:43:44 +0000640EXTERN(void) jsimd_fdct_ifast_sse2 (DCTELEM * data);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000641
DRCbc56b752014-05-16 10:43:44 +0000642EXTERN(void) jsimd_fdct_ifast_neon (DCTELEM * data);
DRCb7400542011-08-10 23:31:13 +0000643
DRCbc56b752014-05-16 10:43:44 +0000644EXTERN(void) jsimd_fdct_ifast_mips_dspr2 (DCTELEM * data);
DRCa6b7fbd2013-09-30 18:13:27 +0000645
DRCcd2d8e12014-09-05 06:33:42 +0000646EXTERN(void) jsimd_fdct_ifast_altivec (DCTELEM * data);
647
DRCbc56b752014-05-16 10:43:44 +0000648/* Floating Point Forward DCT */
649EXTERN(void) jsimd_fdct_float_3dnow (FAST_FLOAT * data);
Pierre Ossman65d03172009-03-09 13:28:10 +0000650
Pierre Ossman018fc422009-03-09 13:31:56 +0000651extern const int jconst_fdct_float_sse[];
DRCbc56b752014-05-16 10:43:44 +0000652EXTERN(void) jsimd_fdct_float_sse (FAST_FLOAT * data);
Pierre Ossman018fc422009-03-09 13:31:56 +0000653
DRCbc56b752014-05-16 10:43:44 +0000654/* Quantization */
655EXTERN(void) jsimd_quantize_mmx
656 (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace);
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000657
DRCbc56b752014-05-16 10:43:44 +0000658EXTERN(void) jsimd_quantize_sse2
659 (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000660
DRCbc56b752014-05-16 10:43:44 +0000661EXTERN(void) jsimd_quantize_neon
662 (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace);
DRC82bd5212011-08-17 21:00:59 +0000663
DRCbc56b752014-05-16 10:43:44 +0000664EXTERN(void) jsimd_quantize_mips_dspr2
665 (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace);
DRCa6b7fbd2013-09-30 18:13:27 +0000666
DRC577ecd92014-12-23 04:14:54 +0000667EXTERN(void) jsimd_quantize_altivec
668 (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace);
669
DRCbc56b752014-05-16 10:43:44 +0000670/* Floating Point Quantization */
671EXTERN(void) jsimd_quantize_float_3dnow
672 (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace);
Pierre Ossman65d03172009-03-09 13:28:10 +0000673
DRCbc56b752014-05-16 10:43:44 +0000674EXTERN(void) jsimd_quantize_float_sse
675 (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace);
Pierre Ossman018fc422009-03-09 13:31:56 +0000676
DRCbc56b752014-05-16 10:43:44 +0000677EXTERN(void) jsimd_quantize_float_sse2
678 (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000679
DRCbc56b752014-05-16 10:43:44 +0000680EXTERN(void) jsimd_quantize_float_mips_dspr2
681 (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace);
DRC3d727282013-10-09 18:39:44 +0000682
DRCbc56b752014-05-16 10:43:44 +0000683/* Scaled Inverse DCT */
684EXTERN(void) jsimd_idct_2x2_mmx
685 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
686 JDIMENSION output_col);
687EXTERN(void) jsimd_idct_4x4_mmx
688 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
689 JDIMENSION output_col);
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000690
Pierre Ossmaneea72152009-03-09 13:34:17 +0000691extern const int jconst_idct_red_sse2[];
DRCbc56b752014-05-16 10:43:44 +0000692EXTERN(void) jsimd_idct_2x2_sse2
693 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
694 JDIMENSION output_col);
695EXTERN(void) jsimd_idct_4x4_sse2
696 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
697 JDIMENSION output_col);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000698
DRCbc56b752014-05-16 10:43:44 +0000699EXTERN(void) jsimd_idct_2x2_neon
700 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
701 JDIMENSION output_col);
702EXTERN(void) jsimd_idct_4x4_neon
703 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
704 JDIMENSION output_col);
DRC8c60d222011-06-17 21:12:58 +0000705
DRCbc56b752014-05-16 10:43:44 +0000706EXTERN(void) jsimd_idct_2x2_mips_dspr2
707 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
708 JDIMENSION output_col);
709EXTERN(void) jsimd_idct_4x4_mips_dspr2
710 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
711 JDIMENSION output_col, int * workspace);
712EXTERN(void) jsimd_idct_6x6_mips_dspr2
713 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
714 JDIMENSION output_col);
715EXTERN(void) jsimd_idct_12x12_pass1_mips_dspr2
716 (JCOEFPTR coef_block, void * dct_table, int * workspace);
717EXTERN(void) jsimd_idct_12x12_pass2_mips_dspr2
718 (int * workspace, int * output);
DRCe5005912013-09-27 17:51:08 +0000719
DRCbc56b752014-05-16 10:43:44 +0000720/* Slow Integer Inverse DCT */
721EXTERN(void) jsimd_idct_islow_mmx
722 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
723 JDIMENSION output_col);
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000724
Pierre Ossmaneea72152009-03-09 13:34:17 +0000725extern const int jconst_idct_islow_sse2[];
DRCbc56b752014-05-16 10:43:44 +0000726EXTERN(void) jsimd_idct_islow_sse2
727 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
728 JDIMENSION output_col);
729
730EXTERN(void) jsimd_idct_islow_neon
731 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
732 JDIMENSION output_col);
733
734EXTERN(void) jsimd_idct_islow_mips_dspr2
DRCc728cfd2014-05-18 19:36:05 +0000735 (void * dct_table, JCOEFPTR coef_block, int * output_buf,
736 JSAMPLE * output_col);
DRCbc56b752014-05-16 10:43:44 +0000737
DRC06911622014-12-20 01:17:39 +0000738EXTERN(void) jsimd_idct_islow_altivec
739 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
740 JDIMENSION output_col);
741
DRCbc56b752014-05-16 10:43:44 +0000742/* Fast Integer Inverse DCT */
743EXTERN(void) jsimd_idct_ifast_mmx
744 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
745 JDIMENSION output_col);
746
Pierre Ossmaneea72152009-03-09 13:34:17 +0000747extern const int jconst_idct_ifast_sse2[];
DRCbc56b752014-05-16 10:43:44 +0000748EXTERN(void) jsimd_idct_ifast_sse2
749 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
750 JDIMENSION output_col);
Pierre Ossmaneea72152009-03-09 13:34:17 +0000751
DRCbc56b752014-05-16 10:43:44 +0000752EXTERN(void) jsimd_idct_ifast_neon
753 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
754 JDIMENSION output_col);
DRC321e0682011-05-03 08:47:43 +0000755
DRCbc56b752014-05-16 10:43:44 +0000756EXTERN(void) jsimd_idct_ifast_cols_mips_dspr2
757 (JCOEF * inptr, IFAST_MULT_TYPE * quantptr, DCTELEM * wsptr,
758 const int * idct_coefs);
759EXTERN(void) jsimd_idct_ifast_rows_mips_dspr2
760 (DCTELEM * wsptr, JSAMPARRAY output_buf, JDIMENSION output_col,
761 const int * idct_coefs);
DRCd3131c12013-10-08 02:18:59 +0000762
DRC6cb7f402014-12-18 10:12:29 +0000763EXTERN(void) jsimd_idct_ifast_altivec
764 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
765 JDIMENSION output_col);
766
DRCbc56b752014-05-16 10:43:44 +0000767/* Floating Point Inverse DCT */
768EXTERN(void) jsimd_idct_float_3dnow
769 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
770 JDIMENSION output_col);
Pierre Ossman65d03172009-03-09 13:28:10 +0000771
Pierre Ossman018fc422009-03-09 13:31:56 +0000772extern const int jconst_idct_float_sse[];
DRCbc56b752014-05-16 10:43:44 +0000773EXTERN(void) jsimd_idct_float_sse
774 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
775 JDIMENSION output_col);
Pierre Ossman018fc422009-03-09 13:31:56 +0000776
Pierre Ossmaneea72152009-03-09 13:34:17 +0000777extern const int jconst_idct_float_sse2[];
DRCbc56b752014-05-16 10:43:44 +0000778EXTERN(void) jsimd_idct_float_sse2
779 (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
780 JDIMENSION output_col);