1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-05 06:30:06 +00:00
mpv/video/out
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
..
cocoa input: add MOUSE_ENTER keybinding. 2015-02-18 00:03:16 +01:00
wayland
aspect.c
aspect.h
bitmap_packer.c buid: readd -Wparentheses 2015-03-02 19:09:25 +01:00
bitmap_packer.h
cocoa_common.h
cocoa_common.m cocoa: add support for querying ambient lighting 2015-03-04 10:06:08 +01:00
d3d_shader_420p.h vo_direct3d: support NV12 with shaders 2015-03-02 19:09:18 +01:00
d3d_shader_nv12.h vo_direct3d: support NV12 with shaders 2015-03-02 19:09:18 +01:00
d3d_shader_yuv.hlsl vo_direct3d: support NV12 with shaders 2015-03-02 19:09:18 +01:00
dither.c
dither.h
filter_kernels.c filter_kernels: rename bilinear_slow to triangle 2015-02-24 03:13:37 +01:00
filter_kernels.h filter_kernels: improve a comment 2015-01-22 20:08:47 +01:00
gl_cocoa.c cocoa: fix fallback for OpenGL 2.1 hardware [2] 2015-01-24 16:54:24 +01:00
gl_common.c vo_opengl: minor robustness improvement in function loader 2015-02-20 18:53:35 +01:00
gl_common.h vo_opengl: remove some unused functions 2015-01-28 19:40:52 +01:00
gl_header_fixes.h cocoa: remove support for systems without gl3.h header 2015-01-22 08:27:03 +01:00
gl_hwdec_vaglx.c vo_opengl: let hwdec driver report the exact image format 2015-01-29 19:53:49 +01:00
gl_hwdec_vda.c command: add property returning detected hwdec API 2015-02-02 22:43:13 +01:00
gl_hwdec_vdpau.c vo_opengl: let hwdec driver report the exact image format 2015-01-29 19:53:49 +01:00
gl_hwdec.c video: have a generic context struct for hwdec backends 2015-01-22 15:32:23 +01:00
gl_hwdec.h vo_opengl: let hwdec driver report the exact image format 2015-01-29 19:53:49 +01:00
gl_lcms.c vo_opengl: minor changes to ICC update code 2015-01-26 02:11:14 +01:00
gl_lcms.h
gl_osd.c vo_opengl: use triangle strip for video 2015-01-30 15:57:40 +01:00
gl_osd.h vo_opengl: move remaining OSD rendering parts to gl_osd.c 2015-01-29 18:29:28 +01:00
gl_utils.c vo_opengl: fix a cast 2015-01-29 21:13:06 +01:00
gl_utils.h vo_opengl: split out a helper for drawing primitives 2015-01-29 17:19:01 +01:00
gl_video_shaders.glsl vo_opengl: implement antiringing for tensor scalers 2015-02-27 04:35:15 +01:00
gl_video.c vo_opengl: add gamma-auto option 2015-03-04 10:06:08 +01:00
gl_video.h vo_opengl: add gamma-auto option 2015-03-04 10:06:08 +01:00
gl_w32.c vo_opengl: remove remnants of dropped stereo buffer support 2015-01-24 23:29:54 +01:00
gl_wayland.c
gl_x11.c vo_opengl: remove remnants of dropped stereo buffer support 2015-01-24 23:29:54 +01:00
gl_x11egl.c x11egl: minor cleanup 2015-02-20 19:54:33 +01:00
vo_caca.c video: remove vfcap.h 2015-01-21 22:08:24 +01:00
vo_direct3d.c vo_direct3d: support NV12 with shaders 2015-03-02 19:09:18 +01:00
vo_image.c video: remove vfcap.h 2015-01-21 22:08:24 +01:00
vo_lavc.c video: remove vfcap.h 2015-01-21 22:08:24 +01:00
vo_null.c video: remove vfcap.h 2015-01-21 22:08:24 +01:00
vo_opengl_cb.c command: add property returning detected hwdec API 2015-02-02 22:43:13 +01:00
vo_opengl.c vo_opengl: add gamma-auto option 2015-03-04 10:06:08 +01:00
vo_sdl.c buid: readd -Wparentheses 2015-03-02 19:09:25 +01:00
vo_vaapi.c vo: simplify VOs by adding generic screenshot support 2015-01-24 23:16:27 +01:00
vo_vdpau.c buid: readd -Wparentheses 2015-03-02 19:09:25 +01:00
vo_wayland.c vo: simplify VOs by adding generic screenshot support 2015-01-24 23:16:27 +01:00
vo_x11.c vo: simplify VOs by adding generic screenshot support 2015-01-24 23:16:27 +01:00
vo_xv.c vo_xv: don't attempt to clear window before mapped 2015-02-26 09:26:28 +01:00
vo.c vo_opengl: fix smoothmotion coefficient calculation 2015-02-13 20:39:53 +01:00
vo.h cocoa: add support for querying ambient lighting 2015-03-04 10:06:08 +01:00
w32_common.c input: add MOUSE_ENTER keybinding. 2015-02-18 00:03:16 +01:00
w32_common.h
wayland_common.c buid: readd -Wparentheses 2015-03-02 19:09:25 +01:00
wayland_common.h
win_state.c
win_state.h
x11_common.c input: add MOUSE_ENTER keybinding. 2015-02-18 00:03:16 +01:00
x11_common.h vo_opengl, x11: implement icc-profile-auto 2015-01-26 02:18:47 +01:00
x11_icon.bin