diff options
author | Niklas Haas <git@haasn.xyz> | 2017-07-17 21:39:06 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-07-24 17:19:31 +0200 |
commit | b196cadf9f9f6ea210db9236c2b26523a9a2719f (patch) | |
tree | 7faa5a77c65d84e45c074eb248fe0b54a62288ad /video/out/opengl/video_shaders.h | |
parent | aad6ba018a17eded2b3f4af2212e0123cfb29b79 (diff) | |
download | mpv-b196cadf9f9f6ea210db9236c2b26523a9a2719f.tar.bz2 mpv-b196cadf9f9f6ea210db9236c2b26523a9a2719f.tar.xz |
vo_opengl: support HDR peak detection
This is done via compute shaders. As a consequence, the tone mapping
algorithms had to be rewritten to compute their known constants in GLSL
(ahead of time), instead of doing it once. Didn't affect performance.
Using shmem/SSBO atomics in this way is extremely fast on nvidia, but it
might be slow on other platforms. Needs testing.
Unfortunately, setting up the SSBO still requires OpenGL calls, which
means I can't have it in video_shaders.c, where it belongs. But I'll
defer worrying about that until the backend refactor, since then I'll be
breaking up the video/video_shaders structure anyway.
Diffstat (limited to 'video/out/opengl/video_shaders.h')
-rw-r--r-- | video/out/opengl/video_shaders.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/video_shaders.h b/video/out/opengl/video_shaders.h index b0b8b4214e..e0594f28f3 100644 --- a/video/out/opengl/video_shaders.h +++ b/video/out/opengl/video_shaders.h @@ -44,7 +44,8 @@ void pass_inverse_ootf(struct gl_shader_cache *sc, enum mp_csp_light light, floa 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, - float tone_mapping_desat, bool is_linear); + float tone_mapping_desat, bool use_detected_peak, + bool is_linear); void pass_sample_deband(struct gl_shader_cache *sc, struct deband_opts *opts, AVLFG *lfg); |