[FFmpeg-cvslog] avfilter/vsrc_mptestsrc: use lrint instead of floor hack

Ganesh Ajjanagadde git at videolan.org
Thu Dec 3 00:32:27 CET 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Wed Nov 25 17:27:27 2015 -0500| [fa5d299496c15e992240914ae05b92d9b74eb3c4] | committer: Ganesh Ajjanagadde

avfilter/vsrc_mptestsrc: use lrint instead of floor hack

lrint is faster, and is more consistent across the codebase.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>

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

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

diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
index 668a001..1cdd3a4 100644
--- a/libavfilter/vsrc_mptestsrc.c
+++ b/libavfilter/vsrc_mptestsrc.c
@@ -121,7 +121,7 @@ static void idct(uint8_t *dst, int dst_linesize, int src[64])
             for (k = 0; k < 8; k++)
                 sum += c[k*8+i]*tmp[8*k+j];
 
-            dst[dst_linesize*i + j] = av_clip_uint8((int)floor(sum+0.5));
+            dst[dst_linesize*i + j] = av_clip_uint8(lrint(sum));
         }
     }
 }



More information about the ffmpeg-cvslog mailing list