diff options
author | Niklas Haas <git@haasn.xyz> | 2017-09-10 18:18:31 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-09-10 18:19:46 +0200 |
commit | d0c87dd57918cab1afc4d5968355b6253377c0b1 (patch) | |
tree | be74d142ba356485b0f9e58bddff37495229dab4 /video/out/opengl/video.c | |
parent | b19b0869d68121f4e9a973b53d9abbd370d0a160 (diff) | |
download | mpv-d0c87dd57918cab1afc4d5968355b6253377c0b1.tar.bz2 mpv-d0c87dd57918cab1afc4d5968355b6253377c0b1.tar.xz |
vo_opengl: add a gamut warning feature
This clearly highlights all out-of-gamut/clipped pixels. (Either too
bright or too saturated)
Has some (documented) caveats. Also make TONE_MAPPING_CLIP stop actually
clamping the value range (it's unnecessary and breaks this feature).
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r-- | video/out/opengl/video.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 8d90c2bcaa..3362381eff 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -363,6 +363,7 @@ const struct m_sub_options gl_video_conf = { OPT_FLAG("hdr-compute-peak", compute_hdr_peak, 0), OPT_FLOAT("tone-mapping-param", tone_mapping_param, 0), OPT_FLOAT("tone-mapping-desaturate", tone_mapping_desat, 0), + OPT_FLAG("gamut-warning", gamut_warning, 0), OPT_FLAG("opengl-pbo", pbo, 0), SCALER_OPTS("scale", SCALER_SCALE), SCALER_OPTS("dscale", SCALER_DSCALE), @@ -2460,7 +2461,7 @@ static void pass_colormanage(struct gl_video *p, struct mp_colorspace src, bool // Adapt from src to dst as necessary pass_color_map(p->sc, src, dst, p->opts.tone_mapping, p->opts.tone_mapping_param, p->opts.tone_mapping_desat, - detect_peak, p->use_linear && !osd); + detect_peak, p->opts.gamut_warning, p->use_linear && !osd); if (p->use_lut_3d) { gl_sc_uniform_texture(p->sc, "lut_3d", p->lut_3d_texture); |