xref: /aosp_15_r20/external/libavc/common/mvc/imvc_structs.h (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
1 /******************************************************************************
2  *
3  * Copyright (C) 2021 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 #ifndef _IMVC_STRUCTS_H_
22 #define _IMVC_STRUCTS_H_
23 
24 #include "ih264_typedefs.h"
25 #include "imvc_defs.h"
26 
27 typedef struct nalu_mvc_ext_t
28 {
29     UWORD8 u1_non_idr_flag;
30 
31     UWORD8 u1_priority_id;
32 
33     UWORD16 u2_view_id;
34 
35     UWORD8 u1_temporal_id;
36 
37     UWORD8 u1_anchor_pic_flag;
38 
39     UWORD8 u1_inter_view_flag;
40 
41 } nalu_mvc_ext_t;
42 
43 typedef struct mvc_ivp_ref_data_t
44 {
45     UWORD8 u1_num_refs;
46 
47     UWORD16 au2_ref_view_ids[MAX_NUM_IVP_REFS];
48 
49 } mvc_ivp_ref_data_t;
50 
51 typedef struct mvc_op_data_t
52 {
53     UWORD8 u1_temporal_id;
54 
55     UWORD16 u2_num_ops;
56 
57     UWORD16 u2_num_target_views;
58 
59     UWORD16 au2_target_view_ids[MAX_NUM_VIEWS];
60 
61     /* Counter for num target views and views each target is dependent on */
62     UWORD16 u2_num_views;
63 
64 } mvc_op_data_t;
65 
66 typedef struct mvc_level_info_t
67 {
68     UWORD32 u4_level_idc;
69 
70     mvc_op_data_t as_mvc_op_data[MAX_NUM_OPERATING_POINTS];
71 
72 } mvc_level_info_t;
73 
74 typedef struct sps_mvc_ext_t
75 {
76     UWORD16 u2_num_views;
77 
78     UWORD16 au2_view_ids[MAX_NUM_VIEWS];
79 
80     /* 0 => L0; 1 => L1 */
81     mvc_ivp_ref_data_t as_anchor_ref_data[2][MAX_NUM_VIEWS];
82 
83     /* 0 => L0; 1 => L1 */
84     mvc_ivp_ref_data_t as_non_anchor_ref_data[2][MAX_NUM_VIEWS];
85 
86     UWORD8 u1_num_level_values_signalled;
87 
88     mvc_level_info_t as_mvc_level_info[MAX_NUM_LEVEL_VALUES_SIGNALLED];
89 
90 } sps_mvc_ext_t;
91 
92 typedef struct mvc_vui_ext_t
93 {
94     UWORD16 u2_vui_mvc_num_ops;
95 
96     UWORD8 u1_vui_mvc_temporal_id[MAX_NUM_OPERATING_POINTS];
97 
98     UWORD16 u2_vui_mvc_num_target_output_views[MAX_NUM_OPERATING_POINTS];
99 
100     UWORD16 u2_vui_mvc_view_id[MAX_NUM_OPERATING_POINTS][MAX_NUM_VIEWS];
101 
102     UWORD8 u1_vui_mvc_timing_info_present_flag[MAX_NUM_OPERATING_POINTS];
103 
104     UWORD32 u4_vui_mvc_num_units_in_tick[MAX_NUM_OPERATING_POINTS];
105 
106     UWORD32 u4_vui_mvc_time_scale[MAX_NUM_OPERATING_POINTS];
107 
108     UWORD8 u1_vui_mvc_fixed_frame_rate_flag[MAX_NUM_OPERATING_POINTS];
109 
110     UWORD8 u1_vui_mvc_nal_hrd_parameters_present_flag[MAX_NUM_OPERATING_POINTS];
111 
112     UWORD8 u1_vui_mvc_vcl_hrd_parameters_present_flag[MAX_NUM_OPERATING_POINTS];
113 
114     UWORD8 u1_vui_mvc_low_delay_hrd_flag[MAX_NUM_OPERATING_POINTS];
115 
116     UWORD8 u1_vui_mvc_pic_struct_present_flag[MAX_NUM_OPERATING_POINTS];
117 
118 } mvc_vui_ext_t;
119 
120 typedef struct buffer_container_t
121 {
122     void *pv_data;
123 
124     WORD32 i4_data_stride;
125 
126 } buffer_container_t;
127 
128 typedef struct yuv_buf_props_t
129 {
130     buffer_container_t as_component_bufs[NUM_COMPONENTS];
131 
132     UWORD8 u1_bit_depth;
133 
134     UWORD16 u2_width;
135 
136     UWORD16 u2_height;
137 
138 } yuv_buf_props_t;
139 
140 typedef struct iv_mvc_yuv_buf_t
141 {
142     yuv_buf_props_t as_view_buf_props[MAX_NUM_VIEWS];
143 
144 } iv_mvc_yuv_buf_t;
145 
146 typedef struct coordinates_t
147 {
148     WORD32 i4_abscissa;
149 
150     WORD32 i4_ordinate;
151 } coordinates_t;
152 
153 typedef struct offsets_t
154 {
155     UWORD16 u2_top_offset;
156 
157     UWORD16 u2_bottom_offset;
158 
159     UWORD16 u2_left_offset;
160 
161     UWORD16 u2_right_offset;
162 } offsets_t;
163 
164 #endif
165