[FFmpeg-trac] #9068(documentation:new): Smartblur filter: inccorct naming variance vs. standard deviation
FFmpeg
trac at avcodec.org
Mon Jan 18 16:01:32 EET 2021
#9068: Smartblur filter: inccorct naming variance vs. standard deviation
-------------------------------------+-------------------------------------
Reporter: simgro | Type: defect
Status: new | Priority: normal
Component: | Version:
documentation | unspecified
Keywords: smartblur, | Blocked By:
gaussian, variance |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary:
The Documentation for smartblur filter states (https://ffmpeg.org/ffmpeg-
filters.html#smartblur-1):
luma_radius, lr: ... specifies the variance of the gaussian filter used to
blur the image.
This is not correct. From how the parameter is used, it is not the
variance but the standard deviation of the gaussian filter (variance=std-
deviation^2).
As far as i can see, the naming error is actually inside the used function
sws_getGaussianVec (https://svn.ffmpeg.org/doxygen/0.8
/libswscale_2utils_8c-source.html#l01272 ) which has an input called
'variance' which is used as if it was the 'standard deviation' in line
01284:
vec->coeff[i]= exp(-dist*dist/(2*variance*variance)) /
sqrt(2*variance*M_PI);
For reference, see e.g., https://en.wikipedia.org/wiki/Gaussian_function
Possible solution:
It might be best to change the documentation such that it correctly ready
'standard deviation'. To avoid confusion, also replace the name of the
variable in the sws_getGaussianVec function. The documentation potentially
has this error whenever the sws_getGaussianVec function is valled by some
filter.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9068>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list