0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/video/decode
wm4 2827295703 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.)
2013-08-12 01:12:02 +02:00
..
dec_video.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
dec_video.h video: add vaapi decode and output support 2013-08-12 01:12:02 +02:00
lavc_dr1.c vdpau: split off decoder parts, use "new" libavcodec vdpau hwaccel API 2013-07-28 19:25:07 +02:00
lavc.h video: add vaapi decode and output support 2013-08-12 01:12:02 +02:00
vaapi.c video: add vaapi decode and output support 2013-08-12 01:12:02 +02:00
vd_lavc.c video: add vaapi decode and output support 2013-08-12 01:12:02 +02:00
vd.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
vd.h vd: add VDCTRL_GET_PARAMS 2013-07-15 01:49:26 +02:00
vdpau_old.c video: redo hw decoding initialization, add --hwdec=auto 2013-08-11 23:59:18 +02:00
vdpau.c video: redo hw decoding initialization, add --hwdec=auto 2013-08-11 23:59:18 +02:00