• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright (C) 2022 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 *  isvce_pred_structs.h
25 *
26 * @brief
27 *  Contains struct definition used for prediction
28 *
29 * @author
30 *  ittiam
31 *
32 * @remarks
33 *  None
34 *
35 *******************************************************************************
36 */
37 
38 #ifndef _ISVCE_PRED_STRUCTS_H_
39 #define _ISVCE_PRED_STRUCTS_H_
40 
41 #include "ih264_typedefs.h"
42 #include "isvc_defs.h"
43 #include "isvc_structs.h"
44 #include "isvce_defs.h"
45 
46 /**
47  * PU information
48  */
49 typedef struct
50 {
51     /**
52      *  Motion Vector
53      */
54     mv_t s_mv;
55 
56     /**
57      *  Ref index
58      */
59     WORD8 i1_ref_idx;
60 
61 } isvce_enc_pu_mv_t;
62 
63 /*
64  * Total Pu info for an MB
65  */
66 typedef struct isvce_enc_pu_t
67 {
68     /* Array with ME info for all lists */
69     isvce_enc_pu_mv_t as_me_info[NUM_PRED_DIRS];
70 
71     UWORD8 au1_mvp_idx[NUM_PRED_DIRS];
72 
73     /**
74      *  PU X position in terms of min PU (4x4) units
75      */
76     UWORD8 u1_pos_x_in_4x4;
77 
78     /**
79      *  PU Y position in terms of min PU (4x4) units
80      */
81     UWORD8 u1_pos_y_in_4x4;
82 
83     /**
84      *  PU width in pixels = (u1_wd_in_4x4_m1 + 1) << 2
85      */
86     UWORD8 u1_wd_in_4x4_m1;
87 
88     /**
89      *  PU height in pixels = (u1_ht_in_4x4_m1 + 1) << 2
90      */
91     UWORD8 u1_ht_in_4x4_m1;
92 
93     /**
94      *  PRED_L0, PRED_L1, PRED_BI
95      */
96     UWORD8 u1_pred_mode;
97 
98 } isvce_enc_pu_t;
99 
100 typedef struct intra4x4_mode_data_t
101 {
102     UWORD8 u1_predicted_mode;
103 
104     UWORD8 u1_mode;
105 
106 } intra4x4_mode_data_t;
107 
108 typedef intra4x4_mode_data_t intra8x8_mode_data_t;
109 
110 typedef struct intra16x16_mode_data_t
111 {
112     UWORD8 u1_mode;
113 
114 } intra16x16_mode_data_t;
115 
116 typedef struct enc_intra_pu_t
117 {
118     intra4x4_mode_data_t as_i4x4_mode_data[MAX_TU_IN_MB];
119 
120     intra8x8_mode_data_t as_i8x8_mode_data[MIN_TU_IN_MB];
121 
122     intra16x16_mode_data_t s_i16x16_mode_data;
123 
124     UWORD8 u1_chroma_intra_mode;
125 
126 } enc_intra_pu_t;
127 
128 typedef struct isvce_mb_info_t
129 {
130     isvce_enc_pu_t as_pu[ENC_MAX_PU_IN_MB];
131 
132     enc_intra_pu_t s_intra_pu;
133 
134     UWORD32 u4_cbp;
135 
136     UWORD32 u4_csbp;
137 
138     UWORD32 u4_res_csbp;
139 
140     UWORD16 u2_mb_type;
141 
142     WORD32 i4_mb_distortion;
143 
144     UWORD8 u1_base_mode_flag;
145 
146     UWORD8 u1_residual_prediction_flag;
147 
148     UWORD8 u1_tx_size;
149 
150     UWORD8 u1_mb_qp;
151 
152     UWORD8 u1_is_intra;
153 
154 } isvce_mb_info_t;
155 
156 #endif
157