ih264d_deblocking.h revision cd9e51fc2b6091aa344363ee8a4f881e938ff80c
1/****************************************************************************** 2 * 3 * Copyright (C) 2015 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#ifndef _IH264D_DEBLOCKING_H_ 21#define _IH264D_DEBLOCKING_H_ 22/*! 23 ************************************************************************** 24 * \file ih264d_deblocking.h 25 * 26 * \brief 27 * Declarations of deblocking functions 28 * 29 * \date 30 * 23/11/2002 31 * 32 * \author AI 33 ************************************************************************** 34 */ 35#include "ih264_typedefs.h" 36#include "ih264_macros.h" 37#include "ih264_platform_macros.h" 38#include "ih264d_structs.h" 39 40WORD8 ih264d_set_deblocking_parameters(deblk_mb_t * ps_cur_deblk_mb, 41 dec_slice_params_t * ps_slice, 42 UWORD8 u1_mb_ngbr_availablity, 43 UWORD8 u1_mb_field_decoding_flag); 44 45void FilterBoundaryLeft(tfr_ctxt_t * const ps_tfr_cxt, 46 const WORD8 i1_cb_qp_idx_ofst, 47 const WORD8 i1_cr_qp_idx_ofst, 48 deblk_mb_t * const ps_cur_mb, 49 UWORD16 u2_strd_y, 50 UWORD16 u2_strd_uv, 51 deblk_mb_t * const ps_left_mb, 52 const UWORD32 pu4_bs_tab[], 53 const UWORD8 u1_cur_fld); 54void FilterBoundaryTop(tfr_ctxt_t * const ps_tfr_cxt, 55 const WORD8 i1_cb_qp_idx_ofst, 56 const WORD8 i1_cr_qp_idx_ofst, 57 deblk_mb_t * const ps_cur_mb, 58 const UWORD16 u2_strd_y, 59 const UWORD16 u2_strd_uv, 60 deblk_mb_t * const ps_top_mb, 61 const UWORD32 u4_bs); 62void deblock_mb(tfr_ctxt_t * const ps_tfr_cxt, 63 const WORD8 i1_cb_qp_idx_ofst, 64 const WORD8 i1_cr_qp_idx_ofst, 65 deblk_mb_t * const ps_cur_mb, 66 WORD32 i4_strd_y, 67 WORD32 i4_strd_uv, 68 deblk_mb_t * const ps_top_mb, 69 deblk_mb_t * const ps_left_mb, 70 const UWORD8 u1_cur_fld, 71 const UWORD8 u1_extra_top_edge); 72void ih264d_deblock_mb_mbaff(dec_struct_t *ps_dec, 73 tfr_ctxt_t * const ps_tfr_cxt, 74 const WORD8 i1_cb_qp_idx_ofst, 75 const WORD8 i1_cr_qp_idx_ofst, 76 deblk_mb_t * const ps_cur_mb, 77 WORD32 i4_strd_y, 78 WORD32 i4_strd_uv, 79 deblk_mb_t * const ps_top_mb, 80 deblk_mb_t * const ps_left_mb, 81 const UWORD8 u1_cur_fld, 82 const UWORD8 u1_extra_top_edge); 83 84void ih264d_deblock_picture_mbaff(dec_struct_t * const ps_dec); 85 86void ih264d_deblock_picture_non_mbaff(dec_struct_t * const ps_dec); 87 88void ih264d_deblock_picture_progressive(dec_struct_t * const ps_dec); 89 90void ih264d_compute_bs_mbaff(dec_struct_t * ps_dec, 91 dec_mb_info_t * ps_cur_mb_info, 92 const UWORD16 u2_mbxn_mb); 93void ih264d_compute_bs_non_mbaff(dec_struct_t * ps_dec, 94 dec_mb_info_t * ps_cur_mb_info, 95 const UWORD16 u2_mbxn_mb); 96 97void ih264d_fill_bs_mbedge_2(dec_struct_t * ps_dec, 98 dec_mb_info_t * ps_cur_mb_info, 99 const UWORD16 u2_mbxn_mb); 100 101void ih264d_fill_bs_mbedge_4(dec_struct_t * ps_dec, 102 dec_mb_info_t * ps_cur_mb_info, 103 const UWORD16 u2_mbxn_mb); 104 105void ih264d_fill_bs1_16x16mb_pslice(mv_pred_t *ps_cur_mv_pred, 106 mv_pred_t *ps_top_mv_pred, 107 void **ppv_map_ref_idx_to_poc, 108 UWORD32 *pu4_bs_table, 109 mv_pred_t *ps_leftmost_mv_pred, 110 neighbouradd_t *ps_left_addr, 111 void **u4_pic_addrress, 112 WORD32 i4_ver_mvlimit); 113 114void ih264d_fill_bs1_non16x16mb_pslice(mv_pred_t *ps_cur_mv_pred, 115 mv_pred_t *ps_top_mv_pred, 116 void **ppv_map_ref_idx_to_poc, 117 UWORD32 *pu4_bs_table, 118 mv_pred_t *ps_leftmost_mv_pred, 119 neighbouradd_t *ps_left_addr, 120 void **u4_pic_addrress, 121 WORD32 i4_ver_mvlimit); 122 123void ih264d_fill_bs1_16x16mb_bslice(mv_pred_t *ps_cur_mv_pred, 124 mv_pred_t *ps_top_mv_pred, 125 void **ppv_map_ref_idx_to_poc, 126 UWORD32 *pu4_bs_table, 127 mv_pred_t *ps_leftmost_mv_pred, 128 neighbouradd_t *ps_left_addr, 129 void **u4_pic_addrress, 130 WORD32 i4_ver_mvlimit); 131 132void ih264d_fill_bs1_non16x16mb_bslice(mv_pred_t *ps_cur_mv_pred, 133 mv_pred_t *ps_top_mv_pred, 134 void **ppv_map_ref_idx_to_poc, 135 UWORD32 *pu4_bs_table, 136 mv_pred_t *ps_leftmost_mv_pred, 137 neighbouradd_t *ps_left_addr, 138 void **u4_pic_addrress, 139 WORD32 i4_ver_mvlimit); 140 141void ih264d_fill_bs_xtra_left_edge_cur_fld(UWORD32 *pu4_bs, 142 WORD32 u4_left_mb_t_csbp, 143 WORD32 u4_left_mb_b_csbp, 144 WORD32 u4_cur_mb_csbp, 145 UWORD32 u4_cur_mb_top); 146 147void ih264d_fill_bs_xtra_left_edge_cur_frm(UWORD32 *pu4_bs, 148 WORD32 u4_left_mb_t_csbp, 149 WORD32 u4_left_mb_b_csbp, 150 WORD32 u4_cur_mb_csbp, 151 UWORD32 u4_cur_mb_top); 152 153void ih264d_deblock_mb_nonmbaff(dec_struct_t *ps_dec, 154 tfr_ctxt_t * const ps_tfr_cxt, 155 const WORD8 i1_cb_qp_idx_ofst, 156 const WORD8 i1_cr_qp_idx_ofst, 157 deblk_mb_t * const ps_cur_mb, 158 WORD32 i4_strd_y, 159 WORD32 i4_strd_uv, 160 deblk_mb_t * const ps_top_mb, 161 deblk_mb_t * const ps_left_mb); 162 163void ih264d_init_deblk_tfr_ctxt(dec_struct_t * ps_dec, 164 pad_mgr_t *ps_pad_mgr, 165 tfr_ctxt_t *ps_tfr_cxt, 166 UWORD16 u2_image_wd_mb, 167 UWORD8 u1_mbaff); 168 169void ih264d_deblock_mb_level(dec_struct_t *ps_dec, 170 dec_mb_info_t *ps_cur_mb_info, 171 UWORD32 nmb_index); 172 173#endif /* _IH264D_DEBLOCKING_H_ */ 174