Re: [FFmpeg-devel] [PATCH 1/9] avfilter/vsrc_mptestsrc: use lrint instead of floor hack
On Tue, Dec 1, 2015 at 9:11 PM, Michael Niedermayerwrote: > On Tue, Dec 01, 2015 at 07:27:50PM -0500, Ganesh Ajjanagadde wrote: >> lrint is faster, and is more consistent across the codebase. >> >> Signed-off-by: Ganesh Ajjanagadde >> --- >> libavfilter/vsrc_mptestsrc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > should be ok pushed, thanks > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > While the State exists there can be no freedom; when there is freedom there > will be no State. -- Vladimir Lenin > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/9] avfilter/vsrc_mptestsrc: use lrint instead of floor hack
lrint is faster, and is more consistent across the codebase. Signed-off-by: Ganesh Ajjanagadde--- 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)); } } } -- 2.6.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel