avfilter/vf_dnn_processing: Use formats list instead of query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 22:05:59 +02:00
parent 505072e809
commit a341c85c84
1 changed files with 1 additions and 5 deletions

View File

@ -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,
};