summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-08-06 10:24:33 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-08-06 18:56:20 +0200
commitee4554ac8ac8c0ad2be9fa2f5c4f4095d29e90e8 (patch)
tree807b90170453625fd2302c8eaec70163446c155d
parentd458d66fe76f7ac657127e41ae4e30464970172e (diff)
wayland: allow de-interlaced picture buffers.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
-rw-r--r--test/common/va_display_wayland.c2
-rw-r--r--test/putsurface/putsurface_wayland.c2
-rw-r--r--va/wayland/va_backend_wayland.h2
-rw-r--r--va/wayland/va_wayland.c8
-rw-r--r--va/wayland/va_wayland.h13
5 files changed, 23 insertions, 4 deletions
diff --git a/test/common/va_display_wayland.c b/test/common/va_display_wayland.c
index 7cdb5c4..332d16d 100644
--- a/test/common/va_display_wayland.c
+++ b/test/common/va_display_wayland.c
@@ -172,7 +172,7 @@ va_put_surface_wayland(
if (!ensure_window(va_dpy, dst_rect->width, dst_rect->height))
return VA_STATUS_ERROR_ALLOCATION_FAILED;
- va_status = vaGetSurfaceBufferWl(va_dpy, surface, &buffer);
+ va_status = vaGetSurfaceBufferWl(va_dpy, surface, VA_FRAME_PICTURE, &buffer);
if (va_status != VA_STATUS_SUCCESS)
return va_status;
diff --git a/test/putsurface/putsurface_wayland.c b/test/putsurface/putsurface_wayland.c
index 109ec48..3e1d495 100644
--- a/test/putsurface/putsurface_wayland.c
+++ b/test/putsurface/putsurface_wayland.c
@@ -156,7 +156,7 @@ va_put_surface(
wl_display_iterate(wl_drawable->display, WL_DISPLAY_READABLE);
}
- va_status = vaGetSurfaceBufferWl(va_dpy, va_surface, &buffer);
+ va_status = vaGetSurfaceBufferWl(va_dpy, va_surface, VA_FRAME_PICTURE, &buffer);
if (va_status != VA_STATUS_SUCCESS)
return va_status;
diff --git a/va/wayland/va_backend_wayland.h b/va/wayland/va_backend_wayland.h
index dfa43eb..b33e3a1 100644
--- a/va/wayland/va_backend_wayland.h
+++ b/va/wayland/va_backend_wayland.h
@@ -49,6 +49,7 @@ struct VADriverVTableWayland {
VAStatus (*vaGetSurfaceBufferWl)(
struct VADriverContext *ctx,
VASurfaceID surface,
+ unsigned int flags,
struct wl_buffer **out_buffer
);
@@ -56,6 +57,7 @@ struct VADriverVTableWayland {
VAStatus (*vaGetImageBufferWl)(
struct VADriverContext *ctx,
VAImageID image,
+ unsigned int flags,
struct wl_buffer **out_buffer
);
};
diff --git a/va/wayland/va_wayland.c b/va/wayland/va_wayland.c
index cfd2ec1..196ab51 100644
--- a/va/wayland/va_wayland.c
+++ b/va/wayland/va_wayland.c
@@ -163,6 +163,7 @@ VAStatus
vaGetSurfaceBufferWl(
VADisplay dpy,
VASurfaceID surface,
+ unsigned int flags,
struct wl_buffer **out_buffer
)
{
@@ -172,13 +173,15 @@ vaGetSurfaceBufferWl(
return VA_STATUS_ERROR_INVALID_DISPLAY;
if (!ctx->vtable_wayland || !ctx->vtable_wayland->vaGetSurfaceBufferWl)
return VA_STATUS_ERROR_UNIMPLEMENTED;
- return ctx->vtable_wayland->vaGetSurfaceBufferWl(ctx, surface, out_buffer);
+ return ctx->vtable_wayland->vaGetSurfaceBufferWl(ctx, surface, flags,
+ out_buffer);
}
VAStatus
vaGetImageBufferWl(
VADisplay dpy,
VAImageID image,
+ unsigned int flags,
struct wl_buffer **out_buffer
)
{
@@ -188,5 +191,6 @@ vaGetImageBufferWl(
return VA_STATUS_ERROR_INVALID_DISPLAY;
if (!ctx->vtable_wayland || !ctx->vtable_wayland->vaGetImageBufferWl)
return VA_STATUS_ERROR_UNIMPLEMENTED;
- return ctx->vtable_wayland->vaGetImageBufferWl(ctx, image, out_buffer);
+ return ctx->vtable_wayland->vaGetImageBufferWl(ctx, image, flags,
+ out_buffer);
}
diff --git a/va/wayland/va_wayland.h b/va/wayland/va_wayland.h
index 009f2d1..46fbf2c 100644
--- a/va/wayland/va_wayland.h
+++ b/va/wayland/va_wayland.h
@@ -75,8 +75,15 @@ vaGetDisplayWl(struct wl_display *display);
* color conversion be needed, then VA/VPP API can fulfill this
* purpose.
*
+ * The @flags describe the desired picture structure. This is useful
+ * to expose a de-interlaced buffer. If the VA driver does not support
+ * any of the supplied flags, then #VA_STATUS_ERROR_FLAG_NOT_SUPPORTED
+ * is returned. The following flags are allowed: \c VA_FRAME_PICTURE,
+ * \c VA_TOP_FIELD, \c VA_BOTTOM_FIELD.
+ *
* @param[in] dpy the VA display
* @param[in] surface the VA surface
+ * @param[in] flags the deinterlacing flags
* @param[out] out_buffer a wl_buffer wrapping the VA @surface
* @return VA_STATUS_SUCCESS if successful
*/
@@ -84,6 +91,7 @@ VAStatus
vaGetSurfaceBufferWl(
VADisplay dpy,
VASurfaceID surface,
+ unsigned int flags,
struct wl_buffer **out_buffer
);
@@ -97,8 +105,12 @@ vaGetSurfaceBufferWl(
* color conversion be needed, then VA/VPP API can fulfill this
* purpose.
*
+ * The @flags describe the desired picture structure. See
+ * vaGetSurfaceBufferWl() description for more details.
+ *
* @param[in] dpy the VA display
* @param[in] image the VA image
+ * @param[in] flags the deinterlacing flags
* @param[out] out_buffer a wl_buffer wrapping the VA @image
* @return VA_STATUS_SUCCESS if successful
*/
@@ -106,6 +118,7 @@ VAStatus
vaGetImageBufferWl(
VADisplay dpy,
VAImageID image,
+ unsigned int flags,
struct wl_buffer **out_buffer
);