mpv/video
Stefano Pigozzi c028d782c1 vo_opengl: add gamma-auto option
This automatically sets the gamma option depending on lighting conditions
measured from the computer's ambient light sensor.

sRGB – arguably the “sibling” to BT.709 for still images – has a reference
viewing environment defined in its specification (IEC 61966-2-1:1999, see
http://www.color.org/chardata/rgb/srgb.xalter). According to this data, the
assumed ambient illuminance is 64 lux. This is the illuminance where the gamma
that results from ICC color management is correct.

On the other hand, BT.1886 formalizes that the gamma level for dim environments
to be 2.40, and Apple resources (WWDC12: 2012 Session 523: Best practices for
color management) define the BT.1886 dim at 16 lux.

So the logic we apply is:

  * >= 64lux -> 1.961 gamma
  * =< 16lux -> 2.400 gamma
  * 16lux < x < 64lux -> logaritmic rescale of lux to gamma. The human
    perception of illuminance roughly follows a logaritmic scale of lux [1].

[1]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd319008%28v=vs.85%29.aspx
2015-03-04 10:06:08 +01:00
..
decode Remove some FFmpeg/Libav compatibility hacks 2015-03-03 12:28:46 +01:00
filter vf: fix indentation level of verbose output 2015-02-23 16:12:03 +01:00
out vo_opengl: add gamma-auto option 2015-03-04 10:06:08 +01:00
csputils.c Remove some FFmpeg/Libav compatibility hacks 2015-03-03 12:28:46 +01:00
csputils.h Revert "Revert recent vo_opengl related commits" 2015-02-28 20:23:47 +01:00
fmt-conversion.c video: work around libswscale for PNG pixel formats 2015-02-06 23:22:16 +01:00
fmt-conversion.h
hwdec.h command: add property returning detected hwdec API 2015-02-02 22:43:13 +01:00
image_writer.c Remove some FFmpeg/Libav compatibility hacks 2015-03-03 12:28:46 +01:00
image_writer.h Revert "Revert recent vo_opengl related commits" 2015-02-28 20:23:47 +01:00
img_format.c video: try to keep implied alpha when using conversion filters 2015-01-21 21:49:15 +01:00
img_format.h vo_opengl: handle grayscale input better, add YA16 support 2015-01-21 19:29:18 +01:00
img_fourcc.h
memcpy_pic.h
mp_image.c Remove some FFmpeg/Libav compatibility hacks 2015-03-03 12:28:46 +01:00
mp_image.h Revert "Revert recent vo_opengl related commits" 2015-02-28 20:23:47 +01:00
mp_image_pool.c mp_image_pool: allow passing pool=NULL in more places 2015-01-22 17:37:40 +01:00
mp_image_pool.h
sws_utils.c vf_scale: libswscale is being stupid 2015-03-01 22:32:38 +01:00
sws_utils.h vf_scale: libswscale is being stupid 2015-03-01 22:32:38 +01:00
vaapi.c command: add property returning detected hwdec API 2015-02-02 22:43:13 +01:00
vaapi.h video: have a generic context struct for hwdec backends 2015-01-22 15:32:23 +01:00
vdpau.c command: add property returning detected hwdec API 2015-02-02 22:43:13 +01:00
vdpau.h video: handle hwdec screenshots differently 2015-01-22 18:18:23 +01:00
vdpau_functions.inc video: handle hwdec screenshots differently 2015-01-22 18:18:23 +01:00
vdpau_mixer.c video: handle hwdec screenshots differently 2015-01-22 18:18:23 +01:00
vdpau_mixer.h