diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index dc4403b996..2c94f37cdc 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -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`, diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 7e9dc0cbef..623037f45d 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -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. diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 98b4ca08cf..b94f4d85be 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -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}, diff --git a/video/out/gpu/video.h b/video/out/gpu/video.h index 43acbf9384..692d261584 100644 --- a/video/out/gpu/video.h +++ b/video/out/gpu/video.h @@ -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 { diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index b018648dcf..4c92faff66 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -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: