• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 //#define LOG_NDEBUG 0
18 #define LOG_TAG "C2Config"
19 #include <utils/Log.h>
20 
21 /**
22  * Define and initialize global config field descriptors in this cpp file
23  */
24 #define __C2_GENERATE_GLOBAL_VARS__
25 #include <C2Config.h>
26 
27 DEFINE_C2_ENUM_VALUE_CUSTOM_HELPER(C2Config::profile_t, ({
28         { "unused", C2Config::PROFILE_UNUSED },
29         { "aac-lc", C2Config::PROFILE_AAC_LC },
30         { "aac-main", C2Config::PROFILE_AAC_MAIN },
31         { "aac-ssr", C2Config::PROFILE_AAC_SSR },
32         { "aac-ltp", C2Config::PROFILE_AAC_LTP },
33         { "aac-he", C2Config::PROFILE_AAC_HE },
34         { "aac-scalable", C2Config::PROFILE_AAC_SCALABLE },
35         { "aac-er-lc", C2Config::PROFILE_AAC_ER_LC },
36         { "aac-er-scalable", C2Config::PROFILE_AAC_ER_SCALABLE },
37         { "aac-ld", C2Config::PROFILE_AAC_LD },
38         { "aac-he-ps", C2Config::PROFILE_AAC_HE_PS },
39         { "aac-eld", C2Config::PROFILE_AAC_ELD },
40         { "aac-xhe", C2Config::PROFILE_AAC_XHE },
41         { "mp2v-simple", C2Config::PROFILE_MP2V_SIMPLE },
42         { "mp2v-main", C2Config::PROFILE_MP2V_MAIN },
43         { "mp2v-snr-scalable", C2Config::PROFILE_MP2V_SNR_SCALABLE },
44         { "mp2v-spatially-scalable", C2Config::PROFILE_MP2V_SPATIALLY_SCALABLE },
45         { "mp2v-high", C2Config::PROFILE_MP2V_HIGH },
46         { "mp2v-422", C2Config::PROFILE_MP2V_422 },
47         { "mp2v-multiview", C2Config::PROFILE_MP2V_MULTIVIEW },
48         { "h263-baseline", C2Config::PROFILE_H263_BASELINE },
49         { "h263-h320", C2Config::PROFILE_H263_H320 },
50         { "h263-v1bc", C2Config::PROFILE_H263_V1BC },
51         { "h263-iswv2", C2Config::PROFILE_H263_ISWV2 },
52         { "h263-iswv3", C2Config::PROFILE_H263_ISWV3 },
53         { "h263-high-compression", C2Config::PROFILE_H263_HIGH_COMPRESSION },
54         { "h263-internet", C2Config::PROFILE_H263_INTERNET },
55         { "h263-interlace", C2Config::PROFILE_H263_INTERLACE },
56         { "h263-high-latency", C2Config::PROFILE_H263_HIGH_LATENCY },
57         { "mp4v-simple", C2Config::PROFILE_MP4V_SIMPLE },
58         { "mp4v-simple-scalable", C2Config::PROFILE_MP4V_SIMPLE_SCALABLE },
59         { "mp4v-core", C2Config::PROFILE_MP4V_CORE },
60         { "mp4v-main", C2Config::PROFILE_MP4V_MAIN },
61         { "mp4v-nbit", C2Config::PROFILE_MP4V_NBIT },
62         { "mp4v-arts", C2Config::PROFILE_MP4V_ARTS },
63         { "mp4v-core-scalable", C2Config::PROFILE_MP4V_CORE_SCALABLE },
64         { "mp4v-ace", C2Config::PROFILE_MP4V_ACE },
65         { "mp4v-advanced-core", C2Config::PROFILE_MP4V_ADVANCED_CORE },
66         { "mp4v-simple-studio", C2Config::PROFILE_MP4V_SIMPLE_STUDIO },
67         { "mp4v-core-studio", C2Config::PROFILE_MP4V_CORE_STUDIO },
68         { "mp4v-advanced-simple", C2Config::PROFILE_MP4V_ADVANCED_SIMPLE },
69         { "mp4v-fgs", C2Config::PROFILE_MP4V_FGS },
70         { "avc-baseline", C2Config::PROFILE_AVC_BASELINE },
71         { "avc-constrained-baseline", C2Config::PROFILE_AVC_CONSTRAINED_BASELINE },
72         { "avc-main", C2Config::PROFILE_AVC_MAIN },
73         { "avc-extended", C2Config::PROFILE_AVC_EXTENDED },
74         { "avc-high", C2Config::PROFILE_AVC_HIGH },
75         { "avc-progressive-high", C2Config::PROFILE_AVC_PROGRESSIVE_HIGH },
76         { "avc-constrained-high", C2Config::PROFILE_AVC_CONSTRAINED_HIGH },
77         { "avc-high-10", C2Config::PROFILE_AVC_HIGH_10 },
78         { "avc-progressive-high-10", C2Config::PROFILE_AVC_PROGRESSIVE_HIGH_10 },
79         { "avc-high-422", C2Config::PROFILE_AVC_HIGH_422 },
80         { "avc-high-444-predictive", C2Config::PROFILE_AVC_HIGH_444_PREDICTIVE },
81         { "avc-high-10-intra", C2Config::PROFILE_AVC_HIGH_10_INTRA },
82         { "avc-high-422-intra", C2Config::PROFILE_AVC_HIGH_422_INTRA },
83         { "avc-high-444-intra", C2Config::PROFILE_AVC_HIGH_444_INTRA },
84         { "avc-cavlc-444-intra", C2Config::PROFILE_AVC_CAVLC_444_INTRA },
85         { "avc-scalable-baseline", C2Config::PROFILE_AVC_SCALABLE_BASELINE },
86         { "avc-scalable-constrained-baseline", C2Config::PROFILE_AVC_SCALABLE_CONSTRAINED_BASELINE },
87         { "avc-scalable-high", C2Config::PROFILE_AVC_SCALABLE_HIGH },
88         { "avc-scalable-constrained-high", C2Config::PROFILE_AVC_SCALABLE_CONSTRAINED_HIGH },
89         { "avc-scalable-high-intra", C2Config::PROFILE_AVC_SCALABLE_HIGH_INTRA },
90         { "avc-multiview-high", C2Config::PROFILE_AVC_MULTIVIEW_HIGH },
91         { "avc-stereo-high", C2Config::PROFILE_AVC_STEREO_HIGH },
92         { "avc-mfc-high", C2Config::PROFILE_AVC_MFC_HIGH },
93         { "avc-multiview-depth-high", C2Config::PROFILE_AVC_MULTIVIEW_DEPTH_HIGH },
94         { "avc-mfc-depth-high", C2Config::PROFILE_AVC_MFC_DEPTH_HIGH },
95         { "avc-enhanced-multiview-depth-high", C2Config::PROFILE_AVC_ENHANCED_MULTIVIEW_DEPTH_HIGH },
96         { "hevc-main", C2Config::PROFILE_HEVC_MAIN },
97         { "hevc-main-10", C2Config::PROFILE_HEVC_MAIN_10 },
98         { "hevc-main-still", C2Config::PROFILE_HEVC_MAIN_STILL },
99         { "hevc-mono", C2Config::PROFILE_HEVC_MONO },
100         { "hevc-mono-12", C2Config::PROFILE_HEVC_MONO_12 },
101         { "hevc-mono-16", C2Config::PROFILE_HEVC_MONO_16 },
102         { "hevc-main-12", C2Config::PROFILE_HEVC_MAIN_12 },
103         { "hevc-main-422-10", C2Config::PROFILE_HEVC_MAIN_422_10 },
104         { "hevc-main-422-12", C2Config::PROFILE_HEVC_MAIN_422_12 },
105         { "hevc-main-444", C2Config::PROFILE_HEVC_MAIN_444 },
106         { "hevc-main-444-10", C2Config::PROFILE_HEVC_MAIN_444_10 },
107         { "hevc-main-444-12", C2Config::PROFILE_HEVC_MAIN_444_12 },
108         { "hevc-main-intra", C2Config::PROFILE_HEVC_MAIN_INTRA },
109         { "hevc-main-10-intra", C2Config::PROFILE_HEVC_MAIN_10_INTRA },
110         { "hevc-main-12-intra", C2Config::PROFILE_HEVC_MAIN_12_INTRA },
111         { "hevc-main-422-10-intra", C2Config::PROFILE_HEVC_MAIN_422_10_INTRA },
112         { "hevc-main-422-12-intra", C2Config::PROFILE_HEVC_MAIN_422_12_INTRA },
113         { "hevc-main-444-intra", C2Config::PROFILE_HEVC_MAIN_444_INTRA },
114         { "hevc-main-444-10-intra", C2Config::PROFILE_HEVC_MAIN_444_10_INTRA },
115         { "hevc-main-444-12-intra", C2Config::PROFILE_HEVC_MAIN_444_12_INTRA },
116         { "hevc-main-444-16-intra", C2Config::PROFILE_HEVC_MAIN_444_16_INTRA },
117         { "hevc-main-444-still", C2Config::PROFILE_HEVC_MAIN_444_STILL },
118         { "hevc-main-444-16-still", C2Config::PROFILE_HEVC_MAIN_444_16_STILL },
119         { "hevc-high-444", C2Config::PROFILE_HEVC_HIGH_444 },
120         { "hevc-high-444-10", C2Config::PROFILE_HEVC_HIGH_444_10 },
121         { "hevc-high-444-14", C2Config::PROFILE_HEVC_HIGH_444_14 },
122         { "hevc-high-444-16-intra", C2Config::PROFILE_HEVC_HIGH_444_16_INTRA },
123         { "hevc-sx-main", C2Config::PROFILE_HEVC_SX_MAIN },
124         { "hevc-sx-main-10", C2Config::PROFILE_HEVC_SX_MAIN_10 },
125         { "hevc-sx-main-444", C2Config::PROFILE_HEVC_SX_MAIN_444 },
126         { "hevc-sx-main-444-10", C2Config::PROFILE_HEVC_SX_MAIN_444_10 },
127         { "hevc-sx-high-444", C2Config::PROFILE_HEVC_SX_HIGH_444 },
128         { "hevc-sx-high-444-10", C2Config::PROFILE_HEVC_SX_HIGH_444_10 },
129         { "hevc-sx-high-444-14", C2Config::PROFILE_HEVC_SX_HIGH_444_14 },
130         { "hevc-multiview-main", C2Config::PROFILE_HEVC_MULTIVIEW_MAIN },
131         { "hevc-scalable-main", C2Config::PROFILE_HEVC_SCALABLE_MAIN },
132         { "hevc-scalable-main-10", C2Config::PROFILE_HEVC_SCALABLE_MAIN_10 },
133         { "hevc-scalable-mono", C2Config::PROFILE_HEVC_SCALABLE_MONO },
134         { "hevc-scalable-mono-12", C2Config::PROFILE_HEVC_SCALABLE_MONO_12 },
135         { "hevc-scalable-mono-16", C2Config::PROFILE_HEVC_SCALABLE_MONO_16 },
136         { "hevc-scalable-main-444", C2Config::PROFILE_HEVC_SCALABLE_MAIN_444 },
137         { "hevc-3d-main", C2Config::PROFILE_HEVC_3D_MAIN },
138         { "vp9-0", C2Config::PROFILE_VP9_0 },
139         { "vp9-1", C2Config::PROFILE_VP9_1 },
140         { "vp9-2", C2Config::PROFILE_VP9_2 },
141         { "vp9-3", C2Config::PROFILE_VP9_3 },
142         { "av1-0", C2Config::PROFILE_AV1_0 },
143         { "av1-1", C2Config::PROFILE_AV1_1 },
144         { "av1-2", C2Config::PROFILE_AV1_2 },
145 }))
146 
147 DEFINE_C2_ENUM_VALUE_CUSTOM_HELPER(C2Config::level_t, ({
148         { "unused", C2Config::LEVEL_UNUSED },
149         { "mp2v-low", C2Config::LEVEL_MP2V_LOW },
150         { "mp2v-main", C2Config::LEVEL_MP2V_MAIN },
151         { "mp2v-high-1440", C2Config::LEVEL_MP2V_HIGH_1440 },
152         { "mp2v-high", C2Config::LEVEL_MP2V_HIGH },
153         { "mp2v-highp", C2Config::LEVEL_MP2V_HIGHP },
154         { "h263-10", C2Config::LEVEL_H263_10 },
155         { "h263-20", C2Config::LEVEL_H263_20 },
156         { "h263-30", C2Config::LEVEL_H263_30 },
157         { "h263-40", C2Config::LEVEL_H263_40 },
158         { "h263-45", C2Config::LEVEL_H263_45 },
159         { "h263-50", C2Config::LEVEL_H263_50 },
160         { "h263-60", C2Config::LEVEL_H263_60 },
161         { "h263-70", C2Config::LEVEL_H263_70 },
162         { "mp4v-0", C2Config::LEVEL_MP4V_0 },
163         { "mp4v-0b", C2Config::LEVEL_MP4V_0B },
164         { "mp4v-1", C2Config::LEVEL_MP4V_1 },
165         { "mp4v-2", C2Config::LEVEL_MP4V_2 },
166         { "mp4v-3", C2Config::LEVEL_MP4V_3 },
167         { "mp4v-3b", C2Config::LEVEL_MP4V_3B },
168         { "mp4v-4", C2Config::LEVEL_MP4V_4 },
169         { "mp4v-4a", C2Config::LEVEL_MP4V_4A },
170         { "mp4v-5", C2Config::LEVEL_MP4V_5 },
171         { "mp4v-6", C2Config::LEVEL_MP4V_6 },
172         { "avc-1", C2Config::LEVEL_AVC_1 },
173         { "avc-1b", C2Config::LEVEL_AVC_1B },
174         { "avc-1.1", C2Config::LEVEL_AVC_1_1 },
175         { "avc-1.2", C2Config::LEVEL_AVC_1_2 },
176         { "avc-1.3", C2Config::LEVEL_AVC_1_3 },
177         { "avc-2", C2Config::LEVEL_AVC_2 },
178         { "avc-2.1", C2Config::LEVEL_AVC_2_1 },
179         { "avc-2.2", C2Config::LEVEL_AVC_2_2 },
180         { "avc-3", C2Config::LEVEL_AVC_3 },
181         { "avc-3.1", C2Config::LEVEL_AVC_3_1 },
182         { "avc-3.2", C2Config::LEVEL_AVC_3_2 },
183         { "avc-4", C2Config::LEVEL_AVC_4 },
184         { "avc-4.1", C2Config::LEVEL_AVC_4_1 },
185         { "avc-4.2", C2Config::LEVEL_AVC_4_2 },
186         { "avc-5", C2Config::LEVEL_AVC_5 },
187         { "avc-5.1", C2Config::LEVEL_AVC_5_1 },
188         { "avc-5.2", C2Config::LEVEL_AVC_5_2 },
189         { "avc-6", C2Config::LEVEL_AVC_6 },
190         { "avc-6.1", C2Config::LEVEL_AVC_6_1 },
191         { "avc-6.2", C2Config::LEVEL_AVC_6_2 },
192         { "hevc-main-1", C2Config::LEVEL_HEVC_MAIN_1 },
193         { "hevc-main-2", C2Config::LEVEL_HEVC_MAIN_2 },
194         { "hevc-main-2.1", C2Config::LEVEL_HEVC_MAIN_2_1 },
195         { "hevc-main-3", C2Config::LEVEL_HEVC_MAIN_3 },
196         { "hevc-main-3.1", C2Config::LEVEL_HEVC_MAIN_3_1 },
197         { "hevc-main-4", C2Config::LEVEL_HEVC_MAIN_4 },
198         { "hevc-main-4.1", C2Config::LEVEL_HEVC_MAIN_4_1 },
199         { "hevc-main-5", C2Config::LEVEL_HEVC_MAIN_5 },
200         { "hevc-main-5.1", C2Config::LEVEL_HEVC_MAIN_5_1 },
201         { "hevc-main-5.2", C2Config::LEVEL_HEVC_MAIN_5_2 },
202         { "hevc-main-6", C2Config::LEVEL_HEVC_MAIN_6 },
203         { "hevc-main-6.1", C2Config::LEVEL_HEVC_MAIN_6_1 },
204         { "hevc-main-6.2", C2Config::LEVEL_HEVC_MAIN_6_2 },
205         { "hevc-high-4", C2Config::LEVEL_HEVC_HIGH_4 },
206         { "hevc-high-4.1", C2Config::LEVEL_HEVC_HIGH_4_1 },
207         { "hevc-high-5", C2Config::LEVEL_HEVC_HIGH_5 },
208         { "hevc-high-5.1", C2Config::LEVEL_HEVC_HIGH_5_1 },
209         { "hevc-high-5.2", C2Config::LEVEL_HEVC_HIGH_5_2 },
210         { "hevc-high-6", C2Config::LEVEL_HEVC_HIGH_6 },
211         { "hevc-high-6.1", C2Config::LEVEL_HEVC_HIGH_6_1 },
212         { "hevc-high-6.2", C2Config::LEVEL_HEVC_HIGH_6_2 },
213         { "vp9-1", C2Config::LEVEL_VP9_1 },
214         { "vp9-1.1", C2Config::LEVEL_VP9_1_1 },
215         { "vp9-2", C2Config::LEVEL_VP9_2 },
216         { "vp9-2.1", C2Config::LEVEL_VP9_2_1 },
217         { "vp9-3", C2Config::LEVEL_VP9_3 },
218         { "vp9-3.1", C2Config::LEVEL_VP9_3_1 },
219         { "vp9-4", C2Config::LEVEL_VP9_4 },
220         { "vp9-4.1", C2Config::LEVEL_VP9_4_1 },
221         { "vp9-5", C2Config::LEVEL_VP9_5 },
222         { "vp9-5.1", C2Config::LEVEL_VP9_5_1 },
223         { "vp9-5.2", C2Config::LEVEL_VP9_5_2 },
224         { "vp9-6", C2Config::LEVEL_VP9_6 },
225         { "vp9-6.1", C2Config::LEVEL_VP9_6_1 },
226         { "vp9-6.2", C2Config::LEVEL_VP9_6_2 },
227         { "av1-2", C2Config::LEVEL_AV1_2 },
228         { "av1-2.1", C2Config::LEVEL_AV1_2_1 },
229         { "av1-2.2", C2Config::LEVEL_AV1_2_2 },
230         { "av1-2.3", C2Config::LEVEL_AV1_2_3 },
231         { "av1-3", C2Config::LEVEL_AV1_3 },
232         { "av1-3.1", C2Config::LEVEL_AV1_3_1 },
233         { "av1-3.2", C2Config::LEVEL_AV1_3_2 },
234         { "av1-3.3", C2Config::LEVEL_AV1_3_3 },
235         { "av1-4", C2Config::LEVEL_AV1_4 },
236         { "av1-4.1", C2Config::LEVEL_AV1_4_1 },
237         { "av1-4.2", C2Config::LEVEL_AV1_4_2 },
238         { "av1-4.3", C2Config::LEVEL_AV1_4_3 },
239         { "av1-5", C2Config::LEVEL_AV1_5 },
240         { "av1-5.1", C2Config::LEVEL_AV1_5_1 },
241         { "av1-5.2", C2Config::LEVEL_AV1_5_2 },
242         { "av1-5.3", C2Config::LEVEL_AV1_5_3 },
243         { "av1-6", C2Config::LEVEL_AV1_6 },
244         { "av1-6.1", C2Config::LEVEL_AV1_6_1 },
245         { "av1-6.2", C2Config::LEVEL_AV1_6_2 },
246         { "av1-6.3", C2Config::LEVEL_AV1_6_3 },
247         { "av1-7", C2Config::LEVEL_AV1_7 },
248         { "av1-7.1", C2Config::LEVEL_AV1_7_1 },
249         { "av1-7.2", C2Config::LEVEL_AV1_7_2 },
250         { "av1-7.3", C2Config::LEVEL_AV1_7_3 },
251 }))
252 
253 DEFINE_C2_ENUM_VALUE_CUSTOM_HELPER(C2BufferData::type_t, ({
254         { "invalid",        C2BufferData::INVALID },
255         { "linear",         C2BufferData::LINEAR },
256         { "linear-chunks",  C2BufferData::LINEAR_CHUNKS },
257         { "graphic",        C2BufferData::GRAPHIC },
258         { "graphic-chunks", C2BufferData::GRAPHIC_CHUNKS },
259 }))
260 
261 
262