• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright (C) 2022 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19  */
20 /**
21  *******************************************************************************
22  * @file
23  *  isvcd_ii_pred.h
24  *
25  * @brief
26  *  Contains structures and function definitions required for SVC resampling
27  *
28  * @author
29  *  Kishore
30  *
31  * @remarks
32  *  None
33  *
34  *******************************************************************************
35  */
36 
37 #ifndef _ISVCD_II_PRED_H_
38 #define _ISVCD_II_PRED_H_
39 
40 typedef struct
41 {
42     /*  Figure shows the projection of current MB onto reference layer
43         mapping to a certain case
44 
45                   MB_WIDTH
46        <--------------------------->
47         ---------------------------   ^
48        |                |          |  |
49        |  TOP_L         |  TOP_R   |  |
50        |                |          |  |
51        |                |          |  |
52        |                |          |  |
53        |          (x,y) |          |  | MB_HEIGHT
54        |---------------------------|  |
55        |                |          |  |
56        |                |          |  |
57        |   BOT_L        |   BOT_R  |  |
58        |                |          |  |
59         ---------------------------   |
60                                       ^
61     */
62 
63     UWORD8 u1_top_left_intra_flag; /*!< flag to  inidicate the TOP_L
64                                        partition is falling in to a INTRA region
65                                        in base layer
66                                     */
67     UWORD8 u1_top_rt_intra_flag;   /*!< flag to  inidicate the TOP_R
68                                       partition is falling in to a INTRA region
69                                       in base layer
70                                    */
71     UWORD8 u1_bot_rt_intra_flag;   /*!< flag to  inidicate the BOT_R
72                                       partition is falling in to a INTRA region
73                                       in base layer
74                                    */
75     UWORD8 u1_bot_left_intra_flag; /*!< flag to  inidicate the BOT_L
76                                       partition is falling in to a INTRA region
77                                       in base layer
78                                    */
79     UWORD8 u1_intersection_x;      /*!< Horizontal point where the projection
80                                         falls into a different MB in reference
81                                         layer
82                                     */
83     UWORD8 u1_intersection_y;      /*!< Vertical point where the projection
84                                         falls into a different MB in reference
85                                         layer
86                                     */
87 } intra_inter_mb_t;
88 
89 typedef struct
90 {
91     WORD16 *pi2_ref_loc_x;                  /*!< buffer pointer which holds
92                                                the projected location on reference
93                                                layer in horizontal direction
94                                                for each pixel in current layer
95                                              */
96     WORD16 *pi2_ref_loc_y;                  /*!< buffer pointer which holds
97                                               the projected location on reference
98                                               layer in vertical direction
99                                               for each pixel in current layer
100                                             */
101     intra_inter_mb_t s_intra_inter_mb_prms; /*!< array structure
102                                        to hold the intersection points
103                                        and the intra status for the
104                                        all 4 parts around the
105                                        intersection point
106                                    */
107     WORD32 i4_ref_res_lyr_wd;               /*!< Width of reference layer */
108     WORD32 i4_ref_res_lyr_ht;               /*!< Height of reference layer */
109     WORD32 i4_cur_res_lyr_wd;               /*!< Width of reference layer */
110     WORD32 i4_cur_res_lyr_ht;               /*!< Height of reference layer */
111 
112 } intra_inter_pred_ctxt_t;
113 
114 typedef struct
115 {
116     UWORD8 *pu1_recon_luma;
117     UWORD8 *pu1_mc_pred_luma;
118     UWORD8 *pu1_intra_pred_luma;
119     WORD16 *pi2_res_luma;
120     WORD32 i4_recon_luma_stride;
121     WORD32 i4_mc_pred_luma_stride;
122     WORD32 i4_intra_pred_luma_stride;
123     WORD32 i4_res_luma_stride;
124     UWORD8 *pu1_recon_chroma;
125     UWORD8 *pu1_mc_pred_chroma;
126     UWORD8 *pu1_intra_pred_chroma;
127     WORD16 *pi2_res_chroma;
128     WORD32 i4_recon_chroma_stride;
129     WORD32 i4_mc_pred_chroma_stride;
130     WORD32 i4_intra_pred_chroma_stride;
131     WORD32 i4_res_chroma_stride;
132 } intra_inter_mb_buff_t;
133 
134 WORD32 isvcd_ii_pred_compute_flags_mb(void *pv_ii_pred_ctxt, mem_element_t *ps_ref_mb_mode,
135                                       mb_coord_t *ps_coord, void *pv_mb_prms, void *pv_svc_mb_prms,
136                                       UWORD8 *pu1_ii_mb_mode);
137 
138 WORD32 isvcd_ii_pred_res_init(void *pv_svc_dec);
139 #endif /* _ISVCD_II_PRED_H_ */
140