1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 01:22:30 +00:00

vo_gpu_next: add --tone-mapping-visualize

This commit is contained in:
Niklas Haas 2023-02-19 21:01:40 +01:00
parent 41ad51bda2
commit 9a752e8b26
5 changed files with 16 additions and 0 deletions

View File

@ -54,6 +54,7 @@ Interface changes
- undeprecate vf_sub
- add `--tone-mapping=st2094-40` and `--tone-mapping=st2094-10`
- change `--screenshot-jxl-effort` default from `3` to `4`.
- add `--tone-mapping-visualize`
--- mpv 0.35.0 ---
- add the `--vo=gpu-next` video output driver, as well as the options
`--allow-delayed-peak-detect`, `--builtin-scalers`,

View File

@ -6524,6 +6524,16 @@ them.
reductions to account for brightness-related perceptual nonuniformity.
(``--vo=gpu-next`` only)
``--tone-mapping-visualize``
Display a (PQ-PQ) graph of the active tone-mapping LUT. Intended only for
debugging purposes. The X axis shows PQ input values, the Y axis shows PQ
output values. The tone-mapping curve is shown in green/yellow. Yellow
means the brightness has been boosted from the source, dark blue regions
show where the brightness has been reduced. The extra colored regions and
lines indicate various monitor limits, as well a reference diagonal
(neutral tone-mapping) and source scene average brightness information (if
available). (``--vo=gpu-next`` only)
``--gamut-mapping-mode``
Specifies the algorithm used for reducing the gamut of images for the
target display, after any tone mapping is done.

View File

@ -399,6 +399,7 @@ const struct m_sub_options gl_video_conf = {
{"max", TONE_MAP_MODE_MAX},
{"hybrid", TONE_MAP_MODE_HYBRID},
{"luma", TONE_MAP_MODE_LUMA})},
{"tone-mapping-visualize", OPT_FLAG(tone_map.visualize)},
{"gamut-mapping-mode", OPT_CHOICE(tone_map.gamut_mode,
{"auto", GAMUT_AUTO},
{"clip", GAMUT_CLIP},

View File

@ -130,6 +130,7 @@ struct gl_tone_map_opts {
float scene_threshold_low;
float scene_threshold_high;
int gamut_mode;
int visualize;
};
struct gl_video_opts {

View File

@ -1878,6 +1878,9 @@ static void update_render_options(struct vo *vo)
p->color_map.tone_mapping_param = 0.0;
if (opts->tone_map.gamut_mode != GAMUT_AUTO)
p->color_map.gamut_mode = gamut_modes[opts->tone_map.gamut_mode];
#if PL_API_VER >= 247
p->color_map.visualize_lut = opts->tone_map.visualize;
#endif
switch (opts->dither_algo) {
case DITHER_NONE: