From 64d56114ed9258efe2e864315d7130bb58a03d52 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 23 Jul 2017 09:41:51 +0200 Subject: vo_opengl: add direct rendering support Can be enabled via --vd-lavc-dr=yes. See manpage additions for what it does. This reminds of the MPlayer -dr flag, but the implementation is completely different. It's the same basic concept: letting the decoder render into a GPU buffer to avoid a copy. Unlike MPlayer, this doesn't try to go through filters (libavfilter doesn't support this anyway). Unless a filter can work in-place, DR will be silently disabled. MPlayer had very complex semantics about buffer types and management (which apparently nobody ever understood) and weird restrictions that mostly limited it to mpeg2 style codecs. The mpv code does not do any of this, and just lets the decoder allocate an arbitrary number of untyped images. (No MPlayer code was used.) Parts of the code based on work by atomnuker (starting point for the generic code) and haasn (some GL definitions, some basic PBO code, and correct fencing). --- DOCS/man/options.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'DOCS/man/options.rst') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index df640c8af5..e73ef6eee4 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -1013,6 +1013,23 @@ Video (default: 3). If this is a number, then fallback will be triggered if N frames fail to decode in a row. 1 is equivalent to ``yes``. +``--vd-lavc-dr=`` + Enable direct rendering (default: no). If this is set to ``yes``, the + video will be decoded directly to GPU video memory (or staging buffers). + This can speed up video upload, and may help with large resolutions or + slow hardware. This works only with the following VOs: + + - ``opengl``: requires at least OpenGL 4.4. + + (In particular, this can't be made work with ``opengl-cb``.) + + Using video filters of any kind that write to the image data (or output + newly allocated frames) will silently disable the DR code path. + + There are some corner cases that will result in undefined behavior (crashes + and other strange behavior) if this option is enabled. These are pending + towards being fixed properly at a later point. + ``--vd-lavc-bitexact`` Only use bit-exact algorithms in all decoding steps (for codec testing). -- cgit v1.2.3