1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-21 07:16:56 +00:00
mpv/DOCS/man
Philip Langdale 25fa1b0b45 hwdec/drmprime: add drmprime hwdec-interop
In the confusing landscape of hardware video decoding APIs, we have had
a long standing support gap for the v4l2 based APIs implemented for the
various SoCs from Rockship, Amlogic, Allwinner, etc. While VAAPI is the
defacto default for desktop GPUs, the developers who work on these SoCs
(who are not the vendors!) have preferred to implement kernel APIs
rather than maintain a userspace driver as VAAPI would require.

While there are two v4l2 APIs (m2m and requests), and multiple forks of
ffmpeg where support for those APIs languishes without reaching
upstream, we can at least say that these APIs export frames as DRMPrime
dmabufs, and that they use the ffmpeg drm hwcontext.

With those two constants, it is possible for us to write a
hwdec-interop without worrying about the mess underneath - for the most
part.

Accordingly, this change implements a hwdec-interop for any decoder
that produces frames as DRMPrime dmabufs. The bulk of the heavy
lifting is done by the dmabuf interop code we already had from
supporting vaapi, and which I refactored for reusability in a previous
set of changes.

When we combine that with the fact that we can't probe for supported
formats, the new code in this change is pretty simple.

This change also includes the hwcontext_fns that are required for us to
be able to configure the hwcontext used by `hwdec=drm-copy`. This is
technically unrelated, but it seemed a good time to fill this gap.

From a testing perspective, I have directly tested on a RockPRO64,
while others have tested with different flavours of Rockchip and on
Amlogic, providing m2m coverage.

I have some other SoCs that I need to spin up to test with, but I don't
expect big surprises, and when we inevitably need to account for new
special cases down the line, we can do so - we won't be able to support
every possible configuration blindly.
2022-08-09 10:19:18 -07:00
..
af.rst various: remove trailing whitespace 2022-05-14 14:51:34 +00:00
ao.rst DOCS/ao: remove only usage of git.io link shortening service 2022-04-28 01:07:11 +03:00
changes.rst manpage: directly link interface-changes.rst in changelog section 2020-02-21 14:34:02 +01:00
console.rst console.lua: define remaining emacs keybindings 2021-11-01 23:42:16 +11:00
encode.rst manpage: explain deprecated usage of multiple items with *-add 2020-01-07 18:13:12 +01:00
input.rst DOCS: fix typo 2022-07-01 14:11:01 +00:00
ipc.rst DOCS: fix spelling 2021-08-24 20:44:52 +03:00
javascript.rst lua: command_native_async: always callback a-sync 2022-06-22 14:44:12 +03:00
libmpv.rst DOCS: convert mpv.io and github links to https 2021-08-17 13:42:21 +00:00
lua.rst lua: command_native_async: always callback a-sync 2022-06-22 14:44:12 +03:00
mpv.rst man: remove unhelpful language 2022-08-07 20:58:56 +02:00
options.rst hwdec/drmprime: add drmprime hwdec-interop 2022-08-09 10:19:18 -07:00
osc.rst osc.lua: add osc-tcspace script option 2022-07-19 23:19:45 +03:00
stats.rst DOCS/stats.rst: fix quoting 2021-08-09 23:57:04 +03:00
vf.rst vf_format: support forwarding/stripping film grain metadata 2022-04-05 15:02:18 +02:00
vo.rst vo: add new vaapi-wayland driver 2022-05-24 21:39:34 +00:00