OSDN Git Service

48b021ac0153a38d70783b57e0f327fa49adb89e
[android-x86/hardware-intel-common-libva.git] / va / va_str.c
1 /*
2  * Copyright (c) 2017 Intel Corporation. All Rights Reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24
25 #include "va_str.h"
26
27 #define TOSTR(enumCase) case enumCase: return #enumCase
28
29 const char *vaProfileStr(VAProfile profile)
30 {
31     switch (profile) {
32     TOSTR(VAProfileNone);
33     TOSTR(VAProfileMPEG2Simple);
34     TOSTR(VAProfileMPEG2Main);
35     TOSTR(VAProfileMPEG4Simple);
36     TOSTR(VAProfileMPEG4AdvancedSimple);
37     TOSTR(VAProfileMPEG4Main);
38     TOSTR(VAProfileH264Main);
39     TOSTR(VAProfileH264High);
40     TOSTR(VAProfileVC1Simple);
41     TOSTR(VAProfileVC1Main);
42     TOSTR(VAProfileVC1Advanced);
43     TOSTR(VAProfileH263Baseline);
44     TOSTR(VAProfileH264ConstrainedBaseline);
45     TOSTR(VAProfileJPEGBaseline);
46     TOSTR(VAProfileVP8Version0_3);
47     TOSTR(VAProfileH264MultiviewHigh);
48     TOSTR(VAProfileH264StereoHigh);
49     TOSTR(VAProfileHEVCMain);
50     TOSTR(VAProfileHEVCMain10);
51     TOSTR(VAProfileVP9Profile0);
52     TOSTR(VAProfileVP9Profile1);
53     TOSTR(VAProfileVP9Profile2);
54     TOSTR(VAProfileVP9Profile3);
55     default: break;
56     }
57     return "<unknown profile>";
58 }
59
60
61 const char *vaEntrypointStr(VAEntrypoint entrypoint)
62 {
63     switch (entrypoint) {
64     TOSTR(VAEntrypointVLD);
65     TOSTR(VAEntrypointIZZ);
66     TOSTR(VAEntrypointIDCT);
67     TOSTR(VAEntrypointMoComp);
68     TOSTR(VAEntrypointDeblocking);
69     TOSTR(VAEntrypointEncSlice);
70     TOSTR(VAEntrypointEncPicture);
71     TOSTR(VAEntrypointEncSliceLP);
72     TOSTR(VAEntrypointVideoProc);
73     TOSTR(VAEntrypointFEI);
74     }
75     return "<unknown entrypoint>";
76 }
77
78 const char *vaConfigAttribTypeStr(VAConfigAttribType configAttribType)
79 {
80     switch (configAttribType) {
81     TOSTR(VAConfigAttribRTFormat);
82     TOSTR(VAConfigAttribSpatialResidual);
83     TOSTR(VAConfigAttribSpatialClipping);
84     TOSTR(VAConfigAttribIntraResidual);
85     TOSTR(VAConfigAttribEncryption);
86     TOSTR(VAConfigAttribRateControl);
87     TOSTR(VAConfigAttribDecSliceMode);
88     TOSTR(VAConfigAttribEncPackedHeaders);
89     TOSTR(VAConfigAttribEncInterlaced);
90     TOSTR(VAConfigAttribEncMaxRefFrames);
91     TOSTR(VAConfigAttribEncMaxSlices);
92     TOSTR(VAConfigAttribEncSliceStructure);
93     TOSTR(VAConfigAttribEncMacroblockInfo);
94     TOSTR(VAConfigAttribEncJPEG);
95     TOSTR(VAConfigAttribEncQualityRange);
96     TOSTR(VAConfigAttribEncSkipFrame);
97     TOSTR(VAConfigAttribEncROI);
98     TOSTR(VAConfigAttribEncRateControlExt);
99     TOSTR(VAConfigAttribFEIFunctionType);
100     TOSTR(VAConfigAttribFEIMVPredictors);
101     TOSTR(VAConfigAttribDecJPEG);
102     TOSTR(VAConfigAttribMaxPictureWidth);
103     TOSTR(VAConfigAttribMaxPictureHeight);
104     case VAConfigAttribTypeMax: break;
105     }
106     return "<unknown config attribute type>";
107 }
108
109 const char *vaBufferTypeStr(VABufferType bufferType)
110 {
111     switch (bufferType) {
112     TOSTR(VAPictureParameterBufferType);
113     TOSTR(VAIQMatrixBufferType);
114     TOSTR(VABitPlaneBufferType);
115     TOSTR(VASliceGroupMapBufferType);
116     TOSTR(VASliceParameterBufferType);
117     TOSTR(VASliceDataBufferType);
118     TOSTR(VAMacroblockParameterBufferType);
119     TOSTR(VAResidualDataBufferType);
120     TOSTR(VADeblockingParameterBufferType);
121     TOSTR(VAImageBufferType);
122     TOSTR(VAProtectedSliceDataBufferType);
123     TOSTR(VAQMatrixBufferType);
124     TOSTR(VAHuffmanTableBufferType);
125     TOSTR(VAProbabilityBufferType);
126     TOSTR(VAEncCodedBufferType);
127     TOSTR(VAEncSequenceParameterBufferType);
128     TOSTR(VAEncPictureParameterBufferType);
129     TOSTR(VAEncSliceParameterBufferType);
130     TOSTR(VAEncPackedHeaderParameterBufferType);
131     TOSTR(VAEncPackedHeaderDataBufferType);
132     TOSTR(VAEncMiscParameterBufferType);
133     TOSTR(VAEncMacroblockParameterBufferType);
134     TOSTR(VAEncMacroblockMapBufferType);
135     TOSTR(VAProcPipelineParameterBufferType);
136     TOSTR(VAProcFilterParameterBufferType);
137     TOSTR(VAEncQPBufferType);
138     TOSTR(VAEncFEIMVBufferType);
139     TOSTR(VAEncFEIMBCodeBufferType);
140     TOSTR(VAEncFEIDistortionBufferType);
141     TOSTR(VAEncFEIMBControlBufferType);
142     TOSTR(VAEncFEIMVPredictorBufferType);
143     case VABufferTypeMax: break;
144     }
145     return "<unknown buffer type>";
146 }
147
148 #undef TOSTR