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

Steinar H. Gunderson steinar+ffmpeg at gunderson.no
Fri Jul 17 21:13:37 EEST 2020


On Fri, Jul 17, 2020 at 08:00:31PM +0200, Paul B Mahol wrote:
>>> But crucial info is missing. How one build vectors?
>> (point - center) * scale_factor + center
> And how to pick scale_factor,

It's a user parameter. scale_factor signifies how long the blur is.
1.0 is no blur, 2.0 means every point gets blurred out to twice the distance
from the center.

> more over how to make this recursive at all?

It's only recursive in the formulation; the actual computation is iterative.

  tmp_pic1 = blur_pass(orig_pic, scale_factor);
  tmp_pic2 = blur_pass(tmp_pic1, (scale_factor - 1.0) / 2.0 + 1.0);
  tmp_pic3 = blur_pass(tmp_pic2, (scale_factor - 1.0) / 4.0 + 1.0);
  output_pic = blur_pass(tmp_pic3, (scale_factor - 1.0) / 8.0 + 1.0);

Repeat as many times as desired until you get the quality you want.

You can also be creative with the blend strength if you want a blur that's
not a box blur.

/* Steinar */
-- 
Homepage: https://www.sesse.net/


More information about the ffmpeg-devel mailing list