1*fb1b10abSAndroid Build Coastguard Worker /*
2*fb1b10abSAndroid Build Coastguard Worker * Copyright (c) 2024 The WebM project authors. All Rights Reserved.
3*fb1b10abSAndroid Build Coastguard Worker *
4*fb1b10abSAndroid Build Coastguard Worker * Use of this source code is governed by a BSD-style license
5*fb1b10abSAndroid Build Coastguard Worker * that can be found in the LICENSE file in the root of the source
6*fb1b10abSAndroid Build Coastguard Worker * tree. An additional intellectual property rights grant can be found
7*fb1b10abSAndroid Build Coastguard Worker * in the file PATENTS. All contributing project authors may
8*fb1b10abSAndroid Build Coastguard Worker * be found in the AUTHORS file in the root of the source tree.
9*fb1b10abSAndroid Build Coastguard Worker */
10*fb1b10abSAndroid Build Coastguard Worker
11*fb1b10abSAndroid Build Coastguard Worker // This file is generated. Do not edit.
12*fb1b10abSAndroid Build Coastguard Worker #ifndef VP9_RTCD_H_
13*fb1b10abSAndroid Build Coastguard Worker #define VP9_RTCD_H_
14*fb1b10abSAndroid Build Coastguard Worker
15*fb1b10abSAndroid Build Coastguard Worker #ifdef RTCD_C
16*fb1b10abSAndroid Build Coastguard Worker #define RTCD_EXTERN
17*fb1b10abSAndroid Build Coastguard Worker #else
18*fb1b10abSAndroid Build Coastguard Worker #define RTCD_EXTERN extern
19*fb1b10abSAndroid Build Coastguard Worker #endif
20*fb1b10abSAndroid Build Coastguard Worker
21*fb1b10abSAndroid Build Coastguard Worker /*
22*fb1b10abSAndroid Build Coastguard Worker * VP9
23*fb1b10abSAndroid Build Coastguard Worker */
24*fb1b10abSAndroid Build Coastguard Worker
25*fb1b10abSAndroid Build Coastguard Worker #include "vpx/vpx_integer.h"
26*fb1b10abSAndroid Build Coastguard Worker #include "vp9/common/vp9_common.h"
27*fb1b10abSAndroid Build Coastguard Worker #include "vp9/common/vp9_enums.h"
28*fb1b10abSAndroid Build Coastguard Worker #include "vp9/common/vp9_filter.h"
29*fb1b10abSAndroid Build Coastguard Worker
30*fb1b10abSAndroid Build Coastguard Worker struct macroblockd;
31*fb1b10abSAndroid Build Coastguard Worker
32*fb1b10abSAndroid Build Coastguard Worker /* Encoder forward decls */
33*fb1b10abSAndroid Build Coastguard Worker struct macroblock;
34*fb1b10abSAndroid Build Coastguard Worker struct macroblock_plane;
35*fb1b10abSAndroid Build Coastguard Worker struct vp9_sad_table;
36*fb1b10abSAndroid Build Coastguard Worker struct ScanOrder;
37*fb1b10abSAndroid Build Coastguard Worker struct search_site_config;
38*fb1b10abSAndroid Build Coastguard Worker struct mv;
39*fb1b10abSAndroid Build Coastguard Worker union int_mv;
40*fb1b10abSAndroid Build Coastguard Worker struct yv12_buffer_config;
41*fb1b10abSAndroid Build Coastguard Worker
42*fb1b10abSAndroid Build Coastguard Worker #ifdef __cplusplus
43*fb1b10abSAndroid Build Coastguard Worker extern "C" {
44*fb1b10abSAndroid Build Coastguard Worker #endif
45*fb1b10abSAndroid Build Coastguard Worker
46*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
47*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_block_error_neon(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
48*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_block_error_sve(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
49*fb1b10abSAndroid Build Coastguard Worker RTCD_EXTERN int64_t (*vp9_block_error)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
50*fb1b10abSAndroid Build Coastguard Worker
51*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_block_error_fp_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
52*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_block_error_fp_neon(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
53*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_block_error_fp_sve(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
54*fb1b10abSAndroid Build Coastguard Worker RTCD_EXTERN int64_t (*vp9_block_error_fp)(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
55*fb1b10abSAndroid Build Coastguard Worker
56*fb1b10abSAndroid Build Coastguard Worker int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, uint32_t start_mv_sad, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_sad_table *sad_fn_ptr, const struct mv *center_mv);
57*fb1b10abSAndroid Build Coastguard Worker int vp9_diamond_search_sad_neon(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, uint32_t start_mv_sad, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_sad_table *sad_fn_ptr, const struct mv *center_mv);
58*fb1b10abSAndroid Build Coastguard Worker #define vp9_diamond_search_sad vp9_diamond_search_sad_neon
59*fb1b10abSAndroid Build Coastguard Worker
60*fb1b10abSAndroid Build Coastguard Worker void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
61*fb1b10abSAndroid Build Coastguard Worker void vp9_fht16x16_neon(const int16_t *input, tran_low_t *output, int stride, int tx_type);
62*fb1b10abSAndroid Build Coastguard Worker #define vp9_fht16x16 vp9_fht16x16_neon
63*fb1b10abSAndroid Build Coastguard Worker
64*fb1b10abSAndroid Build Coastguard Worker void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
65*fb1b10abSAndroid Build Coastguard Worker void vp9_fht4x4_neon(const int16_t *input, tran_low_t *output, int stride, int tx_type);
66*fb1b10abSAndroid Build Coastguard Worker #define vp9_fht4x4 vp9_fht4x4_neon
67*fb1b10abSAndroid Build Coastguard Worker
68*fb1b10abSAndroid Build Coastguard Worker void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
69*fb1b10abSAndroid Build Coastguard Worker void vp9_fht8x8_neon(const int16_t *input, tran_low_t *output, int stride, int tx_type);
70*fb1b10abSAndroid Build Coastguard Worker #define vp9_fht8x8 vp9_fht8x8_neon
71*fb1b10abSAndroid Build Coastguard Worker
72*fb1b10abSAndroid Build Coastguard Worker void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride);
73*fb1b10abSAndroid Build Coastguard Worker #define vp9_fwht4x4 vp9_fwht4x4_c
74*fb1b10abSAndroid Build Coastguard Worker
75*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_highbd_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd);
76*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_highbd_block_error_neon(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd);
77*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_block_error vp9_highbd_block_error_neon
78*fb1b10abSAndroid Build Coastguard Worker
79*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
80*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht16x16_neon(const int16_t *input, tran_low_t *output, int stride, int tx_type);
81*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fht16x16 vp9_highbd_fht16x16_neon
82*fb1b10abSAndroid Build Coastguard Worker
83*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
84*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht4x4_neon(const int16_t *input, tran_low_t *output, int stride, int tx_type);
85*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fht4x4 vp9_highbd_fht4x4_neon
86*fb1b10abSAndroid Build Coastguard Worker
87*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
88*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht8x8_neon(const int16_t *input, tran_low_t *output, int stride, int tx_type);
89*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fht8x8 vp9_highbd_fht8x8_neon
90*fb1b10abSAndroid Build Coastguard Worker
91*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride);
92*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
93*fb1b10abSAndroid Build Coastguard Worker
94*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_iht16x16_256_add_c(const tran_low_t *input, uint16_t *dest, int stride, int tx_type, int bd);
95*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_iht16x16_256_add_neon(const tran_low_t *input, uint16_t *dest, int stride, int tx_type, int bd);
96*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_neon
97*fb1b10abSAndroid Build Coastguard Worker
98*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_iht4x4_16_add_c(const tran_low_t *input, uint16_t *dest, int stride, int tx_type, int bd);
99*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_iht4x4_16_add_neon(const tran_low_t *input, uint16_t *dest, int stride, int tx_type, int bd);
100*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_neon
101*fb1b10abSAndroid Build Coastguard Worker
102*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_iht8x8_64_add_c(const tran_low_t *input, uint16_t *dest, int stride, int tx_type, int bd);
103*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_iht8x8_64_add_neon(const tran_low_t *input, uint16_t *dest, int stride, int tx_type, int bd);
104*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_neon
105*fb1b10abSAndroid Build Coastguard Worker
106*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order);
107*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order);
108*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_neon
109*fb1b10abSAndroid Build Coastguard Worker
110*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order);
111*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_quantize_fp_32x32_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order);
112*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_neon
113*fb1b10abSAndroid Build Coastguard Worker
114*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_temporal_filter_apply_c(const uint8_t *frame1, unsigned int stride, const uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int *blk_fw, int use_32x32, uint32_t *accumulator, uint16_t *count);
115*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
116*fb1b10abSAndroid Build Coastguard Worker
117*fb1b10abSAndroid Build Coastguard Worker void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
118*fb1b10abSAndroid Build Coastguard Worker void vp9_iht16x16_256_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
119*fb1b10abSAndroid Build Coastguard Worker #define vp9_iht16x16_256_add vp9_iht16x16_256_add_neon
120*fb1b10abSAndroid Build Coastguard Worker
121*fb1b10abSAndroid Build Coastguard Worker void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
122*fb1b10abSAndroid Build Coastguard Worker void vp9_iht4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
123*fb1b10abSAndroid Build Coastguard Worker #define vp9_iht4x4_16_add vp9_iht4x4_16_add_neon
124*fb1b10abSAndroid Build Coastguard Worker
125*fb1b10abSAndroid Build Coastguard Worker void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
126*fb1b10abSAndroid Build Coastguard Worker void vp9_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
127*fb1b10abSAndroid Build Coastguard Worker #define vp9_iht8x8_64_add vp9_iht8x8_64_add_neon
128*fb1b10abSAndroid Build Coastguard Worker
129*fb1b10abSAndroid Build Coastguard Worker void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order);
130*fb1b10abSAndroid Build Coastguard Worker void vp9_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order);
131*fb1b10abSAndroid Build Coastguard Worker #define vp9_quantize_fp vp9_quantize_fp_neon
132*fb1b10abSAndroid Build Coastguard Worker
133*fb1b10abSAndroid Build Coastguard Worker void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order);
134*fb1b10abSAndroid Build Coastguard Worker void vp9_quantize_fp_32x32_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order);
135*fb1b10abSAndroid Build Coastguard Worker #define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_neon
136*fb1b10abSAndroid Build Coastguard Worker
137*fb1b10abSAndroid Build Coastguard Worker void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst, INTERP_FILTER filter_type, int phase_scaler);
138*fb1b10abSAndroid Build Coastguard Worker void vp9_scale_and_extend_frame_neon(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst, INTERP_FILTER filter_type, int phase_scaler);
139*fb1b10abSAndroid Build Coastguard Worker #define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_neon
140*fb1b10abSAndroid Build Coastguard Worker
141*fb1b10abSAndroid Build Coastguard Worker void vp9_rtcd(void);
142*fb1b10abSAndroid Build Coastguard Worker
143*fb1b10abSAndroid Build Coastguard Worker #include "vpx_config.h"
144*fb1b10abSAndroid Build Coastguard Worker
145*fb1b10abSAndroid Build Coastguard Worker #ifdef RTCD_C
146*fb1b10abSAndroid Build Coastguard Worker #include "vpx_ports/arm.h"
setup_rtcd_internal(void)147*fb1b10abSAndroid Build Coastguard Worker static void setup_rtcd_internal(void)
148*fb1b10abSAndroid Build Coastguard Worker {
149*fb1b10abSAndroid Build Coastguard Worker int flags = arm_cpu_caps();
150*fb1b10abSAndroid Build Coastguard Worker
151*fb1b10abSAndroid Build Coastguard Worker (void)flags;
152*fb1b10abSAndroid Build Coastguard Worker
153*fb1b10abSAndroid Build Coastguard Worker vp9_block_error = vp9_block_error_neon;
154*fb1b10abSAndroid Build Coastguard Worker if (flags & HAS_SVE) vp9_block_error = vp9_block_error_sve;
155*fb1b10abSAndroid Build Coastguard Worker vp9_block_error_fp = vp9_block_error_fp_neon;
156*fb1b10abSAndroid Build Coastguard Worker if (flags & HAS_SVE) vp9_block_error_fp = vp9_block_error_fp_sve;
157*fb1b10abSAndroid Build Coastguard Worker }
158*fb1b10abSAndroid Build Coastguard Worker #endif
159*fb1b10abSAndroid Build Coastguard Worker
160*fb1b10abSAndroid Build Coastguard Worker #ifdef __cplusplus
161*fb1b10abSAndroid Build Coastguard Worker } // extern "C"
162*fb1b10abSAndroid Build Coastguard Worker #endif
163*fb1b10abSAndroid Build Coastguard Worker
164*fb1b10abSAndroid Build Coastguard Worker #endif // VP9_RTCD_H_
165