[FFmpeg-devel] [PATCH] avfilter: add convolution filter

Michael Niedermayer michael at niedermayer.cc
Sun Aug 2 23:42:00 CEST 2015


On Sun, Aug 02, 2015 at 05:35:59PM +0200, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  doc/filters.texi             |  61 ++++++++
>  libavfilter/Makefile         |   1 +
>  libavfilter/allfilters.c     |   1 +
>  libavfilter/vf_convolution.c | 337 +++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 400 insertions(+)
>  create mode 100644 libavfilter/vf_convolution.c
[...]
> +            dst[x] = av_clip(sum, 0, 255);
[...]
> +        for (x = 0; x < width; x++) {
> +            int sum = 0;
> +
> +            for (i = 0; i < 25; i++) {
> +                sum += *(array[i] + x) * matrix[i];
> +            }
> +            sum = (int)(sum * rdiv + bias + 0.5f);

> +            dst[x] = av_clip(sum, 0, 255);

av_clip_uint8()



[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150802/51ef65a5/attachment.sig>


More information about the ffmpeg-devel mailing list