1*495ae853SAndroid Build Coastguard Worker /****************************************************************************** 2*495ae853SAndroid Build Coastguard Worker * 3*495ae853SAndroid Build Coastguard Worker * Copyright (C) 2022 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 * @file 23*495ae853SAndroid Build Coastguard Worker * isvcd_ii_pred.h 24*495ae853SAndroid Build Coastguard Worker * 25*495ae853SAndroid Build Coastguard Worker * @brief 26*495ae853SAndroid Build Coastguard Worker * Contains structures and function definitions required for SVC resampling 27*495ae853SAndroid Build Coastguard Worker * 28*495ae853SAndroid Build Coastguard Worker * @author 29*495ae853SAndroid Build Coastguard Worker * Kishore 30*495ae853SAndroid Build Coastguard Worker * 31*495ae853SAndroid Build Coastguard Worker * @remarks 32*495ae853SAndroid Build Coastguard Worker * None 33*495ae853SAndroid Build Coastguard Worker * 34*495ae853SAndroid Build Coastguard Worker ******************************************************************************* 35*495ae853SAndroid Build Coastguard Worker */ 36*495ae853SAndroid Build Coastguard Worker 37*495ae853SAndroid Build Coastguard Worker #ifndef _ISVCD_II_PRED_H_ 38*495ae853SAndroid Build Coastguard Worker #define _ISVCD_II_PRED_H_ 39*495ae853SAndroid Build Coastguard Worker 40*495ae853SAndroid Build Coastguard Worker typedef struct 41*495ae853SAndroid Build Coastguard Worker { 42*495ae853SAndroid Build Coastguard Worker /* Figure shows the projection of current MB onto reference layer 43*495ae853SAndroid Build Coastguard Worker mapping to a certain case 44*495ae853SAndroid Build Coastguard Worker 45*495ae853SAndroid Build Coastguard Worker MB_WIDTH 46*495ae853SAndroid Build Coastguard Worker <---------------------------> 47*495ae853SAndroid Build Coastguard Worker --------------------------- ^ 48*495ae853SAndroid Build Coastguard Worker | | | | 49*495ae853SAndroid Build Coastguard Worker | TOP_L | TOP_R | | 50*495ae853SAndroid Build Coastguard Worker | | | | 51*495ae853SAndroid Build Coastguard Worker | | | | 52*495ae853SAndroid Build Coastguard Worker | | | | 53*495ae853SAndroid Build Coastguard Worker | (x,y) | | | MB_HEIGHT 54*495ae853SAndroid Build Coastguard Worker |---------------------------| | 55*495ae853SAndroid Build Coastguard Worker | | | | 56*495ae853SAndroid Build Coastguard Worker | | | | 57*495ae853SAndroid Build Coastguard Worker | BOT_L | BOT_R | | 58*495ae853SAndroid Build Coastguard Worker | | | | 59*495ae853SAndroid Build Coastguard Worker --------------------------- | 60*495ae853SAndroid Build Coastguard Worker ^ 61*495ae853SAndroid Build Coastguard Worker */ 62*495ae853SAndroid Build Coastguard Worker 63*495ae853SAndroid Build Coastguard Worker UWORD8 u1_top_left_intra_flag; /*!< flag to inidicate the TOP_L 64*495ae853SAndroid Build Coastguard Worker partition is falling in to a INTRA region 65*495ae853SAndroid Build Coastguard Worker in base layer 66*495ae853SAndroid Build Coastguard Worker */ 67*495ae853SAndroid Build Coastguard Worker UWORD8 u1_top_rt_intra_flag; /*!< flag to inidicate the TOP_R 68*495ae853SAndroid Build Coastguard Worker partition is falling in to a INTRA region 69*495ae853SAndroid Build Coastguard Worker in base layer 70*495ae853SAndroid Build Coastguard Worker */ 71*495ae853SAndroid Build Coastguard Worker UWORD8 u1_bot_rt_intra_flag; /*!< flag to inidicate the BOT_R 72*495ae853SAndroid Build Coastguard Worker partition is falling in to a INTRA region 73*495ae853SAndroid Build Coastguard Worker in base layer 74*495ae853SAndroid Build Coastguard Worker */ 75*495ae853SAndroid Build Coastguard Worker UWORD8 u1_bot_left_intra_flag; /*!< flag to inidicate the BOT_L 76*495ae853SAndroid Build Coastguard Worker partition is falling in to a INTRA region 77*495ae853SAndroid Build Coastguard Worker in base layer 78*495ae853SAndroid Build Coastguard Worker */ 79*495ae853SAndroid Build Coastguard Worker UWORD8 u1_intersection_x; /*!< Horizontal point where the projection 80*495ae853SAndroid Build Coastguard Worker falls into a different MB in reference 81*495ae853SAndroid Build Coastguard Worker layer 82*495ae853SAndroid Build Coastguard Worker */ 83*495ae853SAndroid Build Coastguard Worker UWORD8 u1_intersection_y; /*!< Vertical point where the projection 84*495ae853SAndroid Build Coastguard Worker falls into a different MB in reference 85*495ae853SAndroid Build Coastguard Worker layer 86*495ae853SAndroid Build Coastguard Worker */ 87*495ae853SAndroid Build Coastguard Worker } intra_inter_mb_t; 88*495ae853SAndroid Build Coastguard Worker 89*495ae853SAndroid Build Coastguard Worker typedef struct 90*495ae853SAndroid Build Coastguard Worker { 91*495ae853SAndroid Build Coastguard Worker WORD16 *pi2_ref_loc_x; /*!< buffer pointer which holds 92*495ae853SAndroid Build Coastguard Worker the projected location on reference 93*495ae853SAndroid Build Coastguard Worker layer in horizontal direction 94*495ae853SAndroid Build Coastguard Worker for each pixel in current layer 95*495ae853SAndroid Build Coastguard Worker */ 96*495ae853SAndroid Build Coastguard Worker WORD16 *pi2_ref_loc_y; /*!< buffer pointer which holds 97*495ae853SAndroid Build Coastguard Worker the projected location on reference 98*495ae853SAndroid Build Coastguard Worker layer in vertical direction 99*495ae853SAndroid Build Coastguard Worker for each pixel in current layer 100*495ae853SAndroid Build Coastguard Worker */ 101*495ae853SAndroid Build Coastguard Worker intra_inter_mb_t s_intra_inter_mb_prms; /*!< array structure 102*495ae853SAndroid Build Coastguard Worker to hold the intersection points 103*495ae853SAndroid Build Coastguard Worker and the intra status for the 104*495ae853SAndroid Build Coastguard Worker all 4 parts around the 105*495ae853SAndroid Build Coastguard Worker intersection point 106*495ae853SAndroid Build Coastguard Worker */ 107*495ae853SAndroid Build Coastguard Worker WORD32 i4_ref_res_lyr_wd; /*!< Width of reference layer */ 108*495ae853SAndroid Build Coastguard Worker WORD32 i4_ref_res_lyr_ht; /*!< Height of reference layer */ 109*495ae853SAndroid Build Coastguard Worker WORD32 i4_cur_res_lyr_wd; /*!< Width of reference layer */ 110*495ae853SAndroid Build Coastguard Worker WORD32 i4_cur_res_lyr_ht; /*!< Height of reference layer */ 111*495ae853SAndroid Build Coastguard Worker 112*495ae853SAndroid Build Coastguard Worker } intra_inter_pred_ctxt_t; 113*495ae853SAndroid Build Coastguard Worker 114*495ae853SAndroid Build Coastguard Worker typedef struct 115*495ae853SAndroid Build Coastguard Worker { 116*495ae853SAndroid Build Coastguard Worker UWORD8 *pu1_recon_luma; 117*495ae853SAndroid Build Coastguard Worker UWORD8 *pu1_mc_pred_luma; 118*495ae853SAndroid Build Coastguard Worker UWORD8 *pu1_intra_pred_luma; 119*495ae853SAndroid Build Coastguard Worker WORD16 *pi2_res_luma; 120*495ae853SAndroid Build Coastguard Worker WORD32 i4_recon_luma_stride; 121*495ae853SAndroid Build Coastguard Worker WORD32 i4_mc_pred_luma_stride; 122*495ae853SAndroid Build Coastguard Worker WORD32 i4_intra_pred_luma_stride; 123*495ae853SAndroid Build Coastguard Worker WORD32 i4_res_luma_stride; 124*495ae853SAndroid Build Coastguard Worker UWORD8 *pu1_recon_chroma; 125*495ae853SAndroid Build Coastguard Worker UWORD8 *pu1_mc_pred_chroma; 126*495ae853SAndroid Build Coastguard Worker UWORD8 *pu1_intra_pred_chroma; 127*495ae853SAndroid Build Coastguard Worker WORD16 *pi2_res_chroma; 128*495ae853SAndroid Build Coastguard Worker WORD32 i4_recon_chroma_stride; 129*495ae853SAndroid Build Coastguard Worker WORD32 i4_mc_pred_chroma_stride; 130*495ae853SAndroid Build Coastguard Worker WORD32 i4_intra_pred_chroma_stride; 131*495ae853SAndroid Build Coastguard Worker WORD32 i4_res_chroma_stride; 132*495ae853SAndroid Build Coastguard Worker } intra_inter_mb_buff_t; 133*495ae853SAndroid Build Coastguard Worker 134*495ae853SAndroid Build Coastguard Worker WORD32 isvcd_ii_pred_compute_flags_mb(void *pv_ii_pred_ctxt, mem_element_t *ps_ref_mb_mode, 135*495ae853SAndroid Build Coastguard Worker mb_coord_t *ps_coord, void *pv_mb_prms, void *pv_svc_mb_prms, 136*495ae853SAndroid Build Coastguard Worker UWORD8 *pu1_ii_mb_mode); 137*495ae853SAndroid Build Coastguard Worker 138*495ae853SAndroid Build Coastguard Worker WORD32 isvcd_ii_pred_res_init(void *pv_svc_dec); 139*495ae853SAndroid Build Coastguard Worker #endif /* _ISVCD_II_PRED_H_ */ 140