diff options
author | Niklas Haas <git@haasn.xyz> | 2018-12-27 18:34:19 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2019-02-18 01:54:06 +0200 |
commit | 3fe882d4ae80fa060a71dad0d6d1605afcfe98b6 (patch) | |
tree | 56c1a100c373d4a7800f3c016ba7b79e0306c4db /video/out/gpu/video_shaders.h | |
parent | 36600ff1633871a996fe05b8e0ff0b22c2ebb0f9 (diff) | |
download | mpv-3fe882d4ae80fa060a71dad0d6d1605afcfe98b6.tar.bz2 mpv-3fe882d4ae80fa060a71dad0d6d1605afcfe98b6.tar.xz |
vo_gpu: improve tone mapping desaturation
Instead of desaturating towards luma, we desaturate towards the
per-channel tone mapped version. This essentially proves a smooth
roll-off towards the "hollywood"-style (non-chromatic) tone mapping
algorithm, which works better for bright content, while continuing to
use the "linear" style (chromatic) tone mapping algorithm for primarily
in-gamut content.
We also split up the desaturation algorithm into strength and exponent,
which allows users to use less aggressive desaturation settings without
affecting the overall curve.
Diffstat (limited to 'video/out/gpu/video_shaders.h')
-rw-r--r-- | video/out/gpu/video_shaders.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/video/out/gpu/video_shaders.h b/video/out/gpu/video_shaders.h index cd395d6377..f20d643e99 100644 --- a/video/out/gpu/video_shaders.h +++ b/video/out/gpu/video_shaders.h @@ -40,11 +40,9 @@ void pass_sample_oversample(struct gl_shader_cache *sc, struct scaler *scaler, void pass_linearize(struct gl_shader_cache *sc, enum mp_csp_trc trc); void pass_delinearize(struct gl_shader_cache *sc, enum mp_csp_trc trc); -void pass_color_map(struct gl_shader_cache *sc, +void pass_color_map(struct gl_shader_cache *sc, bool is_linear, struct mp_colorspace src, struct mp_colorspace dst, - enum tone_mapping algo, float tone_mapping_param, - float tone_mapping_desat, bool use_detected_peak, - bool gamut_warning, bool is_linear); + const struct gl_tone_map_opts *opts); void pass_sample_deband(struct gl_shader_cache *sc, struct deband_opts *opts, AVLFG *lfg, enum mp_csp_trc trc); |