summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-09-03 21:51:48 +0200
committerNiklas Haas <git@haasn.xyz>2017-09-03 21:51:48 +0200
commitf589a3bd78efbc16e8025bff0809ac3c16b8ea2b (patch)
tree90d027ff59b7e9026591594ccd79726743fae732 /video/out/opengl/video.c
parent9a28088e7457a41c61be7f534618c69b4307d693 (diff)
downloadmpv-f589a3bd78efbc16e8025bff0809ac3c16b8ea2b.tar.bz2
mpv-f589a3bd78efbc16e8025bff0809ac3c16b8ea2b.tar.xz
vo_opengl: scale deband-grain to the signal range
This prevents blowing up for high dynamic range sources, where a noise level of 48 can suddenly mean 4800.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r--video/out/opengl/video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 48477fe18d..f0a8635c56 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -1792,7 +1792,8 @@ static void deband_hook(struct gl_video *p, struct img_tex tex,
struct gl_transform *trans, void *priv)
{
pass_describe(p, "debanding (%s)", plane_names[tex.type]);
- pass_sample_deband(p->sc, p->opts.deband_opts, &p->lfg);
+ pass_sample_deband(p->sc, p->opts.deband_opts, &p->lfg,
+ p->image_params.color.gamma);
}
static void unsharp_hook(struct gl_video *p, struct img_tex tex,