[Libav-user] vaapi decoding support status in master branch of ffmpeg

Mark Thompson sw at jkqxz.net
Sun Feb 12 17:32:27 EET 2017


On 12/02/17 15:01, Anton Sviridenko wrote:
> I've noticed recently that changes related to removal of requirement
> for "struct vaapi_context"  were pushed to master. But they did not
> appear in latest release 3.2.4.
> 
> Is current way of initializing VAAPI decoding without vaapi_context
> production ready?

It should be.  For a non-ffmpeg user of it through lavc, see mpv.

> Also I am interested what min. version of libva is required to make things work?

It requires libva >= 1.2.0 (which introduced surface attributes and encoding).  There may be bugs in older versions of drivers, so generally using the most recent version of your driver is a good idea.

> VAAPI decoding works for me on libva 1.7.3, but popular Linux distros
> (like Ubuntu 16.04LTS) have libva 1.7.0 in their repos (or older) and
> decoding acceleration does not work there. get_format() callback just
> is not called with AV_PIX_FMT_VAAPI

Maybe your build with the older version is not configured correctly?  Whether AV_PIX_FMT_VAAPI is offered by the get_format() callback is completely determined by the build parameters (see <http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/h264_slice.c;h=91a3b2524a98bafea456b79373c7a4e31cebe6b0;hb=HEAD#l831> for H.264 - no VAAPI code has actually run at that point).

> I suspect that shipping application with latest version of libva could
> help. Is it safe to use git master branch of libva?

The version of libva doesn't really matter beyond enabling some support (e.g. 1.6.0 required for VP9 decode), because it's really just a thin wrapper around a dynamically-loaded driver.  The driver itself matters more - in my experience they are generally ok, but whether to use a non-release version is really a matter for yourself and whoever makes the driver you want to use.

- Mark


More information about the Libav-user mailing list