Hi, 2015-02-03 22:11 GMT+01:00 Sean V Kelley <sea...@posteo.de>: > From: Heng-ruey Hsu <henry...@chromium.org> > > With this, we can get hardware supported resolution for video encode and > decode. This CL is used to prepare GetSupportedResolution in chrome. > > Signed-off-by: Heng-ruey Hsu <henry...@chromium.org> > Reviewed-by: Wu-cheng Li <wuchen...@chromium.org> > Reviewed-by: Sean V Kelley <sea...@posteo.de> > Cc: Pawel Osciak <posc...@chromium.org> > Cc: Stéphane Marchesin <marc...@chromium.org> > --- > src/i965_drv_video.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c > index ac2aeac..64f4876 100644 > --- a/src/i965_drv_video.c > +++ b/src/i965_drv_video.c > @@ -5149,6 +5149,18 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx, > attribs[i].value.value.p = NULL; /* ignore */ > i++; > > + attribs[i].type = VASurfaceAttribMaxWidth; > + attribs[i].value.type = VAGenericValueTypeInteger; > + attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE; > + attribs[i].value.value.i = i965->codec_info->max_width; > + i++; > + > + attribs[i].type = VASurfaceAttribMaxHeight; > + attribs[i].value.type = VAGenericValueTypeInteger; > + attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE; > + attribs[i].value.value.i = i965->codec_info->max_height; > + i++; > + > if (i > *num_attribs) { > *num_attribs = i; > free(attribs);
This would work as a temporary solution. However, a really correct solution requires a second patch to make codec_info really per-codec. i.e. max resolution constraints can vary on a per-codec basis, depending on the generation. Regards, -- Gwenole Beauchesne Intel Corporation SAS / 2 rue de Paris, 92196 Meudon Cedex, France Registration Number (RCS): Nanterre B 302 456 199 _______________________________________________ Libva mailing list Libva@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libva