1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-30 02:52:10 +00:00
mpv/video/decode
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
..
cuda.c vo_opengl: hwdec_cuda: Use dynamic loading for cuda functions 2016-11-23 01:07:26 +01:00
d3d11va.c video: share hwdec extra surface count between backends 2017-01-11 16:34:18 +01:00
d3d.c win32: build with -DINITGUID 2016-09-28 21:38:52 +10:00
d3d.h d3d: implement screenshots for --hwdec=d3d11va 2016-06-28 20:38:53 +02:00
dec_video.c video: make decoder EOF reporting explicit 2017-01-11 11:02:57 +01:00
dec_video.h player: change aspects of cover art handling 2017-01-10 15:43:02 +01:00
dxva2.c video: share hwdec extra surface count between backends 2017-01-11 16:34:18 +01:00
lavc.h vaapi: handle image copying for vaapi-copy in common code 2017-01-12 14:00:19 +01:00
vaapi_old.c vaapi: move standalone display creation code to common code 2017-01-11 16:34:18 +01:00
vaapi.c vo_opengl, vaapi: properly probe 10 bit rendering support 2017-01-13 18:43:35 +01:00
vd_lavc.c vaapi: handle image copying for vaapi-copy in common code 2017-01-12 14:00:19 +01:00
vd.h video: make decoder EOF reporting explicit 2017-01-11 11:02:57 +01:00
vdpau.c vdpau: fix vaapi probing if libvdpau-va-gl1 is present 2016-12-02 16:09:51 +01:00
videotoolbox.c video: change hw_subfmt meaning 2016-07-15 13:04:17 +02:00