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_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
48*fb1b10abSAndroid Build Coastguard Worker #define vp9_block_error vp9_block_error_sse2
49*fb1b10abSAndroid Build Coastguard Worker
50*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_block_error_fp_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
51*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_block_error_fp_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
52*fb1b10abSAndroid Build Coastguard Worker #define vp9_block_error_fp vp9_block_error_fp_sse2
53*fb1b10abSAndroid Build Coastguard Worker
54*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);
55*fb1b10abSAndroid Build Coastguard Worker #define vp9_diamond_search_sad vp9_diamond_search_sad_c
56*fb1b10abSAndroid Build Coastguard Worker
57*fb1b10abSAndroid Build Coastguard Worker void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
58*fb1b10abSAndroid Build Coastguard Worker void vp9_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type);
59*fb1b10abSAndroid Build Coastguard Worker #define vp9_fht16x16 vp9_fht16x16_sse2
60*fb1b10abSAndroid Build Coastguard Worker
61*fb1b10abSAndroid Build Coastguard Worker void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
62*fb1b10abSAndroid Build Coastguard Worker void vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type);
63*fb1b10abSAndroid Build Coastguard Worker #define vp9_fht4x4 vp9_fht4x4_sse2
64*fb1b10abSAndroid Build Coastguard Worker
65*fb1b10abSAndroid Build Coastguard Worker void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
66*fb1b10abSAndroid Build Coastguard Worker void vp9_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type);
67*fb1b10abSAndroid Build Coastguard Worker #define vp9_fht8x8 vp9_fht8x8_sse2
68*fb1b10abSAndroid Build Coastguard Worker
69*fb1b10abSAndroid Build Coastguard Worker void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride);
70*fb1b10abSAndroid Build Coastguard Worker void vp9_fwht4x4_sse2(const int16_t *input, tran_low_t *output, int stride);
71*fb1b10abSAndroid Build Coastguard Worker #define vp9_fwht4x4 vp9_fwht4x4_sse2
72*fb1b10abSAndroid Build Coastguard Worker
73*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);
74*fb1b10abSAndroid Build Coastguard Worker int64_t vp9_highbd_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd);
75*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_block_error vp9_highbd_block_error_sse2
76*fb1b10abSAndroid Build Coastguard Worker
77*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
78*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fht16x16 vp9_highbd_fht16x16_c
79*fb1b10abSAndroid Build Coastguard Worker
80*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
81*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fht4x4 vp9_highbd_fht4x4_c
82*fb1b10abSAndroid Build Coastguard Worker
83*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type);
84*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fht8x8 vp9_highbd_fht8x8_c
85*fb1b10abSAndroid Build Coastguard Worker
86*fb1b10abSAndroid Build Coastguard Worker void vp9_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride);
87*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
88*fb1b10abSAndroid Build Coastguard Worker
89*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);
90*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c
91*fb1b10abSAndroid Build Coastguard Worker
92*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);
93*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_iht4x4_16_add vp9_highbd_iht4x4_16_add_c
94*fb1b10abSAndroid Build Coastguard Worker
95*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);
96*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_iht8x8_64_add vp9_highbd_iht8x8_64_add_c
97*fb1b10abSAndroid Build Coastguard Worker
98*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);
99*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c
100*fb1b10abSAndroid Build Coastguard Worker
101*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);
102*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c
103*fb1b10abSAndroid Build Coastguard Worker
104*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);
105*fb1b10abSAndroid Build Coastguard Worker #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
106*fb1b10abSAndroid Build Coastguard Worker
107*fb1b10abSAndroid Build Coastguard Worker void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
108*fb1b10abSAndroid Build Coastguard Worker void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
109*fb1b10abSAndroid Build Coastguard Worker #define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2
110*fb1b10abSAndroid Build Coastguard Worker
111*fb1b10abSAndroid Build Coastguard Worker void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
112*fb1b10abSAndroid Build Coastguard Worker void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
113*fb1b10abSAndroid Build Coastguard Worker #define vp9_iht4x4_16_add vp9_iht4x4_16_add_sse2
114*fb1b10abSAndroid Build Coastguard Worker
115*fb1b10abSAndroid Build Coastguard Worker void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
116*fb1b10abSAndroid Build Coastguard Worker void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type);
117*fb1b10abSAndroid Build Coastguard Worker #define vp9_iht8x8_64_add vp9_iht8x8_64_add_sse2
118*fb1b10abSAndroid Build Coastguard Worker
119*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);
120*fb1b10abSAndroid Build Coastguard Worker void vp9_quantize_fp_sse2(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);
121*fb1b10abSAndroid Build Coastguard Worker void vp9_quantize_fp_ssse3(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);
122*fb1b10abSAndroid Build Coastguard Worker #define vp9_quantize_fp vp9_quantize_fp_ssse3
123*fb1b10abSAndroid Build Coastguard Worker
124*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);
125*fb1b10abSAndroid Build Coastguard Worker void vp9_quantize_fp_32x32_ssse3(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);
126*fb1b10abSAndroid Build Coastguard Worker #define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_ssse3
127*fb1b10abSAndroid Build Coastguard Worker
128*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);
129*fb1b10abSAndroid Build Coastguard Worker void vp9_scale_and_extend_frame_ssse3(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst, INTERP_FILTER filter_type, int phase_scaler);
130*fb1b10abSAndroid Build Coastguard Worker #define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_ssse3
131*fb1b10abSAndroid Build Coastguard Worker
132*fb1b10abSAndroid Build Coastguard Worker void vp9_rtcd(void);
133*fb1b10abSAndroid Build Coastguard Worker
134*fb1b10abSAndroid Build Coastguard Worker #ifdef RTCD_C
135*fb1b10abSAndroid Build Coastguard Worker #include "vpx_ports/x86.h"
setup_rtcd_internal(void)136*fb1b10abSAndroid Build Coastguard Worker static void setup_rtcd_internal(void)
137*fb1b10abSAndroid Build Coastguard Worker {
138*fb1b10abSAndroid Build Coastguard Worker int flags = x86_simd_caps();
139*fb1b10abSAndroid Build Coastguard Worker
140*fb1b10abSAndroid Build Coastguard Worker (void)flags;
141*fb1b10abSAndroid Build Coastguard Worker
142*fb1b10abSAndroid Build Coastguard Worker }
143*fb1b10abSAndroid Build Coastguard Worker #endif
144*fb1b10abSAndroid Build Coastguard Worker
145*fb1b10abSAndroid Build Coastguard Worker #ifdef __cplusplus
146*fb1b10abSAndroid Build Coastguard Worker } // extern "C"
147*fb1b10abSAndroid Build Coastguard Worker #endif
148*fb1b10abSAndroid Build Coastguard Worker
149*fb1b10abSAndroid Build Coastguard Worker #endif // VP9_RTCD_H_
150