From c3985c0ea88f30ac3e848a4296c7d2503dcdd5b3 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 16 Oct 2019 13:16:41 +0200 Subject: avfilter/vf_atadenoise: compensate for small overall brightness loss This is very hard to spot. --- libavfilter/vf_atadenoise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter/vf_atadenoise.c') diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c index be7c4e2a34..21c9bb3bac 100644 --- a/libavfilter/vf_atadenoise.c +++ b/libavfilter/vf_atadenoise.c @@ -169,7 +169,7 @@ static void filter_row##name(const uint8_t *ssrc, uint8_t *ddst, \ sum += srcix; \ } \ \ - dst[x] = sum / (r + l + 1); \ + dst[x] = (sum + ((r + l + 1) >> 1)) / (r + l + 1); \ } \ } -- cgit v1.2.3