From d8a3b10f45eb10fb34ce9da3a9a76e3bd8644e3d Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Fri, 9 Jun 2017 09:16:06 +0200 Subject: vo_opengl: add new HDR tone mapping algorithm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I call it `mobius` because apparently the form f(x) = (cx+a)/(dx+b) is called a Möbius transform, which is the algorithm this is based on. In the extremes it becomes `reinhard` (param=0.0 and `clip` (param=1.0), smoothly transitioning between the two depending on the parameter. This is a useful tone mapping algorithm since the tunable mobius transform allows the user to decide the trade-off between color accuracy and detail preservation on a continuous scale. The default of 0.3 is already far more accurate than `reinhard` while also being reasonably good at preserving highlights, without suffering from the overall brightness drop and color distortion of `hable`. For these reasons, make this the new default. Also expand and improve the documentation for these tone mapping functions. --- video/out/opengl/video.c | 1 + 1 file changed, 1 insertion(+) (limited to 'video/out/opengl/video.c') diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 0bfba10ae1..4a91db69f0 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -328,6 +328,7 @@ const struct m_sub_options gl_video_conf = { OPT_INTRANGE("target-brightness", target_brightness, 0, 1, 100000), OPT_CHOICE("hdr-tone-mapping", hdr_tone_mapping, 0, ({"clip", TONE_MAPPING_CLIP}, + {"mobius", TONE_MAPPING_MOBIUS}, {"reinhard", TONE_MAPPING_REINHARD}, {"hable", TONE_MAPPING_HABLE}, {"gamma", TONE_MAPPING_GAMMA}, -- cgit v1.2.3