4 * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
5 * Copyright (C) 2009-2011, 2014, 2022, D. R. Commander.
6 * Copyright (C) 2015-2016, 2018, 2022, Matthieu Darbois.
7 * Copyright (C) 2020, Arm Limited.
9 * Based on the x86 SIMD extension for IJG JPEG library,
10 * Copyright (C) 1999-2006, MIYASAKA Masaru.
11 * For conditions of distribution and use, see copyright notice in jsimdext.inc
13 * This file contains stubs for when there is no SIMD support available.
16 #define JPEG_INTERNALS
24 jsimd_can_rgb_ycc(void)
30 jsimd_can_rgb_gray(void)
36 jsimd_can_ycc_rgb(void)
42 jsimd_can_ycc_rgb565(void)
48 jsimd_c_can_null_convert(void)
54 jsimd_rgb_ycc_convert(j_compress_ptr cinfo
, JSAMPARRAY input_buf
,
55 JSAMPIMAGE output_buf
, JDIMENSION output_row
,
61 jsimd_rgb_gray_convert(j_compress_ptr cinfo
, JSAMPARRAY input_buf
,
62 JSAMPIMAGE output_buf
, JDIMENSION output_row
,
68 jsimd_ycc_rgb_convert(j_decompress_ptr cinfo
, JSAMPIMAGE input_buf
,
69 JDIMENSION input_row
, JSAMPARRAY output_buf
,
75 jsimd_ycc_rgb565_convert(j_decompress_ptr cinfo
, JSAMPIMAGE input_buf
,
76 JDIMENSION input_row
, JSAMPARRAY output_buf
,
82 jsimd_c_null_convert(j_compress_ptr cinfo
, JSAMPARRAY input_buf
,
83 JSAMPIMAGE output_buf
, JDIMENSION output_row
,
89 jsimd_can_h2v2_downsample(void)
95 jsimd_can_h2v1_downsample(void)
101 jsimd_can_h2v2_smooth_downsample(void)
107 jsimd_h2v2_downsample(j_compress_ptr cinfo
, jpeg_component_info
*compptr
,
108 JSAMPARRAY input_data
, JSAMPARRAY output_data
)
113 jsimd_h2v2_smooth_downsample(j_compress_ptr cinfo
,
114 jpeg_component_info
*compptr
,
115 JSAMPARRAY input_data
, JSAMPARRAY output_data
)
120 jsimd_h2v1_downsample(j_compress_ptr cinfo
, jpeg_component_info
*compptr
,
121 JSAMPARRAY input_data
, JSAMPARRAY output_data
)
126 jsimd_can_h2v2_upsample(void)
132 jsimd_can_h2v1_upsample(void)
138 jsimd_can_int_upsample(void)
144 jsimd_int_upsample(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
145 JSAMPARRAY input_data
, JSAMPARRAY
*output_data_ptr
)
150 jsimd_h2v2_upsample(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
151 JSAMPARRAY input_data
, JSAMPARRAY
*output_data_ptr
)
156 jsimd_h2v1_upsample(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
157 JSAMPARRAY input_data
, JSAMPARRAY
*output_data_ptr
)
162 jsimd_can_h2v2_fancy_upsample(void)
168 jsimd_can_h2v1_fancy_upsample(void)
174 jsimd_can_h1v2_fancy_upsample(void)
180 jsimd_h2v2_fancy_upsample(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
181 JSAMPARRAY input_data
, JSAMPARRAY
*output_data_ptr
)
186 jsimd_h2v1_fancy_upsample(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
187 JSAMPARRAY input_data
, JSAMPARRAY
*output_data_ptr
)
192 jsimd_h1v2_fancy_upsample(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
193 JSAMPARRAY input_data
, JSAMPARRAY
*output_data_ptr
)
198 jsimd_can_h2v2_merged_upsample(void)
204 jsimd_can_h2v1_merged_upsample(void)
210 jsimd_h2v2_merged_upsample(j_decompress_ptr cinfo
, JSAMPIMAGE input_buf
,
211 JDIMENSION in_row_group_ctr
, JSAMPARRAY output_buf
)
216 jsimd_h2v1_merged_upsample(j_decompress_ptr cinfo
, JSAMPIMAGE input_buf
,
217 JDIMENSION in_row_group_ctr
, JSAMPARRAY output_buf
)
222 jsimd_can_convsamp(void)
228 jsimd_can_convsamp_float(void)
234 jsimd_convsamp(JSAMPARRAY sample_data
, JDIMENSION start_col
,
240 jsimd_convsamp_float(JSAMPARRAY sample_data
, JDIMENSION start_col
,
241 FAST_FLOAT
*workspace
)
246 jsimd_can_fdct_islow(void)
252 jsimd_can_fdct_ifast(void)
258 jsimd_can_fdct_float(void)
264 jsimd_fdct_islow(DCTELEM
*data
)
269 jsimd_fdct_ifast(DCTELEM
*data
)
274 jsimd_fdct_float(FAST_FLOAT
*data
)
279 jsimd_can_quantize(void)
285 jsimd_can_quantize_float(void)
291 jsimd_quantize(JCOEFPTR coef_block
, DCTELEM
*divisors
, DCTELEM
*workspace
)
296 jsimd_quantize_float(JCOEFPTR coef_block
, FAST_FLOAT
*divisors
,
297 FAST_FLOAT
*workspace
)
302 jsimd_can_idct_2x2(void)
308 jsimd_can_idct_4x4(void)
314 jsimd_can_idct_6x6(void)
320 jsimd_can_idct_12x12(void)
326 jsimd_idct_2x2(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
327 JCOEFPTR coef_block
, JSAMPARRAY output_buf
,
328 JDIMENSION output_col
)
333 jsimd_idct_4x4(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
334 JCOEFPTR coef_block
, JSAMPARRAY output_buf
,
335 JDIMENSION output_col
)
340 jsimd_idct_6x6(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
341 JCOEFPTR coef_block
, JSAMPARRAY output_buf
,
342 JDIMENSION output_col
)
347 jsimd_idct_12x12(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
348 JCOEFPTR coef_block
, JSAMPARRAY output_buf
,
349 JDIMENSION output_col
)
354 jsimd_can_idct_islow(void)
360 jsimd_can_idct_ifast(void)
366 jsimd_can_idct_float(void)
372 jsimd_idct_islow(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
373 JCOEFPTR coef_block
, JSAMPARRAY output_buf
,
374 JDIMENSION output_col
)
379 jsimd_idct_ifast(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
380 JCOEFPTR coef_block
, JSAMPARRAY output_buf
,
381 JDIMENSION output_col
)
386 jsimd_idct_float(j_decompress_ptr cinfo
, jpeg_component_info
*compptr
,
387 JCOEFPTR coef_block
, JSAMPARRAY output_buf
,
388 JDIMENSION output_col
)
393 jsimd_can_huff_encode_one_block(void)
399 jsimd_huff_encode_one_block(void *state
, JOCTET
*buffer
, JCOEFPTR block
,
400 int last_dc_val
, c_derived_tbl
*dctbl
,
401 c_derived_tbl
*actbl
)
407 jsimd_can_encode_mcu_AC_first_prepare(void)
413 jsimd_encode_mcu_AC_first_prepare(const JCOEF
*block
,
414 const int *jpeg_natural_order_start
, int Sl
,
415 int Al
, UJCOEF
*values
, size_t *zerobits
)
420 jsimd_can_encode_mcu_AC_refine_prepare(void)
426 jsimd_encode_mcu_AC_refine_prepare(const JCOEF
*block
,
427 const int *jpeg_natural_order_start
, int Sl
,
428 int Al
, UJCOEF
*absvalues
, size_t *bits
)