OSDN Git Service

add decode stream out buffer type
[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     TOSTR(VAConfigAttribEncQuantization);
105     TOSTR(VAConfigAttribEncIntraRefresh);
106     TOSTR(VAConfigAttribProcessingRate);
107     TOSTR(VAConfigAttribEncDirtyRect);
108     TOSTR(VAConfigAttribEncParallelRateControl);
109     TOSTR(VAConfigAttribEncDynamicScaling);
110     TOSTR(VAConfigAttribDecProcessing);
111     TOSTR(VAConfigAttribFrameSizeToleranceSupport);
112     TOSTR(VAConfigAttribEncTileSupport);
113     TOSTR(VAConfigAttribCustomRoundingControl);
114     case VAConfigAttribTypeMax: break;
115     }
116     return "<unknown config attribute type>";
117 }
118
119 const char *vaBufferTypeStr(VABufferType bufferType)
120 {
121     switch (bufferType) {
122     TOSTR(VAPictureParameterBufferType);
123     TOSTR(VAIQMatrixBufferType);
124     TOSTR(VABitPlaneBufferType);
125     TOSTR(VASliceGroupMapBufferType);
126     TOSTR(VASliceParameterBufferType);
127     TOSTR(VASliceDataBufferType);
128     TOSTR(VAMacroblockParameterBufferType);
129     TOSTR(VAResidualDataBufferType);
130     TOSTR(VADeblockingParameterBufferType);
131     TOSTR(VAImageBufferType);
132     TOSTR(VAProtectedSliceDataBufferType);
133     TOSTR(VAQMatrixBufferType);
134     TOSTR(VAHuffmanTableBufferType);
135     TOSTR(VAProbabilityBufferType);
136     TOSTR(VAEncCodedBufferType);
137     TOSTR(VAEncSequenceParameterBufferType);
138     TOSTR(VAEncPictureParameterBufferType);
139     TOSTR(VAEncSliceParameterBufferType);
140     TOSTR(VAEncPackedHeaderParameterBufferType);
141     TOSTR(VAEncPackedHeaderDataBufferType);
142     TOSTR(VAEncMiscParameterBufferType);
143     TOSTR(VAEncMacroblockParameterBufferType);
144     TOSTR(VAEncMacroblockMapBufferType);
145     TOSTR(VAProcPipelineParameterBufferType);
146     TOSTR(VAProcFilterParameterBufferType);
147     TOSTR(VAEncQPBufferType);
148     TOSTR(VAEncFEIMVBufferType);
149     TOSTR(VAEncFEIMBCodeBufferType);
150     TOSTR(VAEncFEIDistortionBufferType);
151     TOSTR(VAEncFEIMBControlBufferType);
152     TOSTR(VAEncFEIMVPredictorBufferType);
153     TOSTR(VAEncMacroblockDisableSkipMapBufferType);
154     TOSTR(VADecodeStreamoutBufferType);
155     case VABufferTypeMax: break;
156     }
157     return "<unknown buffer type>";
158 }
159
160 #undef TOSTR