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 /*!
     21  ***************************************************************************
     22  * \file ih264d_parse_mb_header.h
     23  *
     24  * \brief
     25  *    This file contains context identifier decoding routines.
     26  *
     27  * \date
     28  *    04/02/2003
     29  *
     30  * \author  NS
     31  ***************************************************************************
     32  */
     33 #ifndef _IH264D_PARSE_MB_HEADER_H_
     34 #define _IH264D_PARSE_MB_HEADER_H_
     35 
     36 #include "ih264_typedefs.h"
     37 #include "ih264_macros.h"
     38 #include "ih264_platform_macros.h"
     39 #include "ih264d_structs.h"
     40 #include "ih264d_cabac.h"
     41 
     42 WORD32 ih264d_read_intra_pred_modes_cabac(dec_struct_t * ps_dec,
     43                                           UWORD8 * pu1_prev_intra4x4_pred_mode_flag,
     44                                           UWORD8 * pu1_rem_intra4x4_pred_mode,
     45                                           UWORD8 u1_tran_form8x8);
     46 
     47 UWORD32 ih264d_parse_mb_type_cabac(struct _DecStruct * ps_dec);
     48 UWORD8 ih264d_parse_mb_type_intra_cabac(UWORD8 u1_inter,
     49                                         struct _DecStruct * ps_dec);
     50 
     51 UWORD32 ih264d_parse_submb_type_cabac(const UWORD8 u1_slc_type_p,
     52                                       decoding_envirnoment_t * ps_cab_env,
     53                                       dec_bit_stream_t * ps_bitstrm,
     54                                       bin_ctxt_model_t * ps_sub_mb_cxt);
     55 WORD32 ih264d_parse_ref_idx_cabac(const UWORD8 u1_num_part,
     56                                 const UWORD8 u1_b2,
     57                                 const UWORD8 u1_max_ref_minus1,
     58                                 const UWORD8 u1_mb_mode,
     59                                 WORD8 * pi1_ref_idx,
     60                                 WORD8 * const pi1_lft_cxt,
     61                                 WORD8 * const pi1_top_cxt,
     62                                 decoding_envirnoment_t * const ps_cab_env,
     63                                 dec_bit_stream_t * const ps_bitstrm,
     64                                 bin_ctxt_model_t * const ps_ref_cxt);
     65 
     66 WORD32 ih264d_parse_mb_qp_delta_cabac(struct _DecStruct * ps_dec,
     67                                       WORD8 *pi1_mb_qp_delta);
     68 WORD8 ih264d_parse_chroma_pred_mode_cabac(struct _DecStruct * ps_dec);
     69 
     70 UWORD32 ih264d_parse_ctx_cbp_cabac(struct _DecStruct * ps_dec);
     71 
     72 UWORD8 ih264d_parse_transform8x8flag_cabac(struct _DecStruct * ps_dec,
     73                                            dec_mb_info_t * ps_cur_mb_info);
     74 
     75 void ih264d_get_mvd_cabac(UWORD8 u1_sub_mb,
     76                           UWORD8 u1_b2,
     77                           UWORD8 u1_part_wd,
     78                           UWORD8 u1_part_ht,
     79                           UWORD8 u1_dec_mvd,
     80                           dec_struct_t *ps_dec,
     81                           mv_pred_t *ps_mv);
     82 
     83 WORD16 ih264d_parse_mvd_cabac(dec_bit_stream_t * ps_bitstrm,
     84                               decoding_envirnoment_t * ps_cab_env,
     85                               bin_ctxt_model_t * p_ctxt_mvd,
     86                               UWORD32 temp);
     87 
     88 #endif /* _IH264D_PARSE_MB_HEADER_H_ */
     89