From db0fb3c48b12f09170231fccd2c91687d9ce21db Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Tue, 19 Sep 2017 06:35:24 +0200 Subject: vo_gpu: fix gamma scale This never really made sense since the BT.1886 changes. It should get *brighter* for bright rooms, not darker for dark rooms. Picked some new values that seemed reasonable-ish. --- video/out/gpu/video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'video') diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index e0ca6c4ffb..9f1654e584 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -3738,9 +3738,9 @@ float gl_video_scale_ambient_lux(float lmin, float lmax, void gl_video_set_ambient_lux(struct gl_video *p, int lux) { if (p->opts.gamma_auto) { - float gamma = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, lux); - MP_VERBOSE(p, "ambient light changed: %dlux (gamma: %f)\n", lux, gamma); - p->opts.gamma = MPMIN(1.0, 1.961 / gamma); + p->opts.gamma = gl_video_scale_ambient_lux(16.0, 256.0, 1.0, 1.2, lux); + MP_VERBOSE(p, "ambient light changed: %d lux (gamma: %f)\n", lux, + p->opts.gamma); } } -- cgit v1.2.3