OSDN Git Service

Improve documentation for rate control parameters
[android-x86/hardware-intel-common-libva.git] / va / va_trace.h
1 /*
2  * Copyright (c) 2009 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 #ifndef VA_TRACE_H
26 #define VA_TRACE_H
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 extern int va_trace_flag;
33
34 #define VA_TRACE_FLAG_LOG             0x1
35 #define VA_TRACE_FLAG_BUFDATA         0x2
36 #define VA_TRACE_FLAG_CODEDBUF        0x4
37 #define VA_TRACE_FLAG_SURFACE_DECODE  0x8
38 #define VA_TRACE_FLAG_SURFACE_ENCODE  0x10
39 #define VA_TRACE_FLAG_SURFACE_JPEG    0x20
40 #define VA_TRACE_FLAG_SURFACE         (VA_TRACE_FLAG_SURFACE_DECODE | \
41                                        VA_TRACE_FLAG_SURFACE_ENCODE | \
42                                        VA_TRACE_FLAG_SURFACE_JPEG)
43
44 #define VA_TRACE_LOG(trace_func,...)            \
45     if (va_trace_flag & VA_TRACE_FLAG_LOG) {    \
46         trace_func(__VA_ARGS__);                \
47     }
48 #define VA_TRACE_ALL(trace_func,...)            \
49     if (va_trace_flag) {                        \
50         trace_func(__VA_ARGS__);                \
51     }
52
53 DLL_HIDDEN
54 void va_TraceInit(VADisplay dpy);
55 DLL_HIDDEN
56 void va_TraceEnd(VADisplay dpy);
57
58 DLL_HIDDEN
59 void va_TraceInitialize (
60     VADisplay dpy,
61     int *major_version,  /* out */
62     int *minor_version   /* out */
63 );
64
65 DLL_HIDDEN
66 void va_TraceTerminate (
67     VADisplay dpy
68 );
69
70 DLL_HIDDEN
71 void va_TraceCreateConfig(
72     VADisplay dpy,
73     VAProfile profile, 
74     VAEntrypoint entrypoint, 
75     VAConfigAttrib *attrib_list,
76     int num_attribs,
77     VAConfigID *config_id /* out */
78 );
79
80 DLL_HIDDEN
81 void va_TraceDestroyConfig (
82     VADisplay dpy,
83     VAConfigID config_id
84 );
85
86 DLL_HIDDEN
87 void va_TraceCreateSurfaces(
88     VADisplay dpy,
89     int width,
90     int height,
91     int format,
92     int num_surfaces,
93     VASurfaceID *surfaces,      /* out */
94     VASurfaceAttrib    *attrib_list,
95     unsigned int        num_attribs
96 );
97
98 DLL_HIDDEN
99 void va_TraceDestroySurfaces(
100     VADisplay dpy,
101     VASurfaceID *surface_list,
102     int num_surfaces
103 );
104
105 DLL_HIDDEN
106 void va_TraceCreateContext(
107     VADisplay dpy,
108     VAConfigID config_id,
109     int picture_width,
110     int picture_height,
111     int flag,
112     VASurfaceID *render_targets,
113     int num_render_targets,
114     VAContextID *context                /* out */
115 );
116
117 DLL_HIDDEN
118 void va_TraceDestroyContext (
119     VADisplay dpy,
120     VAContextID context
121 );
122
123 DLL_HIDDEN
124 void va_TraceCreateMFContext (
125     VADisplay dpy,
126     VAContextID *mf_context     /* out */
127 );
128
129 DLL_HIDDEN
130 void va_TraceMFAddContext (
131     VADisplay dpy,
132     VAMFContextID mf_context,
133     VAContextID context
134 );
135
136 DLL_HIDDEN
137 void va_TraceMFReleaseContext (
138     VADisplay dpy,
139     VAMFContextID mf_context,
140     VAContextID context
141 );
142
143 DLL_HIDDEN
144 void va_TraceMFSubmit (
145     VADisplay dpy,
146     VAMFContextID mf_context,
147     VAContextID *contexts,
148     int num_contexts
149 );
150
151 DLL_HIDDEN
152 void va_TraceCreateBuffer (
153     VADisplay dpy,
154     VAContextID context,        /* in */
155     VABufferType type,          /* in */
156     unsigned int size,          /* in */
157     unsigned int num_elements,  /* in */
158     void *data,                 /* in */
159     VABufferID *buf_id          /* out */
160 );
161
162 DLL_HIDDEN
163 void va_TraceDestroyBuffer (
164     VADisplay dpy,
165     VABufferID buf_id    /* in */
166 );
167
168 DLL_HIDDEN
169 void va_TraceMapBuffer (
170     VADisplay dpy,
171     VABufferID buf_id,  /* in */
172     void **pbuf         /* out */
173 );
174
175
176 DLL_HIDDEN
177 void va_TraceBeginPicture(
178     VADisplay dpy,
179     VAContextID context,
180     VASurfaceID render_target
181 );
182
183 DLL_HIDDEN
184 void va_TraceRenderPicture(
185     VADisplay dpy,
186     VAContextID context,
187     VABufferID *buffers,
188     int num_buffers
189 );
190
191 DLL_HIDDEN
192 void va_TraceEndPicture(
193     VADisplay dpy,
194     VAContextID context,
195     int endpic_done
196 );
197
198 DLL_HIDDEN
199 void va_TraceSyncSurface(
200     VADisplay dpy,
201     VASurfaceID render_target
202 );
203
204 DLL_HIDDEN
205 void va_TraceQuerySurfaceAttributes(
206     VADisplay           dpy,
207     VAConfigID          config,
208     VASurfaceAttrib    *attrib_list,
209     unsigned int       *num_attribs
210 );
211
212 DLL_HIDDEN
213 void va_TraceQuerySurfaceStatus(
214     VADisplay dpy,
215     VASurfaceID render_target,
216     VASurfaceStatus *status     /* out */
217 );
218
219 DLL_HIDDEN
220 void va_TraceQuerySurfaceError(
221         VADisplay dpy,
222         VASurfaceID surface,
223         VAStatus error_status,
224         void **error_info /*out*/
225 );
226
227
228 DLL_HIDDEN
229 void va_TraceMaxNumDisplayAttributes (
230     VADisplay dpy,
231     int number
232 );
233
234 DLL_HIDDEN
235 void va_TraceQueryDisplayAttributes (
236     VADisplay dpy,
237     VADisplayAttribute *attr_list,      /* out */
238     int *num_attributes                 /* out */
239 );
240
241 DLL_HIDDEN
242 void va_TraceGetDisplayAttributes (
243     VADisplay dpy,
244     VADisplayAttribute *attr_list,
245     int num_attributes
246 );
247
248 DLL_HIDDEN
249 void va_TraceSetDisplayAttributes (
250     VADisplay dpy,
251     VADisplayAttribute *attr_list,
252     int num_attributes
253 );
254
255 /* extern function called by display side */
256 void va_TracePutSurface (
257     VADisplay dpy,
258     VASurfaceID surface,
259     void *draw, /* the target Drawable */
260     short srcx,
261     short srcy,
262     unsigned short srcw,
263     unsigned short srch,
264     short destx,
265     short desty,
266     unsigned short destw,
267     unsigned short desth,
268     VARectangle *cliprects, /* client supplied clip list */
269     unsigned int number_cliprects, /* number of clip rects in the clip list */
270     unsigned int flags /* de-interlacing flags */
271 );
272
273 #ifdef __cplusplus
274 }
275 #endif
276     
277
278 #endif /* VA_TRACE_H */