Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
G45/GM45 h264 VA-API howto
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
darkbasic
Tux's lil' helper
Tux's lil' helper


Joined: 06 Sep 2006
Posts: 125

PostPosted: Wed May 30, 2012 10:34 am    Post subject: G45/GM45 h264 VA-API howto Reply with quote

http://www.linuxsystems.it/2012/05/gentoo-g45-gm45-h264-vaapi-video-decoding/

I can finally watch 1080p videos during the looong emerges (at least with a 1.4GHz cpu) :lol:
_________________
Computers are like air conditioners:
they stop working properly when you open Windows...

Coltiva Linux, Windows si pianta da solo.


http://www.linuxsystems.it/
Back to top
View user's profile Send private message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 456

PostPosted: Fri Jun 08, 2012 9:35 pm    Post subject: Reply with quote

I really hope the g45-h264 branch gets merged eventually.
Back to top
View user's profile Send private message
darkbasic
Tux's lil' helper
Tux's lil' helper


Joined: 06 Sep 2006
Posts: 125

PostPosted: Fri Jun 08, 2012 9:55 pm    Post subject: Reply with quote

Me too.
_________________
Computers are like air conditioners:
they stop working properly when you open Windows...

Coltiva Linux, Windows si pianta da solo.


http://www.linuxsystems.it/
Back to top
View user's profile Send private message
SDNick484
Apprentice
Apprentice


Joined: 05 Dec 2005
Posts: 205

PostPosted: Fri Oct 31, 2014 7:28 am    Post subject: Reply with quote

I realize this is an old topic and that there's probably not too many people on this hardware, but I just hacked together an updated ebuild of the G45 H264 branch based on the libva-intel-driver-1.4.1 driver. I'm using the tarball from from Arch for my distfiles:

I call the package x11-libs/intel-driver-g45-h264-20141008.ebuild to avoid conflicts with libva-intel-driver

Please note that I haven't written an ebuild in a while so sorry if there's anything outright wrong. I also hacked the libva ebuild to depend on intel-driver-g45-h264 instead of libva-intel-driver.
Code:

# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

SCM=""
if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
   SCM=git-2
   EGIT_BRANCH=master
   EGIT_REPO_URI="git://anongit.freedesktop.org/git/vaapi/intel-driver"
fi

AUTOTOOLS_AUTORECONF="yes"
inherit autotools ${SCM}

DESCRIPTION="HW video decode support for Intel integrated graphics"
HOMEPAGE="http://www.freedesktop.org/wiki/Software/vaapi"
if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
   SRC_URI=""
   S="${WORKDIR}/${PN}"
else
   SRC_URI="https://downloads.sourceforge.net/project/g45h264/${P}.tar.gz"
   S="${WORKDIR}/${PN}"
fi

LICENSE="MIT"
SLOT="0"
if [ "${PV%9999}" = "${PV}" ] ; then
   KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
else
   KEYWORDS=""
fi
IUSE="+drm X"

RDEPEND=">=x11-libs/libva-1.4[X?,drm?]
   !<x11-libs/libva-1.0.15[video_cards_intel]
   >=x11-libs/libdrm-2.4.46[video_cards_intel]"

DEPEND="${RDEPEND}
   virtual/pkgconfig"

DOCS=( AUTHORS NEWS README )

src_prepare() {
   make distclean;
}

src_configure() {
    sh autogen.sh;
}   

multilib_src_configure() {
   local myeconfargs=(
      $(use_enable drm)
      $(use_enable X x11)
   )
   autotools-utils_src_configure
   sh autogen.sh;
}


The output of vainfo when you use this driver is below; I've also tested it with mpv[/code]:
Code:

libva info: VA-API version 0.36.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_36
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.36 (libva 1.4.1)
vainfo: Driver version: Intel i965 driver for Intel(R) GM45 Express Chipset - 1.4.1.pre1 (1.4.1.pre1)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :   VAEntrypointVLD
      VAProfileMPEG2Main              :   VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:   VAEntrypointVLD
      VAProfileH264Main               :   VAEntrypointVLD
      VAProfileH264High               :   VAEntrypointVLD
Back to top
View user's profile Send private message
ConiKost
Veteran
Veteran


Joined: 11 Jan 2005
Posts: 1340

PostPosted: Thu Dec 25, 2014 9:10 pm    Post subject: Reply with quote

