ffmpeg/libavfilter
Ganesh Ajjanagadde e9c7493f19 avfilter/vsrc_mandelbrot: avoid sqrt for epsilon calculation
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,     256 runs,      0 skips
304527322 decicycles in draw_mandelbrot,     512 runs,      0 skips
377593582 decicycles in draw_mandelbrot,    1024 runs,      0 skips
338539499 decicycles in draw_mandelbrot,    2048 runs,      0 skips
583630357 decicycles in draw_mandelbrot,    4096 runs,      0 skips

new (draw_mandelbrot):
274635709 decicycles in draw_mandelbrot,     256 runs,      0 skips
300287046 decicycles in draw_mandelbrot,     512 runs,      0 skips
371819935 decicycles in draw_mandelbrot,    1024 runs,      0 skips
336663765 decicycles in draw_mandelbrot,    2048 runs,      0 skips
581851016 decicycles in draw_mandelbrot,    4096 runs,      0 skips

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-24 20:36:40 -05:00
..
2015-10-26 20:56:17 +01:00
2015-11-08 18:50:26 +01:00
2015-11-08 18:50:26 +01:00
2015-10-28 03:26:08 +01:00
2015-10-26 23:24:30 -07:00
2015-11-07 16:04:07 +01:00
2014-08-13 01:00:38 +02:00
2015-11-08 18:50:26 +01:00
2015-01-06 10:02:11 +00:00
2015-01-05 01:45:49 +01:00
2015-11-01 18:52:50 -08:00
2015-03-20 09:41:32 +01:00
2015-11-09 08:09:41 +01:00
2015-08-18 10:24:01 -04:00
2015-09-12 02:14:44 +00:00
2015-01-09 17:26:31 +01:00
2015-10-10 17:33:43 +02:00
2015-10-22 10:44:30 -08:00
2015-11-09 08:09:41 +01:00
2015-10-10 17:33:43 +02:00