xref: /aosp_15_r20/external/libvpx/config/generic/vp9_rtcd.h (revision fb1b10ab9aebc7c7068eedab379b749d7e3900be)
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 #define vp9_block_error vp9_block_error_c
48*fb1b10abSAndroid Build Coastguard Worker 
49*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_block_error_fp_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
50*fb1b10abSAndroid Build Coastguard Worker #define vp9_block_error_fp vp9_block_error_fp_c
51*fb1b10abSAndroid Build Coastguard Worker 
52*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);
53*fb1b10abSAndroid Build Coastguard Worker #define vp9_diamond_search_sad vp9_diamond_search_sad_c
54*fb1b10abSAndroid Build Coastguard Worker 
55*fb1b10abSAndroid Build Coastguard Worker void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
56*fb1b10abSAndroid Build Coastguard Worker #define vp9_fht16x16 vp9_fht16x16_c
57*fb1b10abSAndroid Build Coastguard Worker 
58*fb1b10abSAndroid Build Coastguard Worker void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
59*fb1b10abSAndroid Build Coastguard Worker #define vp9_fht4x4 vp9_fht4x4_c
60*fb1b10abSAndroid Build Coastguard Worker 
61*fb1b10abSAndroid Build Coastguard Worker void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
62*fb1b10abSAndroid Build Coastguard Worker #define vp9_fht8x8 vp9_fht8x8_c
63*fb1b10abSAndroid Build Coastguard Worker 
64*fb1b10abSAndroid Build Coastguard Worker void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride);
65*fb1b10abSAndroid Build Coastguard Worker #define vp9_fwht4x4 vp9_fwht4x4_c
66*fb1b10abSAndroid Build Coastguard Worker 
67*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);
68*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_block_error vp9_highbd_block_error_c
69*fb1b10abSAndroid Build Coastguard Worker 
70*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
71*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c
72*fb1b10abSAndroid Build Coastguard Worker 
73*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
74*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c
75*fb1b10abSAndroid Build Coastguard Worker 
76*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
77*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c
78*fb1b10abSAndroid Build Coastguard Worker 
79*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride);
80*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
81*fb1b10abSAndroid Build Coastguard Worker 
82*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);
83*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c
84*fb1b10abSAndroid Build Coastguard Worker 
85*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);
86*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c
87*fb1b10abSAndroid Build Coastguard Worker 
88*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);
89*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c
90*fb1b10abSAndroid Build Coastguard Worker 
91*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);
92*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c
93*fb1b10abSAndroid Build Coastguard Worker 
94*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);
95*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c
96*fb1b10abSAndroid Build Coastguard Worker 
97*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);
98*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
99*fb1b10abSAndroid Build Coastguard Worker 
100*fb1b10abSAndroid Build Coastguard Worker void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
101*fb1b10abSAndroid Build Coastguard Worker #define vp9_iht16x16_256_add vp9_iht16x16_256_add_c
102*fb1b10abSAndroid Build Coastguard Worker 
103*fb1b10abSAndroid Build Coastguard Worker void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
104*fb1b10abSAndroid Build Coastguard Worker #define vp9_iht4x4_16_add vp9_iht4x4_16_add_c
105*fb1b10abSAndroid Build Coastguard Worker 
106*fb1b10abSAndroid Build Coastguard Worker void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
107*fb1b10abSAndroid Build Coastguard Worker #define vp9_iht8x8_64_add vp9_iht8x8_64_add_c
108*fb1b10abSAndroid Build Coastguard Worker 
109*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);
110*fb1b10abSAndroid Build Coastguard Worker #define vp9_quantize_fp vp9_quantize_fp_c
111*fb1b10abSAndroid Build Coastguard Worker 
112*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);
113*fb1b10abSAndroid Build Coastguard Worker #define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c
114*fb1b10abSAndroid Build Coastguard Worker 
115*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);
116*fb1b10abSAndroid Build Coastguard Worker #define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c
117*fb1b10abSAndroid Build Coastguard Worker 
118*fb1b10abSAndroid Build Coastguard Worker void vp9_rtcd(void);
119*fb1b10abSAndroid Build Coastguard Worker 
120*fb1b10abSAndroid Build Coastguard Worker #include "vpx_config.h"
121*fb1b10abSAndroid Build Coastguard Worker 
122*fb1b10abSAndroid Build Coastguard Worker #ifdef RTCD_C
setup_rtcd_internal(void)123*fb1b10abSAndroid Build Coastguard Worker static void setup_rtcd_internal(void)
124*fb1b10abSAndroid Build Coastguard Worker {
125*fb1b10abSAndroid Build Coastguard Worker }
126*fb1b10abSAndroid Build Coastguard Worker #endif
127*fb1b10abSAndroid Build Coastguard Worker 
128*fb1b10abSAndroid Build Coastguard Worker #ifdef __cplusplus
129*fb1b10abSAndroid Build Coastguard Worker }  // extern "C"
130*fb1b10abSAndroid Build Coastguard Worker #endif
131*fb1b10abSAndroid Build Coastguard Worker 
132*fb1b10abSAndroid Build Coastguard Worker #endif  // VP9_RTCD_H_
133