1 // This file is generated. Do not edit.
2 #ifndef AV1_RTCD_H_
3 #define AV1_RTCD_H_
4
5 #ifdef RTCD_C
6 #define RTCD_EXTERN
7 #else
8 #define RTCD_EXTERN extern
9 #endif
10
11 /*
12 * AV1
13 */
14
15 #include "aom/aom_integer.h"
16 #include "aom_dsp/txfm_common.h"
17 #include "av1/common/common.h"
18 #include "av1/common/enums.h"
19 #include "av1/common/quant_common.h"
20 #include "av1/common/filter.h"
21 #include "av1/common/convolve.h"
22 #include "av1/common/av1_txfm.h"
23 #include "av1/common/odintrin.h"
24 #include "av1/common/restoration.h"
25
26 struct macroblockd;
27
28 /* Encoder forward decls */
29 struct macroblock;
30 struct txfm_param;
31 struct aom_variance_vtable;
32 struct search_site_config;
33 struct yv12_buffer_config;
34
35 /* Function pointers return by CfL functions */
36 typedef void (*cfl_subsample_lbd_fn)(const uint8_t *input, int input_stride,
37 uint16_t *output_q3);
38
39 typedef void (*cfl_subsample_hbd_fn)(const uint16_t *input, int input_stride,
40 uint16_t *output_q3);
41
42 typedef void (*cfl_subtract_average_fn)(const uint16_t *src, int16_t *dst);
43
44 typedef void (*cfl_predict_lbd_fn)(const int16_t *src, uint8_t *dst,
45 int dst_stride, int alpha_q3);
46
47 typedef void (*cfl_predict_hbd_fn)(const int16_t *src, uint16_t *dst,
48 int dst_stride, int alpha_q3, int bd);
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 void apply_selfguided_restoration_c(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
55 void apply_selfguided_restoration_neon(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
56 RTCD_EXTERN void (*apply_selfguided_restoration)(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
57
58 void av1_build_compound_diffwtd_mask_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w);
59 #define av1_build_compound_diffwtd_mask av1_build_compound_diffwtd_mask_c
60
61 void av1_build_compound_diffwtd_mask_d16_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
62 void av1_build_compound_diffwtd_mask_d16_neon(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
63 RTCD_EXTERN void (*av1_build_compound_diffwtd_mask_d16)(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const CONV_BUF_TYPE *src0, int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w, ConvolveParams *conv_params, int bd);
64
65 void av1_build_compound_diffwtd_mask_highbd_c(uint8_t *mask, DIFFWTD_MASK_TYPE mask_type, const uint8_t *src0, int src0_stride, const uint8_t *src1, int src1_stride, int h, int w, int bd);
66 #define av1_build_compound_diffwtd_mask_highbd av1_build_compound_diffwtd_mask_highbd_c
67
68 void av1_convolve_2d_copy_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
69 void av1_convolve_2d_copy_sr_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
70 RTCD_EXTERN void (*av1_convolve_2d_copy_sr)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
71
72 void av1_convolve_2d_scale_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_qn, const int x_step_qn, const int subpel_y_q4, const int y_step_qn, ConvolveParams *conv_params);
73 #define av1_convolve_2d_scale av1_convolve_2d_scale_c
74
75 void av1_convolve_2d_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
76 void av1_convolve_2d_sr_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
77 RTCD_EXTERN void (*av1_convolve_2d_sr)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
78
79 void av1_convolve_horiz_rs_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const int16_t *x_filters, int x0_qn, int x_step_qn);
80 #define av1_convolve_horiz_rs av1_convolve_horiz_rs_c
81
82 void av1_convolve_x_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
83 void av1_convolve_x_sr_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
84 RTCD_EXTERN void (*av1_convolve_x_sr)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
85
86 void av1_convolve_y_sr_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
87 void av1_convolve_y_sr_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
88 RTCD_EXTERN void (*av1_convolve_y_sr)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
89
90 void av1_dr_prediction_z1_c(uint8_t *dst, ptrdiff_t stride, int bw, int bh, const uint8_t *above, const uint8_t *left, int upsample_above, int dx, int dy);
91 #define av1_dr_prediction_z1 av1_dr_prediction_z1_c
92
93 void av1_dr_prediction_z2_c(uint8_t *dst, ptrdiff_t stride, int bw, int bh, const uint8_t *above, const uint8_t *left, int upsample_above, int upsample_left, int dx, int dy);
94 #define av1_dr_prediction_z2 av1_dr_prediction_z2_c
95
96 void av1_dr_prediction_z3_c(uint8_t *dst, ptrdiff_t stride, int bw, int bh, const uint8_t *above, const uint8_t *left, int upsample_left, int dx, int dy);
97 #define av1_dr_prediction_z3 av1_dr_prediction_z3_c
98
99 void av1_filter_intra_edge_c(uint8_t *p, int sz, int strength);
100 #define av1_filter_intra_edge av1_filter_intra_edge_c
101
102 void av1_filter_intra_edge_high_c(uint16_t *p, int sz, int strength);
103 #define av1_filter_intra_edge_high av1_filter_intra_edge_high_c
104
105 void av1_filter_intra_predictor_c(uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left, int mode);
106 #define av1_filter_intra_predictor av1_filter_intra_predictor_c
107
108 void av1_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps);
109 #define av1_highbd_convolve8 av1_highbd_convolve8_c
110
111 void av1_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps);
112 #define av1_highbd_convolve8_horiz av1_highbd_convolve8_horiz_c
113
114 void av1_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps);
115 #define av1_highbd_convolve8_vert av1_highbd_convolve8_vert_c
116
117 void av1_highbd_convolve_2d_copy_sr_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
118 #define av1_highbd_convolve_2d_copy_sr av1_highbd_convolve_2d_copy_sr_c
119
120 void av1_highbd_convolve_2d_scale_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int x_step_qn, const int subpel_y_q4, const int y_step_qn, ConvolveParams *conv_params, int bd);
121 #define av1_highbd_convolve_2d_scale av1_highbd_convolve_2d_scale_c
122
123 void av1_highbd_convolve_2d_sr_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
124 #define av1_highbd_convolve_2d_sr av1_highbd_convolve_2d_sr_c
125
126 void av1_highbd_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps);
127 #define av1_highbd_convolve_avg av1_highbd_convolve_avg_c
128
129 void av1_highbd_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps);
130 #define av1_highbd_convolve_copy av1_highbd_convolve_copy_c
131
132 void av1_highbd_convolve_horiz_rs_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const int16_t *x_filters, int x0_qn, int x_step_qn, int bd);
133 #define av1_highbd_convolve_horiz_rs av1_highbd_convolve_horiz_rs_c
134
135 void av1_highbd_convolve_x_sr_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
136 #define av1_highbd_convolve_x_sr av1_highbd_convolve_x_sr_c
137
138 void av1_highbd_convolve_y_sr_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
139 #define av1_highbd_convolve_y_sr av1_highbd_convolve_y_sr_c
140
141 void av1_highbd_dr_prediction_z1_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int dx, int dy, int bd);
142 #define av1_highbd_dr_prediction_z1 av1_highbd_dr_prediction_z1_c
143
144 void av1_highbd_dr_prediction_z2_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_above, int upsample_left, int dx, int dy, int bd);
145 #define av1_highbd_dr_prediction_z2 av1_highbd_dr_prediction_z2_c
146
147 void av1_highbd_dr_prediction_z3_c(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int upsample_left, int dx, int dy, int bd);
148 #define av1_highbd_dr_prediction_z3 av1_highbd_dr_prediction_z3_c
149
150 void av1_highbd_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
151 #define av1_highbd_inv_txfm_add av1_highbd_inv_txfm_add_c
152
153 void av1_highbd_inv_txfm_add_16x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
154 #define av1_highbd_inv_txfm_add_16x16 av1_highbd_inv_txfm_add_16x16_c
155
156 void av1_highbd_inv_txfm_add_16x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
157 #define av1_highbd_inv_txfm_add_16x8 av1_highbd_inv_txfm_add_16x8_c
158
159 void av1_highbd_inv_txfm_add_32x32_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
160 #define av1_highbd_inv_txfm_add_32x32 av1_highbd_inv_txfm_add_32x32_c
161
162 void av1_highbd_inv_txfm_add_4x4_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
163 #define av1_highbd_inv_txfm_add_4x4 av1_highbd_inv_txfm_add_4x4_c
164
165 void av1_highbd_inv_txfm_add_8x16_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
166 #define av1_highbd_inv_txfm_add_8x16 av1_highbd_inv_txfm_add_8x16_c
167
168 void av1_highbd_inv_txfm_add_8x8_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
169 #define av1_highbd_inv_txfm_add_8x8 av1_highbd_inv_txfm_add_8x8_c
170
171 void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
172 #define av1_highbd_iwht4x4_16_add av1_highbd_iwht4x4_16_add_c
173
174 void av1_highbd_iwht4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int bd);
175 #define av1_highbd_iwht4x4_1_add av1_highbd_iwht4x4_1_add_c
176
177 void av1_highbd_jnt_convolve_2d_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
178 #define av1_highbd_jnt_convolve_2d av1_highbd_jnt_convolve_2d_c
179
180 void av1_highbd_jnt_convolve_2d_copy_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
181 #define av1_highbd_jnt_convolve_2d_copy av1_highbd_jnt_convolve_2d_copy_c
182
183 void av1_highbd_jnt_convolve_x_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
184 #define av1_highbd_jnt_convolve_x av1_highbd_jnt_convolve_x_c
185
186 void av1_highbd_jnt_convolve_y_c(const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params, int bd);
187 #define av1_highbd_jnt_convolve_y av1_highbd_jnt_convolve_y_c
188
189 void av1_highbd_warp_affine_c(const int32_t *mat, const uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
190 #define av1_highbd_warp_affine av1_highbd_warp_affine_c
191
192 void av1_highbd_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params, int bps);
193 #define av1_highbd_wiener_convolve_add_src av1_highbd_wiener_convolve_add_src_c
194
195 void av1_inv_txfm2d_add_16x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
196 #define av1_inv_txfm2d_add_16x16 av1_inv_txfm2d_add_16x16_c
197
198 void av1_inv_txfm2d_add_16x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
199 #define av1_inv_txfm2d_add_16x32 av1_inv_txfm2d_add_16x32_c
200
201 void av1_inv_txfm2d_add_16x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
202 #define av1_inv_txfm2d_add_16x4 av1_inv_txfm2d_add_16x4_c
203
204 void av1_inv_txfm2d_add_16x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
205 #define av1_inv_txfm2d_add_16x64 av1_inv_txfm2d_add_16x64_c
206
207 void av1_inv_txfm2d_add_16x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
208 #define av1_inv_txfm2d_add_16x8 av1_inv_txfm2d_add_16x8_c
209
210 void av1_inv_txfm2d_add_32x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
211 #define av1_inv_txfm2d_add_32x16 av1_inv_txfm2d_add_32x16_c
212
213 void av1_inv_txfm2d_add_32x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
214 #define av1_inv_txfm2d_add_32x32 av1_inv_txfm2d_add_32x32_c
215
216 void av1_inv_txfm2d_add_32x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
217 #define av1_inv_txfm2d_add_32x64 av1_inv_txfm2d_add_32x64_c
218
219 void av1_inv_txfm2d_add_32x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
220 #define av1_inv_txfm2d_add_32x8 av1_inv_txfm2d_add_32x8_c
221
222 void av1_inv_txfm2d_add_4x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
223 #define av1_inv_txfm2d_add_4x16 av1_inv_txfm2d_add_4x16_c
224
225 void av1_inv_txfm2d_add_4x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
226 #define av1_inv_txfm2d_add_4x4 av1_inv_txfm2d_add_4x4_c
227
228 void av1_inv_txfm2d_add_4x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
229 #define av1_inv_txfm2d_add_4x8 av1_inv_txfm2d_add_4x8_c
230
231 void av1_inv_txfm2d_add_64x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
232 #define av1_inv_txfm2d_add_64x16 av1_inv_txfm2d_add_64x16_c
233
234 void av1_inv_txfm2d_add_64x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
235 #define av1_inv_txfm2d_add_64x32 av1_inv_txfm2d_add_64x32_c
236
237 void av1_inv_txfm2d_add_64x64_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
238 #define av1_inv_txfm2d_add_64x64 av1_inv_txfm2d_add_64x64_c
239
240 void av1_inv_txfm2d_add_8x16_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
241 #define av1_inv_txfm2d_add_8x16 av1_inv_txfm2d_add_8x16_c
242
243 void av1_inv_txfm2d_add_8x32_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
244 #define av1_inv_txfm2d_add_8x32 av1_inv_txfm2d_add_8x32_c
245
246 void av1_inv_txfm2d_add_8x4_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
247 #define av1_inv_txfm2d_add_8x4 av1_inv_txfm2d_add_8x4_c
248
249 void av1_inv_txfm2d_add_8x8_c(const int32_t *input, uint16_t *output, int stride, TX_TYPE tx_type, int bd);
250 #define av1_inv_txfm2d_add_8x8 av1_inv_txfm2d_add_8x8_c
251
252 void av1_inv_txfm_add_c(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
253 void av1_inv_txfm_add_neon(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
254 RTCD_EXTERN void (*av1_inv_txfm_add)(const tran_low_t *dqcoeff, uint8_t *dst, int stride, const TxfmParam *txfm_param);
255
256 void av1_jnt_convolve_2d_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
257 void av1_jnt_convolve_2d_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
258 RTCD_EXTERN void (*av1_jnt_convolve_2d)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
259
260 void av1_jnt_convolve_2d_copy_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
261 void av1_jnt_convolve_2d_copy_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
262 RTCD_EXTERN void (*av1_jnt_convolve_2d_copy)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
263
264 void av1_jnt_convolve_x_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
265 void av1_jnt_convolve_x_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
266 RTCD_EXTERN void (*av1_jnt_convolve_x)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
267
268 void av1_jnt_convolve_y_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
269 void av1_jnt_convolve_y_neon(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
270 RTCD_EXTERN void (*av1_jnt_convolve_y)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams *filter_params_x, const InterpFilterParams *filter_params_y, const int subpel_x_q4, const int subpel_y_q4, ConvolveParams *conv_params);
271
272 int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
273 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
274 int sgr_params_idx, int bit_depth, int highbd);
275 int av1_selfguided_restoration_neon(const uint8_t *dgd8, int width, int height,
276 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
277 int sgr_params_idx, int bit_depth, int highbd);
278 RTCD_EXTERN int (*av1_selfguided_restoration)(const uint8_t *dgd8, int width, int height,
279 int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
280 int sgr_params_idx, int bit_depth, int highbd);
281
282 void av1_upsample_intra_edge_c(uint8_t *p, int sz);
283 #define av1_upsample_intra_edge av1_upsample_intra_edge_c
284
285 void av1_upsample_intra_edge_high_c(uint16_t *p, int sz, int bd);
286 #define av1_upsample_intra_edge_high av1_upsample_intra_edge_high_c
287
288 void av1_warp_affine_c(const int32_t *mat, const uint8_t *ref, int width, int height, int stride, uint8_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
289 void av1_warp_affine_neon(const int32_t *mat, const uint8_t *ref, int width, int height, int stride, uint8_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
290 RTCD_EXTERN void (*av1_warp_affine)(const int32_t *mat, const uint8_t *ref, int width, int height, int stride, uint8_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
291
292 void av1_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params);
293 void av1_wiener_convolve_add_src_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params);
294 RTCD_EXTERN void (*av1_wiener_convolve_add_src)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const ConvolveParams *conv_params);
295
296 void cdef_filter_block_c(uint8_t *dst8, uint16_t *dst16, int dstride, const uint16_t *in, int pri_strength, int sec_strength, int dir, int pri_damping, int sec_damping, int bsize, int max, int coeff_shift);
297 void cdef_filter_block_neon(uint8_t *dst8, uint16_t *dst16, int dstride, const uint16_t *in, int pri_strength, int sec_strength, int dir, int pri_damping, int sec_damping, int bsize, int max, int coeff_shift);
298 RTCD_EXTERN void (*cdef_filter_block)(uint8_t *dst8, uint16_t *dst16, int dstride, const uint16_t *in, int pri_strength, int sec_strength, int dir, int pri_damping, int sec_damping, int bsize, int max, int coeff_shift);
299
300 int cdef_find_dir_c(const uint16_t *img, int stride, int32_t *var, int coeff_shift);
301 int cdef_find_dir_neon(const uint16_t *img, int stride, int32_t *var, int coeff_shift);
302 RTCD_EXTERN int (*cdef_find_dir)(const uint16_t *img, int stride, int32_t *var, int coeff_shift);
303
304 cfl_subsample_hbd_fn cfl_get_luma_subsampling_420_hbd_c(TX_SIZE tx_size);
305 cfl_subsample_hbd_fn cfl_get_luma_subsampling_420_hbd_neon(TX_SIZE tx_size);
306 RTCD_EXTERN cfl_subsample_hbd_fn (*cfl_get_luma_subsampling_420_hbd)(TX_SIZE tx_size);
307
308 cfl_subsample_lbd_fn cfl_get_luma_subsampling_420_lbd_c(TX_SIZE tx_size);
309 cfl_subsample_lbd_fn cfl_get_luma_subsampling_420_lbd_neon(TX_SIZE tx_size);
310 RTCD_EXTERN cfl_subsample_lbd_fn (*cfl_get_luma_subsampling_420_lbd)(TX_SIZE tx_size);
311
312 cfl_subsample_hbd_fn cfl_get_luma_subsampling_422_hbd_c(TX_SIZE tx_size);
313 cfl_subsample_hbd_fn cfl_get_luma_subsampling_422_hbd_neon(TX_SIZE tx_size);
314 RTCD_EXTERN cfl_subsample_hbd_fn (*cfl_get_luma_subsampling_422_hbd)(TX_SIZE tx_size);
315
316 cfl_subsample_lbd_fn cfl_get_luma_subsampling_422_lbd_c(TX_SIZE tx_size);
317 cfl_subsample_lbd_fn cfl_get_luma_subsampling_422_lbd_neon(TX_SIZE tx_size);
318 RTCD_EXTERN cfl_subsample_lbd_fn (*cfl_get_luma_subsampling_422_lbd)(TX_SIZE tx_size);
319
320 cfl_subsample_hbd_fn cfl_get_luma_subsampling_444_hbd_c(TX_SIZE tx_size);
321 cfl_subsample_hbd_fn cfl_get_luma_subsampling_444_hbd_neon(TX_SIZE tx_size);
322 RTCD_EXTERN cfl_subsample_hbd_fn (*cfl_get_luma_subsampling_444_hbd)(TX_SIZE tx_size);
323
324 cfl_subsample_lbd_fn cfl_get_luma_subsampling_444_lbd_c(TX_SIZE tx_size);
325 cfl_subsample_lbd_fn cfl_get_luma_subsampling_444_lbd_neon(TX_SIZE tx_size);
326 RTCD_EXTERN cfl_subsample_lbd_fn (*cfl_get_luma_subsampling_444_lbd)(TX_SIZE tx_size);
327
328 void copy_rect8_16bit_to_16bit_c(uint16_t *dst, int dstride, const uint16_t *src, int sstride, int v, int h);
329 void copy_rect8_16bit_to_16bit_neon(uint16_t *dst, int dstride, const uint16_t *src, int sstride, int v, int h);
330 RTCD_EXTERN void (*copy_rect8_16bit_to_16bit)(uint16_t *dst, int dstride, const uint16_t *src, int sstride, int v, int h);
331
332 void copy_rect8_8bit_to_16bit_c(uint16_t *dst, int dstride, const uint8_t *src, int sstride, int v, int h);
333 void copy_rect8_8bit_to_16bit_neon(uint16_t *dst, int dstride, const uint8_t *src, int sstride, int v, int h);
334 RTCD_EXTERN void (*copy_rect8_8bit_to_16bit)(uint16_t *dst, int dstride, const uint8_t *src, int sstride, int v, int h);
335
336 cfl_predict_hbd_fn get_predict_hbd_fn_c(TX_SIZE tx_size);
337 cfl_predict_hbd_fn get_predict_hbd_fn_neon(TX_SIZE tx_size);
338 RTCD_EXTERN cfl_predict_hbd_fn (*get_predict_hbd_fn)(TX_SIZE tx_size);
339
340 cfl_predict_lbd_fn get_predict_lbd_fn_c(TX_SIZE tx_size);
341 cfl_predict_lbd_fn get_predict_lbd_fn_neon(TX_SIZE tx_size);
342 RTCD_EXTERN cfl_predict_lbd_fn (*get_predict_lbd_fn)(TX_SIZE tx_size);
343
344 cfl_subtract_average_fn get_subtract_average_fn_c(TX_SIZE tx_size);
345 cfl_subtract_average_fn get_subtract_average_fn_neon(TX_SIZE tx_size);
346 RTCD_EXTERN cfl_subtract_average_fn (*get_subtract_average_fn)(TX_SIZE tx_size);
347
348 void av1_rtcd(void);
349
350 #include "config/aom_config.h"
351
352 #ifdef RTCD_C
353 #include "aom_ports/arm.h"
setup_rtcd_internal(void)354 static void setup_rtcd_internal(void)
355 {
356 int flags = aom_arm_cpu_caps();
357
358 (void)flags;
359
360 apply_selfguided_restoration = apply_selfguided_restoration_c;
361 if (flags & HAS_NEON) apply_selfguided_restoration = apply_selfguided_restoration_neon;
362 av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_c;
363 if (flags & HAS_NEON) av1_build_compound_diffwtd_mask_d16 = av1_build_compound_diffwtd_mask_d16_neon;
364 av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_c;
365 if (flags & HAS_NEON) av1_convolve_2d_copy_sr = av1_convolve_2d_copy_sr_neon;
366 av1_convolve_2d_sr = av1_convolve_2d_sr_c;
367 if (flags & HAS_NEON) av1_convolve_2d_sr = av1_convolve_2d_sr_neon;
368 av1_convolve_x_sr = av1_convolve_x_sr_c;
369 if (flags & HAS_NEON) av1_convolve_x_sr = av1_convolve_x_sr_neon;
370 av1_convolve_y_sr = av1_convolve_y_sr_c;
371 if (flags & HAS_NEON) av1_convolve_y_sr = av1_convolve_y_sr_neon;
372 av1_inv_txfm_add = av1_inv_txfm_add_c;
373 if (flags & HAS_NEON) av1_inv_txfm_add = av1_inv_txfm_add_neon;
374 av1_jnt_convolve_2d = av1_jnt_convolve_2d_c;
375 if (flags & HAS_NEON) av1_jnt_convolve_2d = av1_jnt_convolve_2d_neon;
376 av1_jnt_convolve_2d_copy = av1_jnt_convolve_2d_copy_c;
377 if (flags & HAS_NEON) av1_jnt_convolve_2d_copy = av1_jnt_convolve_2d_copy_neon;
378 av1_jnt_convolve_x = av1_jnt_convolve_x_c;
379 if (flags & HAS_NEON) av1_jnt_convolve_x = av1_jnt_convolve_x_neon;
380 av1_jnt_convolve_y = av1_jnt_convolve_y_c;
381 if (flags & HAS_NEON) av1_jnt_convolve_y = av1_jnt_convolve_y_neon;
382 av1_selfguided_restoration = av1_selfguided_restoration_c;
383 if (flags & HAS_NEON) av1_selfguided_restoration = av1_selfguided_restoration_neon;
384 av1_warp_affine = av1_warp_affine_c;
385 if (flags & HAS_NEON) av1_warp_affine = av1_warp_affine_neon;
386 av1_wiener_convolve_add_src = av1_wiener_convolve_add_src_c;
387 if (flags & HAS_NEON) av1_wiener_convolve_add_src = av1_wiener_convolve_add_src_neon;
388 cdef_filter_block = cdef_filter_block_c;
389 if (flags & HAS_NEON) cdef_filter_block = cdef_filter_block_neon;
390 cdef_find_dir = cdef_find_dir_c;
391 if (flags & HAS_NEON) cdef_find_dir = cdef_find_dir_neon;
392 cfl_get_luma_subsampling_420_hbd = cfl_get_luma_subsampling_420_hbd_c;
393 if (flags & HAS_NEON) cfl_get_luma_subsampling_420_hbd = cfl_get_luma_subsampling_420_hbd_neon;
394 cfl_get_luma_subsampling_420_lbd = cfl_get_luma_subsampling_420_lbd_c;
395 if (flags & HAS_NEON) cfl_get_luma_subsampling_420_lbd = cfl_get_luma_subsampling_420_lbd_neon;
396 cfl_get_luma_subsampling_422_hbd = cfl_get_luma_subsampling_422_hbd_c;
397 if (flags & HAS_NEON) cfl_get_luma_subsampling_422_hbd = cfl_get_luma_subsampling_422_hbd_neon;
398 cfl_get_luma_subsampling_422_lbd = cfl_get_luma_subsampling_422_lbd_c;
399 if (flags & HAS_NEON) cfl_get_luma_subsampling_422_lbd = cfl_get_luma_subsampling_422_lbd_neon;
400 cfl_get_luma_subsampling_444_hbd = cfl_get_luma_subsampling_444_hbd_c;
401 if (flags & HAS_NEON) cfl_get_luma_subsampling_444_hbd = cfl_get_luma_subsampling_444_hbd_neon;
402 cfl_get_luma_subsampling_444_lbd = cfl_get_luma_subsampling_444_lbd_c;
403 if (flags & HAS_NEON) cfl_get_luma_subsampling_444_lbd = cfl_get_luma_subsampling_444_lbd_neon;
404 copy_rect8_16bit_to_16bit = copy_rect8_16bit_to_16bit_c;
405 if (flags & HAS_NEON) copy_rect8_16bit_to_16bit = copy_rect8_16bit_to_16bit_neon;
406 copy_rect8_8bit_to_16bit = copy_rect8_8bit_to_16bit_c;
407 if (flags & HAS_NEON) copy_rect8_8bit_to_16bit = copy_rect8_8bit_to_16bit_neon;
408 get_predict_hbd_fn = get_predict_hbd_fn_c;
409 if (flags & HAS_NEON) get_predict_hbd_fn = get_predict_hbd_fn_neon;
410 get_predict_lbd_fn = get_predict_lbd_fn_c;
411 if (flags & HAS_NEON) get_predict_lbd_fn = get_predict_lbd_fn_neon;
412 get_subtract_average_fn = get_subtract_average_fn_c;
413 if (flags & HAS_NEON) get_subtract_average_fn = get_subtract_average_fn_neon;
414 }
415 #endif
416
417 #ifdef __cplusplus
418 } // extern "C"
419 #endif
420
421 #endif
422