[FFmpeg-devel] [PATCH] avfilter: Added siti filter

Lynne dev at lynne.ee
Tue Jan 19 06:49:29 EET 2021


Jan 19, 2021, 01:07 by borbarak at fb.com:

> Calculate Spatial Info (SI) and Temporal Info (TI) scores for a video, as defined
> in ITU-T P.910: Subjective video quality assessment methods for multimedia
> applications.
>
> Update: Fixed bracket style.
>

Thanks, looks much neater now.



> I'm already adding the data to the frame's metadata, is the suggestion to remove the file option altogether?
>

Yes. We want to avoid filters having their own file in/out options rather
than using generic ones.

 

> +
> +#include "libavutil/imgutils.h"
> +#include "libavutil/internal.h"
> +#include "libavutil/opt.h"
> +
> +#include "avfilter.h"
> +#include "formats.h"
> +#include "internal.h"
> +#include "video.h"
> +
> +static const int X_FILTER[9] = {
> +    1, 0, -1,
> +    2, 0, -2,
> +    1, 0, -1
> +};
> +
> +static const int Y_FILTER[9] = {
> +    1, 2, 1,
> +    0, 0, 0,
> +    -1, -2, -1
> +};
>

We have optimized assembly to apply 3x3 matrices. Check out
libavfilter/x86/vf_convolution.asm:ff_filter_3x3_sse4
 vf_convolution already applies a sobel filter that way. Maybe
look into sharing some DSP code with it?



More information about the ffmpeg-devel mailing list