From 7307e3a901f27f9340c8147c0ce8c4f5ca2def2f Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 6 Jan 2012 18:17:16 +0100 Subject: [PATCH] new package: add package 'libva-driver-intel' Signed-off-by: Stephan Raue --- packages/multimedia/libva-driver-intel/build | 34 ++++++++++++++++++ .../multimedia/libva-driver-intel/install | 26 ++++++++++++++ packages/multimedia/libva-driver-intel/meta | 36 +++++++++++++++++++ ...ibva-driver-intel-1.0.15-Sandybridge.patch | 35 ++++++++++++++++++ packages/multimedia/libva-driver-intel/unpack | 33 +++++++++++++++++ 5 files changed, 164 insertions(+) create mode 100755 packages/multimedia/libva-driver-intel/build create mode 100755 packages/multimedia/libva-driver-intel/install create mode 100644 packages/multimedia/libva-driver-intel/meta create mode 100644 packages/multimedia/libva-driver-intel/patches.upstream/libva-driver-intel-1.0.15-Sandybridge.patch create mode 100755 packages/multimedia/libva-driver-intel/unpack diff --git a/packages/multimedia/libva-driver-intel/build b/packages/multimedia/libva-driver-intel/build new file mode 100755 index 0000000000..82edc19ce5 --- /dev/null +++ b/packages/multimedia/libva-driver-intel/build @@ -0,0 +1,34 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --enable-shared \ + --disable-static \ + --disable-silent-rules \ + --with-drivers-path="/usr/lib/va" \ + +make diff --git a/packages/multimedia/libva-driver-intel/install b/packages/multimedia/libva-driver-intel/install new file mode 100755 index 0000000000..1115a9fa0d --- /dev/null +++ b/packages/multimedia/libva-driver-intel/install @@ -0,0 +1,26 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib/va + cp -P $PKG_BUILD/src/.libs/*.so $INSTALL/usr/lib/va diff --git a/packages/multimedia/libva-driver-intel/meta b/packages/multimedia/libva-driver-intel/meta new file mode 100644 index 0000000000..d6c11b434b --- /dev/null +++ b/packages/multimedia/libva-driver-intel/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="libva-driver-intel" +PKG_VERSION="1.0.15" +PKG_REV="1" +PKG_ARCH="i386 x86_64" +PKG_LICENSE="GPL" +PKG_SITE="http://freedesktop.org/wiki/Software/vaapi" +PKG_URL="http://cgit.freedesktop.org/vaapi/intel-driver/snapshot/intel-driver-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libva libdrm" +PKG_BUILD_DEPENDS="toolchain libva libdrm" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="libva-driver-intel: Intel G45+ driver for VAAPI" +PKG_LONGDESC="libva-driver-intel: Intel G45+ driver for VAAPI" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/multimedia/libva-driver-intel/patches.upstream/libva-driver-intel-1.0.15-Sandybridge.patch b/packages/multimedia/libva-driver-intel/patches.upstream/libva-driver-intel-1.0.15-Sandybridge.patch new file mode 100644 index 0000000000..814d667527 --- /dev/null +++ b/packages/multimedia/libva-driver-intel/patches.upstream/libva-driver-intel-1.0.15-Sandybridge.patch @@ -0,0 +1,35 @@ +From 93059cb9c601e3c49972d190a8e4267e139cbc67 Mon Sep 17 00:00:00 2001 +From: "Xiang, Haihao" +Date: Wed, 21 Sep 2011 14:32:17 +0800 +Subject: [PATCH] workaround for implicit mode weighted prediction on + Sandybridge + +Signed-off-by: Xiang, Haihao +--- + src/gen6_mfd.c | 10 +++++++++- + 1 files changed, 9 insertions(+), 1 deletions(-) + +diff --git a/src/gen6_mfd.c b/src/gen6_mfd.c +index c4c93f7..823999b 100644 +--- a/src/gen6_mfd.c ++++ b/src/gen6_mfd.c +@@ -709,7 +709,15 @@ gen6_mfd_avc_slice_state(VADriverContextP ctx, + } else { + num_ref_idx_l0 = slice_param->num_ref_idx_l0_active_minus1 + 1; + num_ref_idx_l1 = slice_param->num_ref_idx_l1_active_minus1 + 1; +- weighted_pred_idc = (pic_param->pic_fields.bits.weighted_bipred_idc == 1); ++ weighted_pred_idc = pic_param->pic_fields.bits.weighted_bipred_idc; ++ ++ if (weighted_pred_idc == 2 && ++ !mbaff_picture && ++ num_ref_idx_l0 == 1 && ++ num_ref_idx_l1 == 1 && ++ (slice_param->RefPicList0[0].TopFieldOrderCnt + ++ slice_param->RefPicList1[0].TopFieldOrderCnt) == 2 * pic_param->CurrPic.TopFieldOrderCnt) ++ weighted_pred_idc = 0; + } + + first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture; +-- +1.7.5.4 + diff --git a/packages/multimedia/libva-driver-intel/unpack b/packages/multimedia/libva-driver-intel/unpack new file mode 100755 index 0000000000..9155a6437c --- /dev/null +++ b/packages/multimedia/libva-driver-intel/unpack @@ -0,0 +1,33 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +[ -d $BUILD/$PKG_NAME-$PKG_VERSION ] && rm -rf $BUILD/$PKG_NAME-$PKG_VERSION + +tar -xjf $SOURCES/$PKG_NAME/intel-driver-$PKG_VERSION.tar.bz2 -C $BUILD +mv $BUILD/intel-driver-$PKG_VERSION $BUILD/$PKG_NAME-$PKG_VERSION + +for patch in `ls $PKG_DIR/patches.upstream/*.patch`; do + cat $patch | patch -d \ + `echo $BUILD/$PKG_NAME-$PKG_VERSION | cut -f1 -d\ ` -p1 +done