[FFmpeg-cvslog] avfilter/vf_fftdnoiz: Use lrintf() in export_row8()

Michael Niedermayer git at videolan.org
Wed Sep 8 22:43:19 EEST 2021


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Sat Jun  5 20:12:08 2021 +0200| [c7ac5802881382222d274a2418789fef78f0298f] | committer: Michael Niedermayer

avfilter/vf_fftdnoiz: Use lrintf() in export_row8()

Fixes: 1.04064e+10 is outside the range of representable values of type 'int'
Fixes: Ticket 8279

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 1f21349d20d9bda8eeeddb23263892be0cea12e3)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavfilter/vf_fftdnoiz.c b/libavfilter/vf_fftdnoiz.c
index 856d716be5..eea1887e40 100644
--- a/libavfilter/vf_fftdnoiz.c
+++ b/libavfilter/vf_fftdnoiz.c
@@ -161,7 +161,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 + 0.5f);
+        dst[j] = av_clip_uint8(lrintf(src[j].re * scale));
 }
 
 static void import_row16(FFTComplex *dst, uint8_t *srcp, int rw)



More information about the ffmpeg-cvslog mailing list