1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avfilter/vf_libvmaf: 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 21:40:31 +02:00
parent fbd540e040
commit 55e8c3598b

View File

@ -248,18 +248,12 @@ static av_cold int init(AVFilterContext *ctx)
return 0;
}
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUV444P10LE, AV_PIX_FMT_YUV422P10LE, AV_PIX_FMT_YUV420P10LE,
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static int config_input_ref(AVFilterLink *inlink)
{
AVFilterContext *ctx = inlink->dst;
@ -367,5 +361,5 @@ const AVFilter ff_vf_libvmaf = {
.priv_class = &libvmaf_class,
FILTER_INPUTS(libvmaf_inputs),
FILTER_OUTPUTS(libvmaf_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_PIXFMTS_ARRAY(pix_fmts),
};