summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2021-11-03 14:42:20 +0100
committerNiklas Haas <git@haasn.dev>2021-11-03 14:43:17 +0100
commit701bd783cafa9fbe6dc5c34d8784193179a9290d (patch)
treece380a612e40e61482a65513e4adac158918e14d
parent9d5d9b24240efe98cf99bbda2cb5280b025506d8 (diff)
downloadmpv-701bd783cafa9fbe6dc5c34d8784193179a9290d.tar.bz2
mpv-701bd783cafa9fbe6dc5c34d8784193179a9290d.tar.xz
vo_gpu_next: fix --tone-mapping-param mapping
vo_gpu defaults this to NAN, libplacebo uses 0.0 as the default. Fixes https://github.com/mpv-player/mpv/issues/9386
-rw-r--r--video/out/vo_gpu_next.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index 98eb1615d1..72c9cdb8ee 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -1179,6 +1179,8 @@ static void update_render_options(struct priv *p)
p->color_map.intent = opts->icc_opts->intent;
p->color_map.tone_mapping_algo = tone_map_algos[opts->tone_map.curve];
p->color_map.tone_mapping_param = opts->tone_map.curve_param;
+ if (isnan(p->color_map.tone_mapping_param)) // vo_gpu compatibility
+ p->color_map.tone_mapping_param = 0.0;
p->color_map.desaturation_strength = opts->tone_map.desat;
p->color_map.desaturation_exponent = opts->tone_map.desat_exp;
p->color_map.max_boost = opts->tone_map.max_boost;