diff options
author | Niklas Haas <git@nand.wakku.to> | 2016-06-29 09:28:17 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-03 19:42:52 +0200 |
commit | 923e3c7b20f0a238062b0ac538a751c6c363a8cb (patch) | |
tree | d86988c4fe3a603df877e7cf91216ccc20b09a27 /video/out/opengl/video_shaders.h | |
parent | d81fb97f4587f73f62a760b99f686139f9b8d966 (diff) | |
download | mpv-923e3c7b20f0a238062b0ac538a751c6c363a8cb.tar.bz2 mpv-923e3c7b20f0a238062b0ac538a751c6c363a8cb.tar.xz |
vo_opengl: generalize HDR tone mapping mechanism
This involves multiple changes:
1. Brightness metadata is split into nominal peak and signal peak.
For a quick and dirty explanation: nominal peak is the brightest value
that your color space can represent (i.e. the brightness of an encoded
1.0), and signal peak is the brightest value that actually occurs in
the video (i.e. the brightest thing that's displayed).
2. vo_opengl uses a new decision logic to figure out the right nom_peak
and sig_peak for all situations. It also does a better job of picking
the right target gamut/colorspace to use for the OSD. (Which still is
and still should be treated as sRGB). This change in logic also
fixes #3293 en passant.
3. Since it was growing rapidly, the logic for auto-guessing / inferring
the right colorimetry configuration (in pass_colormanage) was split from
the logic for actually performing the adaptation (now pass_color_map).
Right now, the new logic doesn't do a whole lot since HDR metadata is
still ignored (but not for long).
Diffstat (limited to 'video/out/opengl/video_shaders.h')
-rw-r--r-- | video/out/opengl/video_shaders.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/opengl/video_shaders.h b/video/out/opengl/video_shaders.h index 0ee3d81fb5..3bc2f210b8 100644 --- a/video/out/opengl/video_shaders.h +++ b/video/out/opengl/video_shaders.h @@ -38,8 +38,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_tone_map(struct gl_shader_cache *sc, float peak, - enum tone_mapping algo, float param); +void pass_color_map(struct gl_shader_cache *sc, + struct mp_colorspace src, struct mp_colorspace dst, + enum tone_mapping algo, float tone_mapping_param); void pass_sample_deband(struct gl_shader_cache *sc, struct deband_opts *opts, AVLFG *lfg); |