aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 22:05:59 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:58:28 +0200
commita341c85c846f481471713f24ee974ecdafd082e2 (patch)
tree03e464ef72c26337273fb7b64fa0d9d96b51437e
parent505072e80938d9310ab82f442a629508dcef4c32 (diff)
downloadffmpeg-a341c85c846f481471713f24ee974ecdafd082e2.tar.gz
avfilter/vf_dnn_processing: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavfilter/vf_dnn_processing.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavfilter/vf_dnn_processing.c b/libavfilter/vf_dnn_processing.c
index d193205550..52d6ea426c 100644
--- a/libavfilter/vf_dnn_processing.c
+++ b/libavfilter/vf_dnn_processing.c
@@ -65,8 +65,6 @@ static av_cold int init(AVFilterContext *context)
return ff_dnn_init(&ctx->dnnctx, DFT_PROCESS_FRAME, context);
}
-static int query_formats(AVFilterContext *context)
-{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAYF32,
@@ -75,8 +73,6 @@ static int query_formats(AVFilterContext *context)
AV_PIX_FMT_NV12,
AV_PIX_FMT_NONE
};
- return ff_set_common_formats_from_list(context, pix_fmts);
-}
#define LOG_FORMAT_CHANNEL_MISMATCH() \
av_log(ctx, AV_LOG_ERROR, \
@@ -372,7 +368,7 @@ const AVFilter ff_vf_dnn_processing = {
.uninit = uninit,
FILTER_INPUTS(dnn_processing_inputs),
FILTER_OUTPUTS(dnn_processing_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_PIXFMTS_ARRAY(pix_fmts),
.priv_class = &dnn_processing_class,
.activate = activate,
};