[FFmpeg-cvslog] avfilter/vf_atadenoise: compensate for small overall brightness loss

Paul B Mahol git at videolan.org
Wed Oct 16 14:20:01 EEST 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Oct 16 13:16:41 2019 +0200| [c3985c0ea88f30ac3e848a4296c7d2503dcdd5b3] | committer: Paul B Mahol

avfilter/vf_atadenoise: compensate for small overall brightness loss

This is very hard to spot.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3985c0ea88f30ac3e848a4296c7d2503dcdd5b3
---

 libavfilter/vf_atadenoise.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);                   \
    }                                                                        \
 }
 



More information about the ffmpeg-cvslog mailing list