[FFmpeg-cvslog] lavfi/avf_showspectrum: replace rint by lrint

Ganesh Ajjanagadde git at videolan.org
Sun Dec 27 05:31:12 CET 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Fri Dec 25 13:19:12 2015 -0800| [3e2e303e4b0f56e8be8bebcd2db71c69ea128e47] | committer: Ganesh Ajjanagadde

lavfi/avf_showspectrum: replace rint by lrint

avoids float to int cast.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>

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

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

diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 7d5c438..f6f16fc 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -448,7 +448,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
                      (outlink->h - 1) * outpicref->linesize[plane] +
                      s->xpos;
         for (y = 0; y < outlink->h; y++) {
-            *p = rint(FFMAX(0, FFMIN(s->combine_buffer[3 * y + plane], 255)));
+            *p = lrint(FFMAX(0, FFMIN(s->combine_buffer[3 * y + plane], 255)));
             p -= outpicref->linesize[plane];
         }
     }



More information about the ffmpeg-cvslog mailing list