Re: [FFmpeg-devel] [PATCHv2] avfilter/vsrc_mandelbrot: avoid sqrt for epsilon calculation

2015-11-24 Thread Ganesh Ajjanagadde
On Tue, Nov 24, 2015 at 2:28 PM, Michael Niedermayer wrote: > On Tue, Nov 24, 2015 at 12:02:24PM -0500, Ganesh Ajjanagadde wrote: >> This rewrites into a similar expression avoiding sqrt. Similarity is >> assured since sqrt(x^2 + y^2)/(x+y) lies in [1/sqrt(2), 1] for x, y > 0. >> >> Tested on x86-

Re: [FFmpeg-devel] [PATCHv2] avfilter/vsrc_mandelbrot: avoid sqrt for epsilon calculation

2015-11-24 Thread Michael Niedermayer
On Tue, Nov 24, 2015 at 12:02:24PM -0500, Ganesh Ajjanagadde wrote: > This rewrites into a similar expression avoiding sqrt. Similarity is > assured since sqrt(x^2 + y^2)/(x+y) lies in [1/sqrt(2), 1] for x, y > 0. > > Tested on x86-64, Haswell, GNU/Linux. > Command: > ffmpeg -f lavfi -i mandelbrot

[FFmpeg-devel] [PATCHv2] avfilter/vsrc_mandelbrot: avoid sqrt for epsilon calculation

2015-11-24 Thread Ganesh Ajjanagadde
This rewrites into a similar expression avoiding sqrt. Similarity is assured since sqrt(x^2 + y^2)/(x+y) lies in [1/sqrt(2), 1] for x, y > 0. Tested on x86-64, Haswell, GNU/Linux. Command: ffmpeg -f lavfi -i mandelbrot -f null - old (draw_mandelbrot): 277625266 decicycles in draw_mandelbrot,