summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeng-ruey Hsu <henryhsu@chromium.org>2015-02-03 13:11:30 -0800
committerXiang, Haihao <haihao.xiang@intel.com>2015-03-09 12:51:30 +0800
commit1d19387be16165a26c33ac2cbac6388bd801abe7 (patch)
treeca154be341233ee7c7b04bc22cab8d6ba47c456e
parentec0377490e38039e088920988e768029d5b70d8d (diff)
downloadlibva-intel-driver-1d19387be16165a26c33ac2cbac6388bd801abe7.tar.gz
libva-intel-driver-1d19387be16165a26c33ac2cbac6388bd801abe7.tar.bz2
libva-intel-driver-1d19387be16165a26c33ac2cbac6388bd801abe7.zip
libva-intel-driver: Implement max width and height in QuerySurfaceAttributes
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 <henryhsu@chromium.org> Reviewed-by: Wu-cheng Li <wuchengli@chromium.org> Reviewed-by: Sean V Kelley <seanvk@posteo.de> Cc: Pawel Osciak <posciak@chromium.org> Cc: Stéphane Marchesin <marcheu@chromium.org> (cherry picked from commit 9a20d6c34cb65e5b85dd16d6c8b3a215c5972b18)
-rw-r--r--src/i965_drv_video.c12
1 files changed, 12 insertions, 0 deletions
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);