[FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

Paul B Mahol onemda at gmail.com
Sun Jul 19 22:50:05 EEST 2020


On 7/19/20, Paul B Mahol <onemda at gmail.com> wrote:
> On 7/19/20, Steinar H. Gunderson <steinar+ffmpeg at gunderson.no> wrote:
>> On Sun, Jul 19, 2020 at 09:02:30PM +0200, Paul B Mahol wrote:
>>>> Yes, this is the non-recursive version, which is O(n) in the number of
>>>> samples. This is why I recommended the recursive version, which is
>>>> O(log
>>>> n)
>>>> in the number of samples and thus avoids the problem with big lengths.
>>>> It is fairly straightforward to convert one to the other.
>>> Really? How so?
>>
>> As previously mentioned, you do two samples, then save to a temporary
>> buffer,
>> two samples from that buffer with half the distance and so on until your
>> samples are only one pixel apart.
>>
>> You can also try doing three or four samples at a time instead of two;
>> experiment a bit and see what gives the best performance.
>
> This is very slow.
>

Also I fixed silly center artifacts in rblur implementation.

Speed here on historic CPU for hd720 is 12-13 frames per second for 23
fps video with slice threading enabled on 4 core CPU.

This could be made even faster at expense of more memory usage.
I really doubt there is faster algorithm that needs less memory but
with no quality drop.


More information about the ffmpeg-devel mailing list