From 2fd5b9b4dda14c858f24548801da587dea747cac Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 20 Sep 2023 18:30:23 +0200 Subject: [PATCH] vo_gpu: match libplacebo debanding defaults The defaults were awful and horribly regressed many files while also not fixing banding on files that actually needed it, sometimes even *increasing* banding due to the low threshold. Fixes: 12ffce0f224056f91a20c9f0b197f4973931efbe See-Also: haasn/libplacebo@e1e43376d16d5112ee1254534664b0b85110139b --- DOCS/interface-changes.rst | 1 + DOCS/man/options.rst | 4 ++-- video/out/gpu/video_shaders.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 36d19b1407..4de2f77328 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -71,6 +71,7 @@ Interface changes - change `--dscale` default to `hermite` - update defaults to `--hdr-peak-decay-rate=20`, `--hdr-scene-threshold-low=1.0`, `--hdr-scene-threshold-high=3.0` + - update defaults to `--deband-threshold=48`, `--deband-grain=32` --- mpv 0.36.0 --- - add `--target-contrast` - Target luminance value is now also applied when ICC profile is used. diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index a78a594faa..baad2f6e1f 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -6070,7 +6070,7 @@ them. ``--deband-threshold=<0..4096>`` The debanding filter's cut-off threshold. Higher numbers increase the debanding strength dramatically but progressively diminish image details. - (Default 32) + (Default 48) ``--deband-range=<1..64>`` The debanding filter's initial radius. The radius increases linearly for @@ -6083,7 +6083,7 @@ them. ``--deband-grain=<0..4096>`` Add some extra noise to the image. This significantly helps cover up remaining quantization artifacts. Higher numbers add more noise. (Default - 48) + 32) ``--corner-rounding=<0..1>`` If set to a value above 0.0, the output will be rendered with rounded diff --git a/video/out/gpu/video_shaders.c b/video/out/gpu/video_shaders.c index 1957797692..1a6aa28f3e 100644 --- a/video/out/gpu/video_shaders.c +++ b/video/out/gpu/video_shaders.c @@ -942,9 +942,9 @@ static void prng_init(struct gl_shader_cache *sc, AVLFG *lfg) const struct deband_opts deband_opts_def = { .iterations = 1, - .threshold = 32.0, + .threshold = 48.0, .range = 16.0, - .grain = 48.0, + .grain = 32.0, }; #define OPT_BASE_STRUCT struct deband_opts