OSDN Git Service

1f3e37558f801b1c7b31c88e3d46c2df0695c195
[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     case VAConfigAttribTypeMax: break;
108     }
109     return "<unknown config attribute type>";
110 }
111
112 const char *vaBufferTypeStr(VABufferType bufferType)
113 {
114     switch (bufferType) {
115     TOSTR(VAPictureParameterBufferType);
116     TOSTR(VAIQMatrixBufferType);
117     TOSTR(VABitPlaneBufferType);
118     TOSTR(VASliceGroupMapBufferType);
119     TOSTR(VASliceParameterBufferType);
120     TOSTR(VASliceDataBufferType);
121     TOSTR(VAMacroblockParameterBufferType);
122     TOSTR(VAResidualDataBufferType);
123     TOSTR(VADeblockingParameterBufferType);
124     TOSTR(VAImageBufferType);
125     TOSTR(VAProtectedSliceDataBufferType);
126     TOSTR(VAQMatrixBufferType);
127     TOSTR(VAHuffmanTableBufferType);
128     TOSTR(VAProbabilityBufferType);
129     TOSTR(VAEncCodedBufferType);
130     TOSTR(VAEncSequenceParameterBufferType);
131     TOSTR(VAEncPictureParameterBufferType);
132     TOSTR(VAEncSliceParameterBufferType);
133     TOSTR(VAEncPackedHeaderParameterBufferType);
134     TOSTR(VAEncPackedHeaderDataBufferType);
135     TOSTR(VAEncMiscParameterBufferType);
136     TOSTR(VAEncMacroblockParameterBufferType);
137     TOSTR(VAEncMacroblockMapBufferType);
138     TOSTR(VAProcPipelineParameterBufferType);
139     TOSTR(VAProcFilterParameterBufferType);
140     TOSTR(VAEncQPBufferType);
141     TOSTR(VAEncFEIMVBufferType);
142     TOSTR(VAEncFEIMBCodeBufferType);
143     TOSTR(VAEncFEIDistortionBufferType);
144     TOSTR(VAEncFEIMBControlBufferType);
145     TOSTR(VAEncFEIMVPredictorBufferType);
146     case VABufferTypeMax: break;
147     }
148     return "<unknown buffer type>";
149 }
150
151 #undef TOSTR