summaryrefslogtreecommitdiff
path: root/libavfilter/vf_grayworld.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 21:49:35 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:58:27 +0200
commit485c4fb66f34cd0a3622e6b110812bd7e64dd3da (patch)
treedf05af79b3e41b12f616bed92a00820624e5b02e /libavfilter/vf_grayworld.c
parenta07f84ca0042a70cabc6b986f8d12c205b33766d (diff)
downloadffmpeg-485c4fb66f34cd0a3622e6b110812bd7e64dd3da.tar.gz
avfilter/vf_grayworld: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_grayworld.c')
-rw-r--r--libavfilter/vf_grayworld.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/libavfilter/vf_grayworld.c b/libavfilter/vf_grayworld.c
index d3a935ebe3..f20412cb10 100644
--- a/libavfilter/vf_grayworld.c
+++ b/libavfilter/vf_grayworld.c
@@ -56,15 +56,6 @@ static const AVOption grayworld_options[] = {
AVFILTER_DEFINE_CLASS(grayworld);
-static int query_formats(AVFilterContext *ctx)
-{
- static const enum AVPixelFormat pix_fmts[] = {
- AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32,
- AV_PIX_FMT_NONE,
- };
- return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
-
static void apply_matrix(const float matrix[3][3], const float input[3], float output[3])
{
output[0] = matrix[0][0] * input[0] + matrix[0][1] * input[1] + matrix[0][2] * input[2];
@@ -331,7 +322,7 @@ const AVFilter ff_vf_grayworld = {
.priv_class = &grayworld_class,
FILTER_INPUTS(grayworld_inputs),
FILTER_OUTPUTS(grayworld_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,
.uninit = uninit,
};