diff mbox series

[FFmpeg-devel,063/218] avfilter/vf_colormatrix: Use formats list instead of query function

Message ID PR3PR03MB66651994F92531DB592A2AD48FAA9@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit b02929b70c49dc5cdc4abe559daef6eafa0090ed
Headers show
Series [FFmpeg-devel,001/218] avfilter/f_reverse: Don't use redundant query_formats function | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 30, 2021, 1:40 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_colormatrix.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
index 73bc0e9cf0..bee80c69cc 100644
--- a/libavfilter/vf_colormatrix.c
+++ b/libavfilter/vf_colormatrix.c
@@ -404,18 +404,6 @@  static int config_input(AVFilterLink *inlink)
     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_UYVY422,
-        AV_PIX_FMT_NONE
-    };
-    return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
-
 static int filter_frame(AVFilterLink *link, AVFrame *in)
 {
     AVFilterContext *ctx = link->dst;
@@ -509,7 +497,10 @@  const AVFilter ff_vf_colormatrix = {
     .init          = init,
     FILTER_INPUTS(colormatrix_inputs),
     FILTER_OUTPUTS(colormatrix_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_PIXFMTS(AV_PIX_FMT_YUV444P,
+                   AV_PIX_FMT_YUV422P,
+                   AV_PIX_FMT_YUV420P,
+                   AV_PIX_FMT_UYVY422),
     .priv_class    = &colormatrix_class,
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
 };