mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-01-31 00:52:53 +00:00
avfilter/vsrc_mptestsrc: use hypot()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
parent
352bd18dff
commit
74b79dcf51
@ -240,7 +240,7 @@ static void ring2_test(uint8_t *dst, int dst_linesize, int off)
|
|||||||
|
|
||||||
for (y = 0; y < 16*16; y++) {
|
for (y = 0; y < 16*16; y++) {
|
||||||
for (x = 0; x < 16*16; x++) {
|
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);
|
double r = d/20 - (int)(d/20);
|
||||||
if (r < off/30.0) {
|
if (r < off/30.0) {
|
||||||
dst[x + y*dst_linesize] = 255;
|
dst[x + y*dst_linesize] = 255;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user