[FFmpeg-devel] [PATCH 09/10] avfilter/vsrc_mandelbrot: use hypot()

Ganesh Ajjanagadde gajjanag at mit.edu
Mon Nov 23 19:12:42 CET 2015


On Mon, Nov 23, 2015 at 12:54 PM, Nicolas George <george at nsup.org> wrote:
> Le tridi 3 frimaire, an CCXXIV, Ganesh Ajjanagadde a écrit :
>> It seems like getting rid of the sqrt altogether has a very slight
>> positive impact (if any at all). I can post the patch, but would like
>> to know what to benchmark. There are numerous choices, e.g
>> draw_mandelbrot as a whole, the outer loop, or the inner loop.
>> I personally think the inner x loop (lines 268-388) is a good place to
>> look at, since the difference is very small anyway, and further
>> localization is impossible.
>
> The smallest unit that is usually (or always) called as a whole. Otherwise,
> you may find you did shave 10 cycles on a 30 cycles task that is always
> called after a 100M cycles task, and find speed ×1.5 instead of negligible.
>
> In this case, that would be draw_mandelbrot(), and you can do the benchmark
> using just ffmpeg.c and the shell's timing utilities.
>
> (You made the same mistake for deshake.)

I do recall that, but mandelbrot has issues with such benchmarks due
to variable number of iterations as I observed while playing with it
and as pointed out by Michael. It was hence that I proposed the inner
loop benchmark which although it does not get rid of this issue,
should reduce the scope of such things.

Anyway, I will try my best possibly incorporating the disabling of the
skip stuff as suggested by Michael and post.

>
> Regards,
>
> --
>   Nicolas George


More information about the ffmpeg-devel mailing list