1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-20 14:56:55 +00:00
mpv/video/out/opengl
wm4 812128bab7 vo_opengl, vaapi: properly probe 10 bit rendering support
There are going to be users who have a Mesa installation which do not
support 10 bit, but a GPU which can decode to 10 bit. So it's probably
better not to hardcode whether it is supported.

Introduce a more general way to signal supported formats from renderer
to decoder. Obviously this is imperfect, because it still isn't part of
proper format negotation (for example, what if there's a vavpp filter,
which accepts anything). Still slightly better than before.

I don't know any way to probe for vaapi dmabuf/EGL dmabuf support
properly (in particular testing specific formats, not just general
availability). So we stay with the current approach and try to create
and map dummy surfaces on init to probe for support. Overdo it and check
all formats that AVHWFramesConstraints reports, instead of only NV12 and
P010 surfaces.

Since we can support unknown formats now, add explicitly checks to the
EGL/dmabuf mapper code to reject unsupported formats. I also noticed
that libavutil signals support for RGB0/BGR0, but couldn't get it to
work. Remove the DRM formats that are unused/didn't work the way I tried
to use them.

With this, 10 bit decoding + rendering should work, provided you have
a capable CPU and a patched Mesa. The required Mesa patch adds support
for the R16 and GR32 formats. It was sent by a Kodi developer to the
Mesa developer mailing list and was not accepted yet.
2017-01-13 18:43:35 +01:00
..
angle_dynamic.c angle_dynamic: silence warnings during compilation 2016-11-25 09:49:49 +01:00
angle_dynamic.h vo_opengl: angle: dynamically load ANGLE 2016-05-11 15:39:29 +02:00
common.c vo_opengl: add hw overlay support and use it for RPI 2016-09-12 19:58:58 +02:00
common.h opengl: compile against iOS OpenGLES implementation 2016-10-20 17:45:25 +02:00
context_angle.c win32: build with -DINITGUID 2016-09-28 21:38:52 +10:00
context_cocoa.c cocoa: add glFlush() to cocoa backend 2016-10-06 19:50:25 +02:00
context_drm_egl.c drm: include <poll.h> instead of <sys/poll.h> 2017-01-09 16:21:28 +01:00
context_dxinterop.c win32: build with -DINITGUID 2016-09-28 21:38:52 +10:00
context_mali_fbdev.c vo_opengl: mali fbdev support 2016-09-13 18:26:06 +02:00
context_rpi.c vo_opengl: context_rpi: fix stdatomic usage 2016-10-21 17:35:48 +02:00
context_w32.c vo_opengl: use standard functions to retrieve display depth 2016-06-14 10:35:43 +02:00
context_wayland.c context_wayland: do not call vo_wayland_request_frame() upon bufferswap 2017-01-07 10:29:15 +00:00
context_x11.c vo_opengl: x11: move RGBA visual test to x11_common.c 2016-12-30 20:04:32 +01:00
context_x11egl.c vo_opengl: x11egl: fix alpha mode 2016-12-30 20:04:47 +01:00
context.c build: don't rely on "__thread" being always available with GCC 2016-10-20 17:51:57 +02:00
context.h vo_opengl: factor some EGL context creation code 2016-09-13 18:03:43 +02:00
cuda_dynamic.c vo_opengl: hwdec_cuda: Prefix cuda symbols to avoid collisions 2016-11-24 20:15:57 +01:00
cuda_dynamic.h vo_opengl: hwdec_cuda: Prefix cuda symbols to avoid collisions 2016-11-24 20:15:57 +01:00
egl_helpers.c vo_opengl: egl: handle potential eglChooseConfig failures 2016-12-31 14:58:46 +01:00
egl_helpers.h vo_opengl: egl_helpers: add a way to override config selection 2016-12-30 20:03:50 +01:00
formats.c vo_opengl: make ES float texture format checks stricter 2016-05-23 21:27:18 +02:00
formats.h vo_opengl: make ES float texture format checks stricter 2016-05-23 21:27:18 +02:00
header_fixes.h opengl: compile against iOS OpenGLES implementation 2016-10-20 17:45:25 +02:00
hwdec_cuda.c cuda: use libavutil functions for copying hw surfaces to memory 2017-01-12 13:59:35 +01:00
hwdec_d3d11egl.c vo_opengl: hwdec_d3d11egl: fix ANGLE fallback define 2016-11-23 01:09:19 +01:00
hwdec_d3d11eglrgb.c win32: build with -DINITGUID 2016-09-28 21:38:52 +10:00
hwdec_dxva2.c vo_opengl: refactor how hwdec interop exports textures 2016-05-10 18:42:42 +02:00
hwdec_dxva2egl.c vo_opengl: hwdec: reset hw_subfmt field 2016-07-15 13:04:17 +02:00
hwdec_dxva2gldx.c vo_opengl: hwdec: reset hw_subfmt field 2016-07-15 13:04:17 +02:00
hwdec_osx.c videotoolbox: add yuv420p to --videotoolbox-format 2016-07-15 13:04:17 +02:00
hwdec_rpi.c vo_opengl: hwdec_rpi: fix NULL pointer deref in certain cases 2016-10-04 16:36:20 +02:00
hwdec_vaegl.c vo_opengl, vaapi: properly probe 10 bit rendering support 2017-01-13 18:43:35 +01:00
hwdec_vaglx.c vo_opengl: hwdec: reset hw_subfmt field 2016-07-15 13:04:17 +02:00
hwdec_vdpau.c vo_opengl: fix another potential vdpau preemption issue 2016-09-07 18:23:14 +02:00
hwdec.c vo_opengl: allow hwdec interops to support multiple image formats 2016-09-30 13:46:27 +02:00
hwdec.h vo_opengl: allow hwdec interops to support multiple image formats 2016-09-30 13:46:27 +02:00
lcms.c vo_opengl: simplify option handling 2016-09-06 11:11:36 +02:00
lcms.h vo_opengl: simplify option handling 2016-09-06 11:11:36 +02:00
osd.c vo_opengl: remove caching GL_MAX_TEXTURE_SIZE value 2016-07-03 17:33:59 +02:00
osd.h vo_opengl, osd: allow osc.lua to react faster on resizes 2016-03-21 22:23:41 +01:00
user_shaders.c vo_opengl: move eval_szexpr to user_shaders.c 2016-07-03 19:42:52 +02:00
user_shaders.h vo_opengl: move eval_szexpr to user_shaders.c 2016-07-03 19:42:52 +02:00
utils.c vo_opengl: don't rely on viewport to contain window dimensions 2016-12-02 15:26:45 +01:00
utils.h vo_opengl: don't rely on viewport to contain window dimensions 2016-12-02 15:26:45 +01:00
video_shaders.c vo_opengl: dynamically manage texture units 2016-09-14 20:46:45 +02:00
video_shaders.h vo_opengl: generalize HDR tone mapping mechanism 2016-07-03 19:42:52 +02:00
video.c vo_opengl: replace 2 memsets 2017-01-08 11:22:55 +01:00
video.h options: remove deprecated sub-option handling for --vo and --ao 2016-11-25 21:17:25 +01:00