Hi, 2014-08-14 13:04 GMT+02:00 Qu, Pengfei <[email protected]>: > > From b62ef279566e8d2548b519f5b62abceede1042c7 Mon Sep 17 00:00:00 2001 > From: Simon Farnsworth <[email protected]> > 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 <[email protected]> > --- > 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 > _______________________________________________ > Libva mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/libva
This looks OK as a last resort solution, but it should be completed with an earlier check in vaQueryVideoProcPipelineCaps(). This is the function used to validate the filter chain somehow. Besides, I believe we should probably return VA_STATUS_ERROR_INVALID_IMAGE_FORMAT or any other VA_STATUS_ERROR_INVALID_SURFACE_FORMAT that yields the same error code? Thanks, -- Gwenole Beauchesne Intel Corporation SAS / 2 rue de Paris, 92196 Meudon Cedex, France Registration Number (RCS): Nanterre B 302 456 199 _______________________________________________ Libva mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libva
