|author||wm4 <wm4@nowhere>||2017-07-23 09:41:51 +0200|
|committer||wm4 <wm4@nowhere>||2017-07-24 04:32:55 +0200|
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).
Diffstat (limited to 'DOCS')
1 files changed, 17 insertions, 0 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index df640c8af5..e73ef6eee4 100644
@@ -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``.
+ 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.
Only use bit-exact algorithms in all decoding steps (for codec testing).