[Libva] [PATCH 1/3] VPP: support blending capability query

Li Xiaowei xiaowei.a.li at intel.com
Mon Jul 29 05:32:34 PDT 2013


Signed-off-by: Li,Xiaowei <xiaowei.a.li at intel.com>
---
 src/i965_drv_video.c |    8 ++++++++
 src/i965_drv_video.h |    1 +
 2 files changed, 9 insertions(+)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 4dfc33e..fdddb01 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -78,6 +78,8 @@
 
 #define HAS_TILED_SURFACE(ctx) ((ctx)->codec_info->has_tiled_surface)
 
+#define HAS_BLENDING(ctx) ((ctx)->codec_info->has_blending)
+
 static int get_sampling_from_fourcc(unsigned int fourcc);
 
 /* Check whether we are rendering to X11 (VA/X11 or VA/GLX API) */
@@ -256,6 +258,7 @@ static struct hw_codec_info gen7_hw_codec_info = {
     .has_accelerated_getimage = 1,
     .has_accelerated_putimage = 1,
     .has_tiled_surface = 1,
+    .has_blending = 1,
 
     .num_filters = 2,
     .filters = {
@@ -283,6 +286,8 @@ static struct hw_codec_info gen75_hw_codec_info = {
     .has_accelerated_putimage = 1,
     .has_tiled_surface = 1,
     .has_di_motion_adptive = 1,
+    .has_blending = 1,
+
     .num_filters = 4,
     .filters = {
         { VAProcFilterNoiseReduction, I965_RING_VEBOX },
@@ -4723,6 +4728,9 @@ VAStatus i965_QueryVideoProcPipelineCaps(
     pipeline_cap->num_output_color_standards = 1;
     pipeline_cap->output_color_standards = vpp_output_color_standards;
 
+    if (HAS_BLENDING(i965))
+       pipeline_cap->blend_flags = VA_BLEND_LUMA_KEY | VA_BLEND_GLOBAL_ALPHA;
+
     for (i = 0; i < num_filters; i++) {
         struct object_buffer *obj_buffer = BUFFER(filters[i]);
 
diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h
index 48519cd..0d4853e 100644
--- a/src/i965_drv_video.h
+++ b/src/i965_drv_video.h
@@ -291,6 +291,7 @@ struct hw_codec_info
     unsigned int has_tiled_surface:1;
     unsigned int has_di_motion_adptive:1;
     unsigned int has_di_motion_compensated:1;
+    unsigned int has_blending:1;
 
     unsigned int num_filters;
     struct i965_filter filters[VAProcFilterCount];
-- 
1.7.9.5



More information about the Libva mailing list