Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / media / libjpeg / jsimd.h
blob74d480aa2c063b728e254ee8646b1372d952a649
1 /*
2 * jsimd.h
4 * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
5 * Copyright (C) 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
15 #include "jchuff.h" /* Declarations shared with jcphuff.c */
17 EXTERN(int) jsimd_can_rgb_ycc(void);
18 EXTERN(int) jsimd_can_rgb_gray(void);
19 EXTERN(int) jsimd_can_ycc_rgb(void);
20 EXTERN(int) jsimd_can_ycc_rgb565(void);
21 EXTERN(int) jsimd_c_can_null_convert(void);
23 EXTERN(void) jsimd_rgb_ycc_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
24 JSAMPIMAGE output_buf,
25 JDIMENSION output_row, int num_rows);
26 EXTERN(void) jsimd_rgb_gray_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
27 JSAMPIMAGE output_buf,
28 JDIMENSION output_row, int num_rows);
29 EXTERN(void) jsimd_ycc_rgb_convert(j_decompress_ptr cinfo,
30 JSAMPIMAGE input_buf, JDIMENSION input_row,
31 JSAMPARRAY output_buf, int num_rows);
32 EXTERN(void) jsimd_ycc_rgb565_convert(j_decompress_ptr cinfo,
33 JSAMPIMAGE input_buf,
34 JDIMENSION input_row,
35 JSAMPARRAY output_buf, int num_rows);
36 EXTERN(void) jsimd_c_null_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
37 JSAMPIMAGE output_buf, JDIMENSION output_row,
38 int num_rows);
40 EXTERN(int) jsimd_can_h2v2_downsample(void);
41 EXTERN(int) jsimd_can_h2v1_downsample(void);
43 EXTERN(void) jsimd_h2v2_downsample(j_compress_ptr cinfo,
44 jpeg_component_info *compptr,
45 JSAMPARRAY input_data,
46 JSAMPARRAY output_data);
48 EXTERN(int) jsimd_can_h2v2_smooth_downsample(void);
50 EXTERN(void) jsimd_h2v2_smooth_downsample(j_compress_ptr cinfo,
51 jpeg_component_info *compptr,
52 JSAMPARRAY input_data,
53 JSAMPARRAY output_data);
55 EXTERN(void) jsimd_h2v1_downsample(j_compress_ptr cinfo,
56 jpeg_component_info *compptr,
57 JSAMPARRAY input_data,
58 JSAMPARRAY output_data);
60 EXTERN(int) jsimd_can_h2v2_upsample(void);
61 EXTERN(int) jsimd_can_h2v1_upsample(void);
62 EXTERN(int) jsimd_can_int_upsample(void);
64 EXTERN(void) jsimd_h2v2_upsample(j_decompress_ptr cinfo,
65 jpeg_component_info *compptr,
66 JSAMPARRAY input_data,
67 JSAMPARRAY *output_data_ptr);
68 EXTERN(void) jsimd_h2v1_upsample(j_decompress_ptr cinfo,
69 jpeg_component_info *compptr,
70 JSAMPARRAY input_data,
71 JSAMPARRAY *output_data_ptr);
72 EXTERN(void) jsimd_int_upsample(j_decompress_ptr cinfo,
73 jpeg_component_info *compptr,
74 JSAMPARRAY input_data,
75 JSAMPARRAY *output_data_ptr);
77 EXTERN(int) jsimd_can_h2v2_fancy_upsample(void);
78 EXTERN(int) jsimd_can_h2v1_fancy_upsample(void);
79 EXTERN(int) jsimd_can_h1v2_fancy_upsample(void);
81 EXTERN(void) jsimd_h2v2_fancy_upsample(j_decompress_ptr cinfo,
82 jpeg_component_info *compptr,
83 JSAMPARRAY input_data,
84 JSAMPARRAY *output_data_ptr);
85 EXTERN(void) jsimd_h2v1_fancy_upsample(j_decompress_ptr cinfo,
86 jpeg_component_info *compptr,
87 JSAMPARRAY input_data,
88 JSAMPARRAY *output_data_ptr);
89 EXTERN(void) jsimd_h1v2_fancy_upsample(j_decompress_ptr cinfo,
90 jpeg_component_info *compptr,
91 JSAMPARRAY input_data,
92 JSAMPARRAY *output_data_ptr);
94 EXTERN(int) jsimd_can_h2v2_merged_upsample(void);
95 EXTERN(int) jsimd_can_h2v1_merged_upsample(void);
97 EXTERN(void) jsimd_h2v2_merged_upsample(j_decompress_ptr cinfo,
98 JSAMPIMAGE input_buf,
99 JDIMENSION in_row_group_ctr,
100 JSAMPARRAY output_buf);
101 EXTERN(void) jsimd_h2v1_merged_upsample(j_decompress_ptr cinfo,
102 JSAMPIMAGE input_buf,
103 JDIMENSION in_row_group_ctr,
104 JSAMPARRAY output_buf);
106 EXTERN(int) jsimd_can_huff_encode_one_block(void);
108 EXTERN(JOCTET *) jsimd_huff_encode_one_block(void *state, JOCTET *buffer,
109 JCOEFPTR block, int last_dc_val,
110 c_derived_tbl *dctbl,
111 c_derived_tbl *actbl);
113 EXTERN(int) jsimd_can_encode_mcu_AC_first_prepare(void);
115 EXTERN(void) jsimd_encode_mcu_AC_first_prepare
116 (const JCOEF *block, const int *jpeg_natural_order_start, int Sl, int Al,
117 UJCOEF *values, size_t *zerobits);
119 EXTERN(int) jsimd_can_encode_mcu_AC_refine_prepare(void);
121 EXTERN(int) jsimd_encode_mcu_AC_refine_prepare
122 (const JCOEF *block, const int *jpeg_natural_order_start, int Sl, int Al,
123 UJCOEF *absvalues, size_t *bits);