From 1d19387be16165a26c33ac2cbac6388bd801abe7 Mon Sep 17 00:00:00 2001 From: Heng-ruey Hsu Date: Tue, 3 Feb 2015 13:11:30 -0800 Subject: libva-intel-driver: Implement max width and height in QuerySurfaceAttributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Wu-cheng Li Reviewed-by: Sean V Kelley Cc: Pawel Osciak Cc: Stéphane Marchesin (cherry picked from commit 9a20d6c34cb65e5b85dd16d6c8b3a215c5972b18) --- 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); -- cgit v1.2.3