[FFmpeg-devel] [PATCH] avfilter/vf_freezedetect: add filter to detect frozen input

Marton Balint cus at passwd.hu
Tue Nov 20 00:23:06 EET 2018



On Sun, 18 Nov 2018, Marton Balint wrote:

>
>
> On Sat, 17 Nov 2018, Paul B Mahol wrote:
>
>> On 11/17/18, Marton Balint <cus at passwd.hu> wrote:
>>>
>>> On Sun, 11 Nov 2018, Paul B Mahol wrote:
>>>
>>>> On 11/11/18, Marton Balint <cus at passwd.hu> wrote:
>>>>> Signed-off-by: Marton Balint <cus at passwd.hu>
>>>>> ---
>>>>>  Changelog                     |   1 +
>>>>>  configure                     |   1 +
>>>>>  doc/filters.texi              |  29 +++++
>>>>>  libavfilter/Makefile          |   1 +
>>>>>  libavfilter/allfilters.c      |   1 +
>>>>>  libavfilter/version.h         |   2 +-
>>>>>  libavfilter/vf_freezedetect.c | 282
>>>>> ++++++++++++++++++++++++++++++++++++++++++
>>>>>  7 files changed, 316 insertions(+), 1 deletion(-)
>>>>>  create mode 100644 libavfilter/vf_freezedetect.c
>>>>>
>>>>> diff --git a/Changelog b/Changelog
>>>>> index e38a607025..0eba82b477 100644
>>>>> --- a/Changelog
>>>>> +++ b/Changelog
>>>>> @@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
>>>>>  version <next>:
>>>>>  - tpad filter
>>>>>  - AV1 decoding support through libdav1d
>>>>> +- freezedetect filter
>>>>>
>>>
>>> [...]
>>>
>>>>> +AVFILTER_DEFINE_CLASS(freezedetect);
>>>>> +
>>>>> +static int query_formats(AVFilterContext *ctx)
>>>>> +{
>>>>> +    static const enum AVPixelFormat pix_fmts[] = {
>>>>> +        AV_PIX_FMT_YUV420P,
>>>>> +        AV_PIX_FMT_YUYV422,
>>>>> +        AV_PIX_FMT_RGB24,
>>>>> +        AV_PIX_FMT_BGR24,
>>>>> +        AV_PIX_FMT_YUV422P,
>>>>> +        AV_PIX_FMT_YUV444P,
>>>>> +        AV_PIX_FMT_YUV410P,
>>>>> +        AV_PIX_FMT_YUV411P,
>>>>> +        AV_PIX_FMT_GRAY8,
>>>>> +        AV_PIX_FMT_YUVJ420P,
>>>>> +        AV_PIX_FMT_YUVJ422P,
>>>>> +        AV_PIX_FMT_YUVJ444P,
>>>>> +        AV_PIX_FMT_UYVY422,
>>>>> +        AV_PIX_FMT_NV12,
>>>>> +        AV_PIX_FMT_NV21,
>>>>> +        AV_PIX_FMT_ARGB,
>>>>> +        AV_PIX_FMT_RGBA,
>>>>> +        AV_PIX_FMT_ABGR,
>>>>> +        AV_PIX_FMT_BGRA,
>>>>> +        AV_PIX_FMT_GRAY16,
>>>>> +        AV_PIX_FMT_YUV440P,
>>>>> +        AV_PIX_FMT_YUVJ440P,
>>>>> +        AV_PIX_FMT_YUVA420P,
>>>>> +        AV_PIX_FMT_YUV420P16,
>>>>> +        AV_PIX_FMT_YUV422P16,
>>>>> +        AV_PIX_FMT_YUV444P16,
>>>>> +        AV_PIX_FMT_YA8,
>>>>> +        AV_PIX_FMT_YUV420P9,
>>>>> +        AV_PIX_FMT_YUV420P10,
>>>>> +        AV_PIX_FMT_YUV422P10,
>>>>> +        AV_PIX_FMT_YUV444P9,
>>>>> +        AV_PIX_FMT_YUV444P10,
>>>>> +        AV_PIX_FMT_YUV422P9,
>>>>> +        AV_PIX_FMT_GBRP,
>>>>> +        AV_PIX_FMT_GBRP9,
>>>>> +        AV_PIX_FMT_GBRP10,
>>>>> +        AV_PIX_FMT_GBRP16,
>>>>> +        AV_PIX_FMT_YUVA422P,
>>>>> +        AV_PIX_FMT_YUVA444P,
>>>>> +        AV_PIX_FMT_YUVA420P9,
>>>>> +        AV_PIX_FMT_YUVA422P9,
>>>>> +        AV_PIX_FMT_YUVA444P9,
>>>>> +        AV_PIX_FMT_YUVA420P10,
>>>>> +        AV_PIX_FMT_YUVA422P10,
>>>>> +        AV_PIX_FMT_YUVA444P10,
>>>>> +        AV_PIX_FMT_YUVA420P16,
>>>>> +        AV_PIX_FMT_YUVA422P16,
>>>>> +        AV_PIX_FMT_YUVA444P16,
>>>>> +        AV_PIX_FMT_NV16,
>>>>> +        AV_PIX_FMT_YVYU422,
>>>>> +        AV_PIX_FMT_GBRAP,
>>>>> +        AV_PIX_FMT_GBRAP16,
>>>>> +        AV_PIX_FMT_YUV420P12,
>>>>> +        AV_PIX_FMT_YUV420P14,
>>>>> +        AV_PIX_FMT_YUV422P12,
>>>>> +        AV_PIX_FMT_YUV422P14,
>>>>> +        AV_PIX_FMT_YUV444P12,
>>>>> +        AV_PIX_FMT_YUV444P14,
>>>>> +        AV_PIX_FMT_GBRP12,
>>>>> +        AV_PIX_FMT_GBRP14,
>>>>> +        AV_PIX_FMT_YUVJ411P,
>>>>> +        AV_PIX_FMT_YUV440P10,
>>>>> +        AV_PIX_FMT_YUV440P12,
>>>>> +        AV_PIX_FMT_GBRAP12,
>>>>> +        AV_PIX_FMT_GBRAP10,
>>>>> +        AV_PIX_FMT_GRAY12,
>>>>> +        AV_PIX_FMT_GRAY10,
>>>>> +        AV_PIX_FMT_GRAY9,
>>>>> +        AV_PIX_FMT_GRAY14,
>>>>> +        AV_PIX_FMT_NONE
>>>>
>>>> Please make this list more compact, make use of several items per line.
>>>
>>> Ok. I will apply the patch soon.
>>
>> You sure that packed and semi-planar formats like nv21 work with filter?
>
> Yes, because every plane they use have continous data and every component 
> is calculated equally into the sum of absolute differences.

Applied.

Regards,
Marton


More information about the ffmpeg-devel mailing list