From patchwork Tue Dec 6 21:29:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul B Mahol X-Patchwork-Id: 39632 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp4525958pzb; Tue, 6 Dec 2022 13:29:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf6jlqkIgewvMzU2vawUBVh8Dw9ngJTkXr2uWSCCj/72Hccx0cqp2lFG8o9TQiVZoIRo9wvC X-Received: by 2002:a17:906:a11a:b0:7c0:9cb9:bac8 with SMTP id t26-20020a170906a11a00b007c09cb9bac8mr27361148ejy.25.1670362177875; Tue, 06 Dec 2022 13:29:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670362177; cv=none; d=google.com; s=arc-20160816; b=ylyBuVD2l9wc2wU88x17AtjfCx/J59P9UjxD1eSQLarSKNAJWTMICWyvY8iIEKCI0a tMLlf7MEW6fVEUD19VOHgYMLAyy32VIoNTHA3n6dHMbtF+btUkAEtXyRN8mDdbc+dOCP 8RJAyRBZAEsO4o+1heav75PrXS4Z5fCEe3LCrqsXFhoaCzI9UNgNaJ5x3spJMD7lx3p4 jEL4Xu/XJIj23YPpgMXle6249W7cd4GYgU7qB6w0DOpIfiVwxY/MXDWzy9uIyzEbmD1c hsn555y+I9JuBtn50B1759n6fgn2wMyQU3YUB1ByCoIcPJ//FutSlGke2r1BMYx7Q9rR 2AGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to; bh=0vveRAw/D1JplYiTsolEKVLVdjJ5RdPFYT+GmjZgpTs=; b=xST/bjuPb/+1hUM5RgAgMgzyYWH4/Gv153FimYq6skTXToI8JL4Pu/cOrCXLIaf+ad /06AFODi1wZP8n4yQeTjpYY8oJaFlbBRhaFx32ZqBvUbdOiWcjwzrNnrYiost/4JY5MV +QCTI2Qjxp0FwU3V34vcFvwfI8xNsnIQFuo4FzQfHBhkQL7/57Hg8OCTHYQsnl4Qikv7 zTPEsMwGd2an1SJeeuSFGM0LjRrremudUcENQmi6VrZSEOaUA/O23p6/s/CIwgBBBjHP U0TIkkiUgK2WjJFvQjXXDpk6zOidzbKucd7YbhtdgVbfa+tmmERJvTcCCZxvdNriBUUd Pfbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=E5f1Ju4E; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e21-20020a50fb95000000b0045a3b951e8bsi2717719edq.194.2022.12.06.13.29.37; Tue, 06 Dec 2022 13:29:37 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=E5f1Ju4E; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 67ACC68BB37; Tue, 6 Dec 2022 23:29:33 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-vs1-f43.google.com (mail-vs1-f43.google.com [209.85.217.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2D7D368BC47 for ; Tue, 6 Dec 2022 23:29:27 +0200 (EET) Received: by mail-vs1-f43.google.com with SMTP id 128so15447020vsz.12 for ; Tue, 06 Dec 2022 13:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=n2tjE/vSM78moVpkHsk8saKO4tLuZJUDtO3idi1N6xw=; b=E5f1Ju4ElowDZDZsr4KpICiwtQUQEYx/vpgtYCIHRvhT6ePMIFrN7FMkQiSE82JQxU YTzxmHNFws3ZJMu+UIS7Cua2wk0Yo9iPtcS13iYfZe977wnN5tAeUrEhbIY+FBs9mLvc j1xc/GYlTog8ggcKIHUP021rxtDDA5JuM4r7QtC9h8AniAP0l2DWSIJrPhSGb/iG669P ZbK40Ibdf2jSo1i0ZcvSCy2ihD9lMlzb3VBHU+2emfWom52YXuB9wBBKd+7b8BDmPvAV PVJf/chE7fudku+mbhWa6nZdKSPB7oafUtWJVyC8LR9mNmNnL4qRClE60SAsVH8j4D6D D31Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=n2tjE/vSM78moVpkHsk8saKO4tLuZJUDtO3idi1N6xw=; b=6occRoUqfenoT8OFVIRuj+NXxIC2eWQGXk8/sEybEoX9EpuLZKxT5Ih8vDi55PZinu sb93lSKHfDzheOggvsbw0/aQY2tq5LFEJibhumeiSWHQBmxKTbjdPLuvKFyQqGNkOb3H /LydnxrMLcxMDGgCEaXuKJZu+23kXU7x03ZR6gYnrzFSucfBkhRt2GSiminDEoA+9cW9 Jh73EpaWIHiWR/CR0eVxPefGhtWpuUcACQO4CG1BzfeWFVoZ+CQCZsb/glgSgVbeMmw3 AQdvahcwOB7VbKfKmIu3Cpn028rgGM64wP5vhR8bHXSvvFZuhmIegus+FxOLQOLxZkil zNOg== X-Gm-Message-State: ANoB5pm/bAS8WfZdL5q2sn+rtwX83QsnSYmQZQLyrM+R4AYLF6dczH6B 7tvYshpgVkWLjvoqXeRwtzsajlxwVlPeU0F6DAyVL5w3 X-Received: by 2002:a67:f94d:0:b0:3b1:4889:390 with SMTP id u13-20020a67f94d000000b003b148890390mr4393884vsq.57.1670362165551; Tue, 06 Dec 2022 13:29:25 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:612c:2428:b0:32a:5eaa:92e4 with HTTP; Tue, 6 Dec 2022 13:29:24 -0800 (PST) From: Paul B Mahol Date: Tue, 6 Dec 2022 22:29:24 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avfilter: add corr video filter X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 58HBzM/qFrV5 Adds yet another metric filter. Patch attached. From 47f30e54b184e4b96f2e9da78671ca5d85c83762 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 6 Dec 2022 21:31:33 +0100 Subject: [PATCH] avfilter: add corr video filter Signed-off-by: Paul B Mahol --- doc/filters.texi | 22 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_corr.c | 339 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 363 insertions(+) create mode 100644 libavfilter/vf_corr.c diff --git a/doc/filters.texi b/doc/filters.texi index 4b74bce34f..252741b254 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10097,6 +10097,28 @@ ffmpeg -f lavfi -i nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@@inputMe @end example @end itemize +@section corr + +Obtain the correlation between two input videos. + +This filter takes two input videos. + +Both input videos must have the same resolution and pixel format for +this filter to work correctly. Also it assumes that both inputs +have the same number of frames, which are compared one by one. + +The obtained per component, average, min and max correlation is printed through +the logging system. + +The filter stores the calculated correlation of each frame in frame metadata. + +In the below example the input file @file{main.mpg} being processed is compared +with the reference file @file{ref.mpg}. + +@example +ffmpeg -i main.mpg -i ref.mpg -lavfi corr -f null - +@end example + @section cover_rect Cover a rectangular object diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 2791b6a950..9a850d5dc5 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -243,6 +243,7 @@ OBJS-$(CONFIG_CONVOLUTION_OPENCL_FILTER) += vf_convolution_opencl.o opencl.o OBJS-$(CONFIG_CONVOLVE_FILTER) += vf_convolve.o framesync.o OBJS-$(CONFIG_COPY_FILTER) += vf_copy.o OBJS-$(CONFIG_COREIMAGE_FILTER) += vf_coreimage.o +OBJS-$(CONFIG_CORR_FILTER) += vf_corr.o framesync.o OBJS-$(CONFIG_COVER_RECT_FILTER) += vf_cover_rect.o lavfutils.o OBJS-$(CONFIG_CROP_FILTER) += vf_crop.o OBJS-$(CONFIG_CROPDETECT_FILTER) += vf_cropdetect.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 3ff20e76ce..2ece5c15c8 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -223,6 +223,7 @@ extern const AVFilter ff_vf_convolution_opencl; extern const AVFilter ff_vf_convolve; extern const AVFilter ff_vf_copy; extern const AVFilter ff_vf_coreimage; +extern const AVFilter ff_vf_corr; extern const AVFilter ff_vf_cover_rect; extern const AVFilter ff_vf_crop; extern const AVFilter ff_vf_cropdetect; diff --git a/libavfilter/vf_corr.c b/libavfilter/vf_corr.c new file mode 100644 index 0000000000..3e3951d001 --- /dev/null +++ b/libavfilter/vf_corr.c @@ -0,0 +1,339 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Calculate the correlation between two input videos. + */ + +#include "libavutil/avstring.h" +#include "libavutil/opt.h" +#include "libavutil/pixdesc.h" +#include "avfilter.h" +#include "drawutils.h" +#include "formats.h" +#include "framesync.h" +#include "internal.h" +#include "video.h" + +typedef struct CorrContext { + const AVClass *class; + FFFrameSync fs; + double score, min_score, max_score, score_comp[4]; + uint64_t nb_frames; + int is_rgb; + uint8_t rgba_map[4]; + int max[4]; + char comps[4]; + int nb_components; + int planewidth[4]; + int planeheight[4]; + int (*filter_slice)(AVFilterContext *ctx, void *arg, + int jobnr, int nb_jobs); +} CorrContext; + +#define OFFSET(x) offsetof(CorrContext, x) +#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM + +static void set_meta(AVFilterContext *ctx, + AVDictionary **metadata, const char *key, char comp, float d) +{ + char value[128]; + snprintf(value, sizeof(value), "%f", d); + if (comp) { + char key2[128]; + snprintf(key2, sizeof(key2), "lavfi.%s.%s%s%c", + ctx->filter->name, ctx->filter->name, key, comp); + av_dict_set(metadata, key2, value, 0); + } else { + char key2[128]; + snprintf(key2, sizeof(key2), "lavfi.%s.%s%s", + ctx->filter->name, ctx->filter->name, key); + av_dict_set(metadata, key2, value, 0); + } +} + +#define CORR(type, name) \ +static void f##name(AVFilterContext *ctx, AVFrame *master, \ + AVFrame *ref, double *comp_score) \ +{ \ + CorrContext *s = ctx->priv; \ + \ + for (int c = 0; c < s->nb_components; c++) { \ + const ptrdiff_t linesize1 = master->linesize[c] / \ + sizeof(type); \ + const ptrdiff_t linesize2 = ref->linesize[c] / \ + sizeof(type); \ + const type *src1 = (const type *)master->data[c]; \ + const type *src2 = (const type *)ref->data[c]; \ + const int h = s->planeheight[c]; \ + const int w = s->planewidth[c]; \ + const float scale = 1.f / s->max[c]; \ + uint64_t sum1 = 0, sum2 = 0; \ + float sum12, sum1q, sum2q; \ + float sumq, mean1, mean2; \ + \ + for (int y = 0; y < h; y++) { \ + for (int x = 0; x < w; x++) { \ + sum1 += src1[x]; \ + sum2 += src2[x]; \ + } \ + \ + src1 += linesize1; \ + src2 += linesize2; \ + } \ + \ + mean1 = scale * (sum1 /(double)(w * h)); \ + mean2 = scale * (sum2 /(double)(w * h)); \ + \ + src1 = (const type *)master->data[c]; \ + src2 = (const type *)ref->data[c]; \ + \ + sum12 = 0.f; \ + sum1q = 0.f; \ + sum2q = 0.f; \ + \ + for (int y = 0; y < h; y++) { \ + for (int x = 0; x < w; x++) { \ + const float f1 = scale * src1[x] - mean1; \ + const float f2 = scale * src2[x] - mean2; \ + \ + sum12 += f1 * f2; \ + sum1q += f1 * f1; \ + sum2q += f2 * f2; \ + } \ + \ + src1 += linesize1; \ + src2 += linesize2; \ + } \ + \ + sumq = sqrtf(sum1q * sum2q); \ + if (sumq > 0.f) { \ + comp_score[c] = av_clipf(sum12 / sumq,-1.f,1.f); \ + } else { \ + comp_score[c] = sum1q == sum2q ? 1.f : 0.f; \ + } \ + } \ +} + +CORR(uint8_t, corr8) +CORR(uint16_t, corr16) + +static int do_corr(FFFrameSync *fs) +{ + AVFilterContext *ctx = fs->parent; + CorrContext *s = ctx->priv; + AVFrame *master, *ref; + double comp_score[4], score = 0.; + AVDictionary **metadata; + int ret; + + ret = ff_framesync_dualinput_get(fs, &master, &ref); + if (ret < 0) + return ret; + if (ctx->is_disabled || !ref) + return ff_filter_frame(ctx->outputs[0], master); + metadata = &master->metadata; + + if (s->max[0] > 255) { + fcorr16(ctx, master, ref, comp_score); + } else { + fcorr8(ctx, master, ref, comp_score); + } + + for (int c = 0; c < s->nb_components; c++) + score += comp_score[c]; + score /= s->nb_components; + s->score += score; + + s->min_score = fmin(s->min_score, score); + s->max_score = fmax(s->max_score, score); + + for (int c = 0; c < s->nb_components; c++) + s->score_comp[c] += comp_score[c]; + s->nb_frames++; + + for (int j = 0; j < s->nb_components; j++) { + int c = s->is_rgb ? s->rgba_map[j] : j; + set_meta(ctx, metadata, ".", s->comps[j], comp_score[c]); + } + set_meta(ctx, metadata, "_avg", 0, score); + + return ff_filter_frame(ctx->outputs[0], master); +} + +static av_cold int init(AVFilterContext *ctx) +{ + CorrContext *s = ctx->priv; + + s->fs.on_event = do_corr; + + return 0; +} + +static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14, AV_PIX_FMT_GRAY16, +#define PF_NOALPHA(suf) AV_PIX_FMT_YUV420##suf, AV_PIX_FMT_YUV422##suf, AV_PIX_FMT_YUV444##suf +#define PF_ALPHA(suf) AV_PIX_FMT_YUVA420##suf, AV_PIX_FMT_YUVA422##suf, AV_PIX_FMT_YUVA444##suf +#define PF(suf) PF_NOALPHA(suf), PF_ALPHA(suf) + PF(P), PF(P9), PF(P10), PF_NOALPHA(P12), PF_NOALPHA(P14), PF(P16), + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ444P, + AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, + AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, + AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, + AV_PIX_FMT_NONE +}; + +static int config_input_ref(AVFilterLink *inlink) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); + AVFilterContext *ctx = inlink->dst; + CorrContext *s = ctx->priv; + + s->nb_components = desc->nb_components; + if (ctx->inputs[0]->w != ctx->inputs[1]->w || + ctx->inputs[0]->h != ctx->inputs[1]->h) { + av_log(ctx, AV_LOG_ERROR, "Width and height of input videos must be same.\n"); + return AVERROR(EINVAL); + } + + s->is_rgb = ff_fill_rgba_map(s->rgba_map, inlink->format) >= 0; + s->comps[0] = s->is_rgb ? 'R' : 'Y' ; + s->comps[1] = s->is_rgb ? 'G' : 'U' ; + s->comps[2] = s->is_rgb ? 'B' : 'V' ; + s->comps[3] = 'A'; + + s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h); + s->planeheight[0] = s->planeheight[3] = inlink->h; + s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w); + s->planewidth[0] = s->planewidth[3] = inlink->w; + + s->min_score = +INFINITY; + s->max_score = -INFINITY; + + s->max[0] = (1 << desc->comp[0].depth) - 1; + s->max[1] = (1 << desc->comp[1].depth) - 1; + s->max[2] = (1 << desc->comp[2].depth) - 1; + s->max[3] = (1 << desc->comp[3].depth) - 1; + + return 0; +} + +static int config_output(AVFilterLink *outlink) +{ + AVFilterContext *ctx = outlink->src; + CorrContext *s = ctx->priv; + AVFilterLink *mainlink = ctx->inputs[0]; + int ret; + + ret = ff_framesync_init_dualinput(&s->fs, ctx); + if (ret < 0) + return ret; + outlink->w = mainlink->w; + outlink->h = mainlink->h; + outlink->time_base = mainlink->time_base; + outlink->sample_aspect_ratio = mainlink->sample_aspect_ratio; + outlink->frame_rate = mainlink->frame_rate; + if ((ret = ff_framesync_configure(&s->fs)) < 0) + return ret; + + outlink->time_base = s->fs.time_base; + + if (av_cmp_q(mainlink->time_base, outlink->time_base) || + av_cmp_q(ctx->inputs[1]->time_base, outlink->time_base)) + av_log(ctx, AV_LOG_WARNING, "not matching timebases found between first input: %d/%d and second input %d/%d, results may be incorrect!\n", + mainlink->time_base.num, mainlink->time_base.den, + ctx->inputs[1]->time_base.num, ctx->inputs[1]->time_base.den); + + return 0; +} + +static int activate(AVFilterContext *ctx) +{ + CorrContext *s = ctx->priv; + return ff_framesync_activate(&s->fs); +} + +static av_cold void uninit(AVFilterContext *ctx) +{ + CorrContext *s = ctx->priv; + + if (s->nb_frames > 0) { + char buf[256]; + + buf[0] = 0; + for (int j = 0; j < s->nb_components; j++) { + int c = s->is_rgb ? s->rgba_map[j] : j; + av_strlcatf(buf, sizeof(buf), " %c:%f", s->comps[j], s->score_comp[c] / s->nb_frames); + } + + av_log(ctx, AV_LOG_INFO, "%s%s average:%f min:%f max:%f\n", + ctx->filter->name, + buf, + s->score / s->nb_frames, + s->min_score, + s->max_score); + } + + ff_framesync_uninit(&s->fs); +} + +static const AVFilterPad corr_inputs[] = { + { + .name = "main", + .type = AVMEDIA_TYPE_VIDEO, + },{ + .name = "reference", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_input_ref, + }, +}; + +static const AVFilterPad corr_outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_output, + }, +}; + +static const AVOption options[] = { + { NULL } +}; + +#define corr_options options +FRAMESYNC_DEFINE_CLASS(corr, CorrContext, fs); + +const AVFilter ff_vf_corr = { + .name = "corr", + .description = NULL_IF_CONFIG_SMALL("Calculate the correlation between two video streams."), + .preinit = corr_framesync_preinit, + .init = init, + .uninit = uninit, + .activate = activate, + .priv_size = sizeof(CorrContext), + .priv_class = &corr_class, + FILTER_INPUTS(corr_inputs), + FILTER_OUTPUTS(corr_outputs), + FILTER_PIXFMTS_ARRAY(pix_fmts), + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, +}; -- 2.37.2