diff options
author | wm4 <wm4@nowhere> | 2013-08-09 14:01:30 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-08-12 01:12:02 +0200 |
commit | 2827295703c74e3c119df9a435aa856e268c2ea9 (patch) | |
tree | 7464b1630d76e84f1abdf53680544a74b7dab300 /configure | |
parent | c7da4ba74469bc6c404c396340ffadc748535f6e (diff) | |
download | mpv-2827295703c74e3c119df9a435aa856e268c2ea9.tar.bz2 mpv-2827295703c74e3c119df9a435aa856e268c2ea9.tar.xz |
video: add vaapi decode and output support
This is based on the MPlayer VA API patches. To be exact it's based on
a very stripped down version of commit f1ad459a263f8537f6c from
git://gitorious.org/vaapi/mplayer.git.
This doesn't contain useless things like benchmarking hacks and the
demo code for GLX interop. Also, unlike in the original patch, decoding
and video output are split into separate source files (the separation
between decoding and display also makes pixel format hacks unnecessary).
On the other hand, some features not present in the original patch were
added, like screenshot support.
VA API is rather bad for actual video output. Dealing with older libva
versions or the completely broken vdpau backend doesn't help. OSD is
low quality and should be rather slow. In some cases, only either OSD
or subtitles can be shown at the same time (because OSD is drawn first,
OSD is prefered).
Also, libva can't decide whether it accepts straight or premultiplied
alpha for OSD sub-pictures: the vdpau backend seems to assume
premultiplied, while a native vaapi driver uses straight. So I picked
straight alpha. It doesn't matter much, because the blending code for
straight alpha I added to img_convert.c is probably buggy, and ASS
subtitles might be blended incorrectly.
Really good video output with VA API would probably use OpenGL and the
GL interop features, but at this point you might just use vo_opengl.
(Patches for making HW decoding with vo_opengl have a chance of being
accepted.)
Despite these issues, decoding seems to work ok. I still got tearing
on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also
tested with the vdpau vaapi wrapper on a nvidia system; however this
was rather broken. (Fortunately, there is no reason to use mpv's VAAPI
support over native VDPAU.)
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -347,6 +347,7 @@ Video output: --enable-sdl2 enable SDL 2.0+ audio and video output [disable] --enable-xv enable Xv video output [autodetect] --enable-vdpau enable VDPAU acceleration [autodetect] + --enable-vaapi enable VAAPI acceleration [autodetect] --enable-vm enable XF86VidMode support [autodetect] --enable-xinerama enable Xinerama support [autodetect] --enable-x11 enable X11 video output [autodetect] @@ -421,6 +422,7 @@ _wayland=auto _xss=auto _xv=auto _vdpau=auto +_vaapi=auto _direct3d=auto _sdl=no _sdl2=no @@ -582,6 +584,8 @@ for ac_option do --disable-xv) _xv=no ;; --enable-vdpau) _vdpau=yes ;; --disable-vdpau) _vdpau=no ;; + --enable-vaapi) _vaapi=yes ;; + --disable-vaapi) _vaapi=no ;; --enable-direct3d) _direct3d=yes ;; --disable-direct3d) _direct3d=no ;; --enable-sdl) _sdl=yes ;; @@ -1845,6 +1849,23 @@ fi echores "$_vdpau" +echocheck "VAAPI" +if test "$_vaapi" = auto && test "$_x11" = yes ; then + _vaapi=no + if test "$_dl" = yes ; then + pkg_config_add 'libva >= 0.32.0 libva-x11 >= 0.32.0' && _vaapi=yes + fi +fi +if test "$_vaapi" = yes ; then + def_vaapi='#define CONFIG_VAAPI 1' + vomodules="vaapi $vomodules" +else + def_vaapi='#define CONFIG_VAAPI 0' + novomodules="vaapi $novomodules" +fi +echores "$_vdpau" + + echocheck "Xinerama" if test "$_xinerama" = auto && test "$_x11" = yes ; then _xinerama=no @@ -3099,6 +3120,7 @@ VCD = $_vcd VDPAU = $_vdpau VDPAU_DEC = $_vdpau_dec VDPAU_DEC_OLD = $_vdpau_dec_old +VAAPI = $_vaapi WIN32 = $_win32 X11 = $_x11 WAYLAND = $_wayland @@ -3108,6 +3130,7 @@ XV = $_xv ENCODING = $_encoding CONFIG_VDPAU = $_vdpau +CONFIG_VAAPI = $_vaapi CONFIG_ZLIB = $_zlib HAVE_PTHREADS = $_pthreads @@ -3274,6 +3297,7 @@ $def_jpeg $def_mng $def_v4l2 $def_vdpau +$def_vaapi $def_vm $def_x11 $def_wayland |