[Libva] [PATCH] use "uintptr_t*" for buffers in VASurfaceAttributeTPI

Kibey, Sameer sameer.kibey at intel.com
Tue Apr 22 17:49:43 PDT 2014


Just to add, without this patch 64-bit address will get truncated to 32-bits, causing nasty bugs on 64 bit platforms.
Thanks. 
Sameer 

-----Original Message-----
From: Zhao, Halley 
Sent: Tuesday, April 22, 2014 5:43 PM
To: libva at lists.freedesktop.org
Cc: Zhao, Halley; Kibey, Sameer
Subject: [PATCH] use "uintptr_t*" for buffers in VASurfaceAttributeTPI

From: "Zhao, Halley" <halley.zhao at intel.com>

it supports both 32bits and 64bits system, either pointer or handle/fd

signed-off-by: Kibey Sameer<sameer.kibey at intel.com>
signed-off-by: Zhao Halley<halley.zhao at intel.com>
---
 va/va_tpi.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/va/va_tpi.h b/va/va_tpi.h
index d4a9d06..2454037 100644
--- a/va/va_tpi.h
+++ b/va/va_tpi.h
@@ -24,6 +24,7 @@
 #ifndef _VA_TPI_H_
 #define _VA_TPI_H_
 
+#include <stdint.h>
 #include <va/va.h>
 
 #ifdef __cplusplus
@@ -60,7 +61,7 @@ typedef struct _VASurfaceAttributeTPI {
     unsigned int chroma_u_offset; /* U offset from the beginning of the memory */
     unsigned int chroma_v_offset; /* V offset from the beginning of the memory */
     unsigned int count; /* buffer count for surface creation */
-    unsigned int *buffers; /* buffer handles or user pointers */
+    uintptr_t *buffers; /* buffer handles or user pointers */
     unsigned int reserved[4]; /* used to pass additional information, like
                                * Android native window pointer
                                */
-- 
1.8.3.2



More information about the Libva mailing list