xref: /aosp_15_r20/external/libavc/common/svc/isvc_common_tables.c (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
1*495ae853SAndroid Build Coastguard Worker /******************************************************************************
2*495ae853SAndroid Build Coastguard Worker  *
3*495ae853SAndroid Build Coastguard Worker  * Copyright (C) 2022 The Android Open Source Project
4*495ae853SAndroid Build Coastguard Worker  *
5*495ae853SAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
6*495ae853SAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
7*495ae853SAndroid Build Coastguard Worker  * You may obtain a copy of the License at:
8*495ae853SAndroid Build Coastguard Worker  *
9*495ae853SAndroid Build Coastguard Worker  * http://www.apache.org/licenses/LICENSE-2.0
10*495ae853SAndroid Build Coastguard Worker  *
11*495ae853SAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
12*495ae853SAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
13*495ae853SAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*495ae853SAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
15*495ae853SAndroid Build Coastguard Worker  * limitations under the License.
16*495ae853SAndroid Build Coastguard Worker  *
17*495ae853SAndroid Build Coastguard Worker  *****************************************************************************
18*495ae853SAndroid Build Coastguard Worker  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19*495ae853SAndroid Build Coastguard Worker  */
20*495ae853SAndroid Build Coastguard Worker /**
21*495ae853SAndroid Build Coastguard Worker *******************************************************************************
22*495ae853SAndroid Build Coastguard Worker * @file
23*495ae853SAndroid Build Coastguard Worker *  isvc_common_tables.c
24*495ae853SAndroid Build Coastguard Worker *
25*495ae853SAndroid Build Coastguard Worker * @brief
26*495ae853SAndroid Build Coastguard Worker *  Contains common global tables
27*495ae853SAndroid Build Coastguard Worker *
28*495ae853SAndroid Build Coastguard Worker * @author
29*495ae853SAndroid Build Coastguard Worker *  Harish M
30*495ae853SAndroid Build Coastguard Worker *
31*495ae853SAndroid Build Coastguard Worker * @par List of Functions:
32*495ae853SAndroid Build Coastguard Worker *
33*495ae853SAndroid Build Coastguard Worker * @remarks
34*495ae853SAndroid Build Coastguard Worker *  None
35*495ae853SAndroid Build Coastguard Worker *
36*495ae853SAndroid Build Coastguard Worker *******************************************************************************
37*495ae853SAndroid Build Coastguard Worker */
38*495ae853SAndroid Build Coastguard Worker 
39*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
40*495ae853SAndroid Build Coastguard Worker /* File Includes                                                             */
41*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
42*495ae853SAndroid Build Coastguard Worker 
43*495ae853SAndroid Build Coastguard Worker /* User include files */
44*495ae853SAndroid Build Coastguard Worker #include "ih264_typedefs.h"
45*495ae853SAndroid Build Coastguard Worker #include "isvc_defs.h"
46*495ae853SAndroid Build Coastguard Worker #include "isvc_macros.h"
47*495ae853SAndroid Build Coastguard Worker #include "isvc_structs.h"
48*495ae853SAndroid Build Coastguard Worker #include "ih264_common_tables.h"
49*495ae853SAndroid Build Coastguard Worker #include "isvc_common_tables.h"
50*495ae853SAndroid Build Coastguard Worker 
51*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
52*495ae853SAndroid Build Coastguard Worker /* Extern global definitions                                                 */
53*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
54*495ae853SAndroid Build Coastguard Worker 
55*495ae853SAndroid Build Coastguard Worker /**
56*495ae853SAndroid Build Coastguard Worker  ******************************************************************************
57*495ae853SAndroid Build Coastguard Worker  * @brief  while encoding, basing on the input configuration parameters, the
58*495ae853SAndroid Build Coastguard Worker  * the level of the bitstream is computed basing on the table below.
59*495ae853SAndroid Build Coastguard Worker  * input  : table_idx
60*495ae853SAndroid Build Coastguard Worker  * output : level_idc or cpb size
61*495ae853SAndroid Build Coastguard Worker  * @remarks Table A-1 � level table limits
62*495ae853SAndroid Build Coastguard Worker  ******************************************************************************
63*495ae853SAndroid Build Coastguard Worker  */
64*495ae853SAndroid Build Coastguard Worker const level_tables_t gas_isvc_lvl_tbl[16] = {
65*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_10, 1485, 99, 396, 64, 175, 64},
66*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_1B, 1485, 99, 396, 128, 350, 64},
67*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_11, 3000, 396, 900, 192, 500, 128},
68*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_12, 6000, 396, 2376, 384, 1000, 128},
69*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_13, 11880, 396, 2376, 768, 2000, 128},
70*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_20, 11880, 396, 2376, 2000, 2000, 128},
71*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_21, 19800, 792, 4752, 4000, 4000, 256},
72*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_22, 20250, 1620, 8100, 4000, 4000, 256},
73*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_30, 40500, 1620, 8100, 10000, 10000, 256},
74*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_31, 108000, 3600, 18000, 14000, 14000, 512},
75*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_32, 216000, 5120, 20480, 20000, 20000, 512},
76*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_40, 245760, 8192, 32768, 20000, 25000, 512},
77*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_41, 245760, 8192, 32768, 50000, 62500, 512},
78*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_42, 522240, 8704, 34816, 50000, 62500, 512},
79*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_50, 589824, 22080, 110400, 135000, 135000, 512},
80*495ae853SAndroid Build Coastguard Worker     {IH264_LEVEL_51, 983040, 36864, 184320, 240000, 240000, 512},
81*495ae853SAndroid Build Coastguard Worker };
82