summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/video.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2020-05-29 21:39:05 +0200
committerNiklas Haas <git@haasn.xyz>2020-06-15 01:24:09 +0200
commitc9f6c458ea54f595127684a3bcd94f578ec42b1f (patch)
tree12a145ef85a83821926af0e9e18a67a9be5413d1 /video/out/gpu/video.c
parentef6bc8504a945eb6492b8ed46fd5a1afaaf32182 (diff)
downloadmpv-c9f6c458ea54f595127684a3bcd94f578ec42b1f.tar.bz2
mpv-c9f6c458ea54f595127684a3bcd94f578ec42b1f.tar.xz
vo_gpu: add BT.2390 tone-mapping
Implementation copy/pasted from: https://code.videolan.org/videolan/libplacebo/-/commit/f793fc0480f This brings mpv's tone mapping more in line with industry standard practices, for a hopefully more consistent result across the board. Note that we ignore the black point adjustment of the tone mapping entirely. In theory we could revisit this, if we ever make black point compensation part of the mpv rendering pipeline.
Diffstat (limited to 'video/out/gpu/video.c')
-rw-r--r--video/out/gpu/video.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index 500ec6af22..dedeed7001 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -322,7 +322,7 @@ static const struct gl_video_opts gl_video_opts_def = {
.background = {0, 0, 0, 255},
.gamma = 1.0f,
.tone_map = {
- .curve = TONE_MAPPING_HABLE,
+ .curve = TONE_MAPPING_BT_2390,
.curve_param = NAN,
.max_boost = 1.0,
.decay_rate = 100.0,
@@ -382,7 +382,8 @@ const struct m_sub_options gl_video_conf = {
{"reinhard", TONE_MAPPING_REINHARD},
{"hable", TONE_MAPPING_HABLE},
{"gamma", TONE_MAPPING_GAMMA},
- {"linear", TONE_MAPPING_LINEAR})},
+ {"linear", TONE_MAPPING_LINEAR},
+ {"bt.2390", TONE_MAPPING_BT_2390})},
{"hdr-compute-peak", OPT_CHOICE(tone_map.compute_peak,
{"auto", 0},
{"yes", 1},