OSDN Git Service

af8180be73b98c87d743b0659051ba969ea5b87c
[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     }
56     return "<unknown profile>";
57 }
58
59
60 const char *vaEntrypointStr(VAEntrypoint entrypoint)
61 {
62     switch (entrypoint) {
63     TOSTR(VAEntrypointVLD);
64     TOSTR(VAEntrypointIZZ);
65     TOSTR(VAEntrypointIDCT);
66     TOSTR(VAEntrypointMoComp);
67     TOSTR(VAEntrypointDeblocking);
68     TOSTR(VAEntrypointEncSlice);
69     TOSTR(VAEntrypointEncPicture);
70     TOSTR(VAEntrypointEncSliceLP);
71     TOSTR(VAEntrypointVideoProc);
72     TOSTR(VAEntrypointFEI);
73     }
74     return "<unknown entrypoint>";
75 }
76
77 const char *vaConfigAttribTypeStr(VAConfigAttribType configAttribType)
78 {
79     switch (configAttribType) {
80     TOSTR(VAConfigAttribRTFormat);
81     TOSTR(VAConfigAttribSpatialResidual);
82     TOSTR(VAConfigAttribSpatialClipping);
83     TOSTR(VAConfigAttribIntraResidual);
84     TOSTR(VAConfigAttribEncryption);
85     TOSTR(VAConfigAttribRateControl);
86     TOSTR(VAConfigAttribDecSliceMode);
87     TOSTR(VAConfigAttribEncPackedHeaders);
88     TOSTR(VAConfigAttribEncInterlaced);
89     TOSTR(VAConfigAttribEncMaxRefFrames);
90     TOSTR(VAConfigAttribEncMaxSlices);
91     TOSTR(VAConfigAttribEncSliceStructure);
92     TOSTR(VAConfigAttribEncMacroblockInfo);
93     TOSTR(VAConfigAttribEncJPEG);
94     TOSTR(VAConfigAttribEncQualityRange);
95     TOSTR(VAConfigAttribEncSkipFrame);
96     TOSTR(VAConfigAttribEncROI);
97     TOSTR(VAConfigAttribEncRateControlExt);
98     }
99     return "<unknown config attribute type>";
100 }
101
102 const char *vaBufferTypeStr(VABufferType bufferType)
103 {
104     switch (bufferType) {
105     TOSTR(VAPictureParameterBufferType);
106     TOSTR(VAIQMatrixBufferType);
107     TOSTR(VABitPlaneBufferType);
108     TOSTR(VASliceGroupMapBufferType);
109     TOSTR(VASliceParameterBufferType);
110     TOSTR(VASliceDataBufferType);
111     TOSTR(VAMacroblockParameterBufferType);
112     TOSTR(VAResidualDataBufferType);
113     TOSTR(VADeblockingParameterBufferType);
114     TOSTR(VAImageBufferType);
115     TOSTR(VAProtectedSliceDataBufferType);
116     TOSTR(VAQMatrixBufferType);
117     TOSTR(VAHuffmanTableBufferType);
118     TOSTR(VAProbabilityBufferType);
119     TOSTR(VAEncCodedBufferType);
120     TOSTR(VAEncSequenceParameterBufferType);
121     TOSTR(VAEncPictureParameterBufferType);
122     TOSTR(VAEncSliceParameterBufferType);
123     TOSTR(VAEncPackedHeaderParameterBufferType);
124     TOSTR(VAEncPackedHeaderDataBufferType);
125     TOSTR(VAEncMiscParameterBufferType);
126     TOSTR(VAEncMacroblockParameterBufferType);
127     TOSTR(VAEncMacroblockMapBufferType);
128     TOSTR(VAProcPipelineParameterBufferType);
129     TOSTR(VAProcFilterParameterBufferType);
130     }
131     return "<unknown buffer type>";
132 }
133
134 #undef TOSTR