1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-20 22:02:59 +00:00
mpv/video
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
..
decode vo_opengl, vaapi: properly probe 10 bit rendering support 2017-01-13 18:43:35 +01:00
filter af_lavfi, vf_lavfi: work around recent libavfilter EOF bug 2017-01-02 18:13:08 +01:00
out vo_opengl, vaapi: properly probe 10 bit rendering support 2017-01-13 18:43:35 +01:00
csputils.c Remove compatibility things 2016-12-07 19:53:11 +01:00
csputils.h demux: expose demuxer colorimetry metadata to player 2016-11-08 19:16:26 +01:00
fmt-conversion.c Remove compatibility things 2016-12-07 19:53:11 +01:00
fmt-conversion.h
gpu_memcpy.c
gpu_memcpy.h
hwdec.c
hwdec.h vo_opengl, vaapi: properly probe 10 bit rendering support 2017-01-13 18:43:35 +01:00
image_writer.c Remove compatibility things 2016-12-07 19:53:11 +01:00
image_writer.h vo_image: move to global options 2016-09-05 21:04:55 +02:00
img_format.c Remove compatibility things 2016-12-07 19:53:11 +01:00
img_format.h vo_opengl: hwdec_cuda: Support P016 output surfaces 2016-11-22 20:19:58 +01:00
img_fourcc.h
mp_image_pool.c mp_image_pool: fix build on Libav 2017-01-12 14:19:16 +01:00
mp_image_pool.h vaapi: use libavutil functions for copying hw surfaces to memory 2017-01-12 13:58:28 +01:00
mp_image.c vd_lavc, mp_image: remove code duplication for AVFrame<->mp_image 2017-01-12 13:58:28 +01:00
mp_image.h video: use demuxer-signaled duration for last video frame 2016-12-21 18:18:24 +01:00
sws_utils.c
sws_utils.h
vaapi.c vaapi: always create AVHWDeviceContext on init 2017-01-13 13:35:31 +01:00
vaapi.h vaapi: always create AVHWDeviceContext on init 2017-01-13 13:35:31 +01:00
vdpau_functions.inc
vdpau_mixer.c
vdpau_mixer.h
vdpau.c
vdpau.h