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 23 * ih264_common_tables.h 24 * 25 * @brief 26 * Common tables 27 * 28 * @author 29 * Harish 30 * 31 * @par List of Functions: 32 * 33 * @remarks 34 * None 35 * 36 ******************************************************************************* 37 */ 38 39 #ifndef _IH264_COMMON_TABLES_H_ 40 #define _IH264_COMMON_TABLES_H_ 41 42 43 /*****************************************************************************/ 44 /* Structures */ 45 /*****************************************************************************/ 46 47 /** 48 ****************************************************************************** 49 * @brief level tables 50 ****************************************************************************** 51 */ 52 typedef struct 53 { 54 /* level */ 55 IH264_LEVEL_T u4_level_idc; 56 57 /* max macroblock processing rate */ 58 UWORD32 u4_max_mbps; 59 60 /* max frame size in mbs */ 61 UWORD32 u4_max_fs; 62 63 /* max dpb size / 768 */ 64 UWORD32 u4_max_dpb_size; 65 66 /* max bit rate */ 67 UWORD32 u4_max_br; 68 69 /* max cpb size */ 70 UWORD32 u4_max_cpb_size; 71 72 /* max vertical MV component range */ 73 UWORD32 u4_max_mv_y; 74 75 }level_tables_t; 76 77 /*****************************************************************************/ 78 /* Extern global declarations */ 79 /*****************************************************************************/ 80 81 /** 82 ****************************************************************************** 83 * @brief while encoding, basing on the input configuration parameters, the 84 * the level of the bitstream is computed basing on the table below. 85 * input : table_idx 86 * output : level_idc or cpb size 87 * @remarks Table A-1 level table limits 88 ****************************************************************************** 89 */ 90 extern const level_tables_t gas_ih264_lvl_tbl[16]; 91 92 extern const WORD32 gai4_ih264_levels[]; 93 extern const WORD32 gai4_ih264_max_luma_pic_size[]; 94 extern const WORD32 gai4_ih264_max_wd_ht[]; 95 extern const WORD32 gai4_ih264_min_wd_ht[]; 96 97 extern intra_mbtype_info_t gas_ih264_i_mbtype_info[]; 98 extern inter_mbtype_info_t gas_ih264_p_mbtype_info[]; 99 extern inter_mbtype_info_t gas_ih264_b_mbtype_info[]; 100 extern submbtype_info_t gas_ih264_p_submbtype_info[]; 101 extern submbtype_info_t gas_ih264_b_submbtype_info[]; 102 103 104 extern const UWORD8 gau1_ih264_inv_scan_prog4x4[]; 105 extern const UWORD8 gau1_ih264_inv_scan_int4x4[]; 106 extern const UWORD8 gau1_ih264_inv_scan_prog8x8_cavlc[64]; 107 extern const UWORD8 gau1_ih264_inv_scan_int8x8_cavlc[64]; 108 extern const UWORD8 gau1_ih264_inv_scan_prog8x8_cabac[64]; 109 extern const UWORD8 gau1_ih264_inv_scan_int8x8_cabac[64]; 110 111 extern const UWORD8 *const gpau1_ih264_inv_scan8x8[]; 112 extern const UWORD8 *const gpau1_ih264_inv_scan4x4[]; 113 114 extern const UWORD8 gau1_ih264_8x8_subblk_idx[]; 115 116 extern const UWORD8 gau1_ih264_chroma_qp[]; 117 118 extern const UWORD8 gau1_ih264_4x4_ngbr_avbl[16][16]; 119 extern const UWORD8 gau1_ih264_8x8_ngbr_avbl[16][4]; 120 121 122 extern const UWORD16 gau2_ih264_default_inter4x4_weight_scale[]; 123 extern const UWORD16 gau2_ih264_default_intra4x4_weight_scale[]; 124 extern const UWORD16 gau2_ih264_default_intra4x4_scaling_list[]; 125 extern const UWORD16 gau2_ih264_default_inter4x4_scaling_list[]; 126 extern const UWORD16 gau2_ih264_default_intra8x8_scaling_list[]; 127 extern const UWORD16 gau2_ih264_default_inter8x8_scaling_list[]; 128 extern const UWORD16 gau2_ih264_default_intra8x8_weight_scale[]; 129 extern const UWORD16 gau2_ih264_default_inter8x8_weight_scale[]; 130 extern const UWORD16 gau2_ih264_flat_4x4_weight_scale[]; 131 extern const UWORD16 gau2_ih264_flat_8x8_weight_scale[]; 132 133 extern const UWORD16 gau2_ih264_iquant_scale_matrix_4x4 [96]; 134 extern const UWORD16 gau2_ih264_iquant_scale_matrix_8x8 [384]; 135 136 #endif /*_IH264_COMMON_TABLES_H_*/ 137