xref: /aosp_15_r20/external/libhevc/encoder/ihevce_function_selector.h (revision c83a76b084498d55f252f48b2e3786804cdf24b7)
1*c83a76b0SSuyog Pawar /******************************************************************************
2*c83a76b0SSuyog Pawar  *
3*c83a76b0SSuyog Pawar  * Copyright (C) 2018 The Android Open Source Project
4*c83a76b0SSuyog Pawar  *
5*c83a76b0SSuyog Pawar  * Licensed under the Apache License, Version 2.0 (the "License");
6*c83a76b0SSuyog Pawar  * you may not use this file except in compliance with the License.
7*c83a76b0SSuyog Pawar  * You may obtain a copy of the License at:
8*c83a76b0SSuyog Pawar  *
9*c83a76b0SSuyog Pawar  * http://www.apache.org/licenses/LICENSE-2.0
10*c83a76b0SSuyog Pawar  *
11*c83a76b0SSuyog Pawar  * Unless required by applicable law or agreed to in writing, software
12*c83a76b0SSuyog Pawar  * distributed under the License is distributed on an "AS IS" BASIS,
13*c83a76b0SSuyog Pawar  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*c83a76b0SSuyog Pawar  * See the License for the specific language governing permissions and
15*c83a76b0SSuyog Pawar  * limitations under the License.
16*c83a76b0SSuyog Pawar  *
17*c83a76b0SSuyog Pawar  *****************************************************************************
18*c83a76b0SSuyog Pawar  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19*c83a76b0SSuyog Pawar */
20*c83a76b0SSuyog Pawar 
21*c83a76b0SSuyog Pawar /**
22*c83a76b0SSuyog Pawar *******************************************************************************
23*c83a76b0SSuyog Pawar * @file
24*c83a76b0SSuyog Pawar *  ihevce_function_selector.h
25*c83a76b0SSuyog Pawar *
26*c83a76b0SSuyog Pawar * @brief
27*c83a76b0SSuyog Pawar *  Structure definitions used in the decoder
28*c83a76b0SSuyog Pawar *
29*c83a76b0SSuyog Pawar * @author
30*c83a76b0SSuyog Pawar *  ittiam
31*c83a76b0SSuyog Pawar *
32*c83a76b0SSuyog Pawar * @par List of Functions:
33*c83a76b0SSuyog Pawar *
34*c83a76b0SSuyog Pawar * @remarks
35*c83a76b0SSuyog Pawar *  None
36*c83a76b0SSuyog Pawar *
37*c83a76b0SSuyog Pawar *******************************************************************************
38*c83a76b0SSuyog Pawar */
39*c83a76b0SSuyog Pawar 
40*c83a76b0SSuyog Pawar #ifndef _IHEVCE_FUNCTION_SELECTOR_H_
41*c83a76b0SSuyog Pawar #define _IHEVCE_FUNCTION_SELECTOR_H_
42*c83a76b0SSuyog Pawar 
43*c83a76b0SSuyog Pawar /*****************************************************************************/
44*c83a76b0SSuyog Pawar /* Structure                                                                 */
45*c83a76b0SSuyog Pawar /*****************************************************************************/
46*c83a76b0SSuyog Pawar typedef struct
47*c83a76b0SSuyog Pawar {
48*c83a76b0SSuyog Pawar     ihevc_deblk_chroma_horz_ft *ihevc_deblk_chroma_horz_fptr;
49*c83a76b0SSuyog Pawar     ihevc_deblk_chroma_vert_ft *ihevc_deblk_chroma_vert_fptr;
50*c83a76b0SSuyog Pawar     ihevc_deblk_chroma_horz_ft *ihevc_deblk_422chroma_horz_fptr;
51*c83a76b0SSuyog Pawar     ihevc_deblk_chroma_vert_ft *ihevc_deblk_422chroma_vert_fptr;
52*c83a76b0SSuyog Pawar     ihevc_deblk_luma_vert_ft *ihevc_deblk_luma_vert_fptr;
53*c83a76b0SSuyog Pawar     ihevc_deblk_luma_horz_ft *ihevc_deblk_luma_horz_fptr;
54*c83a76b0SSuyog Pawar     ihevc_inter_pred_ft *ihevc_inter_pred_chroma_copy_fptr;
55*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16out_ft *ihevc_inter_pred_chroma_copy_w16out_fptr;
56*c83a76b0SSuyog Pawar     ihevc_inter_pred_ft *ihevc_inter_pred_chroma_horz_fptr;
57*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16out_ft *ihevc_inter_pred_chroma_horz_w16out_fptr;
58*c83a76b0SSuyog Pawar     ihevc_inter_pred_ft *ihevc_inter_pred_chroma_vert_fptr;
59*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16inp_ft *ihevc_inter_pred_chroma_vert_w16inp_fptr;
60*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16inp_w16out_ft *ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr;
61*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16out_ft *ihevc_inter_pred_chroma_vert_w16out_fptr;
62*c83a76b0SSuyog Pawar     ihevc_inter_pred_ft *ihevc_inter_pred_luma_horz_fptr;
63*c83a76b0SSuyog Pawar     ihevc_inter_pred_ft *ihevc_inter_pred_luma_vert_fptr;
64*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16out_ft *ihevc_inter_pred_luma_vert_w16out_fptr;
65*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16inp_ft *ihevc_inter_pred_luma_vert_w16inp_fptr;
66*c83a76b0SSuyog Pawar     ihevc_inter_pred_ft *ihevc_inter_pred_luma_copy_fptr;
67*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16out_ft *ihevc_inter_pred_luma_copy_w16out_fptr;
68*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16out_ft *ihevc_inter_pred_luma_horz_w16out_fptr;
69*c83a76b0SSuyog Pawar     ihevc_inter_pred_w16inp_w16out_ft *ihevc_inter_pred_luma_vert_w16inp_w16out_fptr;
70*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_ref_substitution_ft *ihevc_intra_pred_chroma_ref_substitution_fptr;
71*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_ref_substitution_ft *ihevc_intra_pred_luma_ref_substitution_fptr;
72*c83a76b0SSuyog Pawar     ihevc_intra_pred_ref_filtering_ft *ihevc_intra_pred_ref_filtering_fptr;
73*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_dc_ft *ihevc_intra_pred_chroma_dc_fptr;
74*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_horz_ft *ihevc_intra_pred_chroma_horz_fptr;
75*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_mode2_ft *ihevc_intra_pred_chroma_mode2_fptr;
76*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_mode_18_34_ft *ihevc_intra_pred_chroma_mode_18_34_fptr;
77*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_mode_27_to_33_ft *ihevc_intra_pred_chroma_mode_27_to_33_fptr;
78*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_mode_3_to_9_ft *ihevc_intra_pred_chroma_mode_3_to_9_fptr;
79*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_planar_ft *ihevc_intra_pred_chroma_planar_fptr;
80*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_ver_ft *ihevc_intra_pred_chroma_ver_fptr;
81*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_mode_11_to_17_ft *ihevc_intra_pred_chroma_mode_11_to_17_fptr;
82*c83a76b0SSuyog Pawar     ihevc_intra_pred_chroma_mode_19_to_25_ft *ihevc_intra_pred_chroma_mode_19_to_25_fptr;
83*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_mode_11_to_17_ft *ihevc_intra_pred_luma_mode_11_to_17_fptr;
84*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_mode_19_to_25_ft *ihevc_intra_pred_luma_mode_19_to_25_fptr;
85*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_dc_ft *ihevc_intra_pred_luma_dc_fptr;
86*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_horz_ft *ihevc_intra_pred_luma_horz_fptr;
87*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_mode2_ft *ihevc_intra_pred_luma_mode2_fptr;
88*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_mode_18_34_ft *ihevc_intra_pred_luma_mode_18_34_fptr;
89*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_mode_27_to_33_ft *ihevc_intra_pred_luma_mode_27_to_33_fptr;
90*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_mode_3_to_9_ft *ihevc_intra_pred_luma_mode_3_to_9_fptr;
91*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_planar_ft *ihevc_intra_pred_luma_planar_fptr;
92*c83a76b0SSuyog Pawar     ihevc_intra_pred_luma_ver_ft *ihevc_intra_pred_luma_ver_fptr;
93*c83a76b0SSuyog Pawar     ihevc_itrans_recon_4x4_ttype1_ft *ihevc_itrans_recon_4x4_ttype1_fptr;
94*c83a76b0SSuyog Pawar     ihevc_itrans_recon_4x4_ft *ihevc_itrans_recon_4x4_fptr;
95*c83a76b0SSuyog Pawar     ihevc_itrans_recon_8x8_ft *ihevc_itrans_recon_8x8_fptr;
96*c83a76b0SSuyog Pawar     ihevc_itrans_recon_16x16_ft *ihevc_itrans_recon_16x16_fptr;
97*c83a76b0SSuyog Pawar     ihevc_itrans_recon_32x32_ft *ihevc_itrans_recon_32x32_fptr;
98*c83a76b0SSuyog Pawar     ihevc_chroma_itrans_recon_4x4_ft *ihevc_chroma_itrans_recon_4x4_fptr;
99*c83a76b0SSuyog Pawar     ihevc_chroma_itrans_recon_8x8_ft *ihevc_chroma_itrans_recon_8x8_fptr;
100*c83a76b0SSuyog Pawar     ihevc_chroma_itrans_recon_16x16_ft *ihevc_chroma_itrans_recon_16x16_fptr;
101*c83a76b0SSuyog Pawar     ihevc_memcpy_mul_8_ft *ihevc_memcpy_mul_8_fptr;
102*c83a76b0SSuyog Pawar     ihevc_memcpy_ft *ihevc_memcpy_fptr;
103*c83a76b0SSuyog Pawar     ihevc_memset_mul_8_ft *ihevc_memset_mul_8_fptr;
104*c83a76b0SSuyog Pawar     ihevc_memset_ft *ihevc_memset_fptr;
105*c83a76b0SSuyog Pawar     ihevc_memset_16bit_mul_8_ft *ihevc_memset_16bit_mul_8_fptr;
106*c83a76b0SSuyog Pawar     ihevc_memset_16bit_ft *ihevc_memset_16bit_fptr;
107*c83a76b0SSuyog Pawar 
108*c83a76b0SSuyog Pawar     ihevc_weighted_pred_bi_ft *ihevc_weighted_pred_bi_fptr;
109*c83a76b0SSuyog Pawar     ihevc_weighted_pred_bi_default_ft *ihevc_weighted_pred_bi_default_fptr;
110*c83a76b0SSuyog Pawar     ihevc_weighted_pred_uni_ft *ihevc_weighted_pred_uni_fptr;
111*c83a76b0SSuyog Pawar     ihevc_weighted_pred_chroma_bi_ft *ihevc_weighted_pred_chroma_bi_fptr;
112*c83a76b0SSuyog Pawar     ihevc_weighted_pred_chroma_bi_default_ft *ihevc_weighted_pred_chroma_bi_default_fptr;
113*c83a76b0SSuyog Pawar     ihevc_weighted_pred_chroma_uni_ft *ihevc_weighted_pred_chroma_uni_fptr;
114*c83a76b0SSuyog Pawar     ihevc_resi_trans_4x4_ttype1_ft *ihevc_resi_trans_4x4_ttype1_fptr;
115*c83a76b0SSuyog Pawar     ihevc_resi_trans_4x4_ft *ihevc_resi_trans_4x4_fptr;
116*c83a76b0SSuyog Pawar     ihevc_resi_trans_8x8_ft *ihevc_resi_trans_8x8_fptr;
117*c83a76b0SSuyog Pawar     ihevc_resi_trans_16x16_ft *ihevc_resi_trans_16x16_fptr;
118*c83a76b0SSuyog Pawar     ihevc_resi_trans_32x32_ft *ihevc_resi_trans_32x32_fptr;
119*c83a76b0SSuyog Pawar     ihevc_quant_iquant_ssd_ft *ihevc_quant_iquant_ssd_fptr;
120*c83a76b0SSuyog Pawar     ihevc_quant_iquant_ssd_rdoq_ft *ihevc_quant_iquant_ssd_rdoq_fptr;
121*c83a76b0SSuyog Pawar     ihevc_quant_iquant_ssd_flat_scale_mat_ft *ihevc_quant_iquant_ssd_flat_scale_mat_fptr;
122*c83a76b0SSuyog Pawar     ihevc_quant_iquant_ssd_flat_scale_mat_rdoq_ft *ihevc_quant_iquant_ssd_flat_scale_mat_rdoq_fptr;
123*c83a76b0SSuyog Pawar     ihevc_q_iq_ssd_var_rnd_fact_ft *ihevc_q_iq_ssd_var_rnd_fact_fptr;
124*c83a76b0SSuyog Pawar     ihevc_q_iq_ssd_flat_scale_mat_var_rnd_fact_ft *ihevc_q_iq_ssd_flat_scale_mat_var_rnd_fact_fptr;
125*c83a76b0SSuyog Pawar     ihevc_quant_iquant_ssd_ft *ihevc_quant_iquant_fptr;
126*c83a76b0SSuyog Pawar     ihevc_quant_iquant_ssd_rdoq_ft *ihevc_quant_iquant_rdoq_fptr;
127*c83a76b0SSuyog Pawar     ihevc_quant_iquant_ssd_flat_scale_mat_ft *ihevc_quant_iquant_flat_scale_mat_fptr;
128*c83a76b0SSuyog Pawar     ihevc_quant_iquant_ssd_flat_scale_mat_rdoq_ft *ihevc_quant_iquant_flat_scale_mat_rdoq_fptr;
129*c83a76b0SSuyog Pawar     ihevc_q_iq_ssd_var_rnd_fact_ft *ihevc_q_iq_var_rnd_fact_fptr;
130*c83a76b0SSuyog Pawar     ihevc_q_iq_ssd_flat_scale_mat_var_rnd_fact_ft *ihevc_q_iq_flat_scale_mat_var_rnd_fact_fptr;
131*c83a76b0SSuyog Pawar     ihevc_pad_horz_luma_ft *ihevc_pad_horz_luma_fptr;
132*c83a76b0SSuyog Pawar     ihevc_pad_horz_chroma_ft *ihevc_pad_horz_chroma_fptr;
133*c83a76b0SSuyog Pawar     ihevc_pad_vert_ft *ihevc_pad_vert_fptr;
134*c83a76b0SSuyog Pawar     ihevc_pad_top_ft *ihevc_pad_top_fptr;
135*c83a76b0SSuyog Pawar     ihevc_pad_bottom_ft *ihevc_pad_bottom_fptr;
136*c83a76b0SSuyog Pawar     ihevc_pad_left_luma_ft *ihevc_pad_left_luma_fptr;
137*c83a76b0SSuyog Pawar     ihevc_pad_left_chroma_ft *ihevc_pad_left_chroma_fptr;
138*c83a76b0SSuyog Pawar     ihevc_pad_right_luma_ft *ihevc_pad_right_luma_fptr;
139*c83a76b0SSuyog Pawar     ihevc_pad_right_chroma_ft *ihevc_pad_right_chroma_fptr;
140*c83a76b0SSuyog Pawar     ihevc_sao_edge_offset_class0_ft *ihevc_sao_edge_offset_class0_fptr;
141*c83a76b0SSuyog Pawar     ihevc_sao_edge_offset_class1_ft *ihevc_sao_edge_offset_class1_fptr;
142*c83a76b0SSuyog Pawar     ihevc_sao_edge_offset_class2_ft *ihevc_sao_edge_offset_class2_fptr;
143*c83a76b0SSuyog Pawar     ihevc_sao_edge_offset_class3_ft *ihevc_sao_edge_offset_class3_fptr;
144*c83a76b0SSuyog Pawar 
145*c83a76b0SSuyog Pawar     ihevc_sao_edge_offset_class0_chroma_ft *ihevc_sao_edge_offset_class0_chroma_fptr;
146*c83a76b0SSuyog Pawar     ihevc_sao_edge_offset_class1_chroma_ft *ihevc_sao_edge_offset_class1_chroma_fptr;
147*c83a76b0SSuyog Pawar     ihevc_sao_edge_offset_class2_chroma_ft *ihevc_sao_edge_offset_class2_chroma_fptr;
148*c83a76b0SSuyog Pawar     ihevc_sao_edge_offset_class3_chroma_ft *ihevc_sao_edge_offset_class3_chroma_fptr;
149*c83a76b0SSuyog Pawar } func_selector_t;
150*c83a76b0SSuyog Pawar 
151*c83a76b0SSuyog Pawar /*****************************************************************************/
152*c83a76b0SSuyog Pawar /* Extern Function Declarations                                              */
153*c83a76b0SSuyog Pawar /*****************************************************************************/
154*c83a76b0SSuyog Pawar IV_ARCH_T ihevce_default_arch(void);
155*c83a76b0SSuyog Pawar 
156*c83a76b0SSuyog Pawar void ihevce_init_function_ptr(void *pv_enc_ctxt, IV_ARCH_T e_processor_arch);
157*c83a76b0SSuyog Pawar 
158*c83a76b0SSuyog Pawar #endif /* _IHEVCE_FUNCTION_SELECTOR_H_ */
159