mirror of https://github.com/mpv-player/mpv
0abe34ed21
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. |
||
---|---|---|
.. | ||
angle_dynamic.c | ||
angle_dynamic.h | ||
common.c | ||
common.h | ||
context.c | ||
context.h | ||
context_android.c | ||
context_angle.c | ||
context_cocoa.c | ||
context_drm_egl.c | ||
context_dxinterop.c | ||
context_glx.c | ||
context_mali_fbdev.c | ||
context_rpi.c | ||
context_vdpau.c | ||
context_wayland.c | ||
context_win.c | ||
context_x11egl.c | ||
egl_helpers.c | ||
egl_helpers.h | ||
formats.c | ||
formats.h | ||
gl_headers.h | ||
hwdec_d3d11egl.c | ||
hwdec_d3d11eglrgb.c | ||
hwdec_drmprime_drm.c | ||
hwdec_dxva2egl.c | ||
hwdec_dxva2gldx.c | ||
hwdec_ios.m | ||
hwdec_osx.c | ||
hwdec_rpi.c | ||
hwdec_vdpau.c | ||
libmpv_gl.c | ||
oml_sync.c | ||
oml_sync.h | ||
ra_gl.c | ||
ra_gl.h | ||
utils.c | ||
utils.h |