diff options
author | Niklas Haas <git@haasn.dev> | 2023-08-18 17:25:52 +0200 |
---|---|---|
committer | Niklas Haas <github-daiK1o@haasn.dev> | 2023-08-19 14:12:24 +0200 |
commit | a8192eda6cfc909fc9f5f62e36523b53c0300eff (patch) | |
tree | f8b0c3500417050b5e9e6e36b07f9782a21ea126 | |
parent | 40b6afcfca81a30c29531a49b6368b53ad5d501f (diff) | |
download | mpv-a8192eda6cfc909fc9f5f62e36523b53c0300eff.tar.bz2 mpv-a8192eda6cfc909fc9f5f62e36523b53c0300eff.tar.xz |
vo_gpu_next: add --libplacebo-opts
To help test not-yet-exposed options, and for debugging purposes.
-rw-r--r-- | DOCS/interface-changes.rst | 1 | ||||
-rw-r--r-- | DOCS/man/options.rst | 8 | ||||
-rw-r--r-- | video/out/vo_gpu_next.c | 7 |
3 files changed, 16 insertions, 0 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index f94ee4eb5e..a0ce65a792 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -40,6 +40,7 @@ Interface changes You can disable this with `--no-term-remaining-playtime`. - add `playlist-path` and `playlist/N/playlist-path` properties - add `--x11-wid-title` option + - add `--libplacebo-opts` option --- mpv 0.36.0 --- - add `--target-contrast` - Target luminance value is now also applied when ICC profile is used. diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 71e133e7ff..61cba49943 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -6927,6 +6927,14 @@ them. The directory where gpu shader cache is stored. Cache is stored in the system's cache directory (usually ``~/.cache/mpv``) if this is unset. +``--libplacebo-opts=<key>=<value>[,<key>=<value>[,...]]`` + Passes extra raw option to the libplacebo rendering backend (used by + ``--vo=gpu-next``). May override the effects of any other options set using + the normal options system. Requires libplacebo v6.309 or higher. Included + for debugging purposes only. For more information, see: + + https://code.videolan.org/videolan/libplacebo/-/blob/master/src/options.c#L877 + Miscellaneous ------------- diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 8137ef8040..658fc42acf 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -145,6 +145,7 @@ struct priv { const struct pl_hook **hooks; // storage for `params.hooks` const struct pl_filter_config *frame_mixer; enum mp_csp_levels output_levels; + char **raw_opts; struct pl_icc_profile icc_profile; char *icc_path; @@ -794,6 +795,11 @@ static void update_options(struct vo *vo) pars->color_adjustment.saturation = cparams.saturation; pars->color_adjustment.gamma = cparams.gamma; p->output_levels = cparams.levels_out; + +#if PL_API_VER >= 309 + for (char **kv = p->raw_opts; kv && kv[0]; kv += 2) + pl_options_set_str(pars, kv[0], kv[1]); +#endif } static void apply_target_contrast(struct priv *p, struct pl_color_space *color) @@ -2085,6 +2091,7 @@ const struct vo_driver video_out_gpu_next = { {"target-lut", OPT_STRING(target_lut.opt), .flags = M_OPT_FILE}, {"target-colorspace-hint", OPT_BOOL(target_hint)}, // No `target-lut-type` because we don't support non-RGB targets + {"libplacebo-opts", OPT_KEYVALUELIST(raw_opts)}, {0} }, }; |