xref: /aosp_15_r20/external/libavc/common/svc/isvc_common_tables.c (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
1 /******************************************************************************
2  *
3  * Copyright (C) 2022 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 *  isvc_common_tables.c
24 *
25 * @brief
26 *  Contains common global tables
27 *
28 * @author
29 *  Harish M
30 *
31 * @par List of Functions:
32 *
33 * @remarks
34 *  None
35 *
36 *******************************************************************************
37 */
38 
39 /*****************************************************************************/
40 /* File Includes                                                             */
41 /*****************************************************************************/
42 
43 /* User include files */
44 #include "ih264_typedefs.h"
45 #include "isvc_defs.h"
46 #include "isvc_macros.h"
47 #include "isvc_structs.h"
48 #include "ih264_common_tables.h"
49 #include "isvc_common_tables.h"
50 
51 /*****************************************************************************/
52 /* Extern global definitions                                                 */
53 /*****************************************************************************/
54 
55 /**
56  ******************************************************************************
57  * @brief  while encoding, basing on the input configuration parameters, the
58  * the level of the bitstream is computed basing on the table below.
59  * input  : table_idx
60  * output : level_idc or cpb size
61  * @remarks Table A-1 � level table limits
62  ******************************************************************************
63  */
64 const level_tables_t gas_isvc_lvl_tbl[16] = {
65     {IH264_LEVEL_10, 1485, 99, 396, 64, 175, 64},
66     {IH264_LEVEL_1B, 1485, 99, 396, 128, 350, 64},
67     {IH264_LEVEL_11, 3000, 396, 900, 192, 500, 128},
68     {IH264_LEVEL_12, 6000, 396, 2376, 384, 1000, 128},
69     {IH264_LEVEL_13, 11880, 396, 2376, 768, 2000, 128},
70     {IH264_LEVEL_20, 11880, 396, 2376, 2000, 2000, 128},
71     {IH264_LEVEL_21, 19800, 792, 4752, 4000, 4000, 256},
72     {IH264_LEVEL_22, 20250, 1620, 8100, 4000, 4000, 256},
73     {IH264_LEVEL_30, 40500, 1620, 8100, 10000, 10000, 256},
74     {IH264_LEVEL_31, 108000, 3600, 18000, 14000, 14000, 512},
75     {IH264_LEVEL_32, 216000, 5120, 20480, 20000, 20000, 512},
76     {IH264_LEVEL_40, 245760, 8192, 32768, 20000, 25000, 512},
77     {IH264_LEVEL_41, 245760, 8192, 32768, 50000, 62500, 512},
78     {IH264_LEVEL_42, 522240, 8704, 34816, 50000, 62500, 512},
79     {IH264_LEVEL_50, 589824, 22080, 110400, 135000, 135000, 512},
80     {IH264_LEVEL_51, 983040, 36864, 184320, 240000, 240000, 512},
81 };
82