diff options
author | wm4 <wm4@nowhere> | 2017-12-27 05:27:00 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2019-09-15 20:00:52 +0300 |
commit | 0abe34ed21023b83c7311d85ea317f3af7b5b89c (patch) | |
tree | d2c951a4b2bb558e0f419e34ca566a59b1507569 /player/video.c | |
parent | 6385a5fd1b8a67c051b82d48c993a6591e8f93c6 (diff) | |
download | mpv-0abe34ed21023b83c7311d85ea317f3af7b5b89c.tar.bz2 mpv-0abe34ed21023b83c7311d85ea317f3af7b5b89c.tar.xz |
vo_gpu: x11: remove special vdpau probing, use EGL by default
Originally, vo_gpu/vo_opengl considered the case of Nvidia proprietary
drivers, which required vdpau/GLX, and Intel open source drivers, which
require vaapi/EGL. Since window creation and GPU context creation are
inseparable in mpv's internal API, it had to pick the correct API very
early, or hardware decoding wouldn't work. "x11probe" was introduced for
this reason. It created a GLX context (without showing the window yet),
and checked whether vdpau was available. If yes, it used GLX, if not, it
continued probing x11/EGL. (Obviously it couldn't always fail on GLX
without vdpau, which is why it was a separate "probe" backend.)
Years passed, and now the situation is different. Vdpau is dead. Nvidia
drivers and libavcodec now provide CUDA interop, which requires EGL, and
fixes some of the vdpau problems. AMD drivers now provide vaapi, which
generally works better than vdpau. Intel didn't change.
In particular, vaapi provides working HEVC Main10 support. In theory, it
should work on vdpau too, with quality reduction (no 10 bit surfaces),
but I couldn't get it to work.
So always prefer EGL. And suddenly hardware decoding works. This is
actually rather important, because HEVC is unfortunately on the rise,
despite shitty encoders and unoptimized decoders. The latter may mean
that hardware decoding works better than libavcodec.
This should have been done a long, long time ago.
Diffstat (limited to 'player/video.c')
0 files changed, 0 insertions, 0 deletions