diff mbox series

[FFmpeg-devel,060/218] avfilter/vf_colorconstancy: Store format in filter, remove query func

Message ID PR3PR03MB6665BE0A79C800A566397BA78FAA9@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 203889db8fa8ae647ccf8fc955a12030aea3c28a
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_colorconstancy.c | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c
index 9ccb462d0f..ba6359462e 100644
--- a/libavfilter/vf_colorconstancy.c
+++ b/libavfilter/vf_colorconstancy.c
@@ -636,18 +636,6 @@  static void chromatic_adaptation(AVFilterContext *ctx, AVFrame *in, AVFrame *out
     ff_filter_execute(ctx, diagonal_transformation, &td, NULL, nb_jobs);
 }
 
-static int query_formats(AVFilterContext *ctx)
-{
-    static const enum AVPixelFormat pix_fmts[] = {
-        // TODO: support more formats
-        // FIXME: error when saving to .jpg
-        AV_PIX_FMT_GBRP,
-        AV_PIX_FMT_NONE
-    };
-
-    return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
-
 static int config_props(AVFilterLink *inlink)
 {
     AVFilterContext *ctx = inlink->dst;
@@ -755,7 +743,9 @@  const AVFilter ff_vf_greyedge = {
     .uninit        = uninit,
     FILTER_INPUTS(colorconstancy_inputs),
     FILTER_OUTPUTS(colorconstancy_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    // TODO: support more formats
+    // FIXME: error when saving to .jpg
+    FILTER_SINGLE_PIXFMT(AV_PIX_FMT_GBRP),
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
 };