[FFmpeg-devel] [PATCH 1/2] lsws, lavfi: use sws_get_gaussian_vec
Stefano Sabatini
stefasab at gmail.com
Thu Aug 31 18:34:42 EEST 2023
On date Saturday 2023-08-26 17:13:19 +0200, Andreas Rheinhardt wrote:
> Stefano Sabatini:
> > Use in place of deprecated sws_getGaussianVec.
>
> This patchset should have been sent as a reply to the patch actually
> adding sws_get_gaussian_vec.
Noted.
> > ---
> > libavfilter/vf_sab.c | 17 +++++++++++++----
> > libavfilter/vf_smartblur.c | 8 ++++----
> > libswscale/utils.c | 32 ++++++++++++++------------------
> > 3 files changed, 31 insertions(+), 26 deletions(-)
> >
[...]
> > - if (!filter->lumH || !filter->lumV || !filter->chrH || !filter->chrV)
> > - goto fail;
> > +#define SET_FILTER_VECTOR(name_, standard_deviation_, quality_) \
> > + if (standard_deviation_ != 0.0) { \
> > + sws_get_gaussian_vec(&filter->name_, \
> > + standard_deviation_, quality_); \
> > + } else { \
> > + filter->name_ = sws_getIdentityVec(); \
> > + } \
> > + if (!filter->name_) \
> > + goto fail; \
> > +
> > + SET_FILTER_VECTOR(lumH, lumaGBlur, 3.0);
> > + SET_FILTER_VECTOR(lumV, lumaGBlur, 3.0);
> > + SET_FILTER_VECTOR(chrH, chromaGBlur, 3.0);
> > + SET_FILTER_VECTOR(chrV, chromaGBlur, 3.0);
>
> This will check lumaGBlur/chromaGBlur twice.
Dropped the macro and updated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lsws-lavfi-use-sws_get_gaussian_vec.patch
Type: text/x-diff
Size: 4081 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230831/fb8718cc/attachment.patch>
More information about the ffmpeg-devel
mailing list