summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD5
-rw-r--r--implement-vaquerysurfaceattributes.patch105
4 files changed, 114 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4c845850174f..4bef85a9be9c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sun Aug 27 18:00:29 UTC 2017
+# Sat Sep 2 18:48:37 UTC 2017
pkgbase = libva-vdpau-driver-chromium
pkgdesc = VDPAU backend for VA API. (special version for chromium)
pkgver = 0.7.4
- pkgrel = 2
+ pkgrel = 3
url = http://freedesktop.org/wiki/Software/vaapi
arch = i686
arch = x86_64
@@ -21,12 +21,14 @@ pkgbase = libva-vdpau-driver-chromium
source = libva-vdpau-driver-0.7.4-VAEncH264VUIBufferType.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/libva-vdpau-driver-0.7.4-VAEncH264VUIBufferType.patch?h=packages/libva-vdpau-driver
source = libva-vdpau-driver-0.7.4-fallback-x.patch
source = http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/vdpau-video/vivid/download/head:/sigfpecrash.patch-20140602223430-b42d97uv6vf2c3p7-1/sigfpe-crash.patch
+ source = implement-vaquerysurfaceattributes.patch
sha256sums = 155c1982f0ac3f5435ba20b221bcaa11be212c37db548cd1f2a030ffa17e9bb9
sha256sums = 776bfe4c101cdde396d8783029b288c6cd825d0cdbc782ca3d94a5f9ffb4558c
sha256sums = 5e567b026b97dc0e207b6c05410cc1b7b77a58ceb5046801d0ea1a321cba3b9d
sha256sums = 1ae32b8e5cca1717be4a63f09e8c6bd84a3e9b712b933816cdb32bb315dbda98
sha256sums = b923dc60ad49459ca480a56af075d954b2678a8c7f433fd03f1aa49e58cfe838
sha256sums = ef21397b0ed55f170e57fa1afef42b8b491491149af09b151f97ef3cc20ed0b7
+ sha256sums = a91e11d2826715b29c2a08036f0e70ed45df7139987ff37c84b5c04c4a9c132f
pkgname = libva-vdpau-driver-chromium
diff --git a/.gitignore b/.gitignore
index 51539f253e4b..7cd6885e2071 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
!.SRCINFO
!PKGBUILD
!libva-vdpau-driver-0.7.4-fallback-x.patch
+!implement-vaquerysurfaceattributes.patch
diff --git a/PKGBUILD b/PKGBUILD
index 146491acaff1..b31d4fbd3703 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=libva-vdpau-driver-chromium
pkgver=0.7.4
-pkgrel=2
+pkgrel=3
pkgdesc="VDPAU backend for VA API. (special version for chromium)"
arch=('i686' 'x86_64')
url='http://freedesktop.org/wiki/Software/vaapi'
@@ -22,6 +22,7 @@ source=("http://freedesktop.org/software/vaapi/releases/libva-vdpau-driver/libva
'libva-vdpau-driver-0.7.4-VAEncH264VUIBufferType.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/libva-vdpau-driver-0.7.4-VAEncH264VUIBufferType.patch?h=packages/libva-vdpau-driver'
'libva-vdpau-driver-0.7.4-fallback-x.patch' # original http://www.snewbury.org.uk/libva-vdpau-driver-0.7.4-fallback-x.patch
'http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/vdpau-video/vivid/download/head:/sigfpecrash.patch-20140602223430-b42d97uv6vf2c3p7-1/sigfpe-crash.patch'
+ 'implement-vaquerysurfaceattributes.patch'
)
sha256sums=('155c1982f0ac3f5435ba20b221bcaa11be212c37db548cd1f2a030ffa17e9bb9'
'776bfe4c101cdde396d8783029b288c6cd825d0cdbc782ca3d94a5f9ffb4558c'
@@ -29,6 +30,7 @@ sha256sums=('155c1982f0ac3f5435ba20b221bcaa11be212c37db548cd1f2a030ffa17e9bb9'
'1ae32b8e5cca1717be4a63f09e8c6bd84a3e9b712b933816cdb32bb315dbda98'
'b923dc60ad49459ca480a56af075d954b2678a8c7f433fd03f1aa49e58cfe838'
'ef21397b0ed55f170e57fa1afef42b8b491491149af09b151f97ef3cc20ed0b7'
+ 'a91e11d2826715b29c2a08036f0e70ed45df7139987ff37c84b5c04c4a9c132f'
)
prepare() {
@@ -38,6 +40,7 @@ prepare() {
patch -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-VAEncH264VUIBufferType.patch"
patch -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-fallback-x.patch"
patch -p1 -i "${srcdir}/sigfpe-crash.patch"
+ patch -p1 -i "${srcdir}/implement-vaquerysurfaceattributes.patch"
}
build() {
diff --git a/implement-vaquerysurfaceattributes.patch b/implement-vaquerysurfaceattributes.patch
new file mode 100644
index 000000000000..d3267495cf16
--- /dev/null
+++ b/implement-vaquerysurfaceattributes.patch
@@ -0,0 +1,105 @@
+Index: vdpau-video-0.7.4/src/vdpau_driver_template.h
+===================================================================
+--- vdpau-video-0.7.4.orig/src/vdpau_driver_template.h
++++ vdpau-video-0.7.4/src/vdpau_driver_template.h
+@@ -115,6 +115,13 @@ struct VA_DRIVER_VTABLE {
+ int *num_attribs /* out */
+ );
+
++ VAStatus (*vaQuerySurfaceAttributes) (
++ VADisplay dpy,
++ VAConfigID config_id,
++ VASurfaceAttrib *attrib_list, /* out */
++ unsigned int *num_attribs /* out */
++ );
++
+ VAStatus (*vaCreateSurfaces) (
+ VADriverContextP ctx,
+ int width,
+@@ -589,6 +596,7 @@ static VAStatus FUNC(Initialize)(VA_DRIV
+ vtable->vaCreateConfig = vdpau_CreateConfig;
+ vtable->vaDestroyConfig = vdpau_DestroyConfig;
+ vtable->vaGetConfigAttributes = vdpau_GetConfigAttributes;
++ vtable->vaQuerySurfaceAttributes = vdpau_QuerySurfaceAttributes;
+ vtable->vaCreateSurfaces = vdpau_CreateSurfaces;
+ vtable->vaDestroySurfaces = vdpau_DestroySurfaces;
+ vtable->vaCreateContext = vdpau_CreateContext;
+Index: vdpau-video-0.7.4/src/vdpau_video.c
+===================================================================
+--- vdpau-video-0.7.4.orig/src/vdpau_video.c
++++ vdpau-video-0.7.4/src/vdpau_video.c
+@@ -309,6 +309,54 @@ int surface_remove_association(
+ return -1;
+ }
+
++// vaQuerySurfaceAttributes
++VAStatus
++vdpau_QuerySurfaceAttributes(
++ VADriverContextP ctx,
++ VAConfigID config_id,
++ VASurfaceAttrib *attrib_list,
++ unsigned int *num_attribs
++)
++{
++ VDPAU_DRIVER_DATA_INIT;
++
++ object_config_p obj_config;
++ if ((obj_config = VDPAU_CONFIG(config_id)) == NULL)
++ return VA_STATUS_ERROR_INVALID_CONFIG;
++
++ if (!attrib_list && !num_attribs)
++ return VA_STATUS_ERROR_INVALID_PARAMETER;
++
++ if (!attrib_list) {
++ *num_attribs = 2;
++ return VA_STATUS_SUCCESS;
++ }
++
++ if (*num_attribs < 2) {
++ *num_attribs = 2;
++ return VA_STATUS_ERROR_MAX_NUM_EXCEEDED;
++ }
++
++ VdpDecoderProfile vdp_profile;
++ uint32_t max_width, max_height;
++ vdp_profile = get_VdpDecoderProfile(obj_config->profile);
++ if (!get_max_surface_size(driver_data, vdp_profile, &max_width, &max_height))
++ return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
++
++ if (attrib_list) {
++ attrib_list[0].type = VASurfaceAttribMaxWidth;
++ attrib_list[0].flags = VA_SURFACE_ATTRIB_GETTABLE;
++ attrib_list[0].value.type = VAGenericValueTypeInteger;
++ attrib_list[0].value.value.i = max_width;
++ attrib_list[1].type = VASurfaceAttribMaxHeight;
++ attrib_list[1].flags = VA_SURFACE_ATTRIB_GETTABLE;
++ attrib_list[1].value.type = VAGenericValueTypeInteger;
++ attrib_list[1].value.value.i = max_height;
++ }
++
++ return VA_STATUS_SUCCESS;
++}
++
+ // vaDestroySurfaces
+ VAStatus
+ vdpau_DestroySurfaces(
+Index: vdpau-video-0.7.4/src/vdpau_video.h
+===================================================================
+--- vdpau-video-0.7.4.orig/src/vdpau_video.h
++++ vdpau-video-0.7.4/src/vdpau_video.h
+@@ -165,6 +165,15 @@ vdpau_QueryConfigAttributes(
+ int *num_attribs
+ ) attribute_hidden;
+
++// vaQuerySurfaceAttributes
++VAStatus
++vdpau_QuerySurfaceAttributes(
++ VADriverContextP ctx,
++ VAConfigID config_id,
++ VASurfaceAttrib *attrib_list,
++ unsigned int *num_attribs
++) attribute_hidden;
++
+ // vaCreateSurfaces
+ VAStatus
+ vdpau_CreateSurfaces(