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

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


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

diff --git a/libavfilter/vf_super2xsai.c b/libavfilter/vf_super2xsai.c
index 11532925bb..3fcc035803 100644
--- a/libavfilter/vf_super2xsai.c
+++ b/libavfilter/vf_super2xsai.c
@@ -245,8 +245,6 @@ static int super2xsai(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
     return 0;
 }
 
-static int query_formats(AVFilterContext *ctx)
-{
     static const enum AVPixelFormat pix_fmts[] = {
         AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA, AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR,
         AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
@@ -255,9 +253,6 @@ static int query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_NONE
     };
 
-    return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
-
 static int config_input(AVFilterLink *inlink)
 {
     Super2xSaIContext *s = inlink->dst->priv;
@@ -361,6 +356,6 @@ const AVFilter ff_vf_super2xsai = {
     .priv_size     = sizeof(Super2xSaIContext),
     FILTER_INPUTS(super2xsai_inputs),
     FILTER_OUTPUTS(super2xsai_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_PIXFMTS_ARRAY(pix_fmts),
     .flags         = AVFILTER_FLAG_SLICE_THREADS,
 };
-- 
2.30.2



More information about the ffmpeg-devel mailing list