mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/vf_sr: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
4cb0343abe
commit
afa54580d2
@ -66,15 +66,10 @@ static av_cold int init(AVFilterContext *context)
|
||||
return ff_dnn_init(&sr_context->dnnctx, DFT_PROCESS_FRAME, context);
|
||||
}
|
||||
|
||||
static int query_formats(AVFilterContext *context)
|
||||
{
|
||||
const enum AVPixelFormat pixel_formats[] = {AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P,
|
||||
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_GRAY8,
|
||||
AV_PIX_FMT_NONE};
|
||||
|
||||
return ff_set_common_formats_from_list(context, pixel_formats);
|
||||
}
|
||||
|
||||
static int config_output(AVFilterLink *outlink)
|
||||
{
|
||||
AVFilterContext *context = outlink->src;
|
||||
@ -200,6 +195,6 @@ const AVFilter ff_vf_sr = {
|
||||
.uninit = uninit,
|
||||
FILTER_INPUTS(sr_inputs),
|
||||
FILTER_OUTPUTS(sr_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS_ARRAY(pixel_formats),
|
||||
.priv_class = &sr_class,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user