Home | History | Annotate | Download | only in decoder
      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_PARSE_BSLICE_H_
     21 #define _IH264D_PARSE_BSLICE_H_
     22 /*!
     23 **************************************************************************
     24 * \file ih264d_process_bslice.h
     25 *
     26 * \brief
     27 *    Contains declarations of routines that decode a B slice type
     28 *
     29 * Detailed_description
     30 *
     31 * \date
     32 *    21/12/2002
     33 *
     34 * \author  NS
     35 **************************************************************************
     36 */
     37 #include "ih264_typedefs.h"
     38 #include "ih264_macros.h"
     39 #include "ih264_platform_macros.h"
     40 #include "ih264d_structs.h"
     41 WORD32 ih264d_parse_bslice(dec_struct_t * ps_dec,
     42                             UWORD16 u2_first_mb_in_slice);
     43 WORD32 ih264d_decode_spatial_direct(dec_struct_t * ps_dec,
     44                                     UWORD8 u1_wd_x,
     45                                     dec_mb_info_t * ps_cur_mb_info,
     46                                     UWORD8 u1_mb_num);
     47 WORD32 ih264d_decode_temporal_direct(dec_struct_t * ps_dec,
     48                                      UWORD8 u1_wd_x,
     49                                      dec_mb_info_t * ps_cur_mb_info,
     50                                      UWORD8 u1_mb_num);
     51 WORD32 parseBSliceData(dec_struct_t * ps_dec,
     52                        dec_slice_params_t * ps_slice,
     53                        UWORD16 u2_first_mb_in_slice);
     54 WORD32 parseBSliceData(dec_struct_t * ps_dec,
     55                        dec_slice_params_t * ps_slice,
     56                        UWORD16 u2_first_mb_in_slice);
     57 
     58 void ih264d_init_ref_idx_lx_b(dec_struct_t *ps_dec);
     59 
     60 void ih264d_convert_frm_to_fld_list(struct pic_buffer_t *ps_ref_pic_buf_lx,
     61                                     UWORD8 *pu1_L0,
     62                                     dec_struct_t *ps_dec,
     63                                     UWORD8 u1_num_short_term_bufs);
     64 
     65 void ih264d_convert_frm_mbaff_list(dec_struct_t *ps_dec);
     66 void ih264d_one_to_one(dec_struct_t *ps_dec,
     67                        struct pic_buffer_t *ps_col_pic,
     68                        directmv_t *ps_direct,
     69                        UWORD8 u1_wd_x,
     70                        WORD32 u2_sub_mb_ofst,
     71                        dec_mb_info_t * ps_cur_mb_info);
     72 void ih264d_mbaff_cross_pmbair(dec_struct_t *ps_dec,
     73                                struct pic_buffer_t *ps_col_pic,
     74                                directmv_t *ps_direct,
     75                                UWORD8 u1_wd_x,
     76                                WORD32 u2_sub_mb_ofst,
     77                                dec_mb_info_t * ps_cur_mb_info);
     78 void ih264d_frm_to_fld(dec_struct_t *ps_dec,
     79                        struct pic_buffer_t *ps_col_pic,
     80                        directmv_t *ps_direct,
     81                        UWORD8 u1_wd_x,
     82                        WORD32 u2_sub_mb_ofst,
     83                        dec_mb_info_t * ps_cur_mb_info);
     84 void ih264d_fld_to_frm(dec_struct_t *ps_dec,
     85                        struct pic_buffer_t *ps_col_pic,
     86                        directmv_t *ps_direct,
     87                        UWORD8 u1_wd_x,
     88                        WORD32 u2_sub_mb_ofst,
     89                        dec_mb_info_t * ps_cur_mb_info);
     90 void ih264d_mbaff_to_fld(dec_struct_t *ps_dec,
     91                          struct pic_buffer_t *ps_col_pic,
     92                          directmv_t *ps_direct,
     93                          UWORD8 u1_wd_x,
     94                          WORD32 u2_sub_mb_ofst,
     95                          dec_mb_info_t * ps_cur_mb_info);
     96 void ih264d_fld_to_mbaff(dec_struct_t *ps_dec,
     97                          struct pic_buffer_t *ps_col_pic,
     98                          directmv_t *ps_direct,
     99                          UWORD8 u1_wd_x,
    100                          WORD32 u2_sub_mb_ofst,
    101                          dec_mb_info_t * ps_cur_mb_info);
    102 WORD32 ih264d_cal_col_pic(dec_struct_t *ps_dec);
    103 
    104 WORD32 ih264d_mv_pred_ref_tfr_nby2_bmb(dec_struct_t * ps_dec,
    105                                      UWORD8 u1_num_mbs,
    106                                      UWORD8 u1_num_mbsNby2);
    107 
    108 #endif /* _IH264D_PARSE_BSLICE_H_ */
    109