30 #define BDOF_BLOCK_SIZE 16
31 #define BDOF_MIN_BLOCK_SIZE 4
78 const int block_w,
const int block_h);
91 const int16_t *
src0,
const int16_t *
src1,
93 uintptr_t w0_w1, uintptr_t offset_shift);
95 const int16_t *
src0,
const int16_t *
src1,
97 uintptr_t w0_w1, uintptr_t offset_shift);
99 const int16_t *
src0,
const int16_t *
src1,
101 uintptr_t w0_w1, uintptr_t offset_shift);
107 #define W_AVG_FUN(bit_depth) \
108 static void vvc_w_avg_ ## bit_depth(uint8_t *dst, ptrdiff_t dst_stride, \
109 const int16_t *src0, const int16_t *src1, int width, int height, \
110 int denom, int w0, int w1, int o0, int o1) \
112 int shift = denom + FFMAX(3, 15 - bit_depth); \
113 int offset = ((o0 + o1) * (1 << (bit_depth - 8)) + 1) * (1 << (shift - 1)); \
114 uintptr_t w0_w1 = ((uintptr_t)w0 << 32) | (uint32_t)w1; \
115 uintptr_t offset_shift = ((uintptr_t)offset << 32) | (uint32_t)shift; \
116 ff_vvc_w_avg_ ## bit_depth ## _neon(dst, dst_stride, src0, src1, width, height, w0_w1, offset_shift); \
123 #define DMVR_FUN(fn, bd) \
124 void ff_vvc_dmvr_ ## fn ## bd ## _neon(int16_t *dst, \
125 const uint8_t *_src, ptrdiff_t _src_stride, int height, \
126 intptr_t mx, intptr_t my, int width);
138 #define APPLY_BDOF_FUNC(bd) \
139 void ff_vvc_apply_bdof_ ## bd ## _neon(uint8_t *_dst, ptrdiff_t _dst_stride, \
140 const int16_t *_src0, const int16_t *_src1, \
141 int block_w, int block_h);
154 c->inter.put[0][1][0][0] = ff_vvc_put_pel_pixels4_8_neon;
155 c->inter.put[0][2][0][0] = ff_vvc_put_pel_pixels8_8_neon;
156 c->inter.put[0][3][0][0] = ff_vvc_put_pel_pixels16_8_neon;
157 c->inter.put[0][4][0][0] = ff_vvc_put_pel_pixels32_8_neon;
158 c->inter.put[0][5][0][0] = ff_vvc_put_pel_pixels64_8_neon;
159 c->inter.put[0][6][0][0] = ff_vvc_put_pel_pixels128_8_neon;
161 c->inter.put[0][1][0][1] = ff_vvc_put_qpel_h4_8_neon;
162 c->inter.put[0][2][0][1] = ff_vvc_put_qpel_h8_8_neon;
163 c->inter.put[0][3][0][1] = ff_vvc_put_qpel_h16_8_neon;
164 c->inter.put[0][4][0][1] =
165 c->inter.put[0][5][0][1] =
166 c->inter.put[0][6][0][1] = ff_vvc_put_qpel_h32_8_neon;
169 c->inter.put[0][2][1][0] =
170 c->inter.put[0][3][1][0] =
171 c->inter.put[0][4][1][0] =
172 c->inter.put[0][5][1][0] =
175 c->inter.put[0][1][1][1] = ff_vvc_put_qpel_hv4_8_neon;
176 c->inter.put[0][2][1][1] = ff_vvc_put_qpel_hv8_8_neon;
177 c->inter.put[0][3][1][1] = ff_vvc_put_qpel_hv16_8_neon;
178 c->inter.put[0][4][1][1] = ff_vvc_put_qpel_hv32_8_neon;
179 c->inter.put[0][5][1][1] = ff_vvc_put_qpel_hv64_8_neon;
180 c->inter.put[0][6][1][1] = ff_vvc_put_qpel_hv128_8_neon;
182 c->inter.put[1][1][0][0] = ff_vvc_put_pel_pixels4_8_neon;
183 c->inter.put[1][2][0][0] = ff_vvc_put_pel_pixels8_8_neon;
184 c->inter.put[1][3][0][0] = ff_vvc_put_pel_pixels16_8_neon;
185 c->inter.put[1][4][0][0] = ff_vvc_put_pel_pixels32_8_neon;
186 c->inter.put[1][5][0][0] = ff_vvc_put_pel_pixels64_8_neon;
187 c->inter.put[1][6][0][0] = ff_vvc_put_pel_pixels128_8_neon;
189 c->inter.put[1][1][0][1] = ff_vvc_put_epel_h4_8_neon;
190 c->inter.put[1][2][0][1] = ff_vvc_put_epel_h8_8_neon;
191 c->inter.put[1][3][0][1] = ff_vvc_put_epel_h16_8_neon;
192 c->inter.put[1][4][0][1] =
193 c->inter.put[1][5][0][1] =
194 c->inter.put[1][6][0][1] = ff_vvc_put_epel_h32_8_neon;
196 c->inter.put[1][1][1][1] = ff_vvc_put_epel_hv4_8_neon;
197 c->inter.put[1][2][1][1] = ff_vvc_put_epel_hv8_8_neon;
198 c->inter.put[1][3][1][1] = ff_vvc_put_epel_hv16_8_neon;
199 c->inter.put[1][4][1][1] = ff_vvc_put_epel_hv32_8_neon;
200 c->inter.put[1][5][1][1] = ff_vvc_put_epel_hv64_8_neon;
201 c->inter.put[1][6][1][1] = ff_vvc_put_epel_hv128_8_neon;
203 c->inter.put_uni[0][1][0][0] = ff_vvc_put_pel_uni_pixels4_8_neon;
204 c->inter.put_uni[0][2][0][0] = ff_vvc_put_pel_uni_pixels8_8_neon;
205 c->inter.put_uni[0][3][0][0] = ff_vvc_put_pel_uni_pixels16_8_neon;
206 c->inter.put_uni[0][4][0][0] = ff_vvc_put_pel_uni_pixels32_8_neon;
207 c->inter.put_uni[0][5][0][0] = ff_vvc_put_pel_uni_pixels64_8_neon;
208 c->inter.put_uni[0][6][0][0] = ff_vvc_put_pel_uni_pixels128_8_neon;
210 c->inter.put_uni[0][1][0][1] = ff_vvc_put_qpel_uni_h4_8_neon;
211 c->inter.put_uni[0][2][0][1] = ff_vvc_put_qpel_uni_h8_8_neon;
212 c->inter.put_uni[0][3][0][1] = ff_vvc_put_qpel_uni_h16_8_neon;
213 c->inter.put_uni[0][4][0][1] =
214 c->inter.put_uni[0][5][0][1] =
215 c->inter.put_uni[0][6][0][1] = ff_vvc_put_qpel_uni_h32_8_neon;
217 c->inter.put_uni_w[0][1][0][0] = ff_vvc_put_pel_uni_w_pixels4_8_neon;
218 c->inter.put_uni_w[0][2][0][0] = ff_vvc_put_pel_uni_w_pixels8_8_neon;
219 c->inter.put_uni_w[0][3][0][0] = ff_vvc_put_pel_uni_w_pixels16_8_neon;
220 c->inter.put_uni_w[0][4][0][0] = ff_vvc_put_pel_uni_w_pixels32_8_neon;
221 c->inter.put_uni_w[0][5][0][0] = ff_vvc_put_pel_uni_w_pixels64_8_neon;
222 c->inter.put_uni_w[0][6][0][0] = ff_vvc_put_pel_uni_w_pixels128_8_neon;
225 c->inter.w_avg = vvc_w_avg_8;
226 c->inter.dmvr[0][0] = ff_vvc_dmvr_8_neon;
227 c->inter.dmvr[0][1] = ff_vvc_dmvr_h_8_neon;
228 c->inter.dmvr[1][0] = ff_vvc_dmvr_v_8_neon;
229 c->inter.dmvr[1][1] = ff_vvc_dmvr_hv_8_neon;
230 c->inter.apply_bdof = ff_vvc_apply_bdof_8_neon;
238 c->alf.filter[
LUMA] = alf_filter_luma_8_neon;
239 c->alf.filter[
CHROMA] = alf_filter_chroma_8_neon;
240 c->alf.classify = alf_classify_8_neon;
243 c->inter.put[0][1][0][1] = ff_vvc_put_qpel_h4_8_neon_i8mm;
244 c->inter.put[0][2][0][1] = ff_vvc_put_qpel_h8_8_neon_i8mm;
245 c->inter.put[0][3][0][1] = ff_vvc_put_qpel_h16_8_neon_i8mm;
246 c->inter.put[0][4][0][1] = ff_vvc_put_qpel_h32_8_neon_i8mm;
247 c->inter.put[0][5][0][1] = ff_vvc_put_qpel_h64_8_neon_i8mm;
248 c->inter.put[0][6][0][1] = ff_vvc_put_qpel_h128_8_neon_i8mm;
250 c->inter.put[0][1][1][1] = ff_vvc_put_qpel_hv4_8_neon_i8mm;
251 c->inter.put[0][2][1][1] = ff_vvc_put_qpel_hv8_8_neon_i8mm;
252 c->inter.put[0][3][1][1] = ff_vvc_put_qpel_hv16_8_neon_i8mm;
253 c->inter.put[0][4][1][1] = ff_vvc_put_qpel_hv32_8_neon_i8mm;
254 c->inter.put[0][5][1][1] = ff_vvc_put_qpel_hv64_8_neon_i8mm;
255 c->inter.put[0][6][1][1] = ff_vvc_put_qpel_hv128_8_neon_i8mm;
257 c->inter.put[1][1][0][1] = ff_vvc_put_epel_h4_8_neon_i8mm;
258 c->inter.put[1][2][0][1] = ff_vvc_put_epel_h8_8_neon_i8mm;
259 c->inter.put[1][3][0][1] = ff_vvc_put_epel_h16_8_neon_i8mm;
260 c->inter.put[1][4][0][1] = ff_vvc_put_epel_h32_8_neon_i8mm;
261 c->inter.put[1][5][0][1] = ff_vvc_put_epel_h64_8_neon_i8mm;
262 c->inter.put[1][6][0][1] = ff_vvc_put_epel_h128_8_neon_i8mm;
264 c->inter.put[1][1][1][1] = ff_vvc_put_epel_hv4_8_neon_i8mm;
265 c->inter.put[1][2][1][1] = ff_vvc_put_epel_hv8_8_neon_i8mm;
266 c->inter.put[1][3][1][1] = ff_vvc_put_epel_hv16_8_neon_i8mm;
267 c->inter.put[1][4][1][1] = ff_vvc_put_epel_hv32_8_neon_i8mm;
268 c->inter.put[1][5][1][1] = ff_vvc_put_epel_hv64_8_neon_i8mm;
269 c->inter.put[1][6][1][1] = ff_vvc_put_epel_hv128_8_neon_i8mm;
271 }
else if (bd == 10) {
273 c->inter.w_avg = vvc_w_avg_10;
274 c->inter.dmvr[0][1] = ff_vvc_dmvr_h_10_neon;
275 c->inter.dmvr[1][1] = ff_vvc_dmvr_hv_10_neon;
276 c->inter.apply_bdof = ff_vvc_apply_bdof_10_neon;
279 c->inter.put[0][4][0][1] =
280 c->inter.put[0][5][0][1] =
286 c->inter.put[0][4][1][0] =
287 c->inter.put[0][5][1][0] =
290 c->alf.filter[
LUMA] = alf_filter_luma_10_neon;
291 c->alf.filter[
CHROMA] = alf_filter_chroma_10_neon;
292 c->alf.classify = alf_classify_10_neon;
293 }
else if (bd == 12) {
295 c->inter.w_avg = vvc_w_avg_12;
296 c->inter.dmvr[0][0] = ff_vvc_dmvr_12_neon;
297 c->inter.dmvr[0][1] = ff_vvc_dmvr_h_12_neon;
298 c->inter.dmvr[1][1] = ff_vvc_dmvr_hv_12_neon;
299 c->inter.apply_bdof = ff_vvc_apply_bdof_12_neon;
302 c->inter.put[0][4][0][1] =
303 c->inter.put[0][5][0][1] =
309 c->inter.put[0][4][1][0] =
310 c->inter.put[0][5][1][0] =
313 c->alf.filter[
LUMA] = alf_filter_luma_12_neon;
314 c->alf.filter[
CHROMA] = alf_filter_chroma_12_neon;
315 c->alf.classify = alf_classify_12_neon;