[FFmpeg-devel] [PATCH] avfilter/vsrc_mandelbrot: change sin to sinf for color computation

Michael Niedermayer michaelni at gmx.at
Tue Nov 24 20:28:58 CET 2015


On Tue, Nov 24, 2015 at 01:05:20PM -0500, Ganesh Ajjanagadde wrote:
> lrintf is anyway used, suggesting we only care up to floating precision.
> Rurthermore, there is a compat hack in avutil/libm for this function,
> and it is used in avcodec/aacps_tablegen.h.
> 
> This yields a non-negligible speedup. Sample benchmark:
> x86-64, Haswell, GNU/Linux:
> 
> old (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
> 
> new (draw_mandelbrot):
> 269882717 decicycles in draw_mandelbrot,     256 runs,      0 skips
> 296359285 decicycles in draw_mandelbrot,     512 runs,      0 skips
> 370076599 decicycles in draw_mandelbrot,    1024 runs,      0 skips
> 331478354 decicycles in draw_mandelbrot,    2048 runs,      0 skips
> 571904318 decicycles in draw_mandelbrot,    4096 runs,      0 skips
> 
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  libavfilter/vsrc_mandelbrot.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151124/fdf4433c/attachment.sig>


More information about the ffmpeg-devel mailing list