aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/gamma.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-22 11:49:15 -0500
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-24 20:36:40 -0500
commite9c7493f19a610f44690ef2f2f3737a3c6236fdf (patch)
tree64790256125382c669950ffa20650bb905f70fcd /libswscale/gamma.c
parent81a0aec29e7aa325b46b1942fe477b83fb54eb3a (diff)
downloadffmpeg-e9c7493f19a610f44690ef2f2f3737a3c6236fdf.tar.gz
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>
Diffstat (limited to 'libswscale/gamma.c')
0 files changed, 0 insertions, 0 deletions