xref: /aosp_15_r20/external/libavc/common/ih264_weighted_pred.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 *  ih264_weighted_pred.h
25 *
26 * @brief
27 *  Declarations of functions used for weighted prediction
28 *
29 * @author
30 *  ittiam
31 *
32 * @remarks
33 *  none
34 *
35 *******************************************************************************
36 */
37 
38 #ifndef _IH264_WEIGHTED_PRED_H_
39 #define _IH264_WEIGHTED_PRED_H_
40 
41 /*****************************************************************************/
42 /* Extern Function Declarations                                              */
43 /*****************************************************************************/
44 typedef void ih264_default_weighted_pred_ft(UWORD8 *puc_src1,
45                                             UWORD8 *puc_src2,
46                                             UWORD8 *puc_dst,
47                                             WORD32 src_strd1,
48                                             WORD32 src_strd2,
49                                             WORD32 dst_strd,
50                                             WORD32 ht,
51                                             WORD32 wd);
52 
53 typedef void ih264_weighted_pred_ft(UWORD8 *puc_src,
54                                     UWORD8 *puc_dst,
55                                     WORD32 src_strd,
56                                     WORD32 dst_strd,
57                                     WORD32 log_wd,
58                                     WORD32 wt,
59                                     WORD32 ofst,
60                                     WORD32 ht,
61                                     WORD32 wd);
62 
63 typedef void ih264_weighted_bi_pred_ft(UWORD8 *puc_src1,
64                                        UWORD8 *puc_src2,
65                                        UWORD8 *puc_dst,
66                                        WORD32 src_strd1,
67                                        WORD32 src_strd2,
68                                        WORD32 dst_strd,
69                                        WORD32 log_wd,
70                                        WORD32 wt1,
71                                        WORD32 wt2,
72                                        WORD32 ofst1,
73                                        WORD32 ofst2,
74                                        WORD32 ht,
75                                        WORD32 wd);
76 
77 /* C Declarations */
78 ih264_default_weighted_pred_ft ih264_default_weighted_pred_luma;
79 ih264_default_weighted_pred_ft ih264_default_weighted_pred_chroma;
80 ih264_weighted_pred_ft ih264_weighted_pred_luma;
81 ih264_weighted_pred_ft ih264_weighted_pred_chroma;
82 ih264_weighted_bi_pred_ft ih264_weighted_bi_pred_luma;
83 ih264_weighted_bi_pred_ft ih264_weighted_bi_pred_chroma;
84 
85 /* A9 NEON Declarations */
86 ih264_default_weighted_pred_ft ih264_default_weighted_pred_luma_a9q;
87 ih264_default_weighted_pred_ft ih264_default_weighted_pred_chroma_a9q;
88 ih264_weighted_pred_ft ih264_weighted_pred_luma_a9q;
89 ih264_weighted_pred_ft ih264_weighted_pred_chroma_a9q;
90 ih264_weighted_bi_pred_ft ih264_weighted_bi_pred_luma_a9q;
91 ih264_weighted_bi_pred_ft ih264_weighted_bi_pred_chroma_a9q;
92 
93 /* AV8 NEON Declarations */
94 ih264_default_weighted_pred_ft ih264_default_weighted_pred_luma_av8;
95 ih264_default_weighted_pred_ft ih264_default_weighted_pred_chroma_av8;
96 ih264_weighted_pred_ft ih264_weighted_pred_luma_av8;
97 ih264_weighted_pred_ft ih264_weighted_pred_chroma_av8;
98 ih264_weighted_bi_pred_ft ih264_weighted_bi_pred_luma_av8;
99 ih264_weighted_bi_pred_ft ih264_weighted_bi_pred_chroma_av8;
100 
101 /* SSE42 Intrinsic Declarations */
102 ih264_default_weighted_pred_ft ih264_default_weighted_pred_luma_sse42;
103 ih264_default_weighted_pred_ft ih264_default_weighted_pred_chroma_sse42;
104 ih264_weighted_pred_ft ih264_weighted_pred_luma_sse42;
105 ih264_weighted_pred_ft ih264_weighted_pred_chroma_sse42;
106 ih264_weighted_bi_pred_ft ih264_weighted_bi_pred_luma_sse42;
107 ih264_weighted_bi_pred_ft ih264_weighted_bi_pred_chroma_sse42;
108 
109 #endif /* _IH264_WEIGHTED_PRED_H_ */
110 
111