diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | implement-vaquerysurfaceattributes.patch | 105 | ||||
-rw-r--r-- | libva-vdpau-driver-0.7.4-ConstrainedBaseline.patch | 44 |
5 files changed, 78 insertions, 137 deletions
@@ -1,7 +1,7 @@ pkgbase = libva-vdpau-driver-chromium pkgdesc = VDPAU backend for VA API. (special version for chromium) pkgver = 0.7.4 - pkgrel = 7 + pkgrel = 8 url = http://freedesktop.org/wiki/Software/vaapi arch = x86_64 license = GPL @@ -14,23 +14,27 @@ pkgbase = libva-vdpau-driver-chromium conflicts = libva-vdpau-driver replaces = vdpau-video source = https://freedesktop.org/software/vaapi/releases/libva-vdpau-driver/libva-vdpau-driver-0.7.4.tar.bz2 - source = libva-vdpau-driver-0.7.4-glext-missing-definition.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/libva-vdpau-driver-0.7.4-glext-missing-definition.patch?h=packages/libva-vdpau-driver - source = libva-vdpau-driver-0.7.4-libvdpau-0.8.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/libva-vdpau-driver-0.7.4-libvdpau-0.8.patch?h=packages/libva-vdpau-driver - 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 = sigfpe-crash.patch::https://bugs.freedesktop.org/attachment.cgi?id=142296 + source = https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/libva-vdpau-driver/trunk/libva-vdpau-driver-0.7.4-CreateSurfaceFromV4L2Buf.patch + source = https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/libva-vdpau-driver/trunk/libva-vdpau-driver-0.7.4-glext-missing-definition.patch + source = https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/libva-vdpau-driver/trunk/libva-vdpau-driver-0.7.4-libvdpau-0.8.patch + source = https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/libva-vdpau-driver/trunk/libva-vdpau-driver-0.7.4-VAEncH264VUIBufferType.patch + source = libva-vdpau-driver-0.7.4-sigfpe-crash.patch::https://bugs.freedesktop.org/attachment.cgi?id=142296 source = libva-vdpau-driver-0.7.4-fallback-x.patch::https://raw.githubusercontent.com/sjnewbury/gentoo-playground/0999f9c8544ba29c012dd5d5e5c45a6235c3721a/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-fallback-x.patch - source = implement-vaquerysurfaceattributes.patch - source = libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch::https://raw.githubusercontent.com/gentoo/gentoo/34d5cc6fcf1d76c1c2833cb534717246c221214c/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch - source = https://raw.githubusercontent.com/jstkdng/libva-vdpau-driver-chromium/master/vdpau-driver-template.patch + source = libva-vdpau-driver-0.7.4-implement-vacreatesurfaces2.patch::https://github.com/xtknight/vdpau-va-driver-vp9/commit/dabc0096531c5052d49ac3291a6051f53aff3e31.patch + source = libva-vdpau-driver-0.7.4-implement-vaquerysurfaceattributes.patch::https://github.com/arekinath/libva-vdpau-driver/commit/1a8d93608ef801fa5e755f3dc22dce488ec41f6b.patch + source = https://raw.githubusercontent.com/gentoo/gentoo/34d5cc6fcf1d76c1c2833cb534717246c221214c/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch + source = libva-vdpau-driver-0.7.4-ConstrainedBaseline.patch sha256sums = 155c1982f0ac3f5435ba20b221bcaa11be212c37db548cd1f2a030ffa17e9bb9 + sha256sums = 1914ed49dfd25f9b884dceee15f7a2ad6bc77970d6866456cbda8b8670b75968 sha256sums = 776bfe4c101cdde396d8783029b288c6cd825d0cdbc782ca3d94a5f9ffb4558c sha256sums = 5e567b026b97dc0e207b6c05410cc1b7b77a58ceb5046801d0ea1a321cba3b9d sha256sums = 1ae32b8e5cca1717be4a63f09e8c6bd84a3e9b712b933816cdb32bb315dbda98 sha256sums = ef21397b0ed55f170e57fa1afef42b8b491491149af09b151f97ef3cc20ed0b7 sha256sums = b923dc60ad49459ca480a56af075d954b2678a8c7f433fd03f1aa49e58cfe838 - sha256sums = a91e11d2826715b29c2a08036f0e70ed45df7139987ff37c84b5c04c4a9c132f + sha256sums = cec19e6b4f689886f4917aca93c57158c04a28fd2003f5c5e76497a07a70d168 + sha256sums = b2b1421f5879d64c6408caf728e457cbe1941a3cf20cda43d1ecdcdc86cd1e7a sha256sums = 0ddf889850c54ccace8ec61a232f04ab77495c495949f952363ad28e2fc9891d - sha256sums = 5684b9520bbbe232322b33b313dff9457e339019c3f7e551b78e92adcd354902 + sha256sums = adcc18eb8931fd5a68c684cb79187e6d34abb3109b7a787457b3ea6907e546ae pkgname = libva-vdpau-driver-chromium diff --git a/.gitignore b/.gitignore index c5144583bff5..e6f8b03f7607 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ !.gitignore !.SRCINFO !PKGBUILD -!implement-vaquerysurfaceattributes.patch +!libva-vdpau-driver-0.7.4-ConstrainedBaseline.patch @@ -3,7 +3,7 @@ pkgname=libva-vdpau-driver-chromium pkgver=0.7.4 -pkgrel=7 +pkgrel=8 pkgdesc="VDPAU backend for VA API. (special version for chromium)" arch=('x86_64') url='http://freedesktop.org/wiki/Software/vaapi' @@ -19,45 +19,43 @@ replaces=('vdpau-video') provides=('libva-vdpau-driver') conflicts=('libva-vdpau-driver') source=("https://freedesktop.org/software/vaapi/releases/libva-vdpau-driver/libva-vdpau-driver-${pkgver}.tar.bz2" - 'libva-vdpau-driver-0.7.4-glext-missing-definition.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/libva-vdpau-driver-0.7.4-glext-missing-definition.patch?h=packages/libva-vdpau-driver' - 'libva-vdpau-driver-0.7.4-libvdpau-0.8.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/libva-vdpau-driver-0.7.4-libvdpau-0.8.patch?h=packages/libva-vdpau-driver' - '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' - 'sigfpe-crash.patch::https://bugs.freedesktop.org/attachment.cgi?id=142296' + 'https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/libva-vdpau-driver/trunk/libva-vdpau-driver-0.7.4-CreateSurfaceFromV4L2Buf.patch' + 'https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/libva-vdpau-driver/trunk/libva-vdpau-driver-0.7.4-glext-missing-definition.patch' + 'https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/libva-vdpau-driver/trunk/libva-vdpau-driver-0.7.4-libvdpau-0.8.patch' + 'https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/libva-vdpau-driver/trunk/libva-vdpau-driver-0.7.4-VAEncH264VUIBufferType.patch' + 'libva-vdpau-driver-0.7.4-sigfpe-crash.patch::https://bugs.freedesktop.org/attachment.cgi?id=142296' 'libva-vdpau-driver-0.7.4-fallback-x.patch::https://raw.githubusercontent.com/sjnewbury/gentoo-playground/0999f9c8544ba29c012dd5d5e5c45a6235c3721a/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-fallback-x.patch' - 'implement-vaquerysurfaceattributes.patch' - 'libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch::https://raw.githubusercontent.com/gentoo/gentoo/34d5cc6fcf1d76c1c2833cb534717246c221214c/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch' - 'https://raw.githubusercontent.com/jstkdng/libva-vdpau-driver-chromium/master/vdpau-driver-template.patch' + 'libva-vdpau-driver-0.7.4-implement-vacreatesurfaces2.patch::https://github.com/xtknight/vdpau-va-driver-vp9/commit/dabc0096531c5052d49ac3291a6051f53aff3e31.patch' + 'libva-vdpau-driver-0.7.4-implement-vaquerysurfaceattributes.patch::https://github.com/arekinath/libva-vdpau-driver/commit/1a8d93608ef801fa5e755f3dc22dce488ec41f6b.patch' + 'https://raw.githubusercontent.com/gentoo/gentoo/34d5cc6fcf1d76c1c2833cb534717246c221214c/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch' + 'libva-vdpau-driver-0.7.4-ConstrainedBaseline.patch' # https://gitlab.freedesktop.org/lima/mesa/commit/1edaa33135feffe1082bf491e098224121615b08 ) sha256sums=('155c1982f0ac3f5435ba20b221bcaa11be212c37db548cd1f2a030ffa17e9bb9' + '1914ed49dfd25f9b884dceee15f7a2ad6bc77970d6866456cbda8b8670b75968' '776bfe4c101cdde396d8783029b288c6cd825d0cdbc782ca3d94a5f9ffb4558c' '5e567b026b97dc0e207b6c05410cc1b7b77a58ceb5046801d0ea1a321cba3b9d' '1ae32b8e5cca1717be4a63f09e8c6bd84a3e9b712b933816cdb32bb315dbda98' 'ef21397b0ed55f170e57fa1afef42b8b491491149af09b151f97ef3cc20ed0b7' 'b923dc60ad49459ca480a56af075d954b2678a8c7f433fd03f1aa49e58cfe838' - 'a91e11d2826715b29c2a08036f0e70ed45df7139987ff37c84b5c04c4a9c132f' + 'cec19e6b4f689886f4917aca93c57158c04a28fd2003f5c5e76497a07a70d168' + 'b2b1421f5879d64c6408caf728e457cbe1941a3cf20cda43d1ecdcdc86cd1e7a' '0ddf889850c54ccace8ec61a232f04ab77495c495949f952363ad28e2fc9891d' - '5684b9520bbbe232322b33b313dff9457e339019c3f7e551b78e92adcd354902' + 'adcc18eb8931fd5a68c684cb79187e6d34abb3109b7a787457b3ea6907e546ae' ) prepare() { mkdir -p build + patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-CreateSurfaceFromV4L2Buf.patch" patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-glext-missing-definition.patch" patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-libvdpau-0.8.patch" patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-VAEncH264VUIBufferType.patch" - patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/sigfpe-crash.patch" + patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-sigfpe-crash.patch" patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch" - patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/implement-vaquerysurfaceattributes.patch" + patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-implement-vacreatesurfaces2.patch" + patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-implement-vaquerysurfaceattributes.patch" patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-fallback-x.patch" - patch -d "libva-vdpau-driver-${pkgver}" -p2 -i "${srcdir}/vdpau-driver-template.patch" - - # https://bbs.archlinux.org/viewtopic.php?id=247933 - sed -e '/v4l2_buffer/d' \ - -e '/v4l2_format/d' \ - -i "${srcdir}/libva-vdpau-driver-${pkgver}/src/"vdpau_video.{h,c} - - # https://gitlab.freedesktop.org/lima/mesa/commit/1edaa33135feffe1082bf491e098224121615b08 - sed 's|Baseline|ConstrainedBaseline|g' -i "${srcdir}/libva-vdpau-driver-${pkgver}/src/vdpau_decode.c" + patch -d "libva-vdpau-driver-${pkgver}" -p1 -i "${srcdir}/libva-vdpau-driver-0.7.4-ConstrainedBaseline.patch" } build() { diff --git a/implement-vaquerysurfaceattributes.patch b/implement-vaquerysurfaceattributes.patch deleted file mode 100644 index d3267495cf16..000000000000 --- a/implement-vaquerysurfaceattributes.patch +++ /dev/null @@ -1,105 +0,0 @@ -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( diff --git a/libva-vdpau-driver-0.7.4-ConstrainedBaseline.patch b/libva-vdpau-driver-0.7.4-ConstrainedBaseline.patch new file mode 100644 index 000000000000..383b2ac38463 --- /dev/null +++ b/libva-vdpau-driver-0.7.4-ConstrainedBaseline.patch @@ -0,0 +1,44 @@ +diff --git a/src/vdpau_decode.c.orig b/src/vdpau_decode.c +index 881ca84..9f08abf 100644 +--- a/src/vdpau_decode.c.orig ++++ b/src/vdpau_decode.c +@@ -69,19 +69,19 @@ VdpCodec get_VdpCodec(VdpDecoderProfile profile) + VdpDecoderProfile get_VdpDecoderProfile(VAProfile profile) + { + switch (profile) { ++ case VAProfileMPEG2Simple: return VDP_DECODER_PROFILE_MPEG2_SIMPLE; ++ case VAProfileMPEG2Main: return VDP_DECODER_PROFILE_MPEG2_MAIN; +- case VAProfileMPEG2Simple: return VDP_DECODER_PROFILE_MPEG2_SIMPLE; +- case VAProfileMPEG2Main: return VDP_DECODER_PROFILE_MPEG2_MAIN; + #if USE_VDPAU_MPEG4 ++ case VAProfileMPEG4Simple: return VDP_DECODER_PROFILE_MPEG4_PART2_SP; ++ case VAProfileMPEG4AdvancedSimple: return VDP_DECODER_PROFILE_MPEG4_PART2_ASP; +- case VAProfileMPEG4Simple: return VDP_DECODER_PROFILE_MPEG4_PART2_SP; +- case VAProfileMPEG4AdvancedSimple: return VDP_DECODER_PROFILE_MPEG4_PART2_ASP; + #endif ++ case VAProfileH264ConstrainedBaseline: return VDP_DECODER_PROFILE_H264_BASELINE; ++ case VAProfileH264Main: return VDP_DECODER_PROFILE_H264_MAIN; ++ case VAProfileH264High: return VDP_DECODER_PROFILE_H264_HIGH; ++ case VAProfileVC1Simple: return VDP_DECODER_PROFILE_VC1_SIMPLE; ++ case VAProfileVC1Main: return VDP_DECODER_PROFILE_VC1_MAIN; ++ case VAProfileVC1Advanced: return VDP_DECODER_PROFILE_VC1_ADVANCED; ++ default: break; +- case VAProfileH264Baseline: return VDP_DECODER_PROFILE_H264_BASELINE; +- case VAProfileH264Main: return VDP_DECODER_PROFILE_H264_MAIN; +- case VAProfileH264High: return VDP_DECODER_PROFILE_H264_HIGH; +- case VAProfileVC1Simple: return VDP_DECODER_PROFILE_VC1_SIMPLE; +- case VAProfileVC1Main: return VDP_DECODER_PROFILE_VC1_MAIN; +- case VAProfileVC1Advanced: return VDP_DECODER_PROFILE_VC1_ADVANCED; +- default: break; + } + return (VdpDecoderProfile)-1; + } +@@ -1058,7 +1058,7 @@ vdpau_QueryConfigProfiles( + VAProfileMPEG4Simple, + VAProfileMPEG4AdvancedSimple, + VAProfileMPEG4Main, ++ VAProfileH264ConstrainedBaseline, +- VAProfileH264Baseline, + VAProfileH264Main, + VAProfileH264High, + VAProfileVC1Simple, |