summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2013-10-29 16:17:08 +0800
committerYakui Zhao <yakui.zhao@intel.com>2013-10-29 16:17:08 +0800
commite80a198f5111e9da847bc7ec1540a643ded717df (patch)
treed87eb75ffd2075c6ee23d1fa45e516daae7197eb
parent0a6e8986e3cee77401f7843ee7ef9ca77b030a69 (diff)
Export the extensional VPP filter when supported
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
-rwxr-xr-xsrc/i965_drv_video.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 9efe403..fc52c3d 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -88,6 +88,10 @@ static int
i965_os_has_ring_support(VADriverContextP ctx,
struct i965_filter *filter);
+static int
+i965_has_extvpp_support(VADriverContextP ctx,
+ struct i965_filter *filter);
+
/* Check whether we are rendering to X11 (VA/X11 or VA/GLX API) */
#define IS_VA_X11(ctx) \
(((ctx)->display_type & VA_DISPLAY_MAJOR_MASK) == VA_DISPLAY_X11)
@@ -271,6 +275,7 @@ static struct hw_codec_info gen7_hw_codec_info = {
.filters = {
{ VAProcFilterNoiseReduction, I965_RING_NULL, i965_os_has_ring_support, },
{ VAProcFilterDeinterlacing, I965_RING_NULL, i965_os_has_ring_support, },
+ { VAProcFilterExtVPP, I965_RING_NULL, i965_has_extvpp_support, },
},
};
@@ -4598,6 +4603,19 @@ i965_os_has_ring_support(VADriverContextP ctx,
return 0;
}
+static int
+i965_has_extvpp_support(VADriverContextP ctx,
+ struct i965_filter *filter)
+{
+ struct i965_driver_data *const i965 = i965_driver_data(ctx);
+ struct vpp_opencl_state *ocl_state = &i965->ocl_state;
+
+ if ((ocl_state->ocl_flags & VPP_OCL_SUPPORTED) &&
+ (ocl_state->ocl_flags & VPP_OCL_LOADED)) {
+ return 1;
+ }
+ return 0;
+}
/*
* Query video processing pipeline
*/