xref: /aosp_15_r20/external/libavc/encoder/ih264e_intra_modes_eval.h (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
1 /******************************************************************************
2  *
3  * Copyright (C) 2015 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20 
21 /**
22 *******************************************************************************
23 * @file
24 *  ih264e_intra_modes_eval.h
25 *
26 * @brief
27 *  This file contains declarations of routines that perform rate distortion
28 *  analysis on a macroblock if coded as intra.
29 *
30 * @author
31 *  ittiam
32 *
33 * @remarks
34 *  none
35 *
36 *******************************************************************************
37 */
38 
39 #ifndef _IH264E_INTRA_MODES_EVAL_H_
40 #define _IH264E_INTRA_MODES_EVAL_H_
41 
42 /*****************************************************************************/
43 /* Function Declarations                                                     */
44 /*****************************************************************************/
45 
46 void ih264e_derive_nghbr_avbl_of_mbs(process_ctxt_t *ps_proc_ctxt);
47 
48 UWORD8 ih264e_derive_ngbr_avbl_of_mb_partitions(block_neighbors_t *s_ngbr_avbl,
49                                                 WORD8 i1_pel_pos_x,
50                                                 WORD8 i1_pel_pos_y);
51 
52 void ih264e_evaluate_intra16x16_modes_for_least_cost_rdoptoff(process_ctxt_t *ps_proc);
53 
54 void ih264e_evaluate_intra8x8_modes_for_least_cost_rdoptoff(process_ctxt_t *ps_proc);
55 
56 void ih264e_evaluate_intra4x4_modes_for_least_cost_rdoptoff(process_ctxt_t *ps_proc);
57 
58 void ih264e_evaluate_intra4x4_modes_for_least_cost_rdopton(process_ctxt_t *ps_proc);
59 
60 void ih264e_evaluate_chroma_intra8x8_modes_for_least_cost_rdoptoff(process_ctxt_t *ps_proc);
61 
62 void ih264e_evaluate_intra8x8_modes_for_least_cost_rdoptoff(process_ctxt_t *ps_proc_ctxt);
63 
64 typedef void ih264e_evaluate_intra_modes_ft(UWORD8 *pu1_src,
65                                             UWORD8 *pu1_ngbr_pels_i16,
66                                             UWORD8 *pu1_dst,
67                                             UWORD32 src_strd,
68                                             UWORD32 dst_strd,
69                                             WORD32 u4_n_avblty,
70                                             UWORD32 *u4_intra_mode,
71                                             WORD32 *pu4_sadmin,
72                                             UWORD32 u4_valid_intra_modes);
73 
74 typedef void ih264e_evaluate_intra_4x4_modes_ft(UWORD8 *pu1_src,
75                                                 UWORD8 *pu1_ngbr_pels,
76                                                 UWORD8 *pu1_dst,
77                                                 UWORD32 src_strd,
78                                                 UWORD32 dst_strd,
79                                                 WORD32 u4_n_avblty,
80                                                 UWORD32 *u4_intra_mode,
81                                                 WORD32 *pu4_sadmin,
82                                                 UWORD32 u4_valid_intra_modes,
83                                                 UWORD32 u4_lambda,
84                                                 UWORD32 u4_predictd_mode);
85 
86 /* C Declarations */
87 ih264e_evaluate_intra_modes_ft ih264e_evaluate_intra16x16_modes;
88 ih264e_evaluate_intra_modes_ft ih264e_evaluate_intra_chroma_modes;
89 ih264e_evaluate_intra_4x4_modes_ft ih264e_evaluate_intra_4x4_modes;
90 
91 /* A9 Declarations */
92 ih264e_evaluate_intra_modes_ft ih264e_evaluate_intra16x16_modes_a9q;
93 ih264e_evaluate_intra_modes_ft ih264e_evaluate_intra_chroma_modes_a9q;
94 ih264e_evaluate_intra_4x4_modes_ft ih264e_evaluate_intra_4x4_modes_a9q;
95 
96 /* AV8 Declarations */
97 ih264e_evaluate_intra_modes_ft ih264e_evaluate_intra16x16_modes_av8;
98 ih264e_evaluate_intra_modes_ft ih264e_evaluate_intra_chroma_modes_av8;
99 ih264e_evaluate_intra_4x4_modes_ft ih264e_evaluate_intra_4x4_modes_av8;
100 
101 /* SSSE3 Declarations */
102 ih264e_evaluate_intra_modes_ft ih264e_evaluate_intra16x16_modes_ssse3;
103 ih264e_evaluate_intra_modes_ft ih264e_evaluate_intra_chroma_modes_ssse3;
104 ih264e_evaluate_intra_4x4_modes_ft ih264e_evaluate_intra_4x4_modes_ssse3;
105 
106 #endif /* _IH264E_INTRA_MODES_EVAL_H_ */
107