[Libva] [PATCH] Change the definition of the buffer used for processing

Chen, Wei-fu wei-fu.chen at intel.com
Tue Jun 3 22:52:11 PDT 2014


>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.


Suggest above changes to fix.

Thanks,
Wei-fu


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libva/attachments/20140604/d68d1f13/attachment.html>


More information about the Libva mailing list