mbox

[bug#36814,0/2] Add VA-API Intel back-end and utilities

Message ID 871rydiifr.fsf@nckx
Headers show

Message

ashish.is--- via Guix-patches" via July 26, 2019, 3:27 a.m. UTC
Guix,

The following patches add the VA-API back end for Intel GEN chips 
as well as libva-utils (which provides vainfo amongst many other 
things).  I've tested them on my Ivy Bridge laptop and they work 
wonderfully.

However.

libva (I guess) searches for the back end in mesa's store output 
by default:

--8<---------------cut here---------------start------------->8---
vainfo 
libva info: VA-API version 1.4.1
libva info: va_getDriverName() returns 0
libva info: Trying to open 
/gnu/store/clhrbkacyrclwzkzdj2ql8y572whwjzi-mesa-19.1.1/lib/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
--8<---------------cut here---------------end--------------->8---

I don't know enough about libva or mesa to know how all this can 
be made to compose nicely.

I just tested and enjoyed VA-API acceleration by (icky icky boo 
boo) copying intel-vaapi-driver's library to the mesa store 
directory, so I need help in more ways than one.

Kind regards,

T G-R

Comments

Tobias Geerinckx-Rice July 26, 2019, 8:17 a.m. UTC | #1
Tobias Geerinckx-Rice via Guix-patches 写道:
> I don't know enough about libva or mesa to know how all this can 
> be
> made to compose nicely.

It's actually as simple as exporting 
LIBVA_DRIVERS_PATH="<intel-vaapi-driver>/lib/dri".

I guess making that a search-path for libva should work?

Kind regards,

T G-R
Jelle Licht July 26, 2019, 8:56 a.m. UTC | #2
Hey Tobias,

Tobias Geerinckx-Rice via Guix-patches <guix-patches@gnu.org> writes:

> Tobias Geerinckx-Rice via Guix-patches 写道:
>> I don't know enough about libva or mesa to know how all this can 
>> be
>> made to compose nicely.
>
> It's actually as simple as exporting 
> LIBVA_DRIVERS_PATH="<intel-vaapi-driver>/lib/dri".
A cursory check using the LIBVA_DRIVERS_PATH workaround on a youtube
video using mpv seems to indicate that your packages work wonderfully
(~16% cpu load normally -> ~5% cpu load with vaapi flags).

Thanks for working on this!
>
> I guess making that a search-path for libva should work?
I do not see why not.

>
> Kind regards,
>
> T G-R
Tobias Geerinckx-Rice July 26, 2019, 5:58 p.m. UTC | #3
Jelle,

Thank you for testing!

Jelle Licht 写道:
> A cursory check using the LIBVA_DRIVERS_PATH workaround on a 
> youtube
> video using mpv seems to indicate that your packages work 
> wonderfully
> (~16% cpu load normally -> ~5% cpu load with vaapi flags).

On my Intel Corporation 3rd Gen Core processor Graphics 
Controller, the results were even more exciting: from ~35% to ~7% 
CPU load while playing a 720p H.264 film.  That's a factor of 5.

Sadly, my hardware's too old to accelerate H.265 (HEVC) stream 
(they play just fine on the CPU), but even so: a significant 
majority of my media collection just got significantly 
accelerated…  for free!  \o/

I love this business,

T G-R
Tobias Geerinckx-Rice July 27, 2019, 9:29 p.m. UTC | #4
Tobias Geerinckx-Rice via Guix-patches 写道:
> Guix,
>
> The following patches add the VA-API back end for Intel GEN 
> chips as
> well as libva-utils (which provides vainfo amongst many other 
> things).

Pushed atop master as 3563220e1e46b8a1b9af1e3a4c6cb3f9560c2460 &c.

Kind regards,

T G-R