diff options
author | wm4 <wm4@nowhere> | 2017-10-16 14:44:59 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-16 15:02:12 +0200 |
commit | b135af6842bf55eaffa7b75c12569b48954513cb (patch) | |
tree | 26b9fcaaba1e95ecdbb2eb24f7b9c70b14430d66 /DOCS/man | |
parent | ac295960b8486f104a6aa800d8d31ca2eeba99a0 (diff) |
video: add mp_image_params.hw_flags and add an example
It seems this will be useful for Rokchip DRM hwcontext integration.
DRM hwcontexts have additional internal structure which can be different
depending on the decoder, and which is not part of the generic hwcontext
API. Rockchip has 1 layer, which EGL interop happens to translate to a
RGB texture, while VAAPI (mapped as DRM hwcontext) will use multiple
layers. Both will use sw_format=nv12, and thus are indistinguishable on
the mp_image_params level. But this is needed to initialize the EGL
mapping and the vo_gpu video renderer correctly.
We hope that the layer count is enough to tell whether EGL will
translate the data to a RGB texture (vs. 2 texture resembling raw nv12
data). For that we introduce MP_IMAGE_HW_FLAG_OPAQUE.
This commit adds the flag, infrastructure to set it, and an "example"
for D3D11.
The D3D11 addition is quite useless at this point. But later we want to
get rid of d3d11_update_image_attribs() anyway, while we still need a
way to force d3d11vpp filter insertion, so maybe it has some
justification (who knows). In any case it makes testing this easier.
Obviously it also adds some basic support for triggering the opaque
format for decoding, which will use a driver-specific format, but which
is not supported in shaders. The opaque flag is not used to determine
whether d3d11vpp needs to be inserted, though.
Diffstat (limited to 'DOCS/man')
-rw-r--r-- | DOCS/man/options.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index f17a6042eb..9d92d5c13c 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -843,7 +843,8 @@ Video Some implementations might support multiple formats. In particular, videotoolbox is known to require ``uyvy422`` for good performance on some - older hardware. + older hardware. d3d11va can always use ``yuv420p``, which uses an opaque + format, with likely no advantages. ``--videotoolbox-format=<name>`` Set the internal pixel format used by ``--hwdec=videotoolbox`` on OSX. The |