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

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


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

diff --git a/libavfilter/vf_exposure.c b/libavfilter/vf_exposure.c
index 6443eb77f1..108fba7930 100644
--- a/libavfilter/vf_exposure.c
+++ b/libavfilter/vf_exposure.c
@@ -75,16 +75,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
     return ff_filter_frame(ctx->outputs[0], frame);
 }
 
-static av_cold int query_formats(AVFilterContext *ctx)
-{
-    static const enum AVPixelFormat pixel_fmts[] = {
-        AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32,
-        AV_PIX_FMT_NONE
-    };
-
-    return ff_set_common_formats_from_list(ctx, pixel_fmts);
-}
-
 static av_cold int config_input(AVFilterLink *inlink)
 {
     AVFilterContext *ctx = inlink->dst;
@@ -130,7 +120,7 @@ const AVFilter ff_vf_exposure = {
     .priv_class    = &exposure_class,
     FILTER_INPUTS(exposure_inputs),
     FILTER_OUTPUTS(exposure_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32),
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
     .process_command = ff_filter_process_command,
 };
-- 
2.30.2



More information about the ffmpeg-devel mailing list