summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/video.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2019-01-02 03:03:38 +0100
committerJan Ekström <jeebjp@gmail.com>2019-02-18 01:54:06 +0200
commit12e58ff8a65c537a222a3fb954f88d98a3a5bfd2 (patch)
tree187624c5275f50f6f8d7f2d3a02d1193f7b64ae2 /video/out/gpu/video.c
parent6179dcbb798aa9e3501af82ae46975e881d80626 (diff)
downloadmpv-12e58ff8a65c537a222a3fb954f88d98a3a5bfd2.tar.bz2
mpv-12e58ff8a65c537a222a3fb954f88d98a3a5bfd2.tar.xz
vo_gpu: allow boosting dark scenes when tone mapping
In theory our "eye adaptation" algorithm works in both ways, both darkening bright scenes and brightening dark scenes. But I've always just prevented the latter with a hard clamp, since I wanted to avoid blowing up dark scenes into looking funny (and full of noise). But allowing a tiny bit of over-exposure might be a good thing. I won't change the default just yet (better let users test), but a moderate value of 1.2 might be better than the current 1.0 limit. Needs testing especially on dark scenes.
Diffstat (limited to 'video/out/gpu/video.c')
-rw-r--r--video/out/gpu/video.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index a29f09bc3d..6bf0bb31a1 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -316,6 +316,7 @@ static const struct gl_video_opts gl_video_opts_def = {
.tone_map = {
.curve = TONE_MAPPING_HABLE,
.curve_param = NAN,
+ .max_boost = 1.0,
.decay_rate = 100.0,
.scene_threshold_low = 50,
.scene_threshold_high = 200,
@@ -376,6 +377,7 @@ const struct m_sub_options gl_video_conf = {
OPT_INTRANGE("hdr-scene-threshold-high",
tone_map.scene_threshold_high, 0, 0, 10000),
OPT_FLOAT("tone-mapping-param", tone_map.curve_param, 0),
+ OPT_FLOATRANGE("tone-mapping-max-boost", tone_map.max_boost, 0, 1.0, 10.0),
OPT_FLOAT("tone-mapping-desaturate", tone_map.desat, 0),
OPT_FLOATRANGE("tone-mapping-desaturate-exponent",
tone_map.desat_exp, 0, 0.0, 20.0),