[FFmpeg-devel] [PATCH 106/218] avfilter/vf_sr: Use formats list instead of query function

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Sep 30 16:40:47 EEST 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavfilter/vf_sr.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c
index f528fdcad4..4acf9508a3 100644
--- a/libavfilter/vf_sr.c
+++ b/libavfilter/vf_sr.c
@@ -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,
 };
-- 
2.30.2



More information about the ffmpeg-devel mailing list