summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-02-19 21:01:40 +0100
committerNiklas Haas <git@haasn.dev>2023-02-19 21:01:40 +0100
commit9a752e8b262d0a52799f4c3532f4e43d7be733fc (patch)
treef0dc2b78c66d29f0dd6a9ec566e01c68dc2be130 /video/out
parent41ad51bda281e56ddc8bb4416b82b47903e779f1 (diff)
downloadmpv-9a752e8b262d0a52799f4c3532f4e43d7be733fc.tar.bz2
mpv-9a752e8b262d0a52799f4c3532f4e43d7be733fc.tar.xz
vo_gpu_next: add --tone-mapping-visualize
Diffstat (limited to 'video/out')
-rw-r--r--video/out/gpu/video.c1
-rw-r--r--video/out/gpu/video.h1
-rw-r--r--video/out/vo_gpu_next.c3
3 files changed, 5 insertions, 0 deletions
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: