From b62ef279566e8d2548b519f5b62abceede1042c7 Mon Sep 17 00:00:00 2001 From: Simon Farnsworth Date: Thu, 29 May 2014 10:21:03 +0100 Subject: [PATCH] MADI: Reject reference surfaces in the wrong format SNB and IVB DNDI only work with NV12 surfaces. Reject anything else. Signed-off-by: Simon Farnsworth --- src/i965_post_processing.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c index 5f5a508..44ba3e0 100755 --- a/src/i965_post_processing.c +++ b/src/i965_post_processing.c @@ -3106,6 +3106,11 @@ pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_contex return VA_STATUS_ERROR_UNIMPLEMENTED; } + if (previous_in_obj_surface && previous_in_obj_surface->fourcc != VA_FOURCC_NV12) { + WARN_ONCE("Forward temporal reference must be NV12\n"); + return VA_STATUS_ERROR_INVALID_PARAMETER; + } + /* source (temporal reference) YUV surface index 5 */ orig_w = previous_in_obj_surface->orig_width; orig_h = previous_in_obj_surface->orig_height; @@ -3605,6 +3610,11 @@ gen7_pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_c return VA_STATUS_ERROR_UNIMPLEMENTED; } + if (previous_in_obj_surface && previous_in_obj_surface->fourcc != VA_FOURCC_NV12) { + WARN_ONCE("Forward temporal reference must be NV12\n"); + return VA_STATUS_ERROR_INVALID_PARAMETER; + } + /* source (temporal reference) YUV surface index 4 */ orig_w = previous_in_obj_surface->orig_width; orig_h = previous_in_obj_surface->orig_height; -- 1.9.0