From e3043bdfa358604e71454429c67f7dd709060964 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Tue, 12 Feb 2019 08:07:38 -0800 Subject: Initial commit --- PKGBUILD | 44 ++++++++++++++++++++++++++++++++++++ Read-before-compiling.txt | 2 ++ fix_surface_querys.patch | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 PKGBUILD create mode 100644 Read-before-compiling.txt create mode 100644 fix_surface_querys.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..2b1df24 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: jc_gargma +# Maintainer (AUR): Alois Nešpor +# Contributor (AUR): Pedro Martinez-Julia + +# # I maintain this because: +# AUR version has needless epoch + +pkgname=libva-intel-driver-g45-h264 +pkgver=2.3.0 +pkgrel=1 +pkgdesc="VA-API implementation for Intel G45 chipsets with H264 support." +arch=('i686' 'x86_64') +url='https://01.org/linuxmedia/vaapi' +pkgdesc='Video Acceleration (VA) API for Linux' +depends=('libdrm' 'libgl' 'glibc' 'libva>=2.0.0') +conflicts=('libva-intel-driver' 'intel-gpu-tools') +provides=('libva-intel-driver') +replaces=('libva-intel-driver') +optdepends=('libva-utils: Applications and Scripts for libva (vainfo and others)') +license=(MIT) +makedepends=(mesa) + +source=(https://bitbucket.org/alium/g45-h264/downloads/intel-driver-g45-h264-$pkgver.tar.gz) +sha256sums=('59754576de8bc69412ca0554b3a28406b0562cbf2616eca0d3c261528e81c641') + +prepare () { + cd intel-vaapi-driver + # Only relevant if intel-gpu-tools is installed, + # since then the shaders will be recompiled + sed -i '1s/python$/&2/' src/shaders/gpp.py +} + +build() { + cd $srcdir/intel-vaapi-driver + ./autogen.sh --prefix=/usr + make +} + + +package() { + cd intel-vaapi-driver + make DESTDIR="${pkgdir}" install + install -m644 -D COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING +} diff --git a/Read-before-compiling.txt b/Read-before-compiling.txt new file mode 100644 index 0000000..b500046 --- /dev/null +++ b/Read-before-compiling.txt @@ -0,0 +1,2 @@ +Uninstall intel-gpu-tools before compiling. +You can reinstall it after. diff --git a/fix_surface_querys.patch b/fix_surface_querys.patch new file mode 100644 index 0000000..288962e --- /dev/null +++ b/fix_surface_querys.patch @@ -0,0 +1,57 @@ +--- intel-vaapi-driver/src/i965_drv_video.c.orig 2017-04-20 00:11:01.000000000 +0200 ++++ intel-vaapi-driver/src/i965_drv_video.c 2017-04-22 15:33:21.986238617 +0200 +@@ -5459,15 +5459,7 @@ + attrib_list[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; + + if (attrib_list[i].value.value.i == 0) { +- if (IS_G4X(i965->intel.device_info)) { +- if (obj_config->profile == VAProfileMPEG2Simple || +- obj_config->profile == VAProfileMPEG2Main) { +- attrib_list[i].value.value.i = VA_FOURCC_I420; +- } else { +- assert(0); +- attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED; +- } +- } else if (IS_IRONLAKE(i965->intel.device_info)) { ++ if (IS_G4X(i965->intel.device_info) || IS_IRONLAKE(i965->intel.device_info)) { + if (obj_config->profile == VAProfileMPEG2Simple || + obj_config->profile == VAProfileMPEG2Main) { + attrib_list[i].value.value.i = VA_FOURCC_I420; +@@ -5492,18 +5484,7 @@ + attrib_list[i].value.value.i = VA_FOURCC_NV12; + } + } else { +- if (IS_G4X(i965->intel.device_info)) { +- if (obj_config->profile == VAProfileMPEG2Simple || +- obj_config->profile == VAProfileMPEG2Main) { +- if (attrib_list[i].value.value.i != VA_FOURCC_I420) { +- attrib_list[i].value.value.i = 0; +- attrib_list[i].flags &= ~VA_SURFACE_ATTRIB_SETTABLE; +- } +- } else { +- assert(0); +- attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED; +- } +- } else if (IS_IRONLAKE(i965->intel.device_info)) { ++ if (IS_G4X(i965->intel.device_info) || IS_IRONLAKE(i965->intel.device_info)) { + if (obj_config->profile == VAProfileMPEG2Simple || + obj_config->profile == VAProfileMPEG2Main) { + if (attrib_list[i].value.value.i != VA_FOURCC_I420) { +@@ -5649,16 +5630,7 @@ + if (attribs == NULL) + return VA_STATUS_ERROR_ALLOCATION_FAILED; + +- if (IS_G4X(i965->intel.device_info)) { +- if (obj_config->profile == VAProfileMPEG2Simple || +- obj_config->profile == VAProfileMPEG2Main) { +- attribs[i].type = VASurfaceAttribPixelFormat; +- attribs[i].value.type = VAGenericValueTypeInteger; +- attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; +- attribs[i].value.value.i = VA_FOURCC_I420; +- i++; +- } +- } else if (IS_IRONLAKE(i965->intel.device_info)) { ++ if (IS_G4X(i965->intel.device_info) || IS_IRONLAKE(i965->intel.device_info)) { + switch (obj_config->profile) { + case VAProfileMPEG2Simple: + case VAProfileMPEG2Main: -- cgit v1.2.1