OSDN Git Service

update NEWS for libva 2.4.0
[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     TOSTR(VAProfileHEVCMain12);
56     TOSTR(VAProfileHEVCMain422_10);
57     TOSTR(VAProfileHEVCMain422_12);
58     TOSTR(VAProfileHEVCMain444);
59     TOSTR(VAProfileHEVCMain444_10);
60     TOSTR(VAProfileHEVCMain444_12);
61     TOSTR(VAProfileHEVCSccMain);
62     TOSTR(VAProfileHEVCSccMain10);
63     TOSTR(VAProfileHEVCSccMain444);
64     default: break;
65     }
66     return "<unknown profile>";
67 }
68
69
70 const char *vaEntrypointStr(VAEntrypoint entrypoint)
71 {
72     switch (entrypoint) {
73     TOSTR(VAEntrypointVLD);
74     TOSTR(VAEntrypointIZZ);
75     TOSTR(VAEntrypointIDCT);
76     TOSTR(VAEntrypointMoComp);
77     TOSTR(VAEntrypointDeblocking);
78     TOSTR(VAEntrypointEncSlice);
79     TOSTR(VAEntrypointEncPicture);
80     TOSTR(VAEntrypointEncSliceLP);
81     TOSTR(VAEntrypointVideoProc);
82     TOSTR(VAEntrypointFEI);
83     TOSTR(VAEntrypointStats);
84     }
85     return "<unknown entrypoint>";
86 }
87
88 const char *vaConfigAttribTypeStr(VAConfigAttribType configAttribType)
89 {
90     switch (configAttribType) {
91     TOSTR(VAConfigAttribRTFormat);
92     TOSTR(VAConfigAttribSpatialResidual);
93     TOSTR(VAConfigAttribSpatialClipping);
94     TOSTR(VAConfigAttribIntraResidual);
95     TOSTR(VAConfigAttribEncryption);
96     TOSTR(VAConfigAttribRateControl);
97     TOSTR(VAConfigAttribDecSliceMode);
98     TOSTR(VAConfigAttribEncPackedHeaders);
99     TOSTR(VAConfigAttribEncInterlaced);
100     TOSTR(VAConfigAttribEncMaxRefFrames);
101     TOSTR(VAConfigAttribEncMaxSlices);
102     TOSTR(VAConfigAttribEncSliceStructure);
103     TOSTR(VAConfigAttribEncMacroblockInfo);
104     TOSTR(VAConfigAttribEncJPEG);
105     TOSTR(VAConfigAttribEncQualityRange);
106     TOSTR(VAConfigAttribEncSkipFrame);
107     TOSTR(VAConfigAttribEncROI);
108     TOSTR(VAConfigAttribEncRateControlExt);
109     TOSTR(VAConfigAttribFEIFunctionType);
110     TOSTR(VAConfigAttribFEIMVPredictors);
111     TOSTR(VAConfigAttribDecJPEG);
112     TOSTR(VAConfigAttribMaxPictureWidth);
113     TOSTR(VAConfigAttribMaxPictureHeight);
114     TOSTR(VAConfigAttribEncQuantization);
115     TOSTR(VAConfigAttribEncIntraRefresh);
116     TOSTR(VAConfigAttribProcessingRate);
117     TOSTR(VAConfigAttribEncDirtyRect);
118     TOSTR(VAConfigAttribEncParallelRateControl);
119     TOSTR(VAConfigAttribEncDynamicScaling);
120     TOSTR(VAConfigAttribDecProcessing);
121     TOSTR(VAConfigAttribFrameSizeToleranceSupport);
122     TOSTR(VAConfigAttribEncTileSupport);
123     TOSTR(VAConfigAttribCustomRoundingControl);
124     TOSTR(VAConfigAttribQPBlockSize);
125     TOSTR(VAConfigAttribStats);
126     case VAConfigAttribTypeMax: break;
127     }
128     return "<unknown config attribute type>";
129 }
130
131 const char *vaBufferTypeStr(VABufferType bufferType)
132 {
133     switch (bufferType) {
134     TOSTR(VAPictureParameterBufferType);
135     TOSTR(VAIQMatrixBufferType);
136     TOSTR(VABitPlaneBufferType);
137     TOSTR(VASliceGroupMapBufferType);
138     TOSTR(VASliceParameterBufferType);
139     TOSTR(VASliceDataBufferType);
140     TOSTR(VAMacroblockParameterBufferType);
141     TOSTR(VAResidualDataBufferType);
142     TOSTR(VADeblockingParameterBufferType);
143     TOSTR(VAImageBufferType);
144     TOSTR(VAProtectedSliceDataBufferType);
145     TOSTR(VAQMatrixBufferType);
146     TOSTR(VAHuffmanTableBufferType);
147     TOSTR(VAProbabilityBufferType);
148     TOSTR(VAEncCodedBufferType);
149     TOSTR(VAEncSequenceParameterBufferType);
150     TOSTR(VAEncPictureParameterBufferType);
151     TOSTR(VAEncSliceParameterBufferType);
152     TOSTR(VAEncPackedHeaderParameterBufferType);
153     TOSTR(VAEncPackedHeaderDataBufferType);
154     TOSTR(VAEncMiscParameterBufferType);
155     TOSTR(VAEncMacroblockParameterBufferType);
156     TOSTR(VAEncMacroblockMapBufferType);
157     TOSTR(VAProcPipelineParameterBufferType);
158     TOSTR(VAProcFilterParameterBufferType);
159     TOSTR(VAEncQPBufferType);
160     TOSTR(VAEncFEIMVBufferType);
161     TOSTR(VAEncFEIMBCodeBufferType);
162     TOSTR(VAEncFEIDistortionBufferType);
163     TOSTR(VAEncFEIMBControlBufferType);
164     TOSTR(VAEncFEIMVPredictorBufferType);
165     TOSTR(VAEncMacroblockDisableSkipMapBufferType);
166     TOSTR(VADecodeStreamoutBufferType);
167     TOSTR(VAStatsStatisticsParameterBufferType);
168     TOSTR(VAStatsStatisticsBufferType);
169     TOSTR(VAStatsStatisticsBottomFieldBufferType);
170     TOSTR(VAStatsMVBufferType);
171     TOSTR(VAStatsMVPredictorBufferType);
172     TOSTR(VAEncFEICTBCmdBufferType);
173     TOSTR(VAEncFEICURecordBufferType);
174     TOSTR(VASubsetsParameterBufferType);
175     case VABufferTypeMax: break;
176     }
177     return "<unknown buffer type>";
178 }
179
180 #undef TOSTR