[FFmpeg-cvslog] avfilter/vsrc_mptestsrc: use hypot()

Ganesh Ajjanagadde git at videolan.org
Thu Nov 26 15:21:19 CET 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Sun Nov 22 11:50:22 2015 -0500| [74b79dcf510b1897ba0d87415e4bac33ca11c024] | committer: Ganesh Ajjanagadde

avfilter/vsrc_mptestsrc: use hypot()

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=74b79dcf510b1897ba0d87415e4bac33ca11c024
---

 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 bc5b2cd..668a001 100644
--- a/libavfilter/vsrc_mptestsrc.c
+++ b/libavfilter/vsrc_mptestsrc.c
@@ -240,7 +240,7 @@ static void ring2_test(uint8_t *dst, int dst_linesize, int off)
 
     for (y = 0; y < 16*16; y++) {
         for (x = 0; x < 16*16; x++) {
-            double d = sqrt((x-8*16)*(x-8*16) + (y-8*16)*(y-8*16));
+            double d = hypot(x-8*16, y-8*16);
             double r = d/20 - (int)(d/20);
             if (r < off/30.0) {
                 dst[x + y*dst_linesize]     = 255;



More information about the ffmpeg-cvslog mailing list