Unfortunately, that eBuild does not work with the new ABI_X86. But I've updated your eBuild based on the official one. This one can replace the existing libva-intel-driver.

Code:
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

MY_PN="intel-driver-g45-h264"
MY_PV="20141008"

SCM=""
if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
   SCM=git-2
   EGIT_BRANCH=master
   EGIT_REPO_URI="git://anongit.freedesktop.org/git/vaapi/intel-driver"
fi

AUTOTOOLS_AUTORECONF="yes"
inherit autotools-multilib ${SCM}

DESCRIPTION="HW video decode support for Intel integrated graphics"
HOMEPAGE="http://www.freedesktop.org/wiki/Software/vaapi"
if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
   SRC_URI=""
   S="${WORKDIR}/${PN}"
else
   SRC_URI="https://downloads.sourceforge.net/project/g45h264/${MY_PN}-${MY_PV}.tar.gz"
   S="${WORKDIR}/intel-driver-g45-h264"
fi

LICENSE="MIT"
SLOT="0"
if [ "${PV%9999}" = "${PV}" ] ; then
   KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
else
   KEYWORDS=""
fi
IUSE="+drm wayland X"

RDEPEND=">=x11-libs/libva-1.4[X?,wayland?,drm?,${MULTILIB_USEDEP}]
   !<x11-libs/libva-1.0.15[video_cards_intel]
   >=x11-libs/libdrm-2.4.46[video_cards_intel,${MULTILIB_USEDEP}]
   wayland? ( >=media-libs/mesa-9.1.6[egl,${MULTILIB_USEDEP}] >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}] )"

DEPEND="${RDEPEND}
   virtual/pkgconfig"

DOCS=( AUTHORS NEWS README )

src_prepare() {
   cd ${WORKDIR}/${MY_PN}
   make distclean

   cd ${S}
   sed -e 's/intel-gen4asm/\0diSaBlEd/g' -i configure.ac || die
   autotools-multilib_src_prepare
}

multilib_src_configure() {
   local myeconfargs=(
      $(use_enable drm)
      $(use_enable wayland)
      $(use_enable X x11)
   )
   autotools-utils_src_configure
}


Save as /usr/local/portage/x11-libs/libva-intel-driver/libva-intel-driver-1.4.1.ebuild

Code:
libva info: VA-API version 0.36.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_36
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.36 (libva 1.4.1)
vainfo: Driver version: Intel i965 driver for Intel(R) GM45 Express Chipset - 1.4.1.pre1 (1.4.1.pre1)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :   VAEntrypointVLD
      VAProfileMPEG2Main              :   VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:   VAEntrypointVLD
      VAProfileH264Main               :   VAEntrypointVLD
      VAProfileH264High               :   VAEntrypointVLD
Back to top
View user's profile Send private message
raz123
n00b
n00b


Joined: 15 Jul 2015
Posts: 1

PostPosted: Wed Jul 15, 2015 8:34 pm    Post subject: Reply with quote

ConiKost, SDNick484,

How feasible would it be to use your work on a Ubuntu build?
Back to top
View user's profile Send private message
tw04l124
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 2375
Location: A t z e l, lower austria

PostPosted: Thu Jul 16, 2015 11:26 am    Post subject: Reply with quote

You need to check if those changes were merged with the kernel tree.
And check if there are anything newer (juding on the topic age)
and if it builds at all

it looks like a kernel module or kernel related.

you may be better of asking at the ubuntu forums for that...
Back to top
View user's profile Send private message
ConiKost
Veteran
Veteran


Joined: 11 Jan 2005
Posts: 1340

PostPosted: Thu Aug 13, 2015 12:18 pm    Post subject: Reply with quote

raz123 wrote:
ConiKost, SDNick484,

How feasible would it be to use your work on a Ubuntu build?


Well, that depends. You would have to create an *.deb-file, which contains the compiled version. But I can't help you with that, I don't know Ubuntu.
You should ask there.

Meanfile, updated eBuild to current 1.6.0 :)

Code:
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

MY_PN="intel-driver-g45-h264"
MY_PV="20150703"

SCM=""
if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
        SCM=git-2
        EGIT_BRANCH=master
        EGIT_REPO_URI="git://anongit.freedesktop.org/git/vaapi/intel-driver"
fi

AUTOTOOLS_AUTORECONF="yes"
inherit autotools-multilib ${SCM}

DESCRIPTION="HW video decode support for Intel integrated graphics"
HOMEPAGE="http://www.freedesktop.org/wiki/Software/vaapi"
if [ "${PV%9999}" != "${PV}" ] ; then # Live ebuild
        SRC_URI=""
        S="${WORKDIR}/${PN}"
else
        SRC_URI="https://bitbucket.org/alium/g45-h264/downloads/${MY_PN}-${MY_PV}.tar.gz"
        S="${WORKDIR}/intel-driver-g45-h264"
fi

LICENSE="MIT"
SLOT="0"
if [ "${PV%9999}" = "${PV}" ] ; then
        KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
else
        KEYWORDS=""
fi
IUSE="+drm wayland X"

RDEPEND=">=x11-libs/libva-1.6[X?,wayland?,drm?,${MULTILIB_USEDEP}]
        !<x11-libs/libva-1.0.15[video_cards_intel]
        >=x11-libs/libdrm-2.4.46[video_cards_intel,${MULTILIB_USEDEP}]
        wayland? ( >=media-libs/mesa-9.1.6[egl,${MULTILIB_USEDEP}] >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}] )"

DEPEND="${RDEPEND}
        virtual/pkgconfig"

PATCHES=(
        # Fix automagic depend, bug #529388
        # https://bugs.freedesktop.org/show_bug.cgi?id=79478
        "${FILESDIR}"/${PN}-1.6.0-wayland-automagic.patch
)

DOCS=( AUTHORS NEWS README )

src_prepare() {
        cd ${S}
        sed -e 's/intel-gen4asm/\0diSaBlEd/g' -i configure.ac || die
        autotools-multilib_src_prepare
}

multilib_src_configure() {
        local myeconfargs=(
                $(use_enable drm)
                $(use_enable wayland)
                $(use_enable X x11)
        )
        autotools-utils_src_configure
}


Save as /usr/local/portage/x11-libs/libva-intel-driver/libva-intel-driver-1.6.0.ebuild

Code:
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.6.0)
vainfo: Driver version: Intel i965 driver for Intel(R) GM45 Express Chipset - 1.6.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
Back to top
View user's profile Send private message
mimosinnet
Guru
Guru


Joined: 10 Aug 2006
Posts: 551
Location: Barcelona, Spain

PostPosted: Mon Aug 17, 2015 5:13 pm    Post subject: Reply with quote

ConiKost wrote:
Meanfile, updated eBuild to current 1.6.0 :)

Save as /usr/local/portage/x11-libs/libva-intel-driver/libva-intel-driver-1.6.0.ebuild


Thanks for the ebuild! :D I am trying this now, and it seems to conflict with the ebuild in the tree:

Code:
/usr/portage/x11-libs/libva-intel-driver/libva-intel-driver-1.6.0.ebuild


How do you manage to emerge your ebuild instead of the one in the portage tree?

Cheers!
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
Thank the community answering other people's post, specially those unanswered.
Back to top
View user's profile Send private message
ConiKost
Veteran
Veteran


Joined: 11 Jan 2005
Posts: 1340

PostPosted: Thu Aug 20, 2015 6:07 pm    Post subject: Reply with quote

mimosinnet wrote:
ConiKost wrote:
Meanfile, updated eBuild to current 1.6.0 :)

Save as /usr/local/portage/x11-libs/libva-intel-driver/libva-intel-driver-1.6.0.ebuild


Thanks for the ebuild! :D I am trying this now, and it seems to conflict with the ebuild in the tree:

Code:
/usr/portage/x11-libs/libva-intel-driver/libva-intel-driver-1.6.0.ebuild


How do you manage to emerge your ebuild instead of the one in the portage tree?

Cheers!


It's in my local overlay. So it's prefered over the gentoo one.
Back to top
View user's profile Send private message
mimosinnet
Guru
Guru


Joined: 10 Aug 2006
Posts: 551
Location: Barcelona, Spain

PostPosted: Sat Aug 22, 2015 11:52 am    Post subject: Reply with quote

ConiKost wrote:
It's in my local overlay. So it's prefered over the gentoo one.


Thanks! I have read the Overlay/Local overlay documentation in the Gentoo Wiki and copied the files folder from the portage ibva-intel-driver:

Code:
cp -a /usr/portage/x11-libs/libva-intel-driver/files /usr/local/portage/x11-libs/libva-intel-driver


This is working now! Thanks a lot! :D :)
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
Thank the community answering other people's post, specially those unanswered.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum