avfilter/vsrc_gradients: Use formats list instead of query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 16:48:28 +02:00
parent 9a62afc5fc
commit 90daa728d8
1 changed files with 1 additions and 12 deletions

View File

@ -83,17 +83,6 @@ static const AVOption gradients_options[] = {
AVFILTER_DEFINE_CLASS(gradients);
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_RGBA,
AV_PIX_FMT_RGBA64,
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static uint32_t lerp_color(uint8_t c0[4], uint8_t c1[4], float x)
{
const float y = 1.f - x;
@ -301,7 +290,7 @@ const AVFilter ff_vsrc_gradients = {
.priv_class = &gradients_class,
.inputs = NULL,
FILTER_OUTPUTS(gradients_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_PIXFMTS(AV_PIX_FMT_RGBA, AV_PIX_FMT_RGBA64),
.activate = activate,
.flags = AVFILTER_FLAG_SLICE_THREADS,
};