summaryrefslogtreecommitdiff
path: root/va/va_tpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'va/va_tpi.c')
-rw-r--r--va/va_tpi.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/va/va_tpi.c b/va/va_tpi.c
index 86385b0..e9169fc 100644
--- a/va/va_tpi.c
+++ b/va/va_tpi.c
@@ -137,7 +137,39 @@ VAStatus vaCreateSurfacesForUserPtr(
return VA_STATUS_ERROR_UNIMPLEMENTED;
}
+/*
+ * Create surface from the Kernel buffer
+ */
+VAStatus vaCreateSurfaceFromKBuf(
+ VADisplay dpy,
+ int width,
+ int height,
+ int format,
+ VASurfaceID *surface, /* out */
+ unsigned int kbuf_handle, /* kernel buffer handle*/
+ unsigned size, /* kernel buffer size */
+ unsigned int kBuf_fourcc, /* expected fourcc */
+ unsigned int luma_stride, /* luma stride, could be width aligned with a special value */
+ unsigned int chroma_u_stride, /* chroma stride */
+ unsigned int chroma_v_stride,
+ unsigned int luma_offset, /* could be 0 */
+ unsigned int chroma_u_offset, /* UV offset from the beginning of the memory */
+ unsigned int chroma_v_offset
+)
+{
+ VADriverContextP ctx;
+ struct VADriverVTableTPI *tpi;
+ CHECK_DISPLAY(dpy);
+ ctx = CTX(dpy);
+ tpi = (struct VADriverVTableTPI *)ctx->vtable_tpi;
+ if (tpi && tpi->vaCreateSurfaceFromKBuf) {
+ return tpi->vaCreateSurfaceFromKBuf( ctx, width, height, format, surface, kbuf_handle,
+ size, kBuf_fourcc, luma_stride, chroma_u_stride,
+ chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset );
+ } else
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
+}
VAStatus vaPutSurfaceBuf (