Commit 485c4fb6 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avfilter/vf_grayworld: Use formats list instead of query function

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent a07f84ca
......@@ -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,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment