1 /*
2 * jsimd_none.c
3 *
4 * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
5 * Copyright 2009-2011, 2014 D. R. Commander
6 *
7 * Based on the x86 SIMD extension for IJG JPEG library,
8 * Copyright (C) 1999-2006, MIYASAKA Masaru.
9 * For conditions of distribution and use, see copyright notice in jsimdext.inc
10 *
11 * This file contains stubs for when there is no SIMD support available.
12 */
13
14 #define JPEG_INTERNALS
15 #include "jinclude.h"
16 #include "jpeglib.h"
17 #include "jsimd.h"
18 #include "jdct.h"
19 #include "jsimddct.h"
20
21 GLOBAL(int)
jsimd_can_rgb_ycc(void)22 jsimd_can_rgb_ycc (void)
23 {
24 return 0;
25 }
26
27 GLOBAL(int)
jsimd_can_rgb_gray(void)28 jsimd_can_rgb_gray (void)
29 {
30 return 0;
31 }
32
33 GLOBAL(int)
jsimd_can_ycc_rgb(void)34 jsimd_can_ycc_rgb (void)
35 {
36 return 0;
37 }
38
39 GLOBAL(int)
jsimd_can_ycc_rgb565(void)40 jsimd_can_ycc_rgb565 (void)
41 {
42 return 0;
43 }
44
45 GLOBAL(int)
jsimd_c_can_null_convert(void)46 jsimd_c_can_null_convert (void)
47 {
48 return 0;
49 }
50
51 GLOBAL(void)
jsimd_rgb_ycc_convert(j_compress_ptr cinfo,JSAMPARRAY input_buf,JSAMPIMAGE output_buf,JDIMENSION output_row,int num_rows)52 jsimd_rgb_ycc_convert (j_compress_ptr cinfo,
53 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
54 JDIMENSION output_row, int num_rows)
55 {
56 }
57
58 GLOBAL(void)
jsimd_rgb_gray_convert(j_compress_ptr cinfo,JSAMPARRAY input_buf,JSAMPIMAGE output_buf,JDIMENSION output_row,int num_rows)59 jsimd_rgb_gray_convert (j_compress_ptr cinfo,
60 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
61 JDIMENSION output_row, int num_rows)
62 {
63 }
64
65 GLOBAL(void)
jsimd_ycc_rgb_convert(j_decompress_ptr cinfo,JSAMPIMAGE input_buf,JDIMENSION input_row,JSAMPARRAY output_buf,int num_rows)66 jsimd_ycc_rgb_convert (j_decompress_ptr cinfo,
67 JSAMPIMAGE input_buf, JDIMENSION input_row,
68 JSAMPARRAY output_buf, int num_rows)
69 {
70 }
71
72 GLOBAL(void)
jsimd_ycc_rgb565_convert(j_decompress_ptr cinfo,JSAMPIMAGE input_buf,JDIMENSION input_row,JSAMPARRAY output_buf,int num_rows)73 jsimd_ycc_rgb565_convert (j_decompress_ptr cinfo,
74 JSAMPIMAGE input_buf, JDIMENSION input_row,
75 JSAMPARRAY output_buf, int num_rows)
76 {
77 }
78
79 GLOBAL(void)
jsimd_c_null_convert(j_compress_ptr cinfo,JSAMPARRAY input_buf,JSAMPIMAGE output_buf,JDIMENSION output_row,int num_rows)80 jsimd_c_null_convert (j_compress_ptr cinfo,
81 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
82 JDIMENSION output_row, int num_rows)
83 {
84 }
85
86 GLOBAL(int)
jsimd_can_h2v2_downsample(void)87 jsimd_can_h2v2_downsample (void)
88 {
89 return 0;
90 }
91
92 GLOBAL(int)
jsimd_can_h2v1_downsample(void)93 jsimd_can_h2v1_downsample (void)
94 {
95 return 0;
96 }
97
98 GLOBAL(int)
jsimd_can_h2v2_smooth_downsample(void)99 jsimd_can_h2v2_smooth_downsample (void)
100 {
101 return 0;
102 }
103
104 GLOBAL(void)
jsimd_h2v2_downsample(j_compress_ptr cinfo,jpeg_component_info * compptr,JSAMPARRAY input_data,JSAMPARRAY output_data)105 jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
106 JSAMPARRAY input_data, JSAMPARRAY output_data)
107 {
108 }
109
110 GLOBAL(void)
jsimd_h2v2_smooth_downsample(j_compress_ptr cinfo,jpeg_component_info * compptr,JSAMPARRAY input_data,JSAMPARRAY output_data)111 jsimd_h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
112 JSAMPARRAY input_data, JSAMPARRAY output_data)
113 {
114 }
115
116 GLOBAL(void)
jsimd_h2v1_downsample(j_compress_ptr cinfo,jpeg_component_info * compptr,JSAMPARRAY input_data,JSAMPARRAY output_data)117 jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
118 JSAMPARRAY input_data, JSAMPARRAY output_data)
119 {
120 }
121
122 GLOBAL(int)
jsimd_can_h2v2_upsample(void)123 jsimd_can_h2v2_upsample (void)
124 {
125 return 0;
126 }
127
128 GLOBAL(int)
jsimd_can_h2v1_upsample(void)129 jsimd_can_h2v1_upsample (void)
130 {
131 return 0;
132 }
133
134 GLOBAL(int)
jsimd_can_int_upsample(void)135 jsimd_can_int_upsample (void)
136 {
137 return 0;
138 }
139
140 GLOBAL(void)
jsimd_int_upsample(j_decompress_ptr cinfo,jpeg_component_info * compptr,JSAMPARRAY input_data,JSAMPARRAY * output_data_ptr)141 jsimd_int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
142 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
143 {
144 }
145
146 GLOBAL(void)
jsimd_h2v2_upsample(j_decompress_ptr cinfo,jpeg_component_info * compptr,JSAMPARRAY input_data,JSAMPARRAY * output_data_ptr)147 jsimd_h2v2_upsample (j_decompress_ptr cinfo,
148 jpeg_component_info * compptr,
149 JSAMPARRAY input_data,
150 JSAMPARRAY * output_data_ptr)
151 {
152 }
153
154 GLOBAL(void)
jsimd_h2v1_upsample(j_decompress_ptr cinfo,jpeg_component_info * compptr,JSAMPARRAY input_data,JSAMPARRAY * output_data_ptr)155 jsimd_h2v1_upsample (j_decompress_ptr cinfo,
156 jpeg_component_info * compptr,
157 JSAMPARRAY input_data,
158 JSAMPARRAY * output_data_ptr)
159 {
160 }
161
162 GLOBAL(int)
jsimd_can_h2v2_fancy_upsample(void)163 jsimd_can_h2v2_fancy_upsample (void)
164 {
165 return 0;
166 }
167
168 GLOBAL(int)
jsimd_can_h2v1_fancy_upsample(void)169 jsimd_can_h2v1_fancy_upsample (void)
170 {
171 return 0;
172 }
173
174 GLOBAL(void)
jsimd_h2v2_fancy_upsample(j_decompress_ptr cinfo,jpeg_component_info * compptr,JSAMPARRAY input_data,JSAMPARRAY * output_data_ptr)175 jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo,
176 jpeg_component_info * compptr,
177 JSAMPARRAY input_data,
178 JSAMPARRAY * output_data_ptr)
179 {
180 }
181
182 GLOBAL(void)
jsimd_h2v1_fancy_upsample(j_decompress_ptr cinfo,jpeg_component_info * compptr,JSAMPARRAY input_data,JSAMPARRAY * output_data_ptr)183 jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo,
184 jpeg_component_info * compptr,
185 JSAMPARRAY input_data,
186 JSAMPARRAY * output_data_ptr)
187 {
188 }
189
190 GLOBAL(int)
jsimd_can_h2v2_merged_upsample(void)191 jsimd_can_h2v2_merged_upsample (void)
192 {
193 return 0;
194 }
195
196 GLOBAL(int)
jsimd_can_h2v1_merged_upsample(void)197 jsimd_can_h2v1_merged_upsample (void)
198 {
199 return 0;
200 }
201
202 GLOBAL(void)
jsimd_h2v2_merged_upsample(j_decompress_ptr cinfo,JSAMPIMAGE input_buf,JDIMENSION in_row_group_ctr,JSAMPARRAY output_buf)203 jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo,
204 JSAMPIMAGE input_buf,
205 JDIMENSION in_row_group_ctr,
206 JSAMPARRAY output_buf)
207 {
208 }
209
210 GLOBAL(void)
jsimd_h2v1_merged_upsample(j_decompress_ptr cinfo,JSAMPIMAGE input_buf,JDIMENSION in_row_group_ctr,JSAMPARRAY output_buf)211 jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo,
212 JSAMPIMAGE input_buf,
213 JDIMENSION in_row_group_ctr,
214 JSAMPARRAY output_buf)
215 {
216 }
217
218 GLOBAL(int)
jsimd_can_convsamp(void)219 jsimd_can_convsamp (void)
220 {
221 return 0;
222 }
223
224 GLOBAL(int)
jsimd_can_convsamp_float(void)225 jsimd_can_convsamp_float (void)
226 {
227 return 0;
228 }
229
230 GLOBAL(void)
jsimd_convsamp(JSAMPARRAY sample_data,JDIMENSION start_col,DCTELEM * workspace)231 jsimd_convsamp (JSAMPARRAY sample_data, JDIMENSION start_col,
232 DCTELEM * workspace)
233 {
234 }
235
236 GLOBAL(void)
jsimd_convsamp_float(JSAMPARRAY sample_data,JDIMENSION start_col,FAST_FLOAT * workspace)237 jsimd_convsamp_float (JSAMPARRAY sample_data, JDIMENSION start_col,
238 FAST_FLOAT * workspace)
239 {
240 }
241
242 GLOBAL(int)
jsimd_can_fdct_islow(void)243 jsimd_can_fdct_islow (void)
244 {
245 return 0;
246 }
247
248 GLOBAL(int)
jsimd_can_fdct_ifast(void)249 jsimd_can_fdct_ifast (void)
250 {
251 return 0;
252 }
253
254 GLOBAL(int)
jsimd_can_fdct_float(void)255 jsimd_can_fdct_float (void)
256 {
257 return 0;
258 }
259
260 GLOBAL(void)
jsimd_fdct_islow(DCTELEM * data)261 jsimd_fdct_islow (DCTELEM * data)
262 {
263 }
264
265 GLOBAL(void)
jsimd_fdct_ifast(DCTELEM * data)266 jsimd_fdct_ifast (DCTELEM * data)
267 {
268 }
269
270 GLOBAL(void)
jsimd_fdct_float(FAST_FLOAT * data)271 jsimd_fdct_float (FAST_FLOAT * data)
272 {
273 }
274
275 GLOBAL(int)
jsimd_can_quantize(void)276 jsimd_can_quantize (void)
277 {
278 return 0;
279 }
280
281 GLOBAL(int)
jsimd_can_quantize_float(void)282 jsimd_can_quantize_float (void)
283 {
284 return 0;
285 }
286
287 GLOBAL(void)
jsimd_quantize(JCOEFPTR coef_block,DCTELEM * divisors,DCTELEM * workspace)288 jsimd_quantize (JCOEFPTR coef_block, DCTELEM * divisors,
289 DCTELEM * workspace)
290 {
291 }
292
293 GLOBAL(void)
jsimd_quantize_float(JCOEFPTR coef_block,FAST_FLOAT * divisors,FAST_FLOAT * workspace)294 jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT * divisors,
295 FAST_FLOAT * workspace)
296 {
297 }
298
299 GLOBAL(int)
jsimd_can_idct_2x2(void)300 jsimd_can_idct_2x2 (void)
301 {
302 return 0;
303 }
304
305 GLOBAL(int)
jsimd_can_idct_4x4(void)306 jsimd_can_idct_4x4 (void)
307 {
308 return 0;
309 }
310
311 GLOBAL(int)
jsimd_can_idct_6x6(void)312 jsimd_can_idct_6x6 (void)
313 {
314 return 0;
315 }
316
317 GLOBAL(int)
jsimd_can_idct_12x12(void)318 jsimd_can_idct_12x12 (void)
319 {
320 return 0;
321 }
322
323 GLOBAL(void)
jsimd_idct_2x2(j_decompress_ptr cinfo,jpeg_component_info * compptr,JCOEFPTR coef_block,JSAMPARRAY output_buf,JDIMENSION output_col)324 jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
325 JCOEFPTR coef_block, JSAMPARRAY output_buf,
326 JDIMENSION output_col)
327 {
328 }
329
330 GLOBAL(void)
jsimd_idct_4x4(j_decompress_ptr cinfo,jpeg_component_info * compptr,JCOEFPTR coef_block,JSAMPARRAY output_buf,JDIMENSION output_col)331 jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
332 JCOEFPTR coef_block, JSAMPARRAY output_buf,
333 JDIMENSION output_col)
334 {
335 }
336
337 GLOBAL(void)
jsimd_idct_6x6(j_decompress_ptr cinfo,jpeg_component_info * compptr,JCOEFPTR coef_block,JSAMPARRAY output_buf,JDIMENSION output_col)338 jsimd_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
339 JCOEFPTR coef_block, JSAMPARRAY output_buf,
340 JDIMENSION output_col)
341 {
342 }
343
344 GLOBAL(void)
jsimd_idct_12x12(j_decompress_ptr cinfo,jpeg_component_info * compptr,JCOEFPTR coef_block,JSAMPARRAY output_buf,JDIMENSION output_col)345 jsimd_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
346 JCOEFPTR coef_block, JSAMPARRAY output_buf,
347 JDIMENSION output_col)
348 {
349 }
350
351 GLOBAL(int)
jsimd_can_idct_islow(void)352 jsimd_can_idct_islow (void)
353 {
354 return 0;
355 }
356
357 GLOBAL(int)
jsimd_can_idct_ifast(void)358 jsimd_can_idct_ifast (void)
359 {
360 return 0;
361 }
362
363 GLOBAL(int)
jsimd_can_idct_float(void)364 jsimd_can_idct_float (void)
365 {
366 return 0;
367 }
368
369 GLOBAL(void)
jsimd_idct_islow(j_decompress_ptr cinfo,jpeg_component_info * compptr,JCOEFPTR coef_block,JSAMPARRAY output_buf,JDIMENSION output_col)370 jsimd_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
371 JCOEFPTR coef_block, JSAMPARRAY output_buf,
372 JDIMENSION output_col)
373 {
374 }
375
376 GLOBAL(void)
jsimd_idct_ifast(j_decompress_ptr cinfo,jpeg_component_info * compptr,JCOEFPTR coef_block,JSAMPARRAY output_buf,JDIMENSION output_col)377 jsimd_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr,
378 JCOEFPTR coef_block, JSAMPARRAY output_buf,
379 JDIMENSION output_col)
380 {
381 }
382
383 GLOBAL(void)
jsimd_idct_float(j_decompress_ptr cinfo,jpeg_component_info * compptr,JCOEFPTR coef_block,JSAMPARRAY output_buf,JDIMENSION output_col)384 jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
385 JCOEFPTR coef_block, JSAMPARRAY output_buf,
386 JDIMENSION output_col)
387 {
388 }
389
390