[FFmpeg-cvslog] avfilter/vf_fftdnoiz: round toward nearest integer
Paul B Mahol
git at videolan.org
Sat Oct 19 20:09:33 EEST 2019
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Oct 19 19:07:28 2019 +0200| [26876fdb5e73d6d17fe5a2ae8a3a882978e4b600] | committer: Paul B Mahol
avfilter/vf_fftdnoiz: round toward nearest integer
Instead of rounding toward zero and thus producing
darker output.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26876fdb5e73d6d17fe5a2ae8a3a882978e4b600
---
libavfilter/vf_fftdnoiz.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_fftdnoiz.c b/libavfilter/vf_fftdnoiz.c
index 7ee7dbc19b..a8e0b897f2 100644
--- a/libavfilter/vf_fftdnoiz.c
+++ b/libavfilter/vf_fftdnoiz.c
@@ -156,7 +156,7 @@ static void export_row8(FFTComplex *src, uint8_t *dst, int rw, float scale, int
int j;
for (j = 0; j < rw; j++)
- dst[j] = av_clip_uint8(src[j].re * scale);
+ dst[j] = av_clip_uint8(src[j].re * scale + 0.5f);
}
static void import_row16(FFTComplex *dst, uint8_t *srcp, int rw)
@@ -176,7 +176,7 @@ static void export_row16(FFTComplex *src, uint8_t *dstp, int rw, float scale, in
int j;
for (j = 0; j < rw; j++)
- dst[j] = av_clip_uintp2_c(src[j].re * scale, depth);
+ dst[j] = av_clip_uintp2_c(src[j].re * scale + 0.5f, depth);
}
static int config_input(AVFilterLink *inlink)
More information about the ffmpeg-cvslog
mailing list