[Libva] [PATCH] Change the definition of the buffer used for processing
Xiang, Haihao
haihao.xiang at intel.com
Wed Jun 4 20:04:34 PDT 2014
On Wed, 2014-06-04 at 05:52 +0000, Chen, Wei-fu wrote:
> From c516b1365d3782ec2611109fdb4528e1efcdcbbc Mon Sep 17 00:00:00 2001
>
> From: wchen103 <wchen103>
>
> Date: Tue, 3 Jun 2014 14:58:00 -0400
>
> Subject: [PATCH 1/1] Change the definition of the buffer used for
> processing
>
> rate query for encode/decode
>
>
>
> ---
>
> va/va.c | 2 +-
>
> va/va.h | 12 ++++++++----
>
> va/va_backend.h | 2 +-
>
> 3 files changed, 10 insertions(+), 6 deletions(-)
>
>
>
> diff --git a/va/va.c b/va/va.c
>
> index 7a14f5a..ea785a0 100644
>
> --- a/va/va.c
>
> +++ b/va/va.c
>
> @@ -677,7 +677,7 @@ VAStatus vaQueryConfigAttributes (
>
> VAStatus vaQueryProcessingRate (
>
> VADisplay dpy,
>
> VAConfigID config_id,
>
> - VABufferID proc_buf,
>
> + VAProcessingRateBuffer *proc_buf,
>
> unsigned int *processing_rate /* out */
>
> )
>
> {
>
> diff --git a/va/va.h b/va/va.h
>
> index eb58a40..5350fe2 100644
>
> --- a/va/va.h
>
> +++ b/va/va.h
>
> @@ -1309,9 +1309,6 @@ typedef enum
>
> */
>
> VAProcFilterParameterBufferType = 42,
>
> -/* Following are all other buffer types */
>
> - VAProcessingBufferType = 101,
>
> -
>
> /**
>
> * \brief Intel specific buffer types start at 1001
>
> */
>
> @@ -1355,6 +1352,13 @@ typedef struct _VAProcessingRateBufferDec {
>
> unsigned int reserved;
>
> } VAProcessingRateBufferDec;
>
> +typedef struct _VAProcessingRateBuffer {
>
> + union {
>
> + VAProcessingRateBufferEnc proc_buf_enc;
>
> + VAProcessingRateBufferDec proc_buf_dec;
>
> + }
>
> +} VAProcessingRateBuffer;
>
> +
>
> /**
>
> * \brief Queries processing rate for the supplied config.
>
> *
>
> @@ -1379,7 +1383,7 @@ VAStatus
>
> vaQueryProcessingRate(
>
> VADisplay dpy,
>
> VAConfigID config,
>
> - VABufferID proc_buf,
>
> + VAProcessingRateBuffer *proc_buf,
>
> unsigned int *processing_rate
>
> );
>
> diff --git a/va/va_backend.h b/va/va_backend.h
>
> index 588a54a..8db0206 100644
>
> --- a/va/va_backend.h
>
> +++ b/va/va_backend.h
>
> @@ -102,7 +102,7 @@ struct VADriverVTable
>
> VAStatus (*vaQueryProcessingRate) (
>
> VADriverContextP ctx,
>
> VAConfigID config_id,
>
> - VABufferID buf_id,
>
> + VAProcessingRateBuffer *proc_buf,
>
> unsigned int *processing_rate /* out
> */
>
> );
>
> --
>
>
>
> Hi,
>
>
>
> Since we would like support the processing rate query even the context
> was not created,
>
> We remove the buffer type and add the new structure to meet the
> requirement.
>
Why does the current interface not meet the requirement ? User can use
VA Buffer without a context, such as vaMapBuffer()/vaUnMapBuffer(), so I
think the current interface can meet your requirement too.
>
>
> Suggest above changes to fix.
>
>
>
> Thanks,
>
> Wei-fu
>
>
>
>
>
>
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva
More information about the Libva
mailing list