2 * Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
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:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
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 INTEL 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.
27 * \brief The video processing API
29 * This file contains the \ref api_vpp "Video processing API".
40 * \defgroup api_vpp Video processing API
44 * The video processing API uses the same paradigm as for decoding:
45 * - Query for supported filters;
46 * - Set up a video processing pipeline;
47 * - Send video processing parameters through VA buffers.
49 * \section api_vpp_caps Query for supported filters
51 * Checking whether video processing is supported can be performed
52 * with vaQueryConfigEntrypoints() and the profile argument set to
53 * #VAProfileNone. If video processing is supported, then the list of
54 * returned entry-points will include #VAEntrypointVideoProc.
57 * VAEntrypoint *entrypoints;
58 * int i, num_entrypoints, supportsVideoProcessing = 0;
60 * num_entrypoints = vaMaxNumEntrypoints();
61 * entrypoints = malloc(num_entrypoints * sizeof(entrypoints[0]);
62 * vaQueryConfigEntrypoints(va_dpy, VAProfileNone,
63 * entrypoints, &num_entrypoints);
65 * for (i = 0; !supportsVideoProcessing && i < num_entrypoints; i++) {
66 * if (entrypoints[i] == VAEntrypointVideoProc)
67 * supportsVideoProcessing = 1;
71 * Then, the vaQueryVideoProcFilters() function is used to query the
72 * list of video processing filters.
75 * VAProcFilterType filters[VAProcFilterCount];
76 * unsigned int num_filters = VAProcFilterCount;
78 * // num_filters shall be initialized to the length of the array
79 * vaQueryVideoProcFilters(va_dpy, vpp_ctx, &pipe_caps, &num_filters);
82 * Finally, individual filter capabilities can be checked with
83 * vaQueryVideoProcFilterCaps().
86 * VAProcFilterCap denoise_caps;
87 * unsigned int num_denoise_caps = 1;
88 * vaQueryVideoProcFilterCaps(va_dpy, vpp_ctx,
89 * VAProcFilterNoiseReduction,
90 * &denoise_caps, &num_denoise_caps
93 * VAProcFilterCapDeinterlacing deinterlacing_caps[VAProcDeinterlacingCount];
94 * unsigned int num_deinterlacing_caps = VAProcDeinterlacingCount;
95 * vaQueryVideoProcFilterCaps(va_dpy, vpp_ctx,
96 * VAProcFilterDeinterlacing,
97 * &deinterlacing_caps, &num_deinterlacing_caps
101 * \section api_vpp_setup Set up a video processing pipeline
103 * A video processing pipeline buffer is created for each source
104 * surface we want to process. However, buffers holding filter
105 * parameters can be created once and for all. Rationale is to avoid
106 * multiple creation/destruction chains of filter buffers and also
107 * because filter parameters generally won't change frame after
108 * frame. e.g. this makes it possible to implement a checkerboard of
109 * videos where the same filters are applied to each video source.
111 * The general control flow is demonstrated by the following pseudo-code:
114 * VABufferID denoise_filter, deint_filter;
115 * VABufferID filter_bufs[VAProcFilterCount];
116 * unsigned int num_filter_bufs;
118 * for (i = 0; i < num_filters; i++) {
119 * switch (filters[i]) {
120 * case VAProcFilterNoiseReduction: { // Noise reduction filter
121 * VAProcFilterParameterBuffer denoise;
122 * denoise.type = VAProcFilterNoiseReduction;
123 * denoise.value = 0.5;
124 * vaCreateBuffer(va_dpy, vpp_ctx,
125 * VAProcFilterParameterBufferType, sizeof(denoise), 1,
126 * &denoise, &denoise_filter
128 * filter_bufs[num_filter_bufs++] = denoise_filter;
132 * case VAProcFilterDeinterlacing: // Motion-adaptive deinterlacing
133 * for (j = 0; j < num_deinterlacing_caps; j++) {
134 * VAProcFilterCapDeinterlacing * const cap = &deinterlacing_caps[j];
135 * if (cap->type != VAProcDeinterlacingMotionAdaptive)
138 * VAProcFilterParameterBufferDeinterlacing deint;
139 * deint.type = VAProcFilterDeinterlacing;
140 * deint.algorithm = VAProcDeinterlacingMotionAdaptive;
141 * vaCreateBuffer(va_dpy, vpp_ctx,
142 * VAProcFilterParameterBufferType, sizeof(deint), 1,
143 * &deint, &deint_filter
145 * filter_bufs[num_filter_bufs++] = deint_filter;
151 * Once the video processing pipeline is set up, the caller shall check the
152 * implied capabilities and requirements with vaQueryVideoProcPipelineCaps().
153 * This function can be used to validate the number of reference frames are
154 * needed by the specified deinterlacing algorithm, the supported color
158 * VAProcPipelineCaps pipeline_caps;
159 * VASurfaceID *forward_references;
160 * unsigned int num_forward_references;
161 * VASurfaceID *backward_references;
162 * unsigned int num_backward_references;
164 * vaQueryVideoProcPipelineCaps(va_dpy, vpp_ctx,
165 * filter_bufs, num_filter_bufs,
169 * num_forward_references = pipeline_caps.num_forward_references;
170 * forward_references =
171 * malloc(num__forward_references * sizeof(VASurfaceID));
172 * num_backward_references = pipeline_caps.num_backward_references;
173 * backward_references =
174 * malloc(num_backward_references * sizeof(VASurfaceID));
177 * \section api_vpp_submit Send video processing parameters through VA buffers
179 * Video processing pipeline parameters are submitted for each source
180 * surface to process. Video filter parameters can also change, per-surface.
181 * e.g. the list of reference frames used for deinterlacing.
184 * foreach (iteration) {
185 * vaBeginPicture(va_dpy, vpp_ctx, vpp_surface);
186 * foreach (surface) {
187 * VARectangle output_region;
188 * VABufferID pipeline_buf;
189 * VAProcPipelineParameterBuffer *pipeline_param;
191 * vaCreateBuffer(va_dpy, vpp_ctx,
192 * VAProcPipelineParameterBuffer, sizeof(*pipeline_param), 1,
193 * NULL, &pipeline_param
196 * // Setup output region for this surface
197 * // e.g. upper left corner for the first surface
198 * output_region.x = BORDER;
199 * output_region.y = BORDER;
200 * output_region.width =
201 * (vpp_surface_width - (Nx_surfaces + 1) * BORDER) / Nx_surfaces;
202 * output_region.height =
203 * (vpp_surface_height - (Ny_surfaces + 1) * BORDER) / Ny_surfaces;
205 * vaMapBuffer(va_dpy, pipeline_buf, &pipeline_param);
206 * pipeline_param->surface = surface;
207 * pipeline_param->surface_region = NULL;
208 * pipeline_param->output_region = &output_region;
209 * pipeline_param->output_background_color = 0;
210 * if (first surface to render)
211 * pipeline_param->output_background_color = 0xff000000; // black
212 * pipeline_param->filter_flags = VA_FILTER_SCALING_HQ;
213 * pipeline_param->filters = filter_bufs;
214 * pipeline_param->num_filters = num_filter_bufs;
215 * vaUnmapBuffer(va_dpy, pipeline_buf);
217 * // Update reference frames for deinterlacing, if necessary
218 * pipeline_param->forward_references = forward_references;
219 * pipeline_param->num_forward_references = num_forward_references_used;
220 * pipeline_param->backward_references = backward_references;
221 * pipeline_param->num_backward_references = num_bacward_references_used;
224 * vaRenderPicture(va_dpy, vpp_ctx, &pipeline_buf, 1);
226 * vaEndPicture(va_dpy, vpp_ctx);
231 /** \brief Video filter types. */
232 typedef enum _VAProcFilterType {
233 VAProcFilterNone = 0,
234 /** \brief Noise reduction filter. */
235 VAProcFilterNoiseReduction,
236 /** \brief Deinterlacing filter. */
237 VAProcFilterDeinterlacing,
238 /** \brief Sharpening filter. */
239 VAProcFilterSharpening,
240 /** \brief Color balance parameters. */
241 VAProcFilterColorBalance,
242 /** \brief Color standard conversion. */
243 VAProcFilterColorStandard,
244 /** \brief Max number of video filters. */
248 /** \brief Deinterlacing types. */
249 typedef enum _VAProcDeinterlacingType {
250 VAProcDeinterlacingNone = 0,
251 /** \brief Bob deinterlacing algorithm. */
252 VAProcDeinterlacingBob,
253 /** \brief Weave deinterlacing algorithm. */
254 VAProcDeinterlacingWeave,
255 /** \brief Motion adaptive deinterlacing algorithm. */
256 VAProcDeinterlacingMotionAdaptive,
257 /** \brief Motion compensated deinterlacing algorithm. */
258 VAProcDeinterlacingMotionCompensated,
259 /** \brief Max number of deinterlacing algorithms. */
260 VAProcDeinterlacingCount
261 } VAProcDeinterlacingType;
263 /** \brief Color balance types. */
264 typedef enum _VAProcColorBalanceType {
265 VAProcColorBalanceNone = 0,
267 VAProcColorBalanceHue,
268 /** \brief Saturation. */
269 VAProcColorBalanceSaturation,
270 /** \brief Brightness. */
271 VAProcColorBalanceBrightness,
272 /** \brief Contrast. */
273 VAProcColorBalanceContrast,
274 /** \brief Automatically adjusted saturation. */
275 VAProcColorBalanceAutoSaturation,
276 /** \brief Automatically adjusted brightness. */
277 VAProcColorBalanceAutoBrightness,
278 /** \brief Automatically adjusted contrast. */
279 VAProcColorBalanceAutoContrast,
280 /** \brief Max number of color balance operations. */
281 VAProcColorBalanceCount
282 } VAProcColorBalanceType;
284 /** \brief Color standard types. */
285 typedef enum _VAProcColorStandardType {
286 VAProcColorStandardNone = 0,
287 /** \brief ITU-R BT.601. */
288 VAProcColorStandardBT601,
289 /** \brief ITU-R BT.709. */
290 VAProcColorStandardBT709,
291 /** \brief ITU-R BT.470-2 System M. */
292 VAProcColorStandardBT470M,
293 /** \brief ITU-R BT.470-2 System B, G. */
294 VAProcColorStandardBT470BG,
295 /** \brief SMPTE-170M. */
296 VAProcColorStandardSMPTE170M,
297 /** \brief SMPTE-240M. */
298 VAProcColorStandardSMPTE240M,
299 /** \brief Generic film. */
300 VAProcColorStandardGenericFilm,
301 } VAProcColorStandardType;
303 /** @name Video pipeline flags */
305 /** \brief Specifies whether to apply subpictures when processing a surface. */
306 #define VA_PROC_PIPELINE_SUBPICTURES 0x00000001
308 * \brief Specifies whether to apply power or performance
309 * optimizations to a pipeline.
311 * When processing several surfaces, it may be necessary to prioritize
312 * more certain pipelines than others. This flag is only a hint to the
313 * video processor so that it can omit certain filters to save power
314 * for example. Typically, this flag could be used with video surfaces
315 * decoded from a secondary bitstream.
317 #define VA_PROC_PIPELINE_FAST 0x00000002
320 /** @name Video filter flags */
322 /** \brief Specifies whether the filter shall be present in the pipeline. */
323 #define VA_PROC_FILTER_MANDATORY 0x00000001
326 /** \brief Video processing pipeline capabilities. */
327 typedef struct _VAProcPipelineCaps {
328 /** \brief Video filter flags. See video pipeline flags. */
330 /** \brief Pipeline flags. See VAProcPipelineParameterBuffer::pipeline_flags. */
331 unsigned int pipeline_flags;
332 /** \brief Extra filter flags. See VAProcPipelineParameterBuffer::filter_flags. */
333 unsigned int filter_flags;
334 /** \brief Number of forward reference frames that are needed. */
335 unsigned int num_forward_references;
336 /** \brief Number of backward reference frames that are needed. */
337 unsigned int num_backward_references;
338 } VAProcPipelineCaps;
340 /** \brief Specification of values supported by the filter. */
341 typedef struct _VAProcFilterValueRange {
342 /** \brief Minimum value supported, inclusive. */
344 /** \brief Maximum value supported, inclusive. */
346 /** \brief Default value. */
348 /** \brief Step value that alters the filter behaviour in a sensible way. */
350 } VAProcFilterValueRange;
353 * \brief Video processing pipeline configuration.
355 * This buffer defines a video processing pipeline. As for any buffer
356 * passed to \c vaRenderPicture(), this is a one-time usage model.
357 * However, the actual filters to be applied are provided in the
358 * \c filters field, so they can be re-used in other processing
361 * The target surface is specified by the \c render_target argument of
362 * \c vaBeginPicture(). The general usage model is described as follows:
363 * - \c vaBeginPicture(): specify the target surface that receives the
365 * - \c vaRenderPicture(): specify a surface to be processed and composed
366 * into the \c render_target. Use as many \c vaRenderPicture() calls as
367 * necessary surfaces to compose ;
368 * - \c vaEndPicture(): tell the driver to start processing the surfaces
369 * with the requested filters.
371 * If a filter (e.g. noise reduction) needs to be applied with different
372 * values for multiple surfaces, the application needs to create as many
373 * filter parameter buffers as necessary. i.e. the filter parameters shall
374 * not change between two calls to \c vaRenderPicture().
376 * For composition usage models, the first surface to process will generally
377 * use an opaque background color, i.e. \c output_background_color set with
378 * the most significant byte set to \c 0xff. For instance, \c 0xff000000 for
379 * a black background. Then, subsequent surfaces would use a transparent
382 typedef struct _VAProcPipelineParameterBuffer {
384 * \brief Source surface ID.
386 * ID of the source surface to process. If subpictures are associated
387 * with the video surfaces then they shall be rendered to the target
388 * surface, if the #VA_PROC_PIPELINE_SUBPICTURES pipeline flag is set.
392 * \brief Region within the source surface to be processed.
394 * Pointer to a #VARectangle defining the region within the source
395 * surface to be processed. If NULL, \c surface_region implies the
398 const VARectangle *surface_region;
400 * \brief Region within the output surface.
402 * Pointer to a #VARectangle defining the region within the output
403 * surface that receives the processed pixels. If NULL, \c output_region
404 * implies the whole surface.
406 * Note that any pixels residing outside the specified region will
407 * be filled in with the \ref output_background_color.
409 const VARectangle *output_region;
411 * \brief Background color.
413 * Background color used to fill in pixels that reside outside of the
414 * specified \ref output_region. The color is specified in ARGB format:
415 * [31:24] alpha, [23:16] red, [15:8] green, [7:0] blue.
417 * Unless the alpha value is zero or the \ref output_region represents
418 * the whole target surface size, implementations shall not render the
419 * source surface to the target surface directly. Rather, in order to
420 * maintain the exact semantics of \ref output_background_color, the
421 * driver shall use a temporary surface and fill it in with the
422 * appropriate background color. Next, the driver will blend this
423 * temporary surface into the target surface.
425 unsigned int output_background_color;
427 * \brief Pipeline filters. See video pipeline flags.
429 * Flags to control the pipeline, like whether to apply subpictures
430 * or not, notify the driver that it can opt for power optimizations,
431 * should this be needed.
433 unsigned int pipeline_flags;
435 * \brief Extra filter flags. See vaPutSurface() flags.
437 * Filter flags are used as a fast path, wherever possible, to use
438 * vaPutSurface() flags instead of explicit filter parameter buffers.
440 * Allowed filter flags API-wise. Use vaQueryVideoProcPipelineCaps()
441 * to check for implementation details:
442 * - Bob-deinterlacing: \c VA_FRAME_PICTURE, \c VA_TOP_FIELD,
443 * \c VA_BOTTOM_FIELD. Note that any deinterlacing filter
444 * (#VAProcFilterDeinterlacing) will override those flags.
445 * - Color space conversion: \c VA_SRC_BT601, \c VA_SRC_BT709,
446 * \c VA_SRC_SMPTE_240. Note that any color standard filter
447 * (#VAProcFilterColorStandard) will override those flags.
448 * - Scaling: \c VA_FILTER_SCALING_DEFAULT, \c VA_FILTER_SCALING_FAST,
449 * \c VA_FILTER_SCALING_HQ, \c VA_FILTER_SCALING_NL_ANAMORPHIC.
451 unsigned int filter_flags;
453 * \brief Array of filters to apply to the surface.
455 * The list of filters shall be ordered in the same way the driver expects
456 * them. i.e. as was returned from vaQueryVideoProcFilters().
457 * Otherwise, a #VA_STATUS_ERROR_INVALID_FILTER_CHAIN is returned
458 * from vaRenderPicture() with this buffer.
460 * #VA_STATUS_ERROR_UNSUPPORTED_FILTER is returned if the list
461 * contains an unsupported filter.
463 * Note: no filter buffer is destroyed after a call to vaRenderPicture(),
464 * only this pipeline buffer will be destroyed as per the core API
465 * specification. This allows for flexibility in re-using the filter for
466 * other surfaces to be processed.
469 /** \brief Actual number of filters. */
470 unsigned int num_filters;
471 /** \brief Array of forward reference frames. */
472 VASurfaceID *forward_references;
473 /** \brief Number of forward reference frames that were supplied. */
474 unsigned int num_forward_references;
475 /** \brief Array of backward reference frames. */
476 VASurfaceID *backward_references;
477 /** \brief Number of backward reference frames that were supplied. */
478 unsigned int num_backward_references;
479 } VAProcPipelineParameterBuffer;
482 * \brief Filter parameter buffer base.
484 * This is a helper structure used by driver implementations only.
485 * Users are not supposed to allocate filter parameter buffers of this
488 typedef struct _VAProcFilterParameterBufferBase {
489 /** \brief Filter type. */
490 VAProcFilterType type;
491 } VAProcFilterParameterBufferBase;
494 * \brief Default filter parametrization.
496 * Unless there is a filter-specific parameter buffer,
497 * #VAProcFilterParameterBuffer is the default type to use.
499 typedef struct _VAProcFilterParameterBuffer {
500 /** \brief Filter type. */
501 VAProcFilterType type;
504 } VAProcFilterParameterBuffer;
506 /** \brief Deinterlacing filter parametrization. */
507 typedef struct _VAProcFilterParameterBufferDeinterlacing {
508 /** \brief Filter type. Shall be set to #VAProcFilterDeinterlacing. */
509 VAProcFilterType type;
510 /** \brief Deinterlacing algorithm. */
511 VAProcDeinterlacingType algorithm;
512 } VAProcFilterParameterBufferDeinterlacing;
515 * \brief Color balance filter parametrization.
517 * This buffer defines color balance attributes. A VA buffer can hold
518 * several color balance attributes by creating a VA buffer of desired
519 * number of elements. This can be achieved by the following pseudo-code:
522 * enum { kHue, kSaturation, kBrightness, kContrast };
524 * // Initial color balance parameters
525 * static const VAProcFilterParameterBufferColorBalance colorBalanceParams[4] =
528 * { VAProcFilterColorBalance, VAProcColorBalanceHue, 0.5 },
530 * { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 },
532 * { VAProcFilterColorBalance, VAProcColorBalanceBrightness, 0.5 },
534 * { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 }
538 * VABufferID colorBalanceBuffer;
539 * vaCreateBuffer(va_dpy, vpp_ctx,
540 * VAProcFilterParameterBufferType, sizeof(*pColorBalanceParam), 4,
541 * colorBalanceParams,
542 * &colorBalanceBuffer
545 * VAProcFilterParameterBufferColorBalance *pColorBalanceParam;
546 * vaMapBuffer(va_dpy, colorBalanceBuffer, &pColorBalanceParam);
548 * // Change brightness only
549 * pColorBalanceBuffer[kBrightness].value = 0.75;
551 * vaUnmapBuffer(va_dpy, colorBalanceBuffer);
554 typedef struct _VAProcFilterParameterBufferColorBalance {
555 /** \brief Filter type. Shall be set to #VAProcFilterColorBalance. */
556 VAProcFilterType type;
557 /** \brief Color balance attribute. */
558 VAProcColorBalanceType attrib;
560 * \brief Color balance value.
562 * Special case for automatically adjusted attributes. e.g.
563 * #VAProcColorBalanceAutoSaturation,
564 * #VAProcColorBalanceAutoBrightness,
565 * #VAProcColorBalanceAutoContrast.
566 * - If \ref value is \c 1.0 +/- \c FLT_EPSILON, the attribute is
567 * automatically adjusted and overrides any other attribute of
568 * the same type that would have been set explicitly;
569 * - If \ref value is \c 0.0 +/- \c FLT_EPSILON, the attribute is
570 * disabled and other attribute of the same type is used instead.
573 } VAProcFilterParameterBufferColorBalance;
575 /** \brief Color standard filter parametrization. */
576 typedef struct _VAProcFilterParameterBufferColorStandard {
577 /** \brief Filter type. Shall be set to #VAProcFilterColorStandard. */
578 VAProcFilterType type;
579 /** \brief Color standard to use. */
580 VAProcColorStandardType standard;
581 } VAProcFilterParameterBufferColorStandard;
584 * \brief Default filter cap specification (single range value).
586 * Unless there is a filter-specific cap structure, #VAProcFilterCap is the
587 * default type to use for output caps from vaQueryVideoProcFilterCaps().
589 typedef struct _VAProcFilterCap {
590 /** \brief Range of supported values for the filter. */
591 VAProcFilterValueRange range;
594 /** \brief Capabilities specification for the deinterlacing filter. */
595 typedef struct _VAProcFilterCapDeinterlacing {
596 /** \brief Deinterlacing algorithm. */
597 VAProcDeinterlacingType type;
598 } VAProcFilterCapDeinterlacing;
600 /** \brief Capabilities specification for the color balance filter. */
601 typedef struct _VAProcFilterCapColorBalance {
602 /** \brief Color balance operation. */
603 VAProcColorBalanceType type;
604 /** \brief Range of supported values for the specified operation. */
605 VAProcFilterValueRange range;
606 } VAProcFilterCapColorBalance;
608 /** \brief Capabilities specification for the color standard filter. */
609 typedef struct _VAProcFilterCapColorStandard {
610 /** \brief Color standard type. */
611 VAProcColorStandardType type;
612 } VAProcFilterCapColorStandard;
615 * \brief Queries video processing filters.
617 * This function returns the list of video processing filters supported
618 * by the driver. The \c filters array is allocated by the user and
619 * \c num_filters shall be initialized to the number of allocated
620 * elements in that array. Upon successful return, the actual number
621 * of filters will be overwritten into \c num_filters. Otherwise,
622 * \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \c num_filters
623 * is adjusted to the number of elements that would be returned if enough
624 * space was available.
626 * The list of video processing filters supported by the driver shall
627 * be ordered in the way they can be iteratively applied. This is needed
628 * for both correctness, i.e. some filters would not mean anything if
629 * applied at the beginning of the pipeline; but also for performance
630 * since some filters can be applied in a single pass (e.g. noise
631 * reduction + deinterlacing).
633 * @param[in] dpy the VA display
634 * @param[in] context the video processing context
635 * @param[out] filters the output array of #VAProcFilterType elements
636 * @param[in,out] num_filters the number of elements allocated on input,
637 * the number of elements actually filled in on output
640 vaQueryVideoProcFilters(
643 VAProcFilterType *filters,
644 unsigned int *num_filters
648 * \brief Queries video filter capabilities.
650 * This function returns the list of capabilities supported by the driver
651 * for a specific video filter. The \c filter_caps array is allocated by
652 * the user and \c num_filter_caps shall be initialized to the number
653 * of allocated elements in that array. Upon successful return, the
654 * actual number of filters will be overwritten into \c num_filter_caps.
655 * Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and
656 * \c num_filter_caps is adjusted to the number of elements that would be
657 * returned if enough space was available.
659 * @param[in] dpy the VA display
660 * @param[in] context the video processing context
661 * @param[in] type the video filter type
662 * @param[out] filter_caps the output array of #VAProcFilterCap elements
663 * @param[in,out] num_filter_caps the number of elements allocated on input,
664 * the number of elements actually filled in output
667 vaQueryVideoProcFilterCaps(
670 VAProcFilterType type,
672 unsigned int *num_filter_caps
676 * \brief Queries video processing pipeline capabilities.
678 * This function returns the video processing pipeline capabilities. The
679 * \c filters array defines the video processing pipeline and is an array
680 * of buffers holding filter parameters.
682 * @param[in] dpy the VA display
683 * @param[in] context the video processing context
684 * @param[in] filters the array of VA buffers defining the video
685 * processing pipeline
686 * @param[in] num_filters the number of elements in filters
687 * @param[out] pipeline_caps the video processing pipeline capabilities
690 vaQueryVideoProcPipelineCaps(
694 unsigned int num_filters,
695 VAProcPipelineCaps *pipeline_caps
704 #endif /* VA_VPP_H */