xref: /aosp_15_r20/external/libavc/decoder/svc/isvcd_process_epslice.h (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
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_process_epslice.h
24  *
25  * @brief
26  *  Contains declarations of routines that decode an EP slice type
27  *
28  * @author
29  *  Kishore
30  *
31  * @remarks
32  *  None
33  *
34  *******************************************************************************
35  */
36 
37 #ifndef _ISVCD_PROCESS_EPSLICE_H_
38 #define _ISVCD_PROCESS_EPSLICE_H_
39 
40 #include "ih264_typedefs.h"
41 #include "ih264_macros.h"
42 #include "ih264_platform_macros.h"
43 #include "isvcd_structs.h"
44 
45 WORD32 isvcd_parse_epslice(svc_dec_lyr_struct_t *ps_svc_lyr_dec, UWORD16 u2_first_mb_in_slice);
46 
47 WORD32 isvcd_parse_pmb_cabac(svc_dec_lyr_struct_t *ps_svc_lyr_dec, dec_mb_info_t *ps_cur_mb_info,
48                              dec_svc_mb_info_t *ps_svc_cur_mb_info, UWORD8 u1_mb_num,
49                              UWORD8 u1_num_mbsNby2);
50 
51 WORD32 isvcd_parse_pmb_cavlc(svc_dec_lyr_struct_t *ps_svc_lyr_dec, dec_mb_info_t *ps_cur_mb_info,
52                              dec_svc_mb_info_t *ps_svc_cur_mb_info, UWORD8 u1_mb_num,
53                              UWORD8 u1_num_mbsNby2);
54 WORD32 isvcd_process_ibl_mb(svc_dec_lyr_struct_t *ps_svc_lyr_dec, dec_mb_info_t *ps_cur_mb_info,
55                             UWORD8 u1_mb_num, UWORD8 u1_inter_intra_mode);
56 
57 WORD32 isvcd_process_residual_resample_mb(svc_dec_lyr_struct_t *ps_svc_lyr_dec,
58                                           dec_mb_info_t *ps_cur_mb_info);
59 
60 WORD32 isvcd_process_inter_mb_no_rsd_pred_non_target(svc_dec_lyr_struct_t *ps_svc_lyr_dec,
61                                                      dec_mb_info_t *ps_cur_mb_info,
62                                                      UWORD8 u1_inference_mode);
63 
64 WORD32 isvcd_process_inter_mb_rsd_pred_non_target(svc_dec_lyr_struct_t *ps_svc_lyr_dec,
65                                                   dec_mb_info_t *ps_cur_mb_info,
66                                                   UWORD8 u1_inference_mode,
67                                                   UWORD16 *pu2_res_luma_csbp);
68 
69 WORD32 isvcd_process_inter_mb_rsd_pred_target_lyr(svc_dec_lyr_struct_t *ps_svc_lyr_dec,
70                                                   dec_mb_info_t *ps_cur_mb_info, UWORD8 u1_mb_num,
71                                                   UWORD8 u1_inference_mode,
72                                                   UWORD16 *pu2_res_luma_csbp);
73 
74 WORD32 isvcd_mv_pred_ref_tfr_nby2_epmb(dec_struct_t *ps_dec, UWORD8 u1_num_mbs,
75                                        UWORD8 u1_num_mbsNby2);
76 
77 WORD32 isvcd_decode_recon_tfr_nmb_non_base_lyr(svc_dec_lyr_struct_t *ps_svc_lyr_dec,
78                                                UWORD8 u1_mb_idx, UWORD8 u1_num_mbs,
79                                                UWORD8 u1_num_mbs_next, UWORD8 u1_tfr_n_mb,
80                                                UWORD8 u1_end_of_row);
81 WORD32 isvcd_decode_recon_tfr_nmb_base_lyr(svc_dec_lyr_struct_t *ps_svc_lyr_dec, UWORD8 u1_mb_idx,
82                                            UWORD8 u1_num_mbs, UWORD8 u1_num_mbs_next,
83                                            UWORD8 u1_tfr_n_mb, UWORD8 u1_end_of_row);
84 void isvcd_retrive_infer_mode_mv(svc_dec_lyr_struct_t *ps_svc_lyr_dec, mv_pred_t *ps_mvpred,
85                                  UWORD8 u1_lx, UWORD8 u1_sub_mb_num);
86 
87 void isvcd_update_intra_mb_inter_layer_info(svc_dec_lyr_struct_t *ps_svc_lyr_dec,
88                                             dec_mb_info_t *ps_cur_mb_info);
89 
90 void isvcd_update_ipcm_mb_inter_layer_info(svc_dec_lyr_struct_t *ps_svc_lyr_dec,
91                                            dec_mb_info_t *ps_cur_mb_info);
92 
93 void isvcd_update_ibl_mb_inter_layer_info(svc_dec_lyr_struct_t *ps_svc_lyr_dec,
94                                           dec_mb_info_t *ps_cur_mb_info);
95 void isvcd_update_inter_mb_inter_layer_info(svc_dec_lyr_struct_t *ps_svc_lyr_dec,
96                                             dec_mb_info_t *ps_cur_mb_info,
97                                             UWORD8 u1_inference_mode);
98 void isvcd_ii_pred_mb(void *pv_svc_dec, dec_mb_info_t *ps_cur_mb_info);
99 
100 WORD32 isvcd_mark_err_slice_skip(svc_dec_lyr_struct_t *ps_svc_lyr_dec, WORD32 num_mb_skip,
101                                  UWORD8 u1_is_idr_slice, UWORD16 u2_frame_num,
102                                  pocstruct_t *ps_cur_poc, WORD32 prev_slice_err);
103 
104 void isvcd_one_to_one(svc_dec_lyr_struct_t *ps_svc_lyr_dec, struct pic_buffer_t *ps_col_pic,
105                       directmv_t *ps_direct, UWORD8 u1_wd_x, WORD32 u2_sub_mb_ofst,
106                       dec_mb_info_t *ps_cur_mb_info);
107 
108 WORD32 isvcd_process_ii_mb(svc_dec_lyr_struct_t *ps_svc_lyr_dec, dec_mb_info_t *ps_cur_mb_info,
109                            dec_svc_mb_info_t *ps_svc_cur_mb_info, UWORD8 u1_mb_num);
110 #endif /* _ISVCD_PROCESS_EPSLICE_H_ */