Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 16:31:11 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 19:58:24 +0300
commitc355705ab1b2efbc5c18c37fb28b7d59a5094eda (patch)
tree430eccc96d7e047aa7d74cc3451c6526e045aa46 /libavfilter/vf_curves.c
parente6d233e362823c970571f4f5e0bb185c1796c16a (diff)
avfilter/vf_curves: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_curves.c')
-rw-r--r--libavfilter/vf_curves.c35
1 files changed, 13 insertions, 22 deletions
diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c
index 4aeb9e36ae..22a1f8aa70 100644
--- a/libavfilter/vf_curves.c
+++ b/libavfilter/vf_curves.c
@@ -513,27 +513,6 @@ static av_cold int curves_init(AVFilterContext *ctx)
return 0;
}
-static int query_formats(AVFilterContext *ctx)
-{
- static const enum AVPixelFormat pix_fmts[] = {
- AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
- AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA,
- AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR,
- AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR,
- AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0,
- AV_PIX_FMT_RGB48, AV_PIX_FMT_BGR48,
- AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64,
- AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
- AV_PIX_FMT_GBRP9,
- AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10,
- AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12,
- AV_PIX_FMT_GBRP14,
- AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP16,
- AV_PIX_FMT_NONE
- };
- return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
-
static int filter_slice_packed(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
{
int x, y;
@@ -817,7 +796,19 @@ const AVFilter ff_vf_curves = {
.uninit = curves_uninit,
FILTER_INPUTS(curves_inputs),
FILTER_OUTPUTS(curves_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_PIXFMTS(AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
+ AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA,
+ AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR,
+ AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR,
+ AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0,
+ AV_PIX_FMT_RGB48, AV_PIX_FMT_BGR48,
+ AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64,
+ AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
+ AV_PIX_FMT_GBRP9,
+ AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10,
+ AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12,
+ AV_PIX_FMT_GBRP14,
+ AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP16),
.priv_class = &curves_class,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
.process_command = process_command,