From f589a3bd78efbc16e8025bff0809ac3c16b8ea2b Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sun, 3 Sep 2017 21:51:48 +0200 Subject: 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. --- video/out/opengl/video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out/opengl/video.c') 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, -- cgit v1.2.3