git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
352bd18
)
avfilter/vsrc_mptestsrc: use hypot()
author
Ganesh Ajjanagadde
<gajjanagadde@gmail.com>
Sun, 22 Nov 2015 16:50:22 +0000
(11:50 -0500)
committer
Ganesh Ajjanagadde
<gajjanagadde@gmail.com>
Thu, 26 Nov 2015 14:20:46 +0000
(09:20 -0500)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavfilter/vsrc_mptestsrc.c
patch
|
blob
|
history
diff --git
a/libavfilter/vsrc_mptestsrc.c
b/libavfilter/vsrc_mptestsrc.c
index
bc5b2cd
..
668a001
100644
(file)
--- 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;