blob: d4ec14701dabaa351da03b79f532c8433cc00f09 [file] [log] [blame]
Hamsalekha S8d3d3032015-03-13 21:24:58 +05301/******************************************************************************
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 */
52typedef 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 */
90extern const level_tables_t gas_ih264_lvl_tbl[16];
91
92extern const WORD32 gai4_ih264_levels[];
93extern const WORD32 gai4_ih264_max_luma_pic_size[];
94extern const WORD32 gai4_ih264_max_wd_ht[];
95extern const WORD32 gai4_ih264_min_wd_ht[];
96
97extern intra_mbtype_info_t gas_ih264_i_mbtype_info[];
98extern inter_mbtype_info_t gas_ih264_p_mbtype_info[];
99extern inter_mbtype_info_t gas_ih264_b_mbtype_info[];
100extern submbtype_info_t gas_ih264_p_submbtype_info[];
101extern submbtype_info_t gas_ih264_b_submbtype_info[];
102
103
104extern const UWORD8 gau1_ih264_inv_scan_prog4x4[];
105extern const UWORD8 gau1_ih264_inv_scan_int4x4[];
106extern const UWORD8 gau1_ih264_inv_scan_prog8x8_cavlc[64];
107extern const UWORD8 gau1_ih264_inv_scan_int8x8_cavlc[64];
108extern const UWORD8 gau1_ih264_inv_scan_prog8x8_cabac[64];
109extern const UWORD8 gau1_ih264_inv_scan_int8x8_cabac[64];
110
Martin Storsjo91d27832015-06-23 15:09:31 +0300111extern const UWORD8 *const gpau1_ih264_inv_scan8x8[];
112extern const UWORD8 *const gpau1_ih264_inv_scan4x4[];
Hamsalekha S8d3d3032015-03-13 21:24:58 +0530113
114extern const UWORD8 gau1_ih264_8x8_subblk_idx[];
115
116extern const UWORD8 gau1_ih264_chroma_qp[];
117
118extern const UWORD8 gau1_ih264_4x4_ngbr_avbl[16][16];
119extern const UWORD8 gau1_ih264_8x8_ngbr_avbl[16][4];
120
121
122extern const UWORD16 gau2_ih264_default_inter4x4_weight_scale[];
123extern const UWORD16 gau2_ih264_default_intra4x4_weight_scale[];
124extern const UWORD16 gau2_ih264_default_intra4x4_scaling_list[];
125extern const UWORD16 gau2_ih264_default_inter4x4_scaling_list[];
126extern const UWORD16 gau2_ih264_default_intra8x8_scaling_list[];
127extern const UWORD16 gau2_ih264_default_inter8x8_scaling_list[];
128extern const UWORD16 gau2_ih264_default_intra8x8_weight_scale[];
129extern const UWORD16 gau2_ih264_default_inter8x8_weight_scale[];
130extern const UWORD16 gau2_ih264_flat_4x4_weight_scale[];
131extern const UWORD16 gau2_ih264_flat_8x8_weight_scale[];
132
133extern const UWORD16 gau2_ih264_iquant_scale_matrix_4x4 [96];
134extern const UWORD16 gau2_ih264_iquant_scale_matrix_8x8 [384];
135
136#endif /*_IH264_COMMON_TABLES_H_*/