From 80439128ab321b027153dac98ff52c8e25afe40b Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Mon, 28 Oct 2013 10:33:58 +0800 Subject: Define the pipeline parameter for extensional VPP Signed-off-by: Zhao Yakui --- va/va.h | 7 ++++++ va/va_vpp.h | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/va/va.h b/va/va.h index 16be327..67d3806 100644 --- a/va/va.h +++ b/va/va.h @@ -1032,6 +1032,13 @@ typedef enum * color balance (#VAProcFilterParameterBufferColorBalance), etc. */ VAProcFilterParameterBufferType = 42, + /** + * \brief Video parameter buffer for extensional video post-processing + * + * This buffer describes the video post-processing pipeline parameter for + * extensional VPP which is added/developped by the customer. + */ + VAProcExtensionBufferType = 43, VABufferTypeMax } VABufferType; diff --git a/va/va_vpp.h b/va/va_vpp.h index 1a41b3e..9ccd87f 100644 --- a/va/va_vpp.h +++ b/va/va_vpp.h @@ -685,6 +685,81 @@ typedef struct _VAProcPipelineParameterBuffer { unsigned int num_additional_outputs; } VAProcPipelineParameterBuffer; + +/** + * \brief Video processing pipeline configuration for extensional VPP. + * + * This buffer defines the parameter layout for extensional video processing + * pipeline . As for any buffer passed to \c vaRenderPicture(), this is a + * one-time usage model. And it is noted that the VAProcPipelineParameterBuffer + * and VAProcExtParameterBuffer are multually exclusive. + * + * + * The target surface is specified by the \c render_target argument of + * \c vaBeginPicture(). The general usage model is described as follows: + * - \c vaBeginPicture(): specify the target surface that receives the + * processed output; + * - \c vaRenderPicture(): specify the parameter requirement for the extensional video + * post-processing. + * - \c vaEndPicture(): tell the driver to start processing the surfaces + * based on the VAProcExtParameterBuffer + */ +#define MAX_SURFACE_EXT 16 +typedef struct _VAProcExtParameterBuffer { + /** + * \brief the type id of extension video post-processing. + * id is used to determie the VPP type, + */ + unsigned int vpp_ext_typeid; + /** + * \brief Source surfaces. + * + * ID of the source surfaces to process. + */ + VASurfaceID surfaces[MAX_SURFACE_EXT]; + + /** \brief Number of input surfaces to process. */ + unsigned int num_input_surfaces; + /** + * \brief Regions within the source surface to be processed. + * + * Pointer to a #VARectangle defining the region within the output + * surface that receives the processed pixels. If NULL, \c input_region + * implies the whole surface. + * + * + */ + const VARectangle *surface_regions[MAX_SURFACE_EXT]; + /** + * \brief Region within the output surface. + * + * Pointer to a #VARectangle defining the region within the output + * surface that receives the processed pixels. If NULL, \c output_region + * implies the whole surface. + */ + const VARectangle *output_region; + + /** + * \brief flag of extra buffer. It indicates whether the parameter of + * extra_buffer needs to be passed to GPU kernel. + */ + int extra_flag; + + /** + * \brief content of extra buffer. It indicates that the content needs to + * be passed to GPU kernel when the flag is enabled. + */ + unsigned char extra_buffer[16]; + /** + * + * \brief: reserved file for the extension purpose. + * + * It should be reset to zero currently. + */ + unsigned int reserved[16]; +} VAProcExtParameterBuffer; + + /** * \brief Filter parameter buffer base. * -- cgit v1.2.3