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