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.
This commit is contained in:
Niklas Haas 2017-09-19 06:35:24 +02:00
parent 61f5c423be
commit db0fb3c48b
No known key found for this signature in database
GPG Key ID: 9A09076581B27402
2 changed files with 14 additions and 14 deletions

View File

@ -4649,22 +4649,22 @@ The following video options are currently all specific to ``--vo=gpu`` and
Recommended values based on the environmental brightness:
1.0
Brightly illuminated (default)
0.9
Slightly dim
0.8
Pitch black room
Pitch black or dimly lit room (default)
1.1
Moderately lit room, home
1.2
Brightly illuminated room, office
NOTE: Typical movie content (Blu-ray etc.) already contains a gamma drop of
about 0.8, so specifying it here as well will result in even darker
image than intended!
NOTE: This is based around the assumptions of typical movie content, which
contains an implicit end-to-end of about 0.8 from scene to display. For
bright environments it can be useful to cancel that out.
``--gamma-auto``
Automatically corrects the gamma value depending on ambient lighting
conditions (adding a gamma boost for dark rooms).
conditions (adding a gamma boost for bright rooms).
With ambient illuminance of 64lux, mpv will pick the 1.0 gamma value (no
boost), and slightly increase the boost up until 0.8 for 16lux.
With ambient illuminance of 16 lux, mpv will pick the 1.0 gamma value (no
boost), and slightly increase the boost up until 1.2 for 256 lux.
NOTE: Only implemented on OS X.

View File

@ -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);
}
}