diff options
author | Niklas Haas <git@haasn.xyz> | 2019-01-02 03:03:38 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2019-02-18 01:54:06 +0200 |
commit | 12e58ff8a65c537a222a3fb954f88d98a3a5bfd2 (patch) | |
tree | 187624c5275f50f6f8d7f2d3a02d1193f7b64ae2 /video/out/gpu/video_shaders.c | |
parent | 6179dcbb798aa9e3501af82ae46975e881d80626 (diff) | |
download | mpv-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_shaders.c')
-rw-r--r-- | video/out/gpu/video_shaders.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/gpu/video_shaders.c b/video/out/gpu/video_shaders.c index 0fff8f05f2..fbccd56eb3 100644 --- a/video/out/gpu/video_shaders.c +++ b/video/out/gpu/video_shaders.c @@ -652,7 +652,7 @@ static void pass_tone_map(struct gl_shader_cache *sc, } GLSL(float sig_orig = sig[sig_idx];) - GLSLF("float slope = min(1.0, %f / sig_avg);\n", sdr_avg); + GLSLF("float slope = min(%f, %f / sig_avg);\n", opts->max_boost, sdr_avg); GLSL(sig *= slope;) GLSL(sig_peak *= slope;) |