xref: /aosp_15_r20/external/libavc/common/ih264_structs.h (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
1*495ae853SAndroid Build Coastguard Worker /******************************************************************************
2*495ae853SAndroid Build Coastguard Worker  *
3*495ae853SAndroid Build Coastguard Worker  * Copyright (C) 2015 The Android Open Source Project
4*495ae853SAndroid Build Coastguard Worker  *
5*495ae853SAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
6*495ae853SAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
7*495ae853SAndroid Build Coastguard Worker  * You may obtain a copy of the License at:
8*495ae853SAndroid Build Coastguard Worker  *
9*495ae853SAndroid Build Coastguard Worker  * http://www.apache.org/licenses/LICENSE-2.0
10*495ae853SAndroid Build Coastguard Worker  *
11*495ae853SAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
12*495ae853SAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
13*495ae853SAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*495ae853SAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
15*495ae853SAndroid Build Coastguard Worker  * limitations under the License.
16*495ae853SAndroid Build Coastguard Worker  *
17*495ae853SAndroid Build Coastguard Worker  *****************************************************************************
18*495ae853SAndroid Build Coastguard Worker  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19*495ae853SAndroid Build Coastguard Worker */
20*495ae853SAndroid Build Coastguard Worker 
21*495ae853SAndroid Build Coastguard Worker /**
22*495ae853SAndroid Build Coastguard Worker *******************************************************************************
23*495ae853SAndroid Build Coastguard Worker * @file
24*495ae853SAndroid Build Coastguard Worker *  ih264_structs.h
25*495ae853SAndroid Build Coastguard Worker *
26*495ae853SAndroid Build Coastguard Worker * @brief
27*495ae853SAndroid Build Coastguard Worker *  Structure definitions used in the code
28*495ae853SAndroid Build Coastguard Worker *
29*495ae853SAndroid Build Coastguard Worker * @author
30*495ae853SAndroid Build Coastguard Worker *  ittiam
31*495ae853SAndroid Build Coastguard Worker *
32*495ae853SAndroid Build Coastguard Worker * @remarks
33*495ae853SAndroid Build Coastguard Worker *  none
34*495ae853SAndroid Build Coastguard Worker *
35*495ae853SAndroid Build Coastguard Worker *******************************************************************************
36*495ae853SAndroid Build Coastguard Worker */
37*495ae853SAndroid Build Coastguard Worker 
38*495ae853SAndroid Build Coastguard Worker #ifndef _IH264_STRUCTS_H_
39*495ae853SAndroid Build Coastguard Worker #define _IH264_STRUCTS_H_
40*495ae853SAndroid Build Coastguard Worker 
41*495ae853SAndroid Build Coastguard Worker /** MB Type info for Intra MBs */
42*495ae853SAndroid Build Coastguard Worker typedef struct
43*495ae853SAndroid Build Coastguard Worker {
44*495ae853SAndroid Build Coastguard Worker     UWORD32             u4_num_mbpart;
45*495ae853SAndroid Build Coastguard Worker     MBPART_PREDMODE_T   e_mbpart_predmode;
46*495ae853SAndroid Build Coastguard Worker     MBMODES_I16x16      e_intra_predmode;
47*495ae853SAndroid Build Coastguard Worker     UWORD32             u4_cpb_chroma;
48*495ae853SAndroid Build Coastguard Worker     UWORD32             u4_cpb_luma;
49*495ae853SAndroid Build Coastguard Worker }intra_mbtype_info_t;
50*495ae853SAndroid Build Coastguard Worker 
51*495ae853SAndroid Build Coastguard Worker /** MB Type info for Inter MBs */
52*495ae853SAndroid Build Coastguard Worker typedef struct
53*495ae853SAndroid Build Coastguard Worker {
54*495ae853SAndroid Build Coastguard Worker     UWORD32                 u4_num_mbpart;
55*495ae853SAndroid Build Coastguard Worker     MBPART_PREDMODE_T       e_mbpart_predmode_0;
56*495ae853SAndroid Build Coastguard Worker     MBPART_PREDMODE_T       e_mbpart_predmode_1;
57*495ae853SAndroid Build Coastguard Worker     UWORD32                 u4_mbpart_wd;
58*495ae853SAndroid Build Coastguard Worker     UWORD32                 u4_mbpart_ht;
59*495ae853SAndroid Build Coastguard Worker }inter_mbtype_info_t;
60*495ae853SAndroid Build Coastguard Worker 
61*495ae853SAndroid Build Coastguard Worker 
62*495ae853SAndroid Build Coastguard Worker /** Sub MB Type info for Inter MBs */
63*495ae853SAndroid Build Coastguard Worker typedef struct
64*495ae853SAndroid Build Coastguard Worker {
65*495ae853SAndroid Build Coastguard Worker     UWORD32                 u4_num_mbpart;
66*495ae853SAndroid Build Coastguard Worker     MBPART_PREDMODE_T       e_mbpart_predmode;
67*495ae853SAndroid Build Coastguard Worker     UWORD32                 u4_mbpart_wd;
68*495ae853SAndroid Build Coastguard Worker     UWORD32                 u4_mbpart_ht;
69*495ae853SAndroid Build Coastguard Worker }submbtype_info_t;
70*495ae853SAndroid Build Coastguard Worker 
71*495ae853SAndroid Build Coastguard Worker /**
72*495ae853SAndroid Build Coastguard Worker  * Picture buffer
73*495ae853SAndroid Build Coastguard Worker  */
74*495ae853SAndroid Build Coastguard Worker typedef struct
75*495ae853SAndroid Build Coastguard Worker {
76*495ae853SAndroid Build Coastguard Worker     UWORD8* pu1_luma;
77*495ae853SAndroid Build Coastguard Worker     UWORD8* pu1_chroma;
78*495ae853SAndroid Build Coastguard Worker 
79*495ae853SAndroid Build Coastguard Worker     WORD32 i4_abs_poc;
80*495ae853SAndroid Build Coastguard Worker     WORD32 i4_poc_lsb;
81*495ae853SAndroid Build Coastguard Worker 
82*495ae853SAndroid Build Coastguard Worker 
83*495ae853SAndroid Build Coastguard Worker     /** Lower 32 bit of time stamp */
84*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_timestamp_low;
85*495ae853SAndroid Build Coastguard Worker 
86*495ae853SAndroid Build Coastguard Worker     /** Upper 32 bit of time stamp */
87*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_timestamp_high;
88*495ae853SAndroid Build Coastguard Worker 
89*495ae853SAndroid Build Coastguard Worker     WORD32 i4_used_as_ref;
90*495ae853SAndroid Build Coastguard Worker 
91*495ae853SAndroid Build Coastguard Worker     /**
92*495ae853SAndroid Build Coastguard Worker      * frame_num in the slice header
93*495ae853SAndroid Build Coastguard Worker      */
94*495ae853SAndroid Build Coastguard Worker     WORD32 i4_frame_num;
95*495ae853SAndroid Build Coastguard Worker 
96*495ae853SAndroid Build Coastguard Worker     /**
97*495ae853SAndroid Build Coastguard Worker      * Long-term frame idx
98*495ae853SAndroid Build Coastguard Worker      * TODO: store in frame_num
99*495ae853SAndroid Build Coastguard Worker      */
100*495ae853SAndroid Build Coastguard Worker     WORD32 i4_long_term_frame_idx;
101*495ae853SAndroid Build Coastguard Worker 
102*495ae853SAndroid Build Coastguard Worker     /*
103*495ae853SAndroid Build Coastguard Worker      *  0: Top Field
104*495ae853SAndroid Build Coastguard Worker      *  1: Bottom Field
105*495ae853SAndroid Build Coastguard Worker      */
106*495ae853SAndroid Build Coastguard Worker     WORD8   i1_field_type;
107*495ae853SAndroid Build Coastguard Worker 
108*495ae853SAndroid Build Coastguard Worker     /**
109*495ae853SAndroid Build Coastguard Worker      * buffer ID from frame buffer manager
110*495ae853SAndroid Build Coastguard Worker      */
111*495ae853SAndroid Build Coastguard Worker     WORD32 i4_buf_id;
112*495ae853SAndroid Build Coastguard Worker 
113*495ae853SAndroid Build Coastguard Worker } pic_buf_t;
114*495ae853SAndroid Build Coastguard Worker 
115*495ae853SAndroid Build Coastguard Worker 
116*495ae853SAndroid Build Coastguard Worker /**
117*495ae853SAndroid Build Coastguard Worker  * Reference List
118*495ae853SAndroid Build Coastguard Worker  */
119*495ae853SAndroid Build Coastguard Worker typedef struct
120*495ae853SAndroid Build Coastguard Worker {
121*495ae853SAndroid Build Coastguard Worker     void *pv_pic_buf;
122*495ae853SAndroid Build Coastguard Worker 
123*495ae853SAndroid Build Coastguard Worker     void *pv_mv_buf;
124*495ae853SAndroid Build Coastguard Worker 
125*495ae853SAndroid Build Coastguard Worker } ref_list_t;
126*495ae853SAndroid Build Coastguard Worker 
127*495ae853SAndroid Build Coastguard Worker 
128*495ae853SAndroid Build Coastguard Worker /**
129*495ae853SAndroid Build Coastguard Worker  * Motion vector
130*495ae853SAndroid Build Coastguard Worker  */
131*495ae853SAndroid Build Coastguard Worker typedef struct
132*495ae853SAndroid Build Coastguard Worker {
133*495ae853SAndroid Build Coastguard Worker     /**
134*495ae853SAndroid Build Coastguard Worker      * Horizontal Motion Vector
135*495ae853SAndroid Build Coastguard Worker      */
136*495ae853SAndroid Build Coastguard Worker     WORD16 i2_mvx;
137*495ae853SAndroid Build Coastguard Worker 
138*495ae853SAndroid Build Coastguard Worker     /**
139*495ae853SAndroid Build Coastguard Worker      * Vertical Motion Vector
140*495ae853SAndroid Build Coastguard Worker      */
141*495ae853SAndroid Build Coastguard Worker     WORD16 i2_mvy;
142*495ae853SAndroid Build Coastguard Worker } mv_t;
143*495ae853SAndroid Build Coastguard Worker 
144*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
145*495ae853SAndroid Build Coastguard Worker /* Following results in packed 48 bit structure. If mv_t included            */
146*495ae853SAndroid Build Coastguard Worker /*  ref_pic_buf_id, then 8 bits will be wasted for each mv for aligning.     */
147*495ae853SAndroid Build Coastguard Worker /*  Also using mv_t as elements directly instead of a pointer to l0 and l1   */
148*495ae853SAndroid Build Coastguard Worker /*  mvs. Since pointer takes 4 bytes and MV itself is 4 bytes. It does not   */
149*495ae853SAndroid Build Coastguard Worker /*  really help using pointers.                                              */
150*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
151*495ae853SAndroid Build Coastguard Worker 
152*495ae853SAndroid Build Coastguard Worker /**
153*495ae853SAndroid Build Coastguard Worker  * PU Motion Vector info
154*495ae853SAndroid Build Coastguard Worker  */
155*495ae853SAndroid Build Coastguard Worker typedef struct
156*495ae853SAndroid Build Coastguard Worker {
157*495ae853SAndroid Build Coastguard Worker     /**
158*495ae853SAndroid Build Coastguard Worker      *  L0 Motion Vector
159*495ae853SAndroid Build Coastguard Worker      */
160*495ae853SAndroid Build Coastguard Worker     mv_t s_l0_mv;
161*495ae853SAndroid Build Coastguard Worker 
162*495ae853SAndroid Build Coastguard Worker     /**
163*495ae853SAndroid Build Coastguard Worker      *  L1 Motion Vector
164*495ae853SAndroid Build Coastguard Worker      */
165*495ae853SAndroid Build Coastguard Worker     mv_t s_l1_mv;
166*495ae853SAndroid Build Coastguard Worker 
167*495ae853SAndroid Build Coastguard Worker     /**
168*495ae853SAndroid Build Coastguard Worker      *  L0 Ref index
169*495ae853SAndroid Build Coastguard Worker      */
170*495ae853SAndroid Build Coastguard Worker     WORD8   i1_l0_ref_idx;
171*495ae853SAndroid Build Coastguard Worker 
172*495ae853SAndroid Build Coastguard Worker     /**
173*495ae853SAndroid Build Coastguard Worker      *  L1 Ref index
174*495ae853SAndroid Build Coastguard Worker      */
175*495ae853SAndroid Build Coastguard Worker     WORD8   i1_l1_ref_idx;
176*495ae853SAndroid Build Coastguard Worker 
177*495ae853SAndroid Build Coastguard Worker     /**
178*495ae853SAndroid Build Coastguard Worker      *  L0 Ref Pic Buf ID
179*495ae853SAndroid Build Coastguard Worker      */
180*495ae853SAndroid Build Coastguard Worker     WORD8 i1_l0_ref_pic_buf_id;
181*495ae853SAndroid Build Coastguard Worker 
182*495ae853SAndroid Build Coastguard Worker     /**
183*495ae853SAndroid Build Coastguard Worker      *  L1 Ref Pic Buf ID
184*495ae853SAndroid Build Coastguard Worker      */
185*495ae853SAndroid Build Coastguard Worker     WORD8 i1_l1_ref_pic_buf_id;
186*495ae853SAndroid Build Coastguard Worker 
187*495ae853SAndroid Build Coastguard Worker } pu_mv_t;
188*495ae853SAndroid Build Coastguard Worker 
189*495ae853SAndroid Build Coastguard Worker /**
190*495ae853SAndroid Build Coastguard Worker  * PU information
191*495ae853SAndroid Build Coastguard Worker  */
192*495ae853SAndroid Build Coastguard Worker typedef struct
193*495ae853SAndroid Build Coastguard Worker {
194*495ae853SAndroid Build Coastguard Worker 
195*495ae853SAndroid Build Coastguard Worker     /**
196*495ae853SAndroid Build Coastguard Worker      *  Motion Vectors
197*495ae853SAndroid Build Coastguard Worker      */
198*495ae853SAndroid Build Coastguard Worker     pu_mv_t     s_mv;
199*495ae853SAndroid Build Coastguard Worker 
200*495ae853SAndroid Build Coastguard Worker     /**
201*495ae853SAndroid Build Coastguard Worker      *  PU X position in terms of min PU (4x4) units
202*495ae853SAndroid Build Coastguard Worker      */
203*495ae853SAndroid Build Coastguard Worker     UWORD32     b2_pos_x        : 2;
204*495ae853SAndroid Build Coastguard Worker 
205*495ae853SAndroid Build Coastguard Worker     /**
206*495ae853SAndroid Build Coastguard Worker      *  PU Y position in terms of min PU (4x4) units
207*495ae853SAndroid Build Coastguard Worker      */
208*495ae853SAndroid Build Coastguard Worker     UWORD32     b2_pos_y        : 2;
209*495ae853SAndroid Build Coastguard Worker 
210*495ae853SAndroid Build Coastguard Worker     /**
211*495ae853SAndroid Build Coastguard Worker      *  PU width in pixels = (b2_wd + 1) << 2
212*495ae853SAndroid Build Coastguard Worker      */
213*495ae853SAndroid Build Coastguard Worker     UWORD32     b2_wd           : 2;
214*495ae853SAndroid Build Coastguard Worker 
215*495ae853SAndroid Build Coastguard Worker     /**
216*495ae853SAndroid Build Coastguard Worker      *  PU height in pixels = (b2_ht + 1) << 2
217*495ae853SAndroid Build Coastguard Worker      */
218*495ae853SAndroid Build Coastguard Worker     UWORD32     b2_ht           : 2;
219*495ae853SAndroid Build Coastguard Worker 
220*495ae853SAndroid Build Coastguard Worker     /**
221*495ae853SAndroid Build Coastguard Worker      *  Intra or Inter flag for each partition - 0 or 1
222*495ae853SAndroid Build Coastguard Worker      */
223*495ae853SAndroid Build Coastguard Worker     UWORD32     b1_intra_flag   : 1;
224*495ae853SAndroid Build Coastguard Worker 
225*495ae853SAndroid Build Coastguard Worker     /**
226*495ae853SAndroid Build Coastguard Worker      *  PRED_L0, PRED_L1, PRED_BI
227*495ae853SAndroid Build Coastguard Worker      */
228*495ae853SAndroid Build Coastguard Worker     UWORD32     b2_pred_mode    : 2;
229*495ae853SAndroid Build Coastguard Worker 
230*495ae853SAndroid Build Coastguard Worker } pu_t;
231*495ae853SAndroid Build Coastguard Worker 
232*495ae853SAndroid Build Coastguard Worker 
233*495ae853SAndroid Build Coastguard Worker /**
234*495ae853SAndroid Build Coastguard Worker  * MB information to be stored for entire frame
235*495ae853SAndroid Build Coastguard Worker  */
236*495ae853SAndroid Build Coastguard Worker typedef struct
237*495ae853SAndroid Build Coastguard Worker {
238*495ae853SAndroid Build Coastguard Worker     /**
239*495ae853SAndroid Build Coastguard Worker      * Transform sizes 0: 4x4, 1: 8x8,
240*495ae853SAndroid Build Coastguard Worker      */
241*495ae853SAndroid Build Coastguard Worker     UWORD32     b1_trans_size : 1;
242*495ae853SAndroid Build Coastguard Worker 
243*495ae853SAndroid Build Coastguard Worker     /**
244*495ae853SAndroid Build Coastguard Worker      * CBP - 4 bits for Y, 1 for U and 1 for V
245*495ae853SAndroid Build Coastguard Worker      */
246*495ae853SAndroid Build Coastguard Worker     UWORD32     b6_cbp: 6;
247*495ae853SAndroid Build Coastguard Worker 
248*495ae853SAndroid Build Coastguard Worker     /**
249*495ae853SAndroid Build Coastguard Worker      * Intra pred sizes  0: 4x4, 1: 8x8, 2: 16x16
250*495ae853SAndroid Build Coastguard Worker      */
251*495ae853SAndroid Build Coastguard Worker     UWORD32     b2_intra_pred_size : 2;
252*495ae853SAndroid Build Coastguard Worker 
253*495ae853SAndroid Build Coastguard Worker     /**
254*495ae853SAndroid Build Coastguard Worker      * Flag to signal if the current MB is IPCM
255*495ae853SAndroid Build Coastguard Worker      */
256*495ae853SAndroid Build Coastguard Worker     UWORD32     b1_ipcm : 1;
257*495ae853SAndroid Build Coastguard Worker 
258*495ae853SAndroid Build Coastguard Worker }mb_t;
259*495ae853SAndroid Build Coastguard Worker 
260*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
261*495ae853SAndroid Build Coastguard Worker /* Info from last TU row of MB is stored in a row level neighbour buffer    */
262*495ae853SAndroid Build Coastguard Worker /* , which will be used for Boundary Strength computation                    */
263*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
264*495ae853SAndroid Build Coastguard Worker /**
265*495ae853SAndroid Build Coastguard Worker  *  MB neighbor info
266*495ae853SAndroid Build Coastguard Worker  */
267*495ae853SAndroid Build Coastguard Worker typedef struct
268*495ae853SAndroid Build Coastguard Worker {
269*495ae853SAndroid Build Coastguard Worker     /**
270*495ae853SAndroid Build Coastguard Worker      *  Slice index of the mb
271*495ae853SAndroid Build Coastguard Worker      */
272*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_slice_idx;
273*495ae853SAndroid Build Coastguard Worker 
274*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
275*495ae853SAndroid Build Coastguard Worker     /* CBF of bottom TU row (replicated in 4 pixel boundary)                 */
276*495ae853SAndroid Build Coastguard Worker     /* MSB contains CBF of first TU in the last row and LSB contains CBF     */
277*495ae853SAndroid Build Coastguard Worker     /* of last TU in the last row                                            */
278*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
279*495ae853SAndroid Build Coastguard Worker     /**
280*495ae853SAndroid Build Coastguard Worker      * CBF of bottom TU row
281*495ae853SAndroid Build Coastguard Worker      */
282*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_packed_cbf;
283*495ae853SAndroid Build Coastguard Worker 
284*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
285*495ae853SAndroid Build Coastguard Worker     /* QP of bottom TU row (replicated at 8 pixel boundary (Since QP can     */
286*495ae853SAndroid Build Coastguard Worker     /* not change at less than min CU granularity)                           */
287*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
288*495ae853SAndroid Build Coastguard Worker     /**
289*495ae853SAndroid Build Coastguard Worker      * QP of bottom TU row
290*495ae853SAndroid Build Coastguard Worker      */
291*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_qp;
292*495ae853SAndroid Build Coastguard Worker 
293*495ae853SAndroid Build Coastguard Worker } mb_top_ny_info_t;
294*495ae853SAndroid Build Coastguard Worker 
295*495ae853SAndroid Build Coastguard Worker /**
296*495ae853SAndroid Build Coastguard Worker  *  MB level context
297*495ae853SAndroid Build Coastguard Worker  */
298*495ae853SAndroid Build Coastguard Worker typedef struct _mb_ctxt_t
299*495ae853SAndroid Build Coastguard Worker {
300*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
301*495ae853SAndroid Build Coastguard Worker     /* Tile boundary can be detected by looking at tile start x and tile     */
302*495ae853SAndroid Build Coastguard Worker     /* start y.  And based on the tile, slice and frame boundary the         */
303*495ae853SAndroid Build Coastguard Worker     /* following will be initialized.                                        */
304*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
305*495ae853SAndroid Build Coastguard Worker     /**
306*495ae853SAndroid Build Coastguard Worker      *  Pointer to left MB
307*495ae853SAndroid Build Coastguard Worker      */
308*495ae853SAndroid Build Coastguard Worker     /*  If not available, this will be set to NULL   */
309*495ae853SAndroid Build Coastguard Worker     struct _mb_ctxt_t *ps_mb_left;
310*495ae853SAndroid Build Coastguard Worker 
311*495ae853SAndroid Build Coastguard Worker     /**
312*495ae853SAndroid Build Coastguard Worker      *  Pointer to top-left MB
313*495ae853SAndroid Build Coastguard Worker      */
314*495ae853SAndroid Build Coastguard Worker     /* If not available, this will be set to NULL   */
315*495ae853SAndroid Build Coastguard Worker     mb_top_ny_info_t *ps_mb_ny_topleft;
316*495ae853SAndroid Build Coastguard Worker 
317*495ae853SAndroid Build Coastguard Worker     /**
318*495ae853SAndroid Build Coastguard Worker      *  Pointer to top MB
319*495ae853SAndroid Build Coastguard Worker      */
320*495ae853SAndroid Build Coastguard Worker     /* If not available, this will be set to NULL  */
321*495ae853SAndroid Build Coastguard Worker     mb_top_ny_info_t *ps_mb_ny_top;
322*495ae853SAndroid Build Coastguard Worker 
323*495ae853SAndroid Build Coastguard Worker     /**
324*495ae853SAndroid Build Coastguard Worker      *  Pointer to top-right MB
325*495ae853SAndroid Build Coastguard Worker      */
326*495ae853SAndroid Build Coastguard Worker     /* If not available, this will be set to NULL */
327*495ae853SAndroid Build Coastguard Worker     mb_top_ny_info_t *ps_mb_ny_topright;
328*495ae853SAndroid Build Coastguard Worker 
329*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
330*495ae853SAndroid Build Coastguard Worker     /* Pointer to PU data.                                                   */
331*495ae853SAndroid Build Coastguard Worker     /* This points to a MV Bank stored at frame level. Though this           */
332*495ae853SAndroid Build Coastguard Worker     /* pointer can be derived by reading offset at frame level, it is        */
333*495ae853SAndroid Build Coastguard Worker     /* stored here for faster access. Can be removed if storage of MB       */
334*495ae853SAndroid Build Coastguard Worker     /* structure is critical                                                 */
335*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
336*495ae853SAndroid Build Coastguard Worker     /**
337*495ae853SAndroid Build Coastguard Worker      * Pointer to PU data
338*495ae853SAndroid Build Coastguard Worker      */
339*495ae853SAndroid Build Coastguard Worker     pu_t *ps_pu;
340*495ae853SAndroid Build Coastguard Worker 
341*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
342*495ae853SAndroid Build Coastguard Worker     /* Pointer to a PU map stored at frame level,                            */
343*495ae853SAndroid Build Coastguard Worker     /* Though this pointer can be derived by multiplying MB address with    */
344*495ae853SAndroid Build Coastguard Worker     /* number of minTUs in a MB, it is stored here for faster access.       */
345*495ae853SAndroid Build Coastguard Worker     /* Can be removed if storage of MB structure is critical                */
346*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
347*495ae853SAndroid Build Coastguard Worker     /**
348*495ae853SAndroid Build Coastguard Worker      * Pointer to a PU map stored at frame level
349*495ae853SAndroid Build Coastguard Worker      */
350*495ae853SAndroid Build Coastguard Worker     UWORD8 *pu1_pu_map;
351*495ae853SAndroid Build Coastguard Worker 
352*495ae853SAndroid Build Coastguard Worker     /**
353*495ae853SAndroid Build Coastguard Worker      *  Number of TUs filled in as_tu
354*495ae853SAndroid Build Coastguard Worker      */
355*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
356*495ae853SAndroid Build Coastguard Worker     /* Having the first entry as 32 bit data, helps in keeping each of       */
357*495ae853SAndroid Build Coastguard Worker     /* the structures aligned to 32 bits at MB level                        */
358*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
359*495ae853SAndroid Build Coastguard Worker     WORD32 i4_tu_cnt;
360*495ae853SAndroid Build Coastguard Worker 
361*495ae853SAndroid Build Coastguard Worker     /**
362*495ae853SAndroid Build Coastguard Worker      *  Pointer to transform coeff data
363*495ae853SAndroid Build Coastguard Worker      */
364*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
365*495ae853SAndroid Build Coastguard Worker     /* Following format is repeated for every coded TU                       */
366*495ae853SAndroid Build Coastguard Worker     /* Luma Block                                                            */
367*495ae853SAndroid Build Coastguard Worker     /* num_coeffs      : 16 bits                                             */
368*495ae853SAndroid Build Coastguard Worker     /* zero_cols       : 8 bits ( 1 bit per 4 columns)                       */
369*495ae853SAndroid Build Coastguard Worker     /* sig_coeff_map   : ((TU Size * TU Size) + 31) >> 5 number of WORD32s   */
370*495ae853SAndroid Build Coastguard Worker     /* coeff_data      : Non zero coefficients                               */
371*495ae853SAndroid Build Coastguard Worker     /* Cb Block (only for last TU in 4x4 case else for every luma TU)        */
372*495ae853SAndroid Build Coastguard Worker     /* num_coeffs      : 16 bits                                             */
373*495ae853SAndroid Build Coastguard Worker     /* zero_cols       : 8 bits ( 1 bit per 4 columns)                       */
374*495ae853SAndroid Build Coastguard Worker     /* sig_coeff_map   : ((TU Size * TU Size) + 31) >> 5 number of WORD32s   */
375*495ae853SAndroid Build Coastguard Worker     /* coeff_data      : Non zero coefficients                               */
376*495ae853SAndroid Build Coastguard Worker     /* Cr Block (only for last TU in 4x4 case else for every luma TU)        */
377*495ae853SAndroid Build Coastguard Worker     /* num_coeffs      : 16 bits                                             */
378*495ae853SAndroid Build Coastguard Worker     /* zero_cols       : 8 bits ( 1 bit per 4 columns)                       */
379*495ae853SAndroid Build Coastguard Worker     /* sig_coeff_map   : ((TU Size * TU Size) + 31) >> 5 number of WORD32s   */
380*495ae853SAndroid Build Coastguard Worker     /* coeff_data      : Non zero coefficients                               */
381*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
382*495ae853SAndroid Build Coastguard Worker     void            *pv_coeff_data;
383*495ae853SAndroid Build Coastguard Worker 
384*495ae853SAndroid Build Coastguard Worker     /**
385*495ae853SAndroid Build Coastguard Worker      *  Slice to which the MB belongs to
386*495ae853SAndroid Build Coastguard Worker      */
387*495ae853SAndroid Build Coastguard Worker     WORD32 i4_slice_idx;
388*495ae853SAndroid Build Coastguard Worker 
389*495ae853SAndroid Build Coastguard Worker     /**
390*495ae853SAndroid Build Coastguard Worker      *  MB column position
391*495ae853SAndroid Build Coastguard Worker      */
392*495ae853SAndroid Build Coastguard Worker     WORD32 i4_pos_x;
393*495ae853SAndroid Build Coastguard Worker 
394*495ae853SAndroid Build Coastguard Worker     /**
395*495ae853SAndroid Build Coastguard Worker      *  MB row position
396*495ae853SAndroid Build Coastguard Worker      */
397*495ae853SAndroid Build Coastguard Worker     WORD32 i4_pos_y;
398*495ae853SAndroid Build Coastguard Worker 
399*495ae853SAndroid Build Coastguard Worker     /**
400*495ae853SAndroid Build Coastguard Worker      *  Number of PUs filled in ps_pu
401*495ae853SAndroid Build Coastguard Worker      */
402*495ae853SAndroid Build Coastguard Worker     WORD32 i4_pu_cnt;
403*495ae853SAndroid Build Coastguard Worker 
404*495ae853SAndroid Build Coastguard Worker     /**
405*495ae853SAndroid Build Coastguard Worker      *  Index of current PU being processed in ps_pu
406*495ae853SAndroid Build Coastguard Worker      */
407*495ae853SAndroid Build Coastguard Worker     /*  Scratch variable set to 0 at the start of any PU processing function */
408*495ae853SAndroid Build Coastguard Worker     WORD32 i4_pu_idx;
409*495ae853SAndroid Build Coastguard Worker 
410*495ae853SAndroid Build Coastguard Worker     /**
411*495ae853SAndroid Build Coastguard Worker      * Vertical Boundary strength
412*495ae853SAndroid Build Coastguard Worker      */
413*495ae853SAndroid Build Coastguard Worker     /* Two bits per edge.
414*495ae853SAndroid Build Coastguard Worker     Stored in format. BS[15] | BS[14] | .. |BS[0]*/
415*495ae853SAndroid Build Coastguard Worker     UWORD32 *pu4_vert_bs;
416*495ae853SAndroid Build Coastguard Worker 
417*495ae853SAndroid Build Coastguard Worker     /**
418*495ae853SAndroid Build Coastguard Worker      * Horizontal Boundary strength
419*495ae853SAndroid Build Coastguard Worker      */
420*495ae853SAndroid Build Coastguard Worker 
421*495ae853SAndroid Build Coastguard Worker     /* Two bits per edge.
422*495ae853SAndroid Build Coastguard Worker     Stored in format. BS[15] | BS[14] | .. |BS[0]*/
423*495ae853SAndroid Build Coastguard Worker     UWORD32 *pu4_horz_bs;
424*495ae853SAndroid Build Coastguard Worker 
425*495ae853SAndroid Build Coastguard Worker     /**
426*495ae853SAndroid Build Coastguard Worker      *  Qp array stored for each 8x8 pixels
427*495ae853SAndroid Build Coastguard Worker      */
428*495ae853SAndroid Build Coastguard Worker     UWORD8 *pu1_qp;
429*495ae853SAndroid Build Coastguard Worker 
430*495ae853SAndroid Build Coastguard Worker     /**
431*495ae853SAndroid Build Coastguard Worker      *  Pointer to current frame's pu_t array
432*495ae853SAndroid Build Coastguard Worker      */
433*495ae853SAndroid Build Coastguard Worker     pu_t *ps_frm_pu;
434*495ae853SAndroid Build Coastguard Worker 
435*495ae853SAndroid Build Coastguard Worker     /**
436*495ae853SAndroid Build Coastguard Worker      * Pointer to current frame's pu_t index array, which stores starting index
437*495ae853SAndroid Build Coastguard Worker      * of pu_t for every MB
438*495ae853SAndroid Build Coastguard Worker      */
439*495ae853SAndroid Build Coastguard Worker     UWORD32 *pu4_frm_pu_idx;
440*495ae853SAndroid Build Coastguard Worker 
441*495ae853SAndroid Build Coastguard Worker     /**
442*495ae853SAndroid Build Coastguard Worker      *  Pointer to current frame's pu map array
443*495ae853SAndroid Build Coastguard Worker      */
444*495ae853SAndroid Build Coastguard Worker     UWORD8 *pu1_frm_pu_map;
445*495ae853SAndroid Build Coastguard Worker 
446*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
447*495ae853SAndroid Build Coastguard Worker     /* Need to add encoder specific elements for identifying the order of    */
448*495ae853SAndroid Build Coastguard Worker     /* coding for CU, TU and PU if any                                       */
449*495ae853SAndroid Build Coastguard Worker     /*************************************************************************/
450*495ae853SAndroid Build Coastguard Worker } mb_ctxt_t;
451*495ae853SAndroid Build Coastguard Worker 
452*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
453*495ae853SAndroid Build Coastguard Worker /* The following describes how each of the CU cases are handled          */
454*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
455*495ae853SAndroid Build Coastguard Worker 
456*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
457*495ae853SAndroid Build Coastguard Worker /* For SKIP MB                                                           */
458*495ae853SAndroid Build Coastguard Worker /* One Inter PU with appropriate MV                                      */
459*495ae853SAndroid Build Coastguard Worker /* One TU which says CBP is zero and size is 16x16                       */
460*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
461*495ae853SAndroid Build Coastguard Worker 
462*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
463*495ae853SAndroid Build Coastguard Worker /* For Inter MB                                                          */
464*495ae853SAndroid Build Coastguard Worker /* M Inter PU with appropriate MVs (M between 1 to 4)                    */
465*495ae853SAndroid Build Coastguard Worker /* Number of TUs derived based on transform size                         */
466*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
467*495ae853SAndroid Build Coastguard Worker 
468*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
469*495ae853SAndroid Build Coastguard Worker /* For Intra MB                                                          */
470*495ae853SAndroid Build Coastguard Worker /* Number of TUs derived based on transform size                         */
471*495ae853SAndroid Build Coastguard Worker /* N Intra Modes are signaled along with coeff data at the start        */
472*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
473*495ae853SAndroid Build Coastguard Worker 
474*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
475*495ae853SAndroid Build Coastguard Worker /* For Intra PCM MB                                                      */
476*495ae853SAndroid Build Coastguard Worker /* One TU which says ipcm is 1                                           */
477*495ae853SAndroid Build Coastguard Worker /*************************************************************************/
478*495ae853SAndroid Build Coastguard Worker 
479*495ae853SAndroid Build Coastguard Worker 
480*495ae853SAndroid Build Coastguard Worker 
481*495ae853SAndroid Build Coastguard Worker /**
482*495ae853SAndroid Build Coastguard Worker  * Structure to hold quantization parameters of an mb
483*495ae853SAndroid Build Coastguard Worker  */
484*495ae853SAndroid Build Coastguard Worker typedef struct
485*495ae853SAndroid Build Coastguard Worker {
486*495ae853SAndroid Build Coastguard Worker 
487*495ae853SAndroid Build Coastguard Worker     /*
488*495ae853SAndroid Build Coastguard Worker      * mb qp
489*495ae853SAndroid Build Coastguard Worker      */
490*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_mb_qp;
491*495ae853SAndroid Build Coastguard Worker 
492*495ae853SAndroid Build Coastguard Worker     /*
493*495ae853SAndroid Build Coastguard Worker      * mb qp / 6
494*495ae853SAndroid Build Coastguard Worker      */
495*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_qp_div;
496*495ae853SAndroid Build Coastguard Worker 
497*495ae853SAndroid Build Coastguard Worker     /*
498*495ae853SAndroid Build Coastguard Worker      * mb qp mod 6
499*495ae853SAndroid Build Coastguard Worker      */
500*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_qp_rem;
501*495ae853SAndroid Build Coastguard Worker 
502*495ae853SAndroid Build Coastguard Worker     /*
503*495ae853SAndroid Build Coastguard Worker      * QP bits
504*495ae853SAndroid Build Coastguard Worker      */
505*495ae853SAndroid Build Coastguard Worker     UWORD8  u1_qbits;
506*495ae853SAndroid Build Coastguard Worker 
507*495ae853SAndroid Build Coastguard Worker     /*
508*495ae853SAndroid Build Coastguard Worker      * forward scale matrix
509*495ae853SAndroid Build Coastguard Worker      */
510*495ae853SAndroid Build Coastguard Worker     const UWORD16 *pu2_scale_mat;
511*495ae853SAndroid Build Coastguard Worker 
512*495ae853SAndroid Build Coastguard Worker     /*
513*495ae853SAndroid Build Coastguard Worker      * threshold matrix for quantization
514*495ae853SAndroid Build Coastguard Worker      */
515*495ae853SAndroid Build Coastguard Worker     UWORD16 *pu2_thres_mat;
516*495ae853SAndroid Build Coastguard Worker 
517*495ae853SAndroid Build Coastguard Worker     /*
518*495ae853SAndroid Build Coastguard Worker      * Threshold to compare the sad with
519*495ae853SAndroid Build Coastguard Worker      */
520*495ae853SAndroid Build Coastguard Worker     UWORD16 *pu2_sad_thrsh;
521*495ae853SAndroid Build Coastguard Worker 
522*495ae853SAndroid Build Coastguard Worker     /*
523*495ae853SAndroid Build Coastguard Worker      * qp dependent rounding constant
524*495ae853SAndroid Build Coastguard Worker      */
525*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_dead_zone;
526*495ae853SAndroid Build Coastguard Worker 
527*495ae853SAndroid Build Coastguard Worker     /*
528*495ae853SAndroid Build Coastguard Worker      *  inverse scale matrix
529*495ae853SAndroid Build Coastguard Worker      */
530*495ae853SAndroid Build Coastguard Worker     const UWORD16 *pu2_iscale_mat;
531*495ae853SAndroid Build Coastguard Worker 
532*495ae853SAndroid Build Coastguard Worker     /*
533*495ae853SAndroid Build Coastguard Worker      * Weight matrix in iquant
534*495ae853SAndroid Build Coastguard Worker      */
535*495ae853SAndroid Build Coastguard Worker     UWORD16 *pu2_weigh_mat;
536*495ae853SAndroid Build Coastguard Worker 
537*495ae853SAndroid Build Coastguard Worker }quant_params_t;
538*495ae853SAndroid Build Coastguard Worker 
539*495ae853SAndroid Build Coastguard Worker /**
540*495ae853SAndroid Build Coastguard Worker  * Structure to hold Profile tier level info for a given layer
541*495ae853SAndroid Build Coastguard Worker  */
542*495ae853SAndroid Build Coastguard Worker 
543*495ae853SAndroid Build Coastguard Worker typedef struct
544*495ae853SAndroid Build Coastguard Worker {
545*495ae853SAndroid Build Coastguard Worker     /**
546*495ae853SAndroid Build Coastguard Worker      *  NAL unit type
547*495ae853SAndroid Build Coastguard Worker      */
548*495ae853SAndroid Build Coastguard Worker     WORD8 i1_nal_unit_type;
549*495ae853SAndroid Build Coastguard Worker 
550*495ae853SAndroid Build Coastguard Worker     /**
551*495ae853SAndroid Build Coastguard Worker      * NAL ref idc
552*495ae853SAndroid Build Coastguard Worker      */
553*495ae853SAndroid Build Coastguard Worker     WORD8 i1_nal_ref_idc;
554*495ae853SAndroid Build Coastguard Worker 
555*495ae853SAndroid Build Coastguard Worker 
556*495ae853SAndroid Build Coastguard Worker } nal_header_t;
557*495ae853SAndroid Build Coastguard Worker 
558*495ae853SAndroid Build Coastguard Worker /**
559*495ae853SAndroid Build Coastguard Worker  * HRD parameters Info
560*495ae853SAndroid Build Coastguard Worker  */
561*495ae853SAndroid Build Coastguard Worker typedef struct
562*495ae853SAndroid Build Coastguard Worker {
563*495ae853SAndroid Build Coastguard Worker     /**
564*495ae853SAndroid Build Coastguard Worker      * Specifies the number of alternative CPB specifications in the
565*495ae853SAndroid Build Coastguard Worker      * bitstream
566*495ae853SAndroid Build Coastguard Worker      */
567*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_cpb_cnt_minus1;
568*495ae853SAndroid Build Coastguard Worker 
569*495ae853SAndroid Build Coastguard Worker     /**
570*495ae853SAndroid Build Coastguard Worker      * (together with bit_rate_value_minus1) specifies the
571*495ae853SAndroid Build Coastguard Worker      * maximum input bit rate of the i-th CPB
572*495ae853SAndroid Build Coastguard Worker      */
573*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_bit_rate_scale;
574*495ae853SAndroid Build Coastguard Worker 
575*495ae853SAndroid Build Coastguard Worker     /**
576*495ae853SAndroid Build Coastguard Worker      * (together with cpb_size_du_value_minus1) specifies
577*495ae853SAndroid Build Coastguard Worker      * CPB size of the i-th CPB when the CPB operates
578*495ae853SAndroid Build Coastguard Worker      * at the access unit level
579*495ae853SAndroid Build Coastguard Worker      */
580*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_cpb_size_scale;
581*495ae853SAndroid Build Coastguard Worker 
582*495ae853SAndroid Build Coastguard Worker     /**
583*495ae853SAndroid Build Coastguard Worker      *  (together with bit_rate_scale) specifies the
584*495ae853SAndroid Build Coastguard Worker      *  maximum input bit rate for the i-th CPB
585*495ae853SAndroid Build Coastguard Worker      */
586*495ae853SAndroid Build Coastguard Worker     UWORD32 au4_bit_rate_value_minus1[32];
587*495ae853SAndroid Build Coastguard Worker     /**
588*495ae853SAndroid Build Coastguard Worker      *  together with cpb_size_scale to specify the
589*495ae853SAndroid Build Coastguard Worker      *  CPB size when the CPB operates at the access unit level.
590*495ae853SAndroid Build Coastguard Worker      */
591*495ae853SAndroid Build Coastguard Worker     UWORD32 au4_cpb_size_value_minus1[32];
592*495ae853SAndroid Build Coastguard Worker 
593*495ae853SAndroid Build Coastguard Worker     /**
594*495ae853SAndroid Build Coastguard Worker      * if 1, specifies that the HSS operates in a constant bit rate (CBR) mode
595*495ae853SAndroid Build Coastguard Worker      * if 0, specifies that the HSS operates in a intermittent bit rate (CBR) mode
596*495ae853SAndroid Build Coastguard Worker      */
597*495ae853SAndroid Build Coastguard Worker     UWORD8  au1_cbr_flag[32];
598*495ae853SAndroid Build Coastguard Worker 
599*495ae853SAndroid Build Coastguard Worker 
600*495ae853SAndroid Build Coastguard Worker     /**
601*495ae853SAndroid Build Coastguard Worker      * specifies the length, in bits for initial cpb delay (nal/vcl)syntax in bp sei
602*495ae853SAndroid Build Coastguard Worker      */
603*495ae853SAndroid Build Coastguard Worker     UWORD8  u1_initial_cpb_removal_delay_length_minus1;
604*495ae853SAndroid Build Coastguard Worker 
605*495ae853SAndroid Build Coastguard Worker     /**
606*495ae853SAndroid Build Coastguard Worker      * specifies the length, in bits for the cpb delay syntax in pt_sei
607*495ae853SAndroid Build Coastguard Worker      */
608*495ae853SAndroid Build Coastguard Worker     UWORD8  u1_cpb_removal_delay_length_minus1;
609*495ae853SAndroid Build Coastguard Worker 
610*495ae853SAndroid Build Coastguard Worker     /**
611*495ae853SAndroid Build Coastguard Worker      * specifies the length, in bits, of the pic_dpb_output_delay syntax element in the pt SEI message
612*495ae853SAndroid Build Coastguard Worker      */
613*495ae853SAndroid Build Coastguard Worker     UWORD8  u1_dpb_output_delay_length_minus1;
614*495ae853SAndroid Build Coastguard Worker 
615*495ae853SAndroid Build Coastguard Worker     /**
616*495ae853SAndroid Build Coastguard Worker      * Specifies length of the time offset parameter
617*495ae853SAndroid Build Coastguard Worker      */
618*495ae853SAndroid Build Coastguard Worker     UWORD8  u1_time_offset_length;
619*495ae853SAndroid Build Coastguard Worker 
620*495ae853SAndroid Build Coastguard Worker }hrd_params_t;
621*495ae853SAndroid Build Coastguard Worker 
622*495ae853SAndroid Build Coastguard Worker 
623*495ae853SAndroid Build Coastguard Worker /**
624*495ae853SAndroid Build Coastguard Worker  * Structure to hold VUI parameters Info
625*495ae853SAndroid Build Coastguard Worker  */
626*495ae853SAndroid Build Coastguard Worker typedef struct
627*495ae853SAndroid Build Coastguard Worker {
628*495ae853SAndroid Build Coastguard Worker     /**
629*495ae853SAndroid Build Coastguard Worker      *  indicates the presence of aspect_ratio
630*495ae853SAndroid Build Coastguard Worker      */
631*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_aspect_ratio_info_present_flag;
632*495ae853SAndroid Build Coastguard Worker 
633*495ae853SAndroid Build Coastguard Worker     /**
634*495ae853SAndroid Build Coastguard Worker      *  specifies the aspect ratio of the luma samples
635*495ae853SAndroid Build Coastguard Worker      */
636*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_aspect_ratio_idc;
637*495ae853SAndroid Build Coastguard Worker 
638*495ae853SAndroid Build Coastguard Worker     /**
639*495ae853SAndroid Build Coastguard Worker      *  width of the luma samples. user dependent
640*495ae853SAndroid Build Coastguard Worker      */
641*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_sar_width;
642*495ae853SAndroid Build Coastguard Worker 
643*495ae853SAndroid Build Coastguard Worker     /**
644*495ae853SAndroid Build Coastguard Worker      *  Height of the luma samples. user dependent
645*495ae853SAndroid Build Coastguard Worker      */
646*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_sar_height;
647*495ae853SAndroid Build Coastguard Worker 
648*495ae853SAndroid Build Coastguard Worker     /**
649*495ae853SAndroid Build Coastguard Worker      * if 1, specifies that the overscan_appropriate_flag is present
650*495ae853SAndroid Build Coastguard Worker      * if 0, the preferred display method for the video signal is unspecified
651*495ae853SAndroid Build Coastguard Worker      */
652*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_overscan_info_present_flag;
653*495ae853SAndroid Build Coastguard Worker 
654*495ae853SAndroid Build Coastguard Worker     /**
655*495ae853SAndroid Build Coastguard Worker      * if 1,indicates that the cropped decoded pictures output
656*495ae853SAndroid Build Coastguard Worker      * are suitable for display using overscan
657*495ae853SAndroid Build Coastguard Worker      */
658*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_overscan_appropriate_flag;
659*495ae853SAndroid Build Coastguard Worker 
660*495ae853SAndroid Build Coastguard Worker     /**
661*495ae853SAndroid Build Coastguard Worker      * if 1 specifies that video_format, video_full_range_flag and
662*495ae853SAndroid Build Coastguard Worker      * colour_description_present_flag are present
663*495ae853SAndroid Build Coastguard Worker      */
664*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_video_signal_type_present_flag;
665*495ae853SAndroid Build Coastguard Worker 
666*495ae853SAndroid Build Coastguard Worker     /**
667*495ae853SAndroid Build Coastguard Worker      * pal, secam, ntsc, ...
668*495ae853SAndroid Build Coastguard Worker      */
669*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_video_format;
670*495ae853SAndroid Build Coastguard Worker 
671*495ae853SAndroid Build Coastguard Worker     /**
672*495ae853SAndroid Build Coastguard Worker      * indicates the black level and range of the luma and chroma signals
673*495ae853SAndroid Build Coastguard Worker      */
674*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_video_full_range_flag;
675*495ae853SAndroid Build Coastguard Worker 
676*495ae853SAndroid Build Coastguard Worker     /**
677*495ae853SAndroid Build Coastguard Worker      * if 1,to 1 specifies that colour_primaries, transfer_characteristics
678*495ae853SAndroid Build Coastguard Worker      * and matrix_coefficients are present
679*495ae853SAndroid Build Coastguard Worker      */
680*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_colour_description_present_flag;
681*495ae853SAndroid Build Coastguard Worker 
682*495ae853SAndroid Build Coastguard Worker     /**
683*495ae853SAndroid Build Coastguard Worker      * indicates the chromaticity coordinates of the source primaries
684*495ae853SAndroid Build Coastguard Worker      */
685*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_colour_primaries;
686*495ae853SAndroid Build Coastguard Worker 
687*495ae853SAndroid Build Coastguard Worker     /**
688*495ae853SAndroid Build Coastguard Worker      * indicates the opto-electronic transfer characteristic of the source picture
689*495ae853SAndroid Build Coastguard Worker      */
690*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_transfer_characteristics;
691*495ae853SAndroid Build Coastguard Worker 
692*495ae853SAndroid Build Coastguard Worker     /**
693*495ae853SAndroid Build Coastguard Worker      * the matrix coefficients used in deriving luma and chroma signals
694*495ae853SAndroid Build Coastguard Worker      * from the green, blue, and red primaries
695*495ae853SAndroid Build Coastguard Worker      */
696*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_matrix_coefficients;
697*495ae853SAndroid Build Coastguard Worker 
698*495ae853SAndroid Build Coastguard Worker     /**
699*495ae853SAndroid Build Coastguard Worker      * if 1, specifies that chroma_sample_loc_type_top_field and
700*495ae853SAndroid Build Coastguard Worker      * chroma_sample_loc_type_bottom_field are present
701*495ae853SAndroid Build Coastguard Worker      */
702*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_chroma_loc_info_present_flag;
703*495ae853SAndroid Build Coastguard Worker 
704*495ae853SAndroid Build Coastguard Worker     /**
705*495ae853SAndroid Build Coastguard Worker      * location of chroma samples
706*495ae853SAndroid Build Coastguard Worker      */
707*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_chroma_sample_loc_type_top_field;
708*495ae853SAndroid Build Coastguard Worker 
709*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_chroma_sample_loc_type_bottom_field;
710*495ae853SAndroid Build Coastguard Worker 
711*495ae853SAndroid Build Coastguard Worker     /**
712*495ae853SAndroid Build Coastguard Worker      *   Indicates the presence of the
713*495ae853SAndroid Build Coastguard Worker      *   num_units_in_ticks, time_scale flag
714*495ae853SAndroid Build Coastguard Worker      */
715*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_vui_timing_info_present_flag;
716*495ae853SAndroid Build Coastguard Worker 
717*495ae853SAndroid Build Coastguard Worker     /**
718*495ae853SAndroid Build Coastguard Worker      *   Number of units that
719*495ae853SAndroid Build Coastguard Worker      *   correspond to one increment of the
720*495ae853SAndroid Build Coastguard Worker      *   clock. Indicates the  resolution
721*495ae853SAndroid Build Coastguard Worker      */
722*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_vui_num_units_in_tick;
723*495ae853SAndroid Build Coastguard Worker 
724*495ae853SAndroid Build Coastguard Worker     /**
725*495ae853SAndroid Build Coastguard Worker      *   The number of time units that pass in one second
726*495ae853SAndroid Build Coastguard Worker      */
727*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_vui_time_scale;
728*495ae853SAndroid Build Coastguard Worker 
729*495ae853SAndroid Build Coastguard Worker     /**
730*495ae853SAndroid Build Coastguard Worker      *   Flag indicating that time difference between two frames is a constant
731*495ae853SAndroid Build Coastguard Worker      */
732*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_fixed_frame_rate_flag;
733*495ae853SAndroid Build Coastguard Worker 
734*495ae853SAndroid Build Coastguard Worker     /**
735*495ae853SAndroid Build Coastguard Worker      *   Indicates the presence of NAL HRD parameters
736*495ae853SAndroid Build Coastguard Worker      */
737*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_nal_hrd_parameters_present_flag;
738*495ae853SAndroid Build Coastguard Worker 
739*495ae853SAndroid Build Coastguard Worker     /**
740*495ae853SAndroid Build Coastguard Worker      *   NAL level HRD parameters
741*495ae853SAndroid Build Coastguard Worker      */
742*495ae853SAndroid Build Coastguard Worker     hrd_params_t s_nal_hrd_parameters;
743*495ae853SAndroid Build Coastguard Worker 
744*495ae853SAndroid Build Coastguard Worker     /**
745*495ae853SAndroid Build Coastguard Worker      *   Indicates the presence of VCL HRD parameters
746*495ae853SAndroid Build Coastguard Worker      */
747*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_vcl_hrd_parameters_present_flag;
748*495ae853SAndroid Build Coastguard Worker 
749*495ae853SAndroid Build Coastguard Worker     /**
750*495ae853SAndroid Build Coastguard Worker      *   VCL level HRD parameters
751*495ae853SAndroid Build Coastguard Worker      */
752*495ae853SAndroid Build Coastguard Worker     hrd_params_t s_vcl_hrd_parameters;
753*495ae853SAndroid Build Coastguard Worker 
754*495ae853SAndroid Build Coastguard Worker     /**
755*495ae853SAndroid Build Coastguard Worker      *  Specifies the HRD operational mode
756*495ae853SAndroid Build Coastguard Worker      */
757*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_low_delay_hrd_flag;
758*495ae853SAndroid Build Coastguard Worker 
759*495ae853SAndroid Build Coastguard Worker     /**
760*495ae853SAndroid Build Coastguard Worker      * Indicates presence of SEI messages which include pic_struct syntax element
761*495ae853SAndroid Build Coastguard Worker      */
762*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_pic_struct_present_flag;
763*495ae853SAndroid Build Coastguard Worker 
764*495ae853SAndroid Build Coastguard Worker     /**
765*495ae853SAndroid Build Coastguard Worker      * 1, specifies that the following cvs bitstream restriction parameters are present
766*495ae853SAndroid Build Coastguard Worker      */
767*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_bitstream_restriction_flag;
768*495ae853SAndroid Build Coastguard Worker 
769*495ae853SAndroid Build Coastguard Worker     /**
770*495ae853SAndroid Build Coastguard Worker      * if 0, indicates that no pel outside the pic boundaries and
771*495ae853SAndroid Build Coastguard Worker      * no sub-pels derived using pels outside the pic boundaries is used for inter prediction
772*495ae853SAndroid Build Coastguard Worker      */
773*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_motion_vectors_over_pic_boundaries_flag;
774*495ae853SAndroid Build Coastguard Worker 
775*495ae853SAndroid Build Coastguard Worker     /**
776*495ae853SAndroid Build Coastguard Worker      * Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units
777*495ae853SAndroid Build Coastguard Worker      * associated with any coded picture
778*495ae853SAndroid Build Coastguard Worker      */
779*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_max_bytes_per_pic_denom;
780*495ae853SAndroid Build Coastguard Worker 
781*495ae853SAndroid Build Coastguard Worker     /**
782*495ae853SAndroid Build Coastguard Worker      *  Indicates an upper bound for the number of bits of coding_unit() data
783*495ae853SAndroid Build Coastguard Worker      */
784*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_max_bits_per_mb_denom;
785*495ae853SAndroid Build Coastguard Worker 
786*495ae853SAndroid Build Coastguard Worker     /**
787*495ae853SAndroid Build Coastguard Worker      * Indicate the maximum absolute value of a decoded horizontal MV component
788*495ae853SAndroid Build Coastguard Worker      * in quarter-pel luma units
789*495ae853SAndroid Build Coastguard Worker      */
790*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_log2_max_mv_length_horizontal;
791*495ae853SAndroid Build Coastguard Worker 
792*495ae853SAndroid Build Coastguard Worker     /**
793*495ae853SAndroid Build Coastguard Worker      * Indicate the maximum absolute value of a decoded vertical MV component
794*495ae853SAndroid Build Coastguard Worker      * in quarter-pel luma units
795*495ae853SAndroid Build Coastguard Worker      */
796*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_log2_max_mv_length_vertical;
797*495ae853SAndroid Build Coastguard Worker 
798*495ae853SAndroid Build Coastguard Worker     /**
799*495ae853SAndroid Build Coastguard Worker      *  Max number of frames that are not synchronized in display and decode order
800*495ae853SAndroid Build Coastguard Worker      */
801*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_num_reorder_frames;
802*495ae853SAndroid Build Coastguard Worker 
803*495ae853SAndroid Build Coastguard Worker     /**
804*495ae853SAndroid Build Coastguard Worker      * specifies required size of the HRD DPB in units of frame buffers.
805*495ae853SAndroid Build Coastguard Worker      */
806*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_max_dec_frame_buffering;
807*495ae853SAndroid Build Coastguard Worker 
808*495ae853SAndroid Build Coastguard Worker } vui_t;
809*495ae853SAndroid Build Coastguard Worker 
810*495ae853SAndroid Build Coastguard Worker 
811*495ae853SAndroid Build Coastguard Worker /**
812*495ae853SAndroid Build Coastguard Worker  * Structure to hold SPS info
813*495ae853SAndroid Build Coastguard Worker  */
814*495ae853SAndroid Build Coastguard Worker typedef struct
815*495ae853SAndroid Build Coastguard Worker {
816*495ae853SAndroid Build Coastguard Worker     /**
817*495ae853SAndroid Build Coastguard Worker      *  profile_idc
818*495ae853SAndroid Build Coastguard Worker      */
819*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_profile_idc;
820*495ae853SAndroid Build Coastguard Worker 
821*495ae853SAndroid Build Coastguard Worker     /**
822*495ae853SAndroid Build Coastguard Worker      * constraint_set0_flag
823*495ae853SAndroid Build Coastguard Worker      */
824*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_constraint_set0_flag;
825*495ae853SAndroid Build Coastguard Worker 
826*495ae853SAndroid Build Coastguard Worker     /**
827*495ae853SAndroid Build Coastguard Worker      * constraint_set1_flag
828*495ae853SAndroid Build Coastguard Worker      */
829*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_constraint_set1_flag;
830*495ae853SAndroid Build Coastguard Worker 
831*495ae853SAndroid Build Coastguard Worker     /**
832*495ae853SAndroid Build Coastguard Worker      * constraint_set2_flag
833*495ae853SAndroid Build Coastguard Worker      */
834*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_constraint_set2_flag;
835*495ae853SAndroid Build Coastguard Worker 
836*495ae853SAndroid Build Coastguard Worker     /**
837*495ae853SAndroid Build Coastguard Worker      * constraint_set3_flag
838*495ae853SAndroid Build Coastguard Worker      */
839*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_constraint_set3_flag;
840*495ae853SAndroid Build Coastguard Worker 
841*495ae853SAndroid Build Coastguard Worker     /**
842*495ae853SAndroid Build Coastguard Worker      *  level_idc
843*495ae853SAndroid Build Coastguard Worker      */
844*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_level_idc;
845*495ae853SAndroid Build Coastguard Worker 
846*495ae853SAndroid Build Coastguard Worker     /**
847*495ae853SAndroid Build Coastguard Worker      *  seq_parameter_set_id
848*495ae853SAndroid Build Coastguard Worker      */
849*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sps_id;
850*495ae853SAndroid Build Coastguard Worker 
851*495ae853SAndroid Build Coastguard Worker 
852*495ae853SAndroid Build Coastguard Worker     /**
853*495ae853SAndroid Build Coastguard Worker      *  chroma_format_idc
854*495ae853SAndroid Build Coastguard Worker      */
855*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_chroma_format_idc;
856*495ae853SAndroid Build Coastguard Worker 
857*495ae853SAndroid Build Coastguard Worker     /**
858*495ae853SAndroid Build Coastguard Worker      *  residual_colour_transform_flag
859*495ae853SAndroid Build Coastguard Worker      */
860*495ae853SAndroid Build Coastguard Worker     WORD8 i1_residual_colour_transform_flag;
861*495ae853SAndroid Build Coastguard Worker 
862*495ae853SAndroid Build Coastguard Worker     /**
863*495ae853SAndroid Build Coastguard Worker      *  bit_depth_luma_minus8
864*495ae853SAndroid Build Coastguard Worker      */
865*495ae853SAndroid Build Coastguard Worker     WORD8 i1_bit_depth_luma;
866*495ae853SAndroid Build Coastguard Worker 
867*495ae853SAndroid Build Coastguard Worker     /**
868*495ae853SAndroid Build Coastguard Worker      *  bit_depth_chroma_minus8
869*495ae853SAndroid Build Coastguard Worker      */
870*495ae853SAndroid Build Coastguard Worker     WORD8 i1_bit_depth_chroma;
871*495ae853SAndroid Build Coastguard Worker 
872*495ae853SAndroid Build Coastguard Worker     /**
873*495ae853SAndroid Build Coastguard Worker      *  qpprime_y_zero_transform_bypass_flag
874*495ae853SAndroid Build Coastguard Worker      */
875*495ae853SAndroid Build Coastguard Worker     WORD8 i1_qpprime_y_zero_transform_bypass_flag;
876*495ae853SAndroid Build Coastguard Worker 
877*495ae853SAndroid Build Coastguard Worker     /**
878*495ae853SAndroid Build Coastguard Worker      *  seq_scaling_matrix_present_flag
879*495ae853SAndroid Build Coastguard Worker      */
880*495ae853SAndroid Build Coastguard Worker     WORD8 i1_seq_scaling_matrix_present_flag;
881*495ae853SAndroid Build Coastguard Worker 
882*495ae853SAndroid Build Coastguard Worker     /**
883*495ae853SAndroid Build Coastguard Worker      *  seq_scaling_list_present_flag
884*495ae853SAndroid Build Coastguard Worker      */
885*495ae853SAndroid Build Coastguard Worker     WORD8 ai1_seq_scaling_list_present_flag[8];
886*495ae853SAndroid Build Coastguard Worker 
887*495ae853SAndroid Build Coastguard Worker     /**
888*495ae853SAndroid Build Coastguard Worker      *  log2_max_frame_num_minus4
889*495ae853SAndroid Build Coastguard Worker      */
890*495ae853SAndroid Build Coastguard Worker     WORD8 i1_log2_max_frame_num;
891*495ae853SAndroid Build Coastguard Worker 
892*495ae853SAndroid Build Coastguard Worker     /**
893*495ae853SAndroid Build Coastguard Worker      *  MaxFrameNum in the standard
894*495ae853SAndroid Build Coastguard Worker      *  1 << i1_log2_max_frame_num
895*495ae853SAndroid Build Coastguard Worker      */
896*495ae853SAndroid Build Coastguard Worker     WORD32 i4_max_frame_num;
897*495ae853SAndroid Build Coastguard Worker 
898*495ae853SAndroid Build Coastguard Worker     /**
899*495ae853SAndroid Build Coastguard Worker      *  pic_order_cnt_type
900*495ae853SAndroid Build Coastguard Worker      */
901*495ae853SAndroid Build Coastguard Worker     WORD8 i1_pic_order_cnt_type;
902*495ae853SAndroid Build Coastguard Worker 
903*495ae853SAndroid Build Coastguard Worker     /**
904*495ae853SAndroid Build Coastguard Worker      *  log2_max_pic_order_cnt_lsb_minus4
905*495ae853SAndroid Build Coastguard Worker      */
906*495ae853SAndroid Build Coastguard Worker     WORD8 i1_log2_max_pic_order_cnt_lsb;
907*495ae853SAndroid Build Coastguard Worker 
908*495ae853SAndroid Build Coastguard Worker     /**
909*495ae853SAndroid Build Coastguard Worker      * MaxPicOrderCntLsb in the standard.
910*495ae853SAndroid Build Coastguard Worker      * 1 << log2_max_pic_order_cnt_lsb_minus4
911*495ae853SAndroid Build Coastguard Worker      */
912*495ae853SAndroid Build Coastguard Worker     WORD32 i4_max_pic_order_cnt_lsb;
913*495ae853SAndroid Build Coastguard Worker 
914*495ae853SAndroid Build Coastguard Worker     /**
915*495ae853SAndroid Build Coastguard Worker      *  delta_pic_order_always_zero_flag
916*495ae853SAndroid Build Coastguard Worker      */
917*495ae853SAndroid Build Coastguard Worker     WORD8 i1_delta_pic_order_always_zero_flag;
918*495ae853SAndroid Build Coastguard Worker 
919*495ae853SAndroid Build Coastguard Worker     /**
920*495ae853SAndroid Build Coastguard Worker      *  offset_for_non_ref_pic
921*495ae853SAndroid Build Coastguard Worker      */
922*495ae853SAndroid Build Coastguard Worker     WORD32 i4_offset_for_non_ref_pic;
923*495ae853SAndroid Build Coastguard Worker 
924*495ae853SAndroid Build Coastguard Worker     /**
925*495ae853SAndroid Build Coastguard Worker      *  offset_for_top_to_bottom_field
926*495ae853SAndroid Build Coastguard Worker      */
927*495ae853SAndroid Build Coastguard Worker     WORD32 i4_offset_for_top_to_bottom_field;
928*495ae853SAndroid Build Coastguard Worker 
929*495ae853SAndroid Build Coastguard Worker     /**
930*495ae853SAndroid Build Coastguard Worker      *  num_ref_frames_in_pic_order_cnt_cycle
931*495ae853SAndroid Build Coastguard Worker      */
932*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_num_ref_frames_in_pic_order_cnt_cycle;
933*495ae853SAndroid Build Coastguard Worker 
934*495ae853SAndroid Build Coastguard Worker     /**
935*495ae853SAndroid Build Coastguard Worker      * Offset_for_ref_frame
936*495ae853SAndroid Build Coastguard Worker      */
937*495ae853SAndroid Build Coastguard Worker     WORD32 ai4_offset_for_ref_frame[256];
938*495ae853SAndroid Build Coastguard Worker 
939*495ae853SAndroid Build Coastguard Worker     /**
940*495ae853SAndroid Build Coastguard Worker      *  max_num_ref_frames
941*495ae853SAndroid Build Coastguard Worker      */
942*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_max_num_ref_frames;
943*495ae853SAndroid Build Coastguard Worker 
944*495ae853SAndroid Build Coastguard Worker     /**
945*495ae853SAndroid Build Coastguard Worker      *  gaps_in_frame_num_value_allowed_flag
946*495ae853SAndroid Build Coastguard Worker      */
947*495ae853SAndroid Build Coastguard Worker     WORD8 i1_gaps_in_frame_num_value_allowed_flag;
948*495ae853SAndroid Build Coastguard Worker 
949*495ae853SAndroid Build Coastguard Worker     /**
950*495ae853SAndroid Build Coastguard Worker      *  pic_width_in_mbs_minus1
951*495ae853SAndroid Build Coastguard Worker      */
952*495ae853SAndroid Build Coastguard Worker     WORD16 i2_pic_width_in_mbs_minus1;
953*495ae853SAndroid Build Coastguard Worker 
954*495ae853SAndroid Build Coastguard Worker     /**
955*495ae853SAndroid Build Coastguard Worker      *  pic_height_in_map_units_minus1
956*495ae853SAndroid Build Coastguard Worker      */
957*495ae853SAndroid Build Coastguard Worker     WORD16 i2_pic_height_in_map_units_minus1;
958*495ae853SAndroid Build Coastguard Worker 
959*495ae853SAndroid Build Coastguard Worker     /**
960*495ae853SAndroid Build Coastguard Worker      *  frame_mbs_only_flag
961*495ae853SAndroid Build Coastguard Worker      */
962*495ae853SAndroid Build Coastguard Worker     WORD8 i1_frame_mbs_only_flag;
963*495ae853SAndroid Build Coastguard Worker 
964*495ae853SAndroid Build Coastguard Worker     /**
965*495ae853SAndroid Build Coastguard Worker      *  mb_adaptive_frame_field_flag
966*495ae853SAndroid Build Coastguard Worker      */
967*495ae853SAndroid Build Coastguard Worker     WORD8 i1_mb_adaptive_frame_field_flag;
968*495ae853SAndroid Build Coastguard Worker 
969*495ae853SAndroid Build Coastguard Worker     /**
970*495ae853SAndroid Build Coastguard Worker      *  direct_8x8_inference_flag
971*495ae853SAndroid Build Coastguard Worker      */
972*495ae853SAndroid Build Coastguard Worker     WORD8 i1_direct_8x8_inference_flag;
973*495ae853SAndroid Build Coastguard Worker 
974*495ae853SAndroid Build Coastguard Worker     /**
975*495ae853SAndroid Build Coastguard Worker      *  frame_cropping_flag
976*495ae853SAndroid Build Coastguard Worker      */
977*495ae853SAndroid Build Coastguard Worker     WORD8 i1_frame_cropping_flag;
978*495ae853SAndroid Build Coastguard Worker 
979*495ae853SAndroid Build Coastguard Worker     /**
980*495ae853SAndroid Build Coastguard Worker      *  frame_crop_left_offset
981*495ae853SAndroid Build Coastguard Worker      */
982*495ae853SAndroid Build Coastguard Worker     WORD16 i2_frame_crop_left_offset;
983*495ae853SAndroid Build Coastguard Worker 
984*495ae853SAndroid Build Coastguard Worker     /**
985*495ae853SAndroid Build Coastguard Worker      *  frame_crop_right_offset
986*495ae853SAndroid Build Coastguard Worker      */
987*495ae853SAndroid Build Coastguard Worker     WORD16 i2_frame_crop_right_offset;
988*495ae853SAndroid Build Coastguard Worker 
989*495ae853SAndroid Build Coastguard Worker     /**
990*495ae853SAndroid Build Coastguard Worker      *  frame_crop_top_offset
991*495ae853SAndroid Build Coastguard Worker      */
992*495ae853SAndroid Build Coastguard Worker     WORD16 i2_frame_crop_top_offset;
993*495ae853SAndroid Build Coastguard Worker 
994*495ae853SAndroid Build Coastguard Worker     /**
995*495ae853SAndroid Build Coastguard Worker      *  frame_crop_bottom_offset
996*495ae853SAndroid Build Coastguard Worker      */
997*495ae853SAndroid Build Coastguard Worker     WORD16 i2_frame_crop_bottom_offset;
998*495ae853SAndroid Build Coastguard Worker 
999*495ae853SAndroid Build Coastguard Worker     /**
1000*495ae853SAndroid Build Coastguard Worker      *  vui_parameters_present_flag
1001*495ae853SAndroid Build Coastguard Worker      */
1002*495ae853SAndroid Build Coastguard Worker     WORD8 i1_vui_parameters_present_flag;
1003*495ae853SAndroid Build Coastguard Worker 
1004*495ae853SAndroid Build Coastguard Worker     /**
1005*495ae853SAndroid Build Coastguard Worker      * vui_parameters_Structure_info
1006*495ae853SAndroid Build Coastguard Worker      */
1007*495ae853SAndroid Build Coastguard Worker     vui_t s_vui_parameters;
1008*495ae853SAndroid Build Coastguard Worker 
1009*495ae853SAndroid Build Coastguard Worker     /**
1010*495ae853SAndroid Build Coastguard Worker      * Flag to give status of SPS structure
1011*495ae853SAndroid Build Coastguard Worker      */
1012*495ae853SAndroid Build Coastguard Worker     WORD8 i1_sps_valid;
1013*495ae853SAndroid Build Coastguard Worker 
1014*495ae853SAndroid Build Coastguard Worker     /**
1015*495ae853SAndroid Build Coastguard Worker      * Coded Picture width
1016*495ae853SAndroid Build Coastguard Worker      */
1017*495ae853SAndroid Build Coastguard Worker     WORD32 i2_pic_wd;
1018*495ae853SAndroid Build Coastguard Worker 
1019*495ae853SAndroid Build Coastguard Worker     /**
1020*495ae853SAndroid Build Coastguard Worker      * Coded Picture height
1021*495ae853SAndroid Build Coastguard Worker      */
1022*495ae853SAndroid Build Coastguard Worker     WORD32 i2_pic_ht;
1023*495ae853SAndroid Build Coastguard Worker 
1024*495ae853SAndroid Build Coastguard Worker     /**
1025*495ae853SAndroid Build Coastguard Worker      *  Picture width in MB units
1026*495ae853SAndroid Build Coastguard Worker      */
1027*495ae853SAndroid Build Coastguard Worker 
1028*495ae853SAndroid Build Coastguard Worker     WORD16 i2_pic_wd_in_mb;
1029*495ae853SAndroid Build Coastguard Worker 
1030*495ae853SAndroid Build Coastguard Worker     /**
1031*495ae853SAndroid Build Coastguard Worker      *  Picture height in MB units
1032*495ae853SAndroid Build Coastguard Worker      */
1033*495ae853SAndroid Build Coastguard Worker 
1034*495ae853SAndroid Build Coastguard Worker     WORD16 i2_pic_ht_in_mb;
1035*495ae853SAndroid Build Coastguard Worker 
1036*495ae853SAndroid Build Coastguard Worker     /**
1037*495ae853SAndroid Build Coastguard Worker      * useDefaultScalingMatrixFlag
1038*495ae853SAndroid Build Coastguard Worker      */
1039*495ae853SAndroid Build Coastguard Worker     WORD8 ai1_use_default_scaling_matrix_flag[8];
1040*495ae853SAndroid Build Coastguard Worker 
1041*495ae853SAndroid Build Coastguard Worker     /**
1042*495ae853SAndroid Build Coastguard Worker      * 4x4 Scaling lists after inverse zig zag scan
1043*495ae853SAndroid Build Coastguard Worker      */
1044*495ae853SAndroid Build Coastguard Worker     UWORD16 au2_4x4_weight_scale[6][16];
1045*495ae853SAndroid Build Coastguard Worker 
1046*495ae853SAndroid Build Coastguard Worker     /**
1047*495ae853SAndroid Build Coastguard Worker      * 4x4 Scaling lists after inverse zig zag scan
1048*495ae853SAndroid Build Coastguard Worker      */
1049*495ae853SAndroid Build Coastguard Worker     UWORD16 au2_8x8_weight_scale[2][64];
1050*495ae853SAndroid Build Coastguard Worker 
1051*495ae853SAndroid Build Coastguard Worker } sps_t;
1052*495ae853SAndroid Build Coastguard Worker 
1053*495ae853SAndroid Build Coastguard Worker 
1054*495ae853SAndroid Build Coastguard Worker /**
1055*495ae853SAndroid Build Coastguard Worker  * Structure to hold PPS info
1056*495ae853SAndroid Build Coastguard Worker  */
1057*495ae853SAndroid Build Coastguard Worker typedef struct
1058*495ae853SAndroid Build Coastguard Worker {
1059*495ae853SAndroid Build Coastguard Worker     /**
1060*495ae853SAndroid Build Coastguard Worker      *  pic_parameter_set_id
1061*495ae853SAndroid Build Coastguard Worker      */
1062*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_pps_id;
1063*495ae853SAndroid Build Coastguard Worker 
1064*495ae853SAndroid Build Coastguard Worker     /**
1065*495ae853SAndroid Build Coastguard Worker      *  seq_parameter_set_id
1066*495ae853SAndroid Build Coastguard Worker      */
1067*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sps_id;
1068*495ae853SAndroid Build Coastguard Worker 
1069*495ae853SAndroid Build Coastguard Worker     /**
1070*495ae853SAndroid Build Coastguard Worker      *   Entropy coding : 0-VLC; 1 - CABAC
1071*495ae853SAndroid Build Coastguard Worker      */
1072*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_entropy_coding_mode_flag;
1073*495ae853SAndroid Build Coastguard Worker 
1074*495ae853SAndroid Build Coastguard Worker     /*
1075*495ae853SAndroid Build Coastguard Worker      * Pic order present flag
1076*495ae853SAndroid Build Coastguard Worker      */
1077*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_pic_order_present_flag;
1078*495ae853SAndroid Build Coastguard Worker 
1079*495ae853SAndroid Build Coastguard Worker     /*
1080*495ae853SAndroid Build Coastguard Worker      * Number of slice groups
1081*495ae853SAndroid Build Coastguard Worker      */
1082*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_num_slice_groups;
1083*495ae853SAndroid Build Coastguard Worker 
1084*495ae853SAndroid Build Coastguard Worker     /*
1085*495ae853SAndroid Build Coastguard Worker      * Slice group map type
1086*495ae853SAndroid Build Coastguard Worker      */
1087*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_slice_group_map_type;
1088*495ae853SAndroid Build Coastguard Worker 
1089*495ae853SAndroid Build Coastguard Worker     /*
1090*495ae853SAndroid Build Coastguard Worker      * Maximum reference picture index in the reference list 0 : range [0 - 31]
1091*495ae853SAndroid Build Coastguard Worker      */
1092*495ae853SAndroid Build Coastguard Worker     WORD8 i1_num_ref_idx_l0_default_active;
1093*495ae853SAndroid Build Coastguard Worker 
1094*495ae853SAndroid Build Coastguard Worker     /*
1095*495ae853SAndroid Build Coastguard Worker      * Maximum reference picture index in the reference list 1 : range [0 - 31]
1096*495ae853SAndroid Build Coastguard Worker      */
1097*495ae853SAndroid Build Coastguard Worker     WORD8 i1_num_ref_idx_l1_default_active;
1098*495ae853SAndroid Build Coastguard Worker 
1099*495ae853SAndroid Build Coastguard Worker     /**
1100*495ae853SAndroid Build Coastguard Worker      *  weighted_pred_flag
1101*495ae853SAndroid Build Coastguard Worker      */
1102*495ae853SAndroid Build Coastguard Worker     WORD8 i1_weighted_pred_flag;
1103*495ae853SAndroid Build Coastguard Worker 
1104*495ae853SAndroid Build Coastguard Worker     /**
1105*495ae853SAndroid Build Coastguard Worker      *  weighted_bipred_flag
1106*495ae853SAndroid Build Coastguard Worker      */
1107*495ae853SAndroid Build Coastguard Worker     WORD8 i1_weighted_bipred_idc;
1108*495ae853SAndroid Build Coastguard Worker 
1109*495ae853SAndroid Build Coastguard Worker     /**
1110*495ae853SAndroid Build Coastguard Worker      *  pic_init_qp_minus26
1111*495ae853SAndroid Build Coastguard Worker      */
1112*495ae853SAndroid Build Coastguard Worker     WORD8 i1_pic_init_qp;
1113*495ae853SAndroid Build Coastguard Worker 
1114*495ae853SAndroid Build Coastguard Worker     /**
1115*495ae853SAndroid Build Coastguard Worker      *  pic_init_qs_minus26
1116*495ae853SAndroid Build Coastguard Worker      */
1117*495ae853SAndroid Build Coastguard Worker     WORD8 i1_pic_init_qs;
1118*495ae853SAndroid Build Coastguard Worker 
1119*495ae853SAndroid Build Coastguard Worker     /*
1120*495ae853SAndroid Build Coastguard Worker      * Chroma QP offset w.r.t QPY {-12,12}
1121*495ae853SAndroid Build Coastguard Worker      */
1122*495ae853SAndroid Build Coastguard Worker     WORD8  i1_chroma_qp_index_offset;
1123*495ae853SAndroid Build Coastguard Worker 
1124*495ae853SAndroid Build Coastguard Worker     /**
1125*495ae853SAndroid Build Coastguard Worker      *  deblocking_filter_control_present_flag
1126*495ae853SAndroid Build Coastguard Worker      */
1127*495ae853SAndroid Build Coastguard Worker     WORD8 i1_deblocking_filter_control_present_flag;
1128*495ae853SAndroid Build Coastguard Worker 
1129*495ae853SAndroid Build Coastguard Worker     /**
1130*495ae853SAndroid Build Coastguard Worker      *  constrained_intra_pred_flag
1131*495ae853SAndroid Build Coastguard Worker      */
1132*495ae853SAndroid Build Coastguard Worker     WORD8 i1_constrained_intra_pred_flag;
1133*495ae853SAndroid Build Coastguard Worker 
1134*495ae853SAndroid Build Coastguard Worker     /**
1135*495ae853SAndroid Build Coastguard Worker      *  redundant_pic_cnt_present_flag
1136*495ae853SAndroid Build Coastguard Worker      */
1137*495ae853SAndroid Build Coastguard Worker     WORD8 i1_redundant_pic_cnt_present_flag;
1138*495ae853SAndroid Build Coastguard Worker 
1139*495ae853SAndroid Build Coastguard Worker     /**
1140*495ae853SAndroid Build Coastguard Worker      *  transform_8x8_mode_flag
1141*495ae853SAndroid Build Coastguard Worker      */
1142*495ae853SAndroid Build Coastguard Worker     WORD8 i1_transform_8x8_mode_flag;
1143*495ae853SAndroid Build Coastguard Worker 
1144*495ae853SAndroid Build Coastguard Worker     /**
1145*495ae853SAndroid Build Coastguard Worker      *  pic_scaling_matrix_present_flag
1146*495ae853SAndroid Build Coastguard Worker      */
1147*495ae853SAndroid Build Coastguard Worker     WORD8 i1_pic_scaling_matrix_present_flag;
1148*495ae853SAndroid Build Coastguard Worker 
1149*495ae853SAndroid Build Coastguard Worker     /*
1150*495ae853SAndroid Build Coastguard Worker      *  Second chroma QP offset
1151*495ae853SAndroid Build Coastguard Worker      */
1152*495ae853SAndroid Build Coastguard Worker     WORD8  i1_second_chroma_qp_index_offset;
1153*495ae853SAndroid Build Coastguard Worker 
1154*495ae853SAndroid Build Coastguard Worker 
1155*495ae853SAndroid Build Coastguard Worker     /**
1156*495ae853SAndroid Build Coastguard Worker      * useDefaultScalingMatrixFlag
1157*495ae853SAndroid Build Coastguard Worker      */
1158*495ae853SAndroid Build Coastguard Worker     WORD8 ai1_use_default_scaling_matrix_flag[8];
1159*495ae853SAndroid Build Coastguard Worker 
1160*495ae853SAndroid Build Coastguard Worker     /**
1161*495ae853SAndroid Build Coastguard Worker      * 4x4 Scaling lists after inverse zig zag scan
1162*495ae853SAndroid Build Coastguard Worker      */
1163*495ae853SAndroid Build Coastguard Worker     UWORD16 au2_4x4_weight_scale[6][16];
1164*495ae853SAndroid Build Coastguard Worker 
1165*495ae853SAndroid Build Coastguard Worker     /**
1166*495ae853SAndroid Build Coastguard Worker      * 4x4 Scaling lists after inverse zig zag scan
1167*495ae853SAndroid Build Coastguard Worker      */
1168*495ae853SAndroid Build Coastguard Worker     UWORD16 au2_8x8_weight_scale[2][64];
1169*495ae853SAndroid Build Coastguard Worker 
1170*495ae853SAndroid Build Coastguard Worker 
1171*495ae853SAndroid Build Coastguard Worker     /**
1172*495ae853SAndroid Build Coastguard Worker      *  pic_scaling_list_present_flag
1173*495ae853SAndroid Build Coastguard Worker      */
1174*495ae853SAndroid Build Coastguard Worker     WORD8 ai1_pic_scaling_list_present_flag[8];
1175*495ae853SAndroid Build Coastguard Worker 
1176*495ae853SAndroid Build Coastguard Worker     /**
1177*495ae853SAndroid Build Coastguard Worker      * Flag to give status of PPS structure
1178*495ae853SAndroid Build Coastguard Worker      */
1179*495ae853SAndroid Build Coastguard Worker     WORD8   i1_pps_valid;
1180*495ae853SAndroid Build Coastguard Worker 
1181*495ae853SAndroid Build Coastguard Worker 
1182*495ae853SAndroid Build Coastguard Worker } pps_t;
1183*495ae853SAndroid Build Coastguard Worker 
1184*495ae853SAndroid Build Coastguard Worker /**
1185*495ae853SAndroid Build Coastguard Worker  * MMCO commands and params.
1186*495ae853SAndroid Build Coastguard Worker  */
1187*495ae853SAndroid Build Coastguard Worker typedef struct
1188*495ae853SAndroid Build Coastguard Worker {
1189*495ae853SAndroid Build Coastguard Worker     /*
1190*495ae853SAndroid Build Coastguard Worker      * memory management control operation command
1191*495ae853SAndroid Build Coastguard Worker      */
1192*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_memory_management_control_operation;
1193*495ae853SAndroid Build Coastguard Worker 
1194*495ae853SAndroid Build Coastguard Worker     /*
1195*495ae853SAndroid Build Coastguard Worker      * Contains difference of pic nums of short-term pic/frame
1196*495ae853SAndroid Build Coastguard Worker      * 1. To signal it as "unused for reference" if mmco = 1
1197*495ae853SAndroid Build Coastguard Worker      * 2. To signal it as "used for long-term reference" if mmco = 3
1198*495ae853SAndroid Build Coastguard Worker      */
1199*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_difference_of_pic_nums_minus1;
1200*495ae853SAndroid Build Coastguard Worker 
1201*495ae853SAndroid Build Coastguard Worker     /* Long-term pic num to be set as "unused for reference" */
1202*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_long_term_pic_num;
1203*495ae853SAndroid Build Coastguard Worker 
1204*495ae853SAndroid Build Coastguard Worker     /*
1205*495ae853SAndroid Build Coastguard Worker      * Assign a long-term idx to a picture as follows
1206*495ae853SAndroid Build Coastguard Worker      * 1. Assign to a short-term pic if mmco = 3
1207*495ae853SAndroid Build Coastguard Worker      * 2. Assign to the current pic if mmco = 6
1208*495ae853SAndroid Build Coastguard Worker      */
1209*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_long_term_frame_idx;
1210*495ae853SAndroid Build Coastguard Worker 
1211*495ae853SAndroid Build Coastguard Worker     /*
1212*495ae853SAndroid Build Coastguard Worker      * The max long-term idx. The long-term pics having idx above
1213*495ae853SAndroid Build Coastguard Worker      * are set as "unused for reference
1214*495ae853SAndroid Build Coastguard Worker      */
1215*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_max_long_term_frame_idx_plus1;
1216*495ae853SAndroid Build Coastguard Worker 
1217*495ae853SAndroid Build Coastguard Worker }mmco_prms_t;
1218*495ae853SAndroid Build Coastguard Worker 
1219*495ae853SAndroid Build Coastguard Worker /**
1220*495ae853SAndroid Build Coastguard Worker  * Structure to hold Reference picture list modification info
1221*495ae853SAndroid Build Coastguard Worker  */
1222*495ae853SAndroid Build Coastguard Worker typedef struct
1223*495ae853SAndroid Build Coastguard Worker {
1224*495ae853SAndroid Build Coastguard Worker     /*
1225*495ae853SAndroid Build Coastguard Worker      * ref_pic_list_modification_flag_l0
1226*495ae853SAndroid Build Coastguard Worker      */
1227*495ae853SAndroid Build Coastguard Worker     WORD8 i1_ref_pic_list_modification_flag_l0;
1228*495ae853SAndroid Build Coastguard Worker 
1229*495ae853SAndroid Build Coastguard Worker     /*
1230*495ae853SAndroid Build Coastguard Worker      * Modification required in list0
1231*495ae853SAndroid Build Coastguard Worker      */
1232*495ae853SAndroid Build Coastguard Worker     WORD8 i1_modification_of_pic_nums_idc_l0[MAX_MODICATION_IDC];
1233*495ae853SAndroid Build Coastguard Worker 
1234*495ae853SAndroid Build Coastguard Worker     /*
1235*495ae853SAndroid Build Coastguard Worker      * The absolute difference between the picture number of
1236*495ae853SAndroid Build Coastguard Worker      * the picture being moved to the current index in
1237*495ae853SAndroid Build Coastguard Worker      * list0 and the picture number prediction value
1238*495ae853SAndroid Build Coastguard Worker      */
1239*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_abs_diff_pic_num_minus1_l0[MAX_MODICATION_IDC];
1240*495ae853SAndroid Build Coastguard Worker 
1241*495ae853SAndroid Build Coastguard Worker     /*
1242*495ae853SAndroid Build Coastguard Worker      * The long-term picture number of the picture being moved
1243*495ae853SAndroid Build Coastguard Worker      * to the current index in list0
1244*495ae853SAndroid Build Coastguard Worker      */
1245*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_long_term_pic_num_l0[MAX_MODICATION_IDC];
1246*495ae853SAndroid Build Coastguard Worker 
1247*495ae853SAndroid Build Coastguard Worker     /*
1248*495ae853SAndroid Build Coastguard Worker      * ref_pic_list_modification_flag_l1
1249*495ae853SAndroid Build Coastguard Worker      */
1250*495ae853SAndroid Build Coastguard Worker     WORD8 i1_ref_pic_list_modification_flag_l1;
1251*495ae853SAndroid Build Coastguard Worker 
1252*495ae853SAndroid Build Coastguard Worker     /*
1253*495ae853SAndroid Build Coastguard Worker      * Modification required in list1
1254*495ae853SAndroid Build Coastguard Worker      */
1255*495ae853SAndroid Build Coastguard Worker     WORD8 i1_modification_of_pic_nums_idc_l1[MAX_MODICATION_IDC];
1256*495ae853SAndroid Build Coastguard Worker 
1257*495ae853SAndroid Build Coastguard Worker     /*
1258*495ae853SAndroid Build Coastguard Worker      * The absolute difference between the picture number of
1259*495ae853SAndroid Build Coastguard Worker      * the picture being moved to the current index in
1260*495ae853SAndroid Build Coastguard Worker      * list1 and the picture number prediction value
1261*495ae853SAndroid Build Coastguard Worker      */
1262*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_abs_diff_pic_num_minus1_l1[MAX_MODICATION_IDC];
1263*495ae853SAndroid Build Coastguard Worker 
1264*495ae853SAndroid Build Coastguard Worker     /*
1265*495ae853SAndroid Build Coastguard Worker      * The long-term picture number of the picture being moved
1266*495ae853SAndroid Build Coastguard Worker      * to the current index in list1
1267*495ae853SAndroid Build Coastguard Worker      */
1268*495ae853SAndroid Build Coastguard Worker    UWORD8 u1_long_term_pic_num_l1[MAX_MODICATION_IDC];
1269*495ae853SAndroid Build Coastguard Worker }rplm_t;
1270*495ae853SAndroid Build Coastguard Worker 
1271*495ae853SAndroid Build Coastguard Worker /**
1272*495ae853SAndroid Build Coastguard Worker  * Structure to hold Slice Header info
1273*495ae853SAndroid Build Coastguard Worker  */
1274*495ae853SAndroid Build Coastguard Worker typedef struct
1275*495ae853SAndroid Build Coastguard Worker {
1276*495ae853SAndroid Build Coastguard Worker 
1277*495ae853SAndroid Build Coastguard Worker     /*
1278*495ae853SAndroid Build Coastguard Worker      *  nal_unit_type
1279*495ae853SAndroid Build Coastguard Worker      */
1280*495ae853SAndroid Build Coastguard Worker     WORD8  i1_nal_unit_type;
1281*495ae853SAndroid Build Coastguard Worker 
1282*495ae853SAndroid Build Coastguard Worker     /*
1283*495ae853SAndroid Build Coastguard Worker      *  nal_unit_idc
1284*495ae853SAndroid Build Coastguard Worker      */
1285*495ae853SAndroid Build Coastguard Worker     WORD8  i1_nal_unit_idc;
1286*495ae853SAndroid Build Coastguard Worker 
1287*495ae853SAndroid Build Coastguard Worker     /*
1288*495ae853SAndroid Build Coastguard Worker      *  first_mb_in_slice
1289*495ae853SAndroid Build Coastguard Worker      */
1290*495ae853SAndroid Build Coastguard Worker     UWORD16   u2_first_mb_in_slice;
1291*495ae853SAndroid Build Coastguard Worker 
1292*495ae853SAndroid Build Coastguard Worker     /*
1293*495ae853SAndroid Build Coastguard Worker      *  slice_type
1294*495ae853SAndroid Build Coastguard Worker      */
1295*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_slice_type;
1296*495ae853SAndroid Build Coastguard Worker 
1297*495ae853SAndroid Build Coastguard Worker     /*
1298*495ae853SAndroid Build Coastguard Worker      *  pic_parameter_set_id
1299*495ae853SAndroid Build Coastguard Worker      */
1300*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_pps_id;
1301*495ae853SAndroid Build Coastguard Worker 
1302*495ae853SAndroid Build Coastguard Worker     /*
1303*495ae853SAndroid Build Coastguard Worker      *  frame_num
1304*495ae853SAndroid Build Coastguard Worker      */
1305*495ae853SAndroid Build Coastguard Worker     WORD32 i4_frame_num;
1306*495ae853SAndroid Build Coastguard Worker 
1307*495ae853SAndroid Build Coastguard Worker     /*
1308*495ae853SAndroid Build Coastguard Worker      *  field_pic_flag
1309*495ae853SAndroid Build Coastguard Worker      */
1310*495ae853SAndroid Build Coastguard Worker     WORD8   i1_field_pic_flag;
1311*495ae853SAndroid Build Coastguard Worker 
1312*495ae853SAndroid Build Coastguard Worker     /*
1313*495ae853SAndroid Build Coastguard Worker      *  bottom_field_flag
1314*495ae853SAndroid Build Coastguard Worker      */
1315*495ae853SAndroid Build Coastguard Worker     WORD8   i1_bottom_field_flag;
1316*495ae853SAndroid Build Coastguard Worker 
1317*495ae853SAndroid Build Coastguard Worker     /*
1318*495ae853SAndroid Build Coastguard Worker      *  second_field
1319*495ae853SAndroid Build Coastguard Worker      */
1320*495ae853SAndroid Build Coastguard Worker     WORD8   i1_second_field_flag;
1321*495ae853SAndroid Build Coastguard Worker 
1322*495ae853SAndroid Build Coastguard Worker     /*
1323*495ae853SAndroid Build Coastguard Worker      *  idr_pic_id
1324*495ae853SAndroid Build Coastguard Worker      */
1325*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_idr_pic_id ;
1326*495ae853SAndroid Build Coastguard Worker 
1327*495ae853SAndroid Build Coastguard Worker     /*
1328*495ae853SAndroid Build Coastguard Worker      *  pic_order_cnt_lsb
1329*495ae853SAndroid Build Coastguard Worker      */
1330*495ae853SAndroid Build Coastguard Worker     UWORD16 i4_pic_order_cnt_lsb;
1331*495ae853SAndroid Build Coastguard Worker 
1332*495ae853SAndroid Build Coastguard Worker     /*
1333*495ae853SAndroid Build Coastguard Worker      *  delta_pic_order_cnt_bottom
1334*495ae853SAndroid Build Coastguard Worker      */
1335*495ae853SAndroid Build Coastguard Worker     WORD32  i4_delta_pic_order_cnt_bottom;
1336*495ae853SAndroid Build Coastguard Worker 
1337*495ae853SAndroid Build Coastguard Worker     /*
1338*495ae853SAndroid Build Coastguard Worker      *  delta_pic_order_cnt
1339*495ae853SAndroid Build Coastguard Worker      */
1340*495ae853SAndroid Build Coastguard Worker     WORD32   ai4_delta_pic_order_cnt[2];
1341*495ae853SAndroid Build Coastguard Worker 
1342*495ae853SAndroid Build Coastguard Worker     /*
1343*495ae853SAndroid Build Coastguard Worker      *  redundant_pic_cnt
1344*495ae853SAndroid Build Coastguard Worker      */
1345*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_redundant_pic_cnt;
1346*495ae853SAndroid Build Coastguard Worker 
1347*495ae853SAndroid Build Coastguard Worker     /*
1348*495ae853SAndroid Build Coastguard Worker      *  direct_spatial_mv_pred_flag
1349*495ae853SAndroid Build Coastguard Worker      */
1350*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_direct_spatial_mv_pred_flag;
1351*495ae853SAndroid Build Coastguard Worker 
1352*495ae853SAndroid Build Coastguard Worker     /*
1353*495ae853SAndroid Build Coastguard Worker      *  num_ref_idx_active_override_flag
1354*495ae853SAndroid Build Coastguard Worker      */
1355*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_num_ref_idx_active_override_flag;
1356*495ae853SAndroid Build Coastguard Worker 
1357*495ae853SAndroid Build Coastguard Worker     /*
1358*495ae853SAndroid Build Coastguard Worker      *  num_ref_idx_l0_active
1359*495ae853SAndroid Build Coastguard Worker      */
1360*495ae853SAndroid Build Coastguard Worker     WORD8   i1_num_ref_idx_l0_active;
1361*495ae853SAndroid Build Coastguard Worker 
1362*495ae853SAndroid Build Coastguard Worker     /*
1363*495ae853SAndroid Build Coastguard Worker      *  num_ref_idx_l1_active_minus1
1364*495ae853SAndroid Build Coastguard Worker      */
1365*495ae853SAndroid Build Coastguard Worker     WORD8   i1_num_ref_idx_l1_active;
1366*495ae853SAndroid Build Coastguard Worker 
1367*495ae853SAndroid Build Coastguard Worker     /*
1368*495ae853SAndroid Build Coastguard Worker      * ref_pic_list_reordering_flag_l0
1369*495ae853SAndroid Build Coastguard Worker      */
1370*495ae853SAndroid Build Coastguard Worker     UWORD8  u1_ref_idx_reordering_flag_l0;
1371*495ae853SAndroid Build Coastguard Worker 
1372*495ae853SAndroid Build Coastguard Worker     /*
1373*495ae853SAndroid Build Coastguard Worker      * ref_pic_list_reordering_flag_l1
1374*495ae853SAndroid Build Coastguard Worker      */
1375*495ae853SAndroid Build Coastguard Worker     UWORD8  u1_ref_idx_reordering_flag_l1;
1376*495ae853SAndroid Build Coastguard Worker 
1377*495ae853SAndroid Build Coastguard Worker     /**
1378*495ae853SAndroid Build Coastguard Worker      *  Reference prediction list modification
1379*495ae853SAndroid Build Coastguard Worker      */
1380*495ae853SAndroid Build Coastguard Worker     rplm_t s_rplm;
1381*495ae853SAndroid Build Coastguard Worker 
1382*495ae853SAndroid Build Coastguard Worker     /**
1383*495ae853SAndroid Build Coastguard Worker      * L0 Reference pic lists
1384*495ae853SAndroid Build Coastguard Worker      */
1385*495ae853SAndroid Build Coastguard Worker     ref_list_t as_ref_pic_list0[MAX_DPB_SIZE];
1386*495ae853SAndroid Build Coastguard Worker 
1387*495ae853SAndroid Build Coastguard Worker     /**
1388*495ae853SAndroid Build Coastguard Worker      * L1 Reference pic lists
1389*495ae853SAndroid Build Coastguard Worker      */
1390*495ae853SAndroid Build Coastguard Worker     ref_list_t as_ref_pic_list1[MAX_DPB_SIZE];
1391*495ae853SAndroid Build Coastguard Worker 
1392*495ae853SAndroid Build Coastguard Worker     /*
1393*495ae853SAndroid Build Coastguard Worker      * no_output_of_prior_pics_flag
1394*495ae853SAndroid Build Coastguard Worker      */
1395*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_no_output_of_prior_pics_flag;
1396*495ae853SAndroid Build Coastguard Worker 
1397*495ae853SAndroid Build Coastguard Worker     /*
1398*495ae853SAndroid Build Coastguard Worker      * long_term_reference_flag
1399*495ae853SAndroid Build Coastguard Worker      */
1400*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_long_term_reference_flag;
1401*495ae853SAndroid Build Coastguard Worker 
1402*495ae853SAndroid Build Coastguard Worker     /*
1403*495ae853SAndroid Build Coastguard Worker      * adaptive_ref_pic_marking_mode_flag
1404*495ae853SAndroid Build Coastguard Worker      */
1405*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_adaptive_ref_pic_marking_mode_flag;
1406*495ae853SAndroid Build Coastguard Worker 
1407*495ae853SAndroid Build Coastguard Worker     /*
1408*495ae853SAndroid Build Coastguard Worker      * Array to structures to store mmco commands
1409*495ae853SAndroid Build Coastguard Worker      * and parameters.
1410*495ae853SAndroid Build Coastguard Worker      */
1411*495ae853SAndroid Build Coastguard Worker     mmco_prms_t as_mmco_prms[MAX_MMCO_COMMANDS];
1412*495ae853SAndroid Build Coastguard Worker 
1413*495ae853SAndroid Build Coastguard Worker     /*
1414*495ae853SAndroid Build Coastguard Worker      *  entropy_coding_mode_flag
1415*495ae853SAndroid Build Coastguard Worker      */
1416*495ae853SAndroid Build Coastguard Worker     WORD8   u1_entropy_coding_mode_flag;
1417*495ae853SAndroid Build Coastguard Worker 
1418*495ae853SAndroid Build Coastguard Worker     /*
1419*495ae853SAndroid Build Coastguard Worker      *  cabac_init_idc
1420*495ae853SAndroid Build Coastguard Worker      */
1421*495ae853SAndroid Build Coastguard Worker     WORD8   i1_cabac_init_idc;
1422*495ae853SAndroid Build Coastguard Worker 
1423*495ae853SAndroid Build Coastguard Worker     /*
1424*495ae853SAndroid Build Coastguard Worker      *  i1_slice_qp
1425*495ae853SAndroid Build Coastguard Worker      */
1426*495ae853SAndroid Build Coastguard Worker     WORD8   i1_slice_qp;
1427*495ae853SAndroid Build Coastguard Worker 
1428*495ae853SAndroid Build Coastguard Worker     /*
1429*495ae853SAndroid Build Coastguard Worker      *  sp_for_switch_flag
1430*495ae853SAndroid Build Coastguard Worker      */
1431*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_sp_for_switch_flag;
1432*495ae853SAndroid Build Coastguard Worker 
1433*495ae853SAndroid Build Coastguard Worker     /*
1434*495ae853SAndroid Build Coastguard Worker      *  slice_qs_delta
1435*495ae853SAndroid Build Coastguard Worker      */
1436*495ae853SAndroid Build Coastguard Worker     UWORD8   u1_slice_qs;
1437*495ae853SAndroid Build Coastguard Worker 
1438*495ae853SAndroid Build Coastguard Worker     /*
1439*495ae853SAndroid Build Coastguard Worker      *  disable_deblocking_filter_idc
1440*495ae853SAndroid Build Coastguard Worker      */
1441*495ae853SAndroid Build Coastguard Worker     WORD8   u1_disable_deblocking_filter_idc;
1442*495ae853SAndroid Build Coastguard Worker 
1443*495ae853SAndroid Build Coastguard Worker     /*
1444*495ae853SAndroid Build Coastguard Worker      *  slice_alpha_c0_offset_div2
1445*495ae853SAndroid Build Coastguard Worker      */
1446*495ae853SAndroid Build Coastguard Worker     WORD8   i1_slice_alpha_c0_offset_div2;
1447*495ae853SAndroid Build Coastguard Worker 
1448*495ae853SAndroid Build Coastguard Worker     /*
1449*495ae853SAndroid Build Coastguard Worker      *  slice_beta_offset_div2
1450*495ae853SAndroid Build Coastguard Worker      */
1451*495ae853SAndroid Build Coastguard Worker     WORD8   i1_slice_beta_offset_div2;
1452*495ae853SAndroid Build Coastguard Worker 
1453*495ae853SAndroid Build Coastguard Worker     /*
1454*495ae853SAndroid Build Coastguard Worker      *  num_slice_groups_minus1
1455*495ae853SAndroid Build Coastguard Worker      */
1456*495ae853SAndroid Build Coastguard Worker     WORD8   u1_num_slice_groups_minus1;
1457*495ae853SAndroid Build Coastguard Worker 
1458*495ae853SAndroid Build Coastguard Worker     /*
1459*495ae853SAndroid Build Coastguard Worker      *  slice_group_change_cycle
1460*495ae853SAndroid Build Coastguard Worker      */
1461*495ae853SAndroid Build Coastguard Worker     WORD8   u1_slice_group_change_cycle;
1462*495ae853SAndroid Build Coastguard Worker 
1463*495ae853SAndroid Build Coastguard Worker     /**
1464*495ae853SAndroid Build Coastguard Worker      * Start MB X
1465*495ae853SAndroid Build Coastguard Worker      */
1466*495ae853SAndroid Build Coastguard Worker     UWORD16 i2_mb_x;
1467*495ae853SAndroid Build Coastguard Worker 
1468*495ae853SAndroid Build Coastguard Worker     /**
1469*495ae853SAndroid Build Coastguard Worker      * Start MB Y
1470*495ae853SAndroid Build Coastguard Worker      */
1471*495ae853SAndroid Build Coastguard Worker     UWORD16 i2_mb_y;
1472*495ae853SAndroid Build Coastguard Worker 
1473*495ae853SAndroid Build Coastguard Worker     /**
1474*495ae853SAndroid Build Coastguard Worker      * Absolute POC. Contains minimum of top and bottom POC.
1475*495ae853SAndroid Build Coastguard Worker      */
1476*495ae853SAndroid Build Coastguard Worker     WORD32 i4_abs_pic_order_cnt;
1477*495ae853SAndroid Build Coastguard Worker 
1478*495ae853SAndroid Build Coastguard Worker     /**
1479*495ae853SAndroid Build Coastguard Worker      *  Absolute top POC. Contains top poc for frame or top
1480*495ae853SAndroid Build Coastguard Worker      *  field. Invalid for bottom field.
1481*495ae853SAndroid Build Coastguard Worker      */
1482*495ae853SAndroid Build Coastguard Worker     WORD32 i4_abs_top_pic_order_cnt;
1483*495ae853SAndroid Build Coastguard Worker 
1484*495ae853SAndroid Build Coastguard Worker     /**
1485*495ae853SAndroid Build Coastguard Worker      *  Absolute top POC. Contains bottom poc for frame or bottom
1486*495ae853SAndroid Build Coastguard Worker      *  field. Invalid for top field.
1487*495ae853SAndroid Build Coastguard Worker      */
1488*495ae853SAndroid Build Coastguard Worker     WORD32 i4_abs_bottom_pic_order_cnt;
1489*495ae853SAndroid Build Coastguard Worker 
1490*495ae853SAndroid Build Coastguard Worker     /**
1491*495ae853SAndroid Build Coastguard Worker      * Flag signaling if the current slice is ref slice
1492*495ae853SAndroid Build Coastguard Worker      */
1493*495ae853SAndroid Build Coastguard Worker     UWORD8 i1_nal_ref_idc;
1494*495ae853SAndroid Build Coastguard Worker 
1495*495ae853SAndroid Build Coastguard Worker     /**
1496*495ae853SAndroid Build Coastguard Worker      * Flag to indicate if the current slice is MBAFF Frame
1497*495ae853SAndroid Build Coastguard Worker      */
1498*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_mbaff_frame_flag;
1499*495ae853SAndroid Build Coastguard Worker 
1500*495ae853SAndroid Build Coastguard Worker     /**
1501*495ae853SAndroid Build Coastguard Worker      * luma_log2_weight_denom
1502*495ae853SAndroid Build Coastguard Worker      */
1503*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_luma_log2_weight_denom;
1504*495ae853SAndroid Build Coastguard Worker 
1505*495ae853SAndroid Build Coastguard Worker     /**
1506*495ae853SAndroid Build Coastguard Worker      * chroma_log2_weight_denom
1507*495ae853SAndroid Build Coastguard Worker      */
1508*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_chroma_log2_weight_denom;
1509*495ae853SAndroid Build Coastguard Worker 
1510*495ae853SAndroid Build Coastguard Worker     /**
1511*495ae853SAndroid Build Coastguard Worker      * luma_weight_l0_flag
1512*495ae853SAndroid Build Coastguard Worker      */
1513*495ae853SAndroid Build Coastguard Worker     UWORD8 au1_luma_weight_l0_flag[MAX_DPB_SIZE];
1514*495ae853SAndroid Build Coastguard Worker 
1515*495ae853SAndroid Build Coastguard Worker     /**
1516*495ae853SAndroid Build Coastguard Worker      * luma_weight_l0 : (-128, 127 )is the range of weights
1517*495ae853SAndroid Build Coastguard Worker      * when weighted pred is enabled, 128 is default value
1518*495ae853SAndroid Build Coastguard Worker      */
1519*495ae853SAndroid Build Coastguard Worker     WORD16 ai2_luma_weight_l0[MAX_DPB_SIZE];
1520*495ae853SAndroid Build Coastguard Worker 
1521*495ae853SAndroid Build Coastguard Worker     /**
1522*495ae853SAndroid Build Coastguard Worker      * luma_offset_l0 : (-128, 127 )is the range of offset
1523*495ae853SAndroid Build Coastguard Worker      * when weighted pred is enabled, 0 is default value
1524*495ae853SAndroid Build Coastguard Worker      */
1525*495ae853SAndroid Build Coastguard Worker     WORD8 ai1_luma_offset_l0[MAX_DPB_SIZE];
1526*495ae853SAndroid Build Coastguard Worker 
1527*495ae853SAndroid Build Coastguard Worker     /**
1528*495ae853SAndroid Build Coastguard Worker      * chroma_weight_l0_flag
1529*495ae853SAndroid Build Coastguard Worker      */
1530*495ae853SAndroid Build Coastguard Worker     UWORD8 au1_chroma_weight_l0_flag[MAX_DPB_SIZE];
1531*495ae853SAndroid Build Coastguard Worker 
1532*495ae853SAndroid Build Coastguard Worker     /**
1533*495ae853SAndroid Build Coastguard Worker      * chroma_weight_l0 : (-128, 127 )is the range of weights
1534*495ae853SAndroid Build Coastguard Worker      * when weighted pred is enabled, 128 is default value
1535*495ae853SAndroid Build Coastguard Worker      */
1536*495ae853SAndroid Build Coastguard Worker     WORD16 ai2_chroma_weight_l0[MAX_DPB_SIZE][2];
1537*495ae853SAndroid Build Coastguard Worker 
1538*495ae853SAndroid Build Coastguard Worker     /**
1539*495ae853SAndroid Build Coastguard Worker      * chroma_offset_l0 : (-128, 127 )is the range of offset
1540*495ae853SAndroid Build Coastguard Worker      * when weighted pred is enabled, 0 is default value
1541*495ae853SAndroid Build Coastguard Worker      */
1542*495ae853SAndroid Build Coastguard Worker     WORD8 ai1_chroma_offset_l0[MAX_DPB_SIZE][2];
1543*495ae853SAndroid Build Coastguard Worker 
1544*495ae853SAndroid Build Coastguard Worker     /**
1545*495ae853SAndroid Build Coastguard Worker      * luma_weight_l0_flag
1546*495ae853SAndroid Build Coastguard Worker      */
1547*495ae853SAndroid Build Coastguard Worker     UWORD8 au1_luma_weight_l1_flag[MAX_DPB_SIZE];
1548*495ae853SAndroid Build Coastguard Worker 
1549*495ae853SAndroid Build Coastguard Worker     /**
1550*495ae853SAndroid Build Coastguard Worker      * luma_weight_l1 : (-128, 127 )is the range of weights
1551*495ae853SAndroid Build Coastguard Worker      * when weighted pred is enabled, 128 is default value
1552*495ae853SAndroid Build Coastguard Worker      */
1553*495ae853SAndroid Build Coastguard Worker     WORD16 ai2_luma_weight_l1[MAX_DPB_SIZE];
1554*495ae853SAndroid Build Coastguard Worker 
1555*495ae853SAndroid Build Coastguard Worker     /**
1556*495ae853SAndroid Build Coastguard Worker      * luma_offset_l1 : (-128, 127 )is the range of offset
1557*495ae853SAndroid Build Coastguard Worker      * when weighted pred is enabled, 0 is default value
1558*495ae853SAndroid Build Coastguard Worker      */
1559*495ae853SAndroid Build Coastguard Worker     WORD8 ai1_luma_offset_l1[MAX_DPB_SIZE];
1560*495ae853SAndroid Build Coastguard Worker 
1561*495ae853SAndroid Build Coastguard Worker     /**
1562*495ae853SAndroid Build Coastguard Worker      * chroma_weight_l1_flag
1563*495ae853SAndroid Build Coastguard Worker      */
1564*495ae853SAndroid Build Coastguard Worker     UWORD8 au1_chroma_weight_l1_flag[MAX_DPB_SIZE];
1565*495ae853SAndroid Build Coastguard Worker 
1566*495ae853SAndroid Build Coastguard Worker     /**
1567*495ae853SAndroid Build Coastguard Worker      * chroma_weight_l1 : (-128, 127 )is the range of weights
1568*495ae853SAndroid Build Coastguard Worker      * when weighted pred is enabled, 128 is default value
1569*495ae853SAndroid Build Coastguard Worker      */
1570*495ae853SAndroid Build Coastguard Worker     WORD16 ai2_chroma_weight_l1[MAX_DPB_SIZE][2];
1571*495ae853SAndroid Build Coastguard Worker 
1572*495ae853SAndroid Build Coastguard Worker     /**
1573*495ae853SAndroid Build Coastguard Worker      * chroma_offset_l1 :(-128, 127 )is the range of offset
1574*495ae853SAndroid Build Coastguard Worker      * when weighted pred is enabled, 0 is default value
1575*495ae853SAndroid Build Coastguard Worker      */
1576*495ae853SAndroid Build Coastguard Worker     WORD8 ai1_chroma_offset_l1[MAX_DPB_SIZE][2];
1577*495ae853SAndroid Build Coastguard Worker }slice_header_t;
1578*495ae853SAndroid Build Coastguard Worker 
1579*495ae853SAndroid Build Coastguard Worker 
1580*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
1581*495ae853SAndroid Build Coastguard Worker /* The following can be used to type cast coefficient data that is stored    */
1582*495ae853SAndroid Build Coastguard Worker /*  per subblock. Note that though i2_level is shown as an array that        */
1583*495ae853SAndroid Build Coastguard Worker /*  holds 16 coefficients, only the first few entries will be valid. Next    */
1584*495ae853SAndroid Build Coastguard Worker /*  subblocks data starts after the valid number of coefficients. Number     */
1585*495ae853SAndroid Build Coastguard Worker /*  of non-zero coefficients will be derived using number of non-zero bits   */
1586*495ae853SAndroid Build Coastguard Worker /*  in sig coeff map                                                         */
1587*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
1588*495ae853SAndroid Build Coastguard Worker 
1589*495ae853SAndroid Build Coastguard Worker /**
1590*495ae853SAndroid Build Coastguard Worker  * Structure to hold coefficient info for a 2x2 chroma DC transform
1591*495ae853SAndroid Build Coastguard Worker  */
1592*495ae853SAndroid Build Coastguard Worker typedef struct
1593*495ae853SAndroid Build Coastguard Worker {
1594*495ae853SAndroid Build Coastguard Worker     /**
1595*495ae853SAndroid Build Coastguard Worker      * significant coefficient map
1596*495ae853SAndroid Build Coastguard Worker      */
1597*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sig_coeff_map;
1598*495ae853SAndroid Build Coastguard Worker 
1599*495ae853SAndroid Build Coastguard Worker     /**
1600*495ae853SAndroid Build Coastguard Worker      * sub block position
1601*495ae853SAndroid Build Coastguard Worker      */
1602*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_subblk_pos;
1603*495ae853SAndroid Build Coastguard Worker 
1604*495ae853SAndroid Build Coastguard Worker     /**
1605*495ae853SAndroid Build Coastguard Worker      * holds coefficients
1606*495ae853SAndroid Build Coastguard Worker      */
1607*495ae853SAndroid Build Coastguard Worker     WORD16  ai2_level[2 * 2];
1608*495ae853SAndroid Build Coastguard Worker }tu_sblk2x2_coeff_data_t;
1609*495ae853SAndroid Build Coastguard Worker 
1610*495ae853SAndroid Build Coastguard Worker /**
1611*495ae853SAndroid Build Coastguard Worker  * Structure to hold coefficient info for a 4x4 transform
1612*495ae853SAndroid Build Coastguard Worker  */
1613*495ae853SAndroid Build Coastguard Worker typedef struct
1614*495ae853SAndroid Build Coastguard Worker {
1615*495ae853SAndroid Build Coastguard Worker     /**
1616*495ae853SAndroid Build Coastguard Worker      * significant coefficient map
1617*495ae853SAndroid Build Coastguard Worker      */
1618*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_sig_coeff_map;
1619*495ae853SAndroid Build Coastguard Worker 
1620*495ae853SAndroid Build Coastguard Worker     /**
1621*495ae853SAndroid Build Coastguard Worker      * sub block position
1622*495ae853SAndroid Build Coastguard Worker      */
1623*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_subblk_pos;
1624*495ae853SAndroid Build Coastguard Worker 
1625*495ae853SAndroid Build Coastguard Worker     /**
1626*495ae853SAndroid Build Coastguard Worker      * holds coefficients
1627*495ae853SAndroid Build Coastguard Worker      */
1628*495ae853SAndroid Build Coastguard Worker     WORD16  ai2_level[SUBBLK_COEFF_CNT];
1629*495ae853SAndroid Build Coastguard Worker }tu_sblk4x4_coeff_data_t;
1630*495ae853SAndroid Build Coastguard Worker 
1631*495ae853SAndroid Build Coastguard Worker /**
1632*495ae853SAndroid Build Coastguard Worker  * Structure to hold coefficient info for a 8x8 transform
1633*495ae853SAndroid Build Coastguard Worker  */
1634*495ae853SAndroid Build Coastguard Worker typedef struct
1635*495ae853SAndroid Build Coastguard Worker {
1636*495ae853SAndroid Build Coastguard Worker 
1637*495ae853SAndroid Build Coastguard Worker     /**
1638*495ae853SAndroid Build Coastguard Worker      * significant coefficient map
1639*495ae853SAndroid Build Coastguard Worker      */
1640*495ae853SAndroid Build Coastguard Worker     UWORD32 au4_sig_coeff_map[2];
1641*495ae853SAndroid Build Coastguard Worker 
1642*495ae853SAndroid Build Coastguard Worker     /**
1643*495ae853SAndroid Build Coastguard Worker      * sub block position
1644*495ae853SAndroid Build Coastguard Worker      */
1645*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_subblk_pos;
1646*495ae853SAndroid Build Coastguard Worker 
1647*495ae853SAndroid Build Coastguard Worker     /**
1648*495ae853SAndroid Build Coastguard Worker      * holds coefficients
1649*495ae853SAndroid Build Coastguard Worker      */
1650*495ae853SAndroid Build Coastguard Worker     WORD16  ai2_level[TRANS_SIZE_8 * TRANS_SIZE_8];
1651*495ae853SAndroid Build Coastguard Worker }tu_blk8x8_coeff_data_t;
1652*495ae853SAndroid Build Coastguard Worker 
1653*495ae853SAndroid Build Coastguard Worker 
1654*495ae853SAndroid Build Coastguard Worker /**
1655*495ae853SAndroid Build Coastguard Worker  * Structure to hold coefficient info for a 16x16 IPCM MB
1656*495ae853SAndroid Build Coastguard Worker  */
1657*495ae853SAndroid Build Coastguard Worker typedef struct
1658*495ae853SAndroid Build Coastguard Worker {
1659*495ae853SAndroid Build Coastguard Worker     /**
1660*495ae853SAndroid Build Coastguard Worker      * holds coefficients
1661*495ae853SAndroid Build Coastguard Worker      */
1662*495ae853SAndroid Build Coastguard Worker     UWORD8  au1_level[MB_SIZE * MB_SIZE * 3 / 2];
1663*495ae853SAndroid Build Coastguard Worker }tu_ipcm_coeff_data_t;
1664*495ae853SAndroid Build Coastguard Worker 
1665*495ae853SAndroid Build Coastguard Worker 
1666*495ae853SAndroid Build Coastguard Worker typedef struct
1667*495ae853SAndroid Build Coastguard Worker {
1668*495ae853SAndroid Build Coastguard Worker     /**
1669*495ae853SAndroid Build Coastguard Worker      * Transform sizes 0: 4x4, 1: 8x8,
1670*495ae853SAndroid Build Coastguard Worker      */
1671*495ae853SAndroid Build Coastguard Worker     UWORD32     b1_trans_size : 1;
1672*495ae853SAndroid Build Coastguard Worker 
1673*495ae853SAndroid Build Coastguard Worker     /**
1674*495ae853SAndroid Build Coastguard Worker      * Flag to signal if the current MB is IPCM
1675*495ae853SAndroid Build Coastguard Worker      */
1676*495ae853SAndroid Build Coastguard Worker     UWORD32     b1_ipcm : 1;
1677*495ae853SAndroid Build Coastguard Worker 
1678*495ae853SAndroid Build Coastguard Worker     /**
1679*495ae853SAndroid Build Coastguard Worker      * Intra pred sizes  0: 4x4, 1: 8x8, 2: 16x16
1680*495ae853SAndroid Build Coastguard Worker      */
1681*495ae853SAndroid Build Coastguard Worker     UWORD32     b2_intra_pred_size : 2;
1682*495ae853SAndroid Build Coastguard Worker 
1683*495ae853SAndroid Build Coastguard Worker     /**
1684*495ae853SAndroid Build Coastguard Worker      * Chroma intra mode
1685*495ae853SAndroid Build Coastguard Worker      */
1686*495ae853SAndroid Build Coastguard Worker     UWORD32     b2_intra_chroma_pred_mode: 2;
1687*495ae853SAndroid Build Coastguard Worker 
1688*495ae853SAndroid Build Coastguard Worker     /**
1689*495ae853SAndroid Build Coastguard Worker      * Number of coded subblocks in the current MB, for which
1690*495ae853SAndroid Build Coastguard Worker      * tu data is sent. Maximum of 27 subblocks in the following
1691*495ae853SAndroid Build Coastguard Worker      * order.
1692*495ae853SAndroid Build Coastguard Worker      * 1 4x4 luma DC(for intra16x16),
1693*495ae853SAndroid Build Coastguard Worker      * 16 4x4 luma,
1694*495ae853SAndroid Build Coastguard Worker      * 2 2x2 chroma DC,
1695*495ae853SAndroid Build Coastguard Worker      * 8 4x4 chroma,
1696*495ae853SAndroid Build Coastguard Worker      */
1697*495ae853SAndroid Build Coastguard Worker     WORD32      b5_num_coded_sblks: 5;
1698*495ae853SAndroid Build Coastguard Worker 
1699*495ae853SAndroid Build Coastguard Worker     /**
1700*495ae853SAndroid Build Coastguard Worker      * Flag to signal if 4x4 subblock for DC values (in INTRA 16x16 MB)
1701*495ae853SAndroid Build Coastguard Worker      * is coded
1702*495ae853SAndroid Build Coastguard Worker      */
1703*495ae853SAndroid Build Coastguard Worker     UWORD32     b1_luma_dc_coded: 1;
1704*495ae853SAndroid Build Coastguard Worker 
1705*495ae853SAndroid Build Coastguard Worker     /**
1706*495ae853SAndroid Build Coastguard Worker      * Flag to signal if 4x4 subblock for DC values (in INTRA 16x16 MB)
1707*495ae853SAndroid Build Coastguard Worker      * is coded
1708*495ae853SAndroid Build Coastguard Worker      */
1709*495ae853SAndroid Build Coastguard Worker     UWORD32     b1_chroma_dc_coded: 1;
1710*495ae853SAndroid Build Coastguard Worker 
1711*495ae853SAndroid Build Coastguard Worker     /**
1712*495ae853SAndroid Build Coastguard Worker      * CSBP - 16 bits, 1 bit for each 4x4
1713*495ae853SAndroid Build Coastguard Worker      * for intra16x16 mb_type only ac coefficients are
1714*495ae853SAndroid Build Coastguard Worker      */
1715*495ae853SAndroid Build Coastguard Worker     UWORD32     b16_luma_csbp: 16;
1716*495ae853SAndroid Build Coastguard Worker 
1717*495ae853SAndroid Build Coastguard Worker     /**
1718*495ae853SAndroid Build Coastguard Worker      * CSBP - 16 bits, 1 bit for each 4x4
1719*495ae853SAndroid Build Coastguard Worker      * for intra16x16 mb_type only ac coefficients are
1720*495ae853SAndroid Build Coastguard Worker      */
1721*495ae853SAndroid Build Coastguard Worker     UWORD32     b8_chroma_csbp: 8;
1722*495ae853SAndroid Build Coastguard Worker 
1723*495ae853SAndroid Build Coastguard Worker     /**
1724*495ae853SAndroid Build Coastguard Worker      * Luma Intra pred modes,
1725*495ae853SAndroid Build Coastguard Worker      * Based on intra pred size either 16, 4 or 1 entry will be
1726*495ae853SAndroid Build Coastguard Worker      * populated below.
1727*495ae853SAndroid Build Coastguard Worker      */
1728*495ae853SAndroid Build Coastguard Worker     UWORD8     au1_luma_intra_modes[16];
1729*495ae853SAndroid Build Coastguard Worker 
1730*495ae853SAndroid Build Coastguard Worker }intra_mb_t;
1731*495ae853SAndroid Build Coastguard Worker 
1732*495ae853SAndroid Build Coastguard Worker 
1733*495ae853SAndroid Build Coastguard Worker typedef struct
1734*495ae853SAndroid Build Coastguard Worker {
1735*495ae853SAndroid Build Coastguard Worker     /**
1736*495ae853SAndroid Build Coastguard Worker      * Transform sizes 0: 4x4, 1: 8x8,
1737*495ae853SAndroid Build Coastguard Worker      */
1738*495ae853SAndroid Build Coastguard Worker     UWORD8     b1_trans_size : 1;
1739*495ae853SAndroid Build Coastguard Worker 
1740*495ae853SAndroid Build Coastguard Worker 
1741*495ae853SAndroid Build Coastguard Worker     /**
1742*495ae853SAndroid Build Coastguard Worker      * Skip flag
1743*495ae853SAndroid Build Coastguard Worker      */
1744*495ae853SAndroid Build Coastguard Worker     UWORD8     b1_skip : 1;
1745*495ae853SAndroid Build Coastguard Worker 
1746*495ae853SAndroid Build Coastguard Worker 
1747*495ae853SAndroid Build Coastguard Worker     /**
1748*495ae853SAndroid Build Coastguard Worker      * Number of coded subblocks in the current MB, for which
1749*495ae853SAndroid Build Coastguard Worker      * tu data is sent. Maximum of 26 subblocks in the following
1750*495ae853SAndroid Build Coastguard Worker      * order.
1751*495ae853SAndroid Build Coastguard Worker      * 16 4x4 luma,
1752*495ae853SAndroid Build Coastguard Worker      * 2 2x2 chroma DC,
1753*495ae853SAndroid Build Coastguard Worker      * 8 4x4 chroma,
1754*495ae853SAndroid Build Coastguard Worker      */
1755*495ae853SAndroid Build Coastguard Worker     WORD32      b5_num_coded_sblks: 5;
1756*495ae853SAndroid Build Coastguard Worker 
1757*495ae853SAndroid Build Coastguard Worker     /**
1758*495ae853SAndroid Build Coastguard Worker      * CSBP - 16 bits, 1 bit for each 4x4
1759*495ae853SAndroid Build Coastguard Worker      * for intra16x16 mb_type only ac coefficients are
1760*495ae853SAndroid Build Coastguard Worker      */
1761*495ae853SAndroid Build Coastguard Worker     UWORD32     b16_luma_csbp: 16;
1762*495ae853SAndroid Build Coastguard Worker 
1763*495ae853SAndroid Build Coastguard Worker     /**
1764*495ae853SAndroid Build Coastguard Worker      * CSBP - 16 bits, 1 bit for each 4x4
1765*495ae853SAndroid Build Coastguard Worker      * for intra16x16 mb_type only ac coefficients are
1766*495ae853SAndroid Build Coastguard Worker      */
1767*495ae853SAndroid Build Coastguard Worker     UWORD32     b16_chroma_csbp: 8;
1768*495ae853SAndroid Build Coastguard Worker }inter_mb_t;
1769*495ae853SAndroid Build Coastguard Worker 
1770*495ae853SAndroid Build Coastguard Worker /**
1771*495ae853SAndroid Build Coastguard Worker  * Structure to hold Mastering Display Color Volume SEI
1772*495ae853SAndroid Build Coastguard Worker  */
1773*495ae853SAndroid Build Coastguard Worker typedef struct
1774*495ae853SAndroid Build Coastguard Worker {
1775*495ae853SAndroid Build Coastguard Worker     /**
1776*495ae853SAndroid Build Coastguard Worker      * Array to store the display_primaries_x values
1777*495ae853SAndroid Build Coastguard Worker      */
1778*495ae853SAndroid Build Coastguard Worker     UWORD16 au2_display_primaries_x[NUM_SEI_MDCV_PRIMARIES];
1779*495ae853SAndroid Build Coastguard Worker 
1780*495ae853SAndroid Build Coastguard Worker     /**
1781*495ae853SAndroid Build Coastguard Worker      * Array to store the display_primaries_y values
1782*495ae853SAndroid Build Coastguard Worker      */
1783*495ae853SAndroid Build Coastguard Worker     UWORD16 au2_display_primaries_y[NUM_SEI_MDCV_PRIMARIES];
1784*495ae853SAndroid Build Coastguard Worker 
1785*495ae853SAndroid Build Coastguard Worker     /**
1786*495ae853SAndroid Build Coastguard Worker      * Variable to store the white point x value
1787*495ae853SAndroid Build Coastguard Worker      */
1788*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_white_point_x;
1789*495ae853SAndroid Build Coastguard Worker 
1790*495ae853SAndroid Build Coastguard Worker     /**
1791*495ae853SAndroid Build Coastguard Worker      * Variable to store the white point y value
1792*495ae853SAndroid Build Coastguard Worker      */
1793*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_white_point_y;
1794*495ae853SAndroid Build Coastguard Worker 
1795*495ae853SAndroid Build Coastguard Worker     /**
1796*495ae853SAndroid Build Coastguard Worker      * Variable to store the max display mastering luminance value
1797*495ae853SAndroid Build Coastguard Worker      */
1798*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_max_display_mastering_luminance;
1799*495ae853SAndroid Build Coastguard Worker 
1800*495ae853SAndroid Build Coastguard Worker     /**
1801*495ae853SAndroid Build Coastguard Worker      * Variable to store the min display mastering luminance value
1802*495ae853SAndroid Build Coastguard Worker      */
1803*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_min_display_mastering_luminance;
1804*495ae853SAndroid Build Coastguard Worker }sei_mdcv_params_t;
1805*495ae853SAndroid Build Coastguard Worker 
1806*495ae853SAndroid Build Coastguard Worker 
1807*495ae853SAndroid Build Coastguard Worker /**
1808*495ae853SAndroid Build Coastguard Worker  *  Structure for Content Light Level Info
1809*495ae853SAndroid Build Coastguard Worker  *
1810*495ae853SAndroid Build Coastguard Worker  */
1811*495ae853SAndroid Build Coastguard Worker typedef struct
1812*495ae853SAndroid Build Coastguard Worker {
1813*495ae853SAndroid Build Coastguard Worker     /**
1814*495ae853SAndroid Build Coastguard Worker      * The maximum pixel intensity of all samples
1815*495ae853SAndroid Build Coastguard Worker      */
1816*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_max_content_light_level;
1817*495ae853SAndroid Build Coastguard Worker 
1818*495ae853SAndroid Build Coastguard Worker     /**
1819*495ae853SAndroid Build Coastguard Worker      * The average pixel intensity of all samples
1820*495ae853SAndroid Build Coastguard Worker      */
1821*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_max_pic_average_light_level;
1822*495ae853SAndroid Build Coastguard Worker }sei_cll_params_t;
1823*495ae853SAndroid Build Coastguard Worker 
1824*495ae853SAndroid Build Coastguard Worker 
1825*495ae853SAndroid Build Coastguard Worker /**
1826*495ae853SAndroid Build Coastguard Worker  * Structure to hold Ambient viewing environment SEI
1827*495ae853SAndroid Build Coastguard Worker  */
1828*495ae853SAndroid Build Coastguard Worker typedef struct
1829*495ae853SAndroid Build Coastguard Worker {
1830*495ae853SAndroid Build Coastguard Worker     /**
1831*495ae853SAndroid Build Coastguard Worker      * specifies the environmental illluminance of the ambient viewing environment
1832*495ae853SAndroid Build Coastguard Worker      */
1833*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_ambient_illuminance;
1834*495ae853SAndroid Build Coastguard Worker 
1835*495ae853SAndroid Build Coastguard Worker     /*
1836*495ae853SAndroid Build Coastguard Worker      * specify the normalized x chromaticity coordinates of the
1837*495ae853SAndroid Build Coastguard Worker      * environmental ambient light in the nominal viewing environment
1838*495ae853SAndroid Build Coastguard Worker      */
1839*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_ambient_light_x;
1840*495ae853SAndroid Build Coastguard Worker 
1841*495ae853SAndroid Build Coastguard Worker     /*
1842*495ae853SAndroid Build Coastguard Worker     * specify the normalized y chromaticity coordinates of the
1843*495ae853SAndroid Build Coastguard Worker     * environmental ambient light in the nominal viewing environment
1844*495ae853SAndroid Build Coastguard Worker     */
1845*495ae853SAndroid Build Coastguard Worker     UWORD16 u2_ambient_light_y;
1846*495ae853SAndroid Build Coastguard Worker }sei_ave_params_t;
1847*495ae853SAndroid Build Coastguard Worker 
1848*495ae853SAndroid Build Coastguard Worker 
1849*495ae853SAndroid Build Coastguard Worker /**
1850*495ae853SAndroid Build Coastguard Worker  * Structure to hold Content color volume SEI
1851*495ae853SAndroid Build Coastguard Worker  */
1852*495ae853SAndroid Build Coastguard Worker typedef struct
1853*495ae853SAndroid Build Coastguard Worker {
1854*495ae853SAndroid Build Coastguard Worker     /*
1855*495ae853SAndroid Build Coastguard Worker      * Flag used to control persistence of CCV SEI messages
1856*495ae853SAndroid Build Coastguard Worker      */
1857*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_ccv_cancel_flag;
1858*495ae853SAndroid Build Coastguard Worker 
1859*495ae853SAndroid Build Coastguard Worker     /*
1860*495ae853SAndroid Build Coastguard Worker      * specifies the persistence of the CCV SEI message for the current layer
1861*495ae853SAndroid Build Coastguard Worker      */
1862*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_ccv_persistence_flag;
1863*495ae853SAndroid Build Coastguard Worker 
1864*495ae853SAndroid Build Coastguard Worker     /*
1865*495ae853SAndroid Build Coastguard Worker      * specifies the presence of syntax elements ccv_primaries_x and ccv_primaries_y
1866*495ae853SAndroid Build Coastguard Worker      */
1867*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_ccv_primaries_present_flag;
1868*495ae853SAndroid Build Coastguard Worker 
1869*495ae853SAndroid Build Coastguard Worker     /*
1870*495ae853SAndroid Build Coastguard Worker      * specifies that the syntax element ccv_min_luminance_value is present
1871*495ae853SAndroid Build Coastguard Worker      */
1872*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_ccv_min_luminance_value_present_flag;
1873*495ae853SAndroid Build Coastguard Worker 
1874*495ae853SAndroid Build Coastguard Worker     /*
1875*495ae853SAndroid Build Coastguard Worker      * specifies that the syntax element ccv_max_luminance_value is present
1876*495ae853SAndroid Build Coastguard Worker      */
1877*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_ccv_max_luminance_value_present_flag;
1878*495ae853SAndroid Build Coastguard Worker 
1879*495ae853SAndroid Build Coastguard Worker     /*
1880*495ae853SAndroid Build Coastguard Worker      * specifies that the syntax element ccv_avg_luminance_value is present
1881*495ae853SAndroid Build Coastguard Worker      */
1882*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_ccv_avg_luminance_value_present_flag;
1883*495ae853SAndroid Build Coastguard Worker 
1884*495ae853SAndroid Build Coastguard Worker     /*
1885*495ae853SAndroid Build Coastguard Worker      * shall be equal to 0 in bitstreams conforming to this version. Other values
1886*495ae853SAndroid Build Coastguard Worker      * for reserved_zero_2bits are reserved for future use
1887*495ae853SAndroid Build Coastguard Worker      */
1888*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_ccv_reserved_zero_2bits;
1889*495ae853SAndroid Build Coastguard Worker 
1890*495ae853SAndroid Build Coastguard Worker     /*
1891*495ae853SAndroid Build Coastguard Worker      * specify the normalized x chromaticity coordinates of the colour
1892*495ae853SAndroid Build Coastguard Worker      * primary component c of the nominal content colour volume
1893*495ae853SAndroid Build Coastguard Worker      */
1894*495ae853SAndroid Build Coastguard Worker     WORD32 ai4_ccv_primaries_x[NUM_SEI_CCV_PRIMARIES];
1895*495ae853SAndroid Build Coastguard Worker 
1896*495ae853SAndroid Build Coastguard Worker     /*
1897*495ae853SAndroid Build Coastguard Worker      * specify the normalized y chromaticity coordinates of the colour
1898*495ae853SAndroid Build Coastguard Worker      * primary component c of the nominal content colour volume
1899*495ae853SAndroid Build Coastguard Worker      */
1900*495ae853SAndroid Build Coastguard Worker     WORD32 ai4_ccv_primaries_y[NUM_SEI_CCV_PRIMARIES];
1901*495ae853SAndroid Build Coastguard Worker 
1902*495ae853SAndroid Build Coastguard Worker     /*
1903*495ae853SAndroid Build Coastguard Worker      * specifies the normalized minimum luminance value
1904*495ae853SAndroid Build Coastguard Worker      */
1905*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_ccv_min_luminance_value;
1906*495ae853SAndroid Build Coastguard Worker 
1907*495ae853SAndroid Build Coastguard Worker     /*
1908*495ae853SAndroid Build Coastguard Worker      * specifies the normalized maximum luminance value
1909*495ae853SAndroid Build Coastguard Worker      */
1910*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_ccv_max_luminance_value;
1911*495ae853SAndroid Build Coastguard Worker 
1912*495ae853SAndroid Build Coastguard Worker     /*
1913*495ae853SAndroid Build Coastguard Worker      * specifies the normalized average luminance value
1914*495ae853SAndroid Build Coastguard Worker      */
1915*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_ccv_avg_luminance_value;
1916*495ae853SAndroid Build Coastguard Worker }sei_ccv_params_t;
1917*495ae853SAndroid Build Coastguard Worker 
1918*495ae853SAndroid Build Coastguard Worker /**
1919*495ae853SAndroid Build Coastguard Worker  * Structure to hold FGC SEI
1920*495ae853SAndroid Build Coastguard Worker  */
1921*495ae853SAndroid Build Coastguard Worker typedef struct
1922*495ae853SAndroid Build Coastguard Worker {
1923*495ae853SAndroid Build Coastguard Worker     /**
1924*495ae853SAndroid Build Coastguard Worker      * Flag to control the presence of FGC SEI params
1925*495ae853SAndroid Build Coastguard Worker      */
1926*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_film_grain_characteristics_cancel_flag;
1927*495ae853SAndroid Build Coastguard Worker 
1928*495ae853SAndroid Build Coastguard Worker     /**
1929*495ae853SAndroid Build Coastguard Worker      * Specifies the pic order count
1930*495ae853SAndroid Build Coastguard Worker      */
1931*495ae853SAndroid Build Coastguard Worker     WORD32 i4_poc;
1932*495ae853SAndroid Build Coastguard Worker 
1933*495ae853SAndroid Build Coastguard Worker     /**
1934*495ae853SAndroid Build Coastguard Worker      * Specifies IDR pic ID
1935*495ae853SAndroid Build Coastguard Worker      */
1936*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_idr_pic_id;
1937*495ae853SAndroid Build Coastguard Worker 
1938*495ae853SAndroid Build Coastguard Worker     /**
1939*495ae853SAndroid Build Coastguard Worker      * Specifies film grain model for simulation
1940*495ae853SAndroid Build Coastguard Worker      */
1941*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_film_grain_model_id;
1942*495ae853SAndroid Build Coastguard Worker 
1943*495ae853SAndroid Build Coastguard Worker     /**
1944*495ae853SAndroid Build Coastguard Worker      * Specifies separate color format for decoded samples and grain
1945*495ae853SAndroid Build Coastguard Worker      */
1946*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_separate_colour_description_present_flag;
1947*495ae853SAndroid Build Coastguard Worker 
1948*495ae853SAndroid Build Coastguard Worker     /**
1949*495ae853SAndroid Build Coastguard Worker      * Specifies the bit depth used for the luma component
1950*495ae853SAndroid Build Coastguard Worker      */
1951*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_film_grain_bit_depth_luma_minus8;
1952*495ae853SAndroid Build Coastguard Worker 
1953*495ae853SAndroid Build Coastguard Worker     /**
1954*495ae853SAndroid Build Coastguard Worker      * Specifies the bit depth used for the Cb and Cr components
1955*495ae853SAndroid Build Coastguard Worker      */
1956*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_film_grain_bit_depth_chroma_minus8;
1957*495ae853SAndroid Build Coastguard Worker 
1958*495ae853SAndroid Build Coastguard Worker     /**
1959*495ae853SAndroid Build Coastguard Worker      * Specifies the colour space of the FGC in SEI
1960*495ae853SAndroid Build Coastguard Worker      */
1961*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_film_grain_full_range_flag;
1962*495ae853SAndroid Build Coastguard Worker 
1963*495ae853SAndroid Build Coastguard Worker     /**
1964*495ae853SAndroid Build Coastguard Worker      * Specifies the colour space of the FGC in SEI
1965*495ae853SAndroid Build Coastguard Worker      */
1966*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_film_grain_colour_primaries;
1967*495ae853SAndroid Build Coastguard Worker 
1968*495ae853SAndroid Build Coastguard Worker     /**
1969*495ae853SAndroid Build Coastguard Worker      * Specifies the colour space of the FGC in SEI
1970*495ae853SAndroid Build Coastguard Worker      */
1971*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_film_grain_transfer_characteristics;
1972*495ae853SAndroid Build Coastguard Worker 
1973*495ae853SAndroid Build Coastguard Worker     /**
1974*495ae853SAndroid Build Coastguard Worker      * Specifies the colour space of the FGC in SEI
1975*495ae853SAndroid Build Coastguard Worker      */
1976*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_film_grain_matrix_coefficients;
1977*495ae853SAndroid Build Coastguard Worker 
1978*495ae853SAndroid Build Coastguard Worker     /**
1979*495ae853SAndroid Build Coastguard Worker      * identifies the blending mode used to blend the simulated film grain with the decoded images
1980*495ae853SAndroid Build Coastguard Worker      */
1981*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_blending_mode_id;
1982*495ae853SAndroid Build Coastguard Worker 
1983*495ae853SAndroid Build Coastguard Worker     /**
1984*495ae853SAndroid Build Coastguard Worker      * Specifies a scale factor used in the film grain characterization equations
1985*495ae853SAndroid Build Coastguard Worker      */
1986*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_log2_scale_factor;
1987*495ae853SAndroid Build Coastguard Worker 
1988*495ae853SAndroid Build Coastguard Worker     /**
1989*495ae853SAndroid Build Coastguard Worker      * Indicates whether film grain is modelled or not on the colour component
1990*495ae853SAndroid Build Coastguard Worker      */
1991*495ae853SAndroid Build Coastguard Worker     UWORD8 au1_comp_model_present_flag[SEI_FGC_NUM_COLOUR_COMPONENTS];
1992*495ae853SAndroid Build Coastguard Worker 
1993*495ae853SAndroid Build Coastguard Worker     /**
1994*495ae853SAndroid Build Coastguard Worker      * Specifies the number of intensity intervals for which
1995*495ae853SAndroid Build Coastguard Worker      * a specific set of model values has been estimated
1996*495ae853SAndroid Build Coastguard Worker      */
1997*495ae853SAndroid Build Coastguard Worker     UWORD8 au1_num_intensity_intervals_minus1[SEI_FGC_NUM_COLOUR_COMPONENTS];
1998*495ae853SAndroid Build Coastguard Worker 
1999*495ae853SAndroid Build Coastguard Worker     /**
2000*495ae853SAndroid Build Coastguard Worker      * Specifies the number of model values present for each intensity interval in which
2001*495ae853SAndroid Build Coastguard Worker      * the film grain has been modelled
2002*495ae853SAndroid Build Coastguard Worker      */
2003*495ae853SAndroid Build Coastguard Worker     UWORD8 au1_num_model_values_minus1[SEI_FGC_NUM_COLOUR_COMPONENTS];
2004*495ae853SAndroid Build Coastguard Worker 
2005*495ae853SAndroid Build Coastguard Worker     /**
2006*495ae853SAndroid Build Coastguard Worker      * Specifies the lower bound of the interval of intensity levels for which
2007*495ae853SAndroid Build Coastguard Worker      * the set of model values applies
2008*495ae853SAndroid Build Coastguard Worker      */
2009*495ae853SAndroid Build Coastguard Worker     UWORD8 au1_intensity_interval_lower_bound[SEI_FGC_NUM_COLOUR_COMPONENTS]
2010*495ae853SAndroid Build Coastguard Worker                                              [SEI_FGC_MAX_NUM_INTENSITY_INTERVALS];
2011*495ae853SAndroid Build Coastguard Worker 
2012*495ae853SAndroid Build Coastguard Worker     /**
2013*495ae853SAndroid Build Coastguard Worker      * Specifies the upper bound of the interval of intensity levels for which
2014*495ae853SAndroid Build Coastguard Worker      * the set of model values applies
2015*495ae853SAndroid Build Coastguard Worker      */
2016*495ae853SAndroid Build Coastguard Worker     UWORD8 au1_intensity_interval_upper_bound[SEI_FGC_NUM_COLOUR_COMPONENTS]
2017*495ae853SAndroid Build Coastguard Worker                                              [SEI_FGC_MAX_NUM_INTENSITY_INTERVALS];
2018*495ae853SAndroid Build Coastguard Worker 
2019*495ae853SAndroid Build Coastguard Worker     /**
2020*495ae853SAndroid Build Coastguard Worker      * Represents each one of the model values present for
2021*495ae853SAndroid Build Coastguard Worker      * the colour component and intensity interval
2022*495ae853SAndroid Build Coastguard Worker      */
2023*495ae853SAndroid Build Coastguard Worker     WORD32 ai4_comp_model_value[SEI_FGC_NUM_COLOUR_COMPONENTS][SEI_FGC_MAX_NUM_INTENSITY_INTERVALS]
2024*495ae853SAndroid Build Coastguard Worker                                [SEI_FGC_MAX_NUM_MODEL_VALUES];
2025*495ae853SAndroid Build Coastguard Worker 
2026*495ae853SAndroid Build Coastguard Worker     /**
2027*495ae853SAndroid Build Coastguard Worker      * Specifies the persistence of the film grain characteristics SEI message
2028*495ae853SAndroid Build Coastguard Worker      */
2029*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_film_grain_characteristics_repetition_period;
2030*495ae853SAndroid Build Coastguard Worker 
2031*495ae853SAndroid Build Coastguard Worker } sei_fgc_params_t;
2032*495ae853SAndroid Build Coastguard Worker 
2033*495ae853SAndroid Build Coastguard Worker /**
2034*495ae853SAndroid Build Coastguard Worker  * Structure to hold shutter interval info SEI
2035*495ae853SAndroid Build Coastguard Worker  */
2036*495ae853SAndroid Build Coastguard Worker typedef struct
2037*495ae853SAndroid Build Coastguard Worker {
2038*495ae853SAndroid Build Coastguard Worker     /**
2039*495ae853SAndroid Build Coastguard Worker      * specifies if the sei sii is enabled
2040*495ae853SAndroid Build Coastguard Worker      */
2041*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_shutter_interval_info_present_flag;
2042*495ae853SAndroid Build Coastguard Worker 
2043*495ae853SAndroid Build Coastguard Worker     /**
2044*495ae853SAndroid Build Coastguard Worker      * specifies the shutter interval temporal sub-layer index
2045*495ae853SAndroid Build Coastguard Worker      * of the current picture
2046*495ae853SAndroid Build Coastguard Worker      */
2047*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_sii_sub_layer_idx;
2048*495ae853SAndroid Build Coastguard Worker 
2049*495ae853SAndroid Build Coastguard Worker     /**
2050*495ae853SAndroid Build Coastguard Worker      * specify the number of time units that pass in one second
2051*495ae853SAndroid Build Coastguard Worker      */
2052*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_sii_time_scale;
2053*495ae853SAndroid Build Coastguard Worker 
2054*495ae853SAndroid Build Coastguard Worker     /**
2055*495ae853SAndroid Build Coastguard Worker      * specifies that the indicated shutter interval is the same for all
2056*495ae853SAndroid Build Coastguard Worker      * pictures in the coded video sequence
2057*495ae853SAndroid Build Coastguard Worker      */
2058*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_fixed_shutter_interval_within_cvs_flag;
2059*495ae853SAndroid Build Coastguard Worker 
2060*495ae853SAndroid Build Coastguard Worker     /**
2061*495ae853SAndroid Build Coastguard Worker      * specifies the the number of time units of a clock operating at the
2062*495ae853SAndroid Build Coastguard Worker      * frequency sii_time_scale Hz that corresponds to the indicated shutter
2063*495ae853SAndroid Build Coastguard Worker      * interval of each picture in the coded video sequence
2064*495ae853SAndroid Build Coastguard Worker      */
2065*495ae853SAndroid Build Coastguard Worker     UWORD32 u4_sii_num_units_in_shutter_interval;
2066*495ae853SAndroid Build Coastguard Worker 
2067*495ae853SAndroid Build Coastguard Worker     /**
2068*495ae853SAndroid Build Coastguard Worker      * sii_max_sub_layers_minus1 plus 1 specifies the maximum number of
2069*495ae853SAndroid Build Coastguard Worker      * shutter interval temporal sub-layers indexes that may be present
2070*495ae853SAndroid Build Coastguard Worker      * in the coded video sequence
2071*495ae853SAndroid Build Coastguard Worker      */
2072*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sii_max_sub_layers_minus1;
2073*495ae853SAndroid Build Coastguard Worker 
2074*495ae853SAndroid Build Coastguard Worker     /*
2075*495ae853SAndroid Build Coastguard Worker      * specifies the number of time units of a clock operating at the
2076*495ae853SAndroid Build Coastguard Worker      * frequency sii_time_scale Hz that corresponds to the shutter
2077*495ae853SAndroid Build Coastguard Worker      * interval of each picture in the coded video sequence
2078*495ae853SAndroid Build Coastguard Worker      */
2079*495ae853SAndroid Build Coastguard Worker     UWORD32 au4_sub_layer_num_units_in_shutter_interval[SII_MAX_SUB_LAYERS];
2080*495ae853SAndroid Build Coastguard Worker } sei_sii_params_t;
2081*495ae853SAndroid Build Coastguard Worker 
2082*495ae853SAndroid Build Coastguard Worker /**
2083*495ae853SAndroid Build Coastguard Worker  * Structure to hold SEI parameters Info
2084*495ae853SAndroid Build Coastguard Worker  */
2085*495ae853SAndroid Build Coastguard Worker typedef struct
2086*495ae853SAndroid Build Coastguard Worker {
2087*495ae853SAndroid Build Coastguard Worker     /**
2088*495ae853SAndroid Build Coastguard Worker      *  mastering display color volume info present flag
2089*495ae853SAndroid Build Coastguard Worker      */
2090*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sei_mdcv_params_present_flag;
2091*495ae853SAndroid Build Coastguard Worker 
2092*495ae853SAndroid Build Coastguard Worker     /*
2093*495ae853SAndroid Build Coastguard Worker      * MDCV parameters
2094*495ae853SAndroid Build Coastguard Worker      */
2095*495ae853SAndroid Build Coastguard Worker     sei_mdcv_params_t s_sei_mdcv_params;
2096*495ae853SAndroid Build Coastguard Worker 
2097*495ae853SAndroid Build Coastguard Worker     /**
2098*495ae853SAndroid Build Coastguard Worker      * content light level info present flag
2099*495ae853SAndroid Build Coastguard Worker      */
2100*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sei_cll_params_present_flag;
2101*495ae853SAndroid Build Coastguard Worker 
2102*495ae853SAndroid Build Coastguard Worker     /*
2103*495ae853SAndroid Build Coastguard Worker      * CLL parameters
2104*495ae853SAndroid Build Coastguard Worker      */
2105*495ae853SAndroid Build Coastguard Worker     sei_cll_params_t s_sei_cll_params;
2106*495ae853SAndroid Build Coastguard Worker 
2107*495ae853SAndroid Build Coastguard Worker     /**
2108*495ae853SAndroid Build Coastguard Worker      * ambient viewing environment info present flag
2109*495ae853SAndroid Build Coastguard Worker      */
2110*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sei_ave_params_present_flag;
2111*495ae853SAndroid Build Coastguard Worker 
2112*495ae853SAndroid Build Coastguard Worker     /*
2113*495ae853SAndroid Build Coastguard Worker      * AVE parameters
2114*495ae853SAndroid Build Coastguard Worker      */
2115*495ae853SAndroid Build Coastguard Worker     sei_ave_params_t s_sei_ave_params;
2116*495ae853SAndroid Build Coastguard Worker 
2117*495ae853SAndroid Build Coastguard Worker     /**
2118*495ae853SAndroid Build Coastguard Worker      * content color volume info present flag
2119*495ae853SAndroid Build Coastguard Worker      */
2120*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sei_ccv_params_present_flag;
2121*495ae853SAndroid Build Coastguard Worker 
2122*495ae853SAndroid Build Coastguard Worker     /*
2123*495ae853SAndroid Build Coastguard Worker      * CCV parameters
2124*495ae853SAndroid Build Coastguard Worker      */
2125*495ae853SAndroid Build Coastguard Worker     sei_ccv_params_t s_sei_ccv_params;
2126*495ae853SAndroid Build Coastguard Worker 
2127*495ae853SAndroid Build Coastguard Worker     /**
2128*495ae853SAndroid Build Coastguard Worker      * film grain characteristics info present flag
2129*495ae853SAndroid Build Coastguard Worker      */
2130*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sei_fgc_params_present_flag;
2131*495ae853SAndroid Build Coastguard Worker 
2132*495ae853SAndroid Build Coastguard Worker     /*
2133*495ae853SAndroid Build Coastguard Worker      * Film grain parameters
2134*495ae853SAndroid Build Coastguard Worker      */
2135*495ae853SAndroid Build Coastguard Worker     sei_fgc_params_t s_sei_fgc_params;
2136*495ae853SAndroid Build Coastguard Worker 
2137*495ae853SAndroid Build Coastguard Worker     /**
2138*495ae853SAndroid Build Coastguard Worker      * shutter interval info present flag
2139*495ae853SAndroid Build Coastguard Worker      */
2140*495ae853SAndroid Build Coastguard Worker     UWORD8 u1_sei_sii_params_present_flag;
2141*495ae853SAndroid Build Coastguard Worker 
2142*495ae853SAndroid Build Coastguard Worker     /*
2143*495ae853SAndroid Build Coastguard Worker      * Shutter Interval Info parameters
2144*495ae853SAndroid Build Coastguard Worker      */
2145*495ae853SAndroid Build Coastguard Worker     sei_sii_params_t s_sei_sii_params;
2146*495ae853SAndroid Build Coastguard Worker } sei_params_t;
2147*495ae853SAndroid Build Coastguard Worker 
2148*495ae853SAndroid Build Coastguard Worker 
2149*495ae853SAndroid Build Coastguard Worker #endif /* _IH264_STRUCTS_H_ */
2150