From 9d5d9b24240efe98cf99bbda2cb5280b025506d8 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Fri, 9 Apr 2021 09:14:54 +0200 Subject: vo_gpu_next: add new libplacebo-based renderer As discussed in #8799, this will eventually replace vo_gpu. However, it is not yet complete. Currently missing: - OpenGL contexts - hardware decoding - blend-subtitles=video - VOCTRL_SCREENSHOT However, it's usable enough to cover most use cases, and as such is enough to start getting in some crucial testing. --- DOCS/interface-changes.rst | 5 +++ DOCS/man/options.rst | 81 ++++++++++++++++++++++++++++++++++++++++++++-- DOCS/man/vo.rst | 12 +++++++ 3 files changed, 96 insertions(+), 2 deletions(-) (limited to 'DOCS') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 84418c5ce3..6aa6fd907d 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -26,6 +26,11 @@ Interface changes :: + --- mpv 0.35.0 --- + - add the `--vo=gpu-next` video output driver, as well as the options + `--allow-delayed-peak-detect`, `--builtin-scalers`, + `--interpolation-preserve` `--lut`, `--lut-type`, `--image-lut`, + `--image-lut-type` and `--target-lut` along with it. --- mpv 0.34.0 --- - deprecate selecting by card number with `--drm-connector`, add `--drm-device` which can be used instead diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 3ade7f764c..4b97915734 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -5013,8 +5013,9 @@ ALSA audio output options GPU renderer options ----------------------- -The following video options are currently all specific to ``--vo=gpu`` and -``--vo=libmpv`` only, which are the only VOs that implement them. +The following video options are currently all specific to ``--vo=gpu``, +``--vo=libmpv`` and ``--vo=gpu-next``, which are the only VOs that implement +them. ``--scale=`` The filter function to use when upscaling video. @@ -5191,6 +5192,12 @@ The following video options are currently all specific to ``--vo=gpu`` and will reproduce the source image perfectly if no scaling is performed. Enabled by default. Note that this option never affects ``--cscale``. +``--builtin-scalers`` + Allow using faster built-in replacements for common scalers such as + ``nearest``, ``bilinear`` or ``bicubic``. These have the disadvantage of + not being configurable, unlike normal scaler kernels. Defaults to + enabled. (This option only affects ``--vo=gpu-next``) + ``--correct-downscaling`` When using convolution based filters, extend the filter size when downscaling. Increases quality, but reduces performance while downscaling. @@ -5267,6 +5274,15 @@ The following video options are currently all specific to ``--vo=gpu`` and Set this to ``-1`` to disable this logic. +``--interpolation-preserve`` + Preserve the previous frames' interpolated results even when renderer + parameters are changed - with the exception of options related to + cropping and video placement, which always invalidate the cache. Enabling + this option makes dynamic updates of renderer settings slightly smoother at + the cost of slightly higher latency in response to such changes. Defaults + to on. (Only affects ``--vo=gpu-next``, note that ``-vo=gpu`` always + invalidates interpolated frames) + ``--opengl-pbo`` Enable use of PBOs. On some drivers this can be faster, especially if the source video size is huge (e.g. so called "4K" video). On other drivers it @@ -6139,6 +6155,29 @@ The following video options are currently all specific to ``--vo=gpu`` and NOTE: Only implemented on macOS. +``--image-lut=`` + Specifies a custom LUT file (in Adobe .cube format) to apply to the colors + during image decoding. The exact interpretation of the LUT depends on + the value of ``--image-lut-type``. (Only for ``--vo=gpu-next``) + +``--image-lut-type=`` + Controls the interpretation of color values fed to and from the LUT + specified as ``--image-lut``. Valid values are: + + auto + Chooses the interpretation of the LUT automatically from tagged + metadata, and otherwise falls back to ``native``. (Default) + native + Applied to the raw image contents in its native colorspace, before + decoding to RGB. For example, for a HDR10 image, this would be fed + PQ-encoded YCbCr values in the range 0.0 - 1.0. + normalized + Applied to the normalized RGB image contents, after decoding from + its native color encoding, but before linearization. + conversion + Fully replaces the color decoding. A LUT of this type should ingest the + image's native colorspace and output normalized non-linear RGB. + ``--target-prim=`` Specifies the primaries of the display. Video colors will be adapted to this colorspace when ICC color management is not being used. Valid values @@ -6254,6 +6293,12 @@ The following video options are currently all specific to ``--vo=gpu`` and In such a configuration, we highly recommend setting ``--tone-mapping`` to ``mobius`` or even ``clip``. +``--target-lut=`` + Specifies a custom LUT file (in Adobe .cube format) to apply to the colors + before display on-screen. This LUT is fed values in normalized RGB, after + encoding into the target colorspace, so after the application of + ``--target-trc``. (Only for ``--vo=gpu-next``) + ``--tone-mapping=`` Specifies the algorithm used for tone-mapping images onto the target display. This is relevant for both HDR->SDR conversion as well as gamut @@ -6335,6 +6380,14 @@ The following video options are currently all specific to ``--vo=gpu`` and The special value ``auto`` (default) will enable HDR peak computation automatically if compute shaders and SSBOs are supported. +``--allow-delayed-peak-detect`` + When using ``--hdr-compute-peak``, allow delaying the detected peak by a + frame when beneficial for performance. In particular, this is required to + avoid an unnecessary FBO indirection when no advanced rendering is required + otherwise. Has no effect if there already is an indirect pass, such as when + advanced scaling is enabled. Defaults to on. (Only affects + ``--vo=gpu-next``, note that ``--vo=gpu`` always delays the peak.) + ``--hdr-peak-decay-rate=<1.0..1000.0>`` The decay rate used for the HDR peak detection algorithm (default: 100.0). This is only relevant when ``--hdr-compute-peak`` is enabled. Higher values @@ -6456,6 +6509,30 @@ The following video options are currently all specific to ``--vo=gpu`` and value ``inf`` causes the BT.1886 curve to be treated as a pure power gamma 2.4 function. +``--lut=`` + Specifies a custom LUT (in Adobe .cube format) to apply to the colors + as part of color conversion. The exact interpretation depends on the value + of ``--lut-type``. (Only for ``--vo=gpu-next``) + +``--lut-type=`` + Controls the interpretation of color values fed to and from the LUT + specified as ``--lut``. Valid values are: + + auto + Chooses the interpretation of the LUT automatically from tagged + metadata, and otherwise falls back to ``native``. (Default) + native + Applied to raw image contents in its native RGB colorspace (non-linear + light), before conversion to the output color space. + normalized + Applied to the normalized RGB image contents, in linear light, before + conversion to the output color space. + conversion + Fully replaces the conversion from the image color space to the output + color space. If such a LUT is present, it has the highest priority, and + overrides any ICC profiles, as well as options related to tone mapping + and output colorimetry (``--target-prim``, ``--target-trc`` etc.). + ``--blend-subtitles=`` Blend subtitles directly onto upscaled video frames, before interpolation and/or color management (default: no). Enabling this causes subtitles to be diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index 7632f3c406..7897336266 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -257,6 +257,18 @@ Available video output drivers are: with ``rgb32f``. If you have problems, you can also try enabling the ``--gpu-dumb-mode=yes`` option. +``gpu-next`` + Experimental video renderer based on ``libplacebo``. This supports almost + the same set of features as ``--vo=gpu``. See `GPU renderer options`_ for a + list. + + Currently, this only supports ``--gpu-api=vulkan``, and no hardware + decoding. Unlike ``--vo=gpu``, the FBO formats are not tunable, but you can + still set ``--gpu-dumb-mode=yes`` to forcibly disable their use. + + Should generally be faster and higher quality, but some features may still + be missing or misbehave. Expect (and report!) bugs. + ``sdl`` SDL 2.0+ Render video output driver, depending on system with or without hardware acceleration. Should work on all platforms supported by SDL 2.0. -- cgit v1.2.3