1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_colorconstancy: Store format in filter, remove query func

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 15:11:01 +02:00
parent be26348153
commit 203889db8f

View File

@ -636,18 +636,6 @@ static void chromatic_adaptation(AVFilterContext *ctx, AVFrame *in, AVFrame *out
ff_filter_execute(ctx, diagonal_transformation, &td, NULL, nb_jobs);
}
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
// TODO: support more formats
// FIXME: error when saving to .jpg
AV_PIX_FMT_GBRP,
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static int config_props(AVFilterLink *inlink)
{
AVFilterContext *ctx = inlink->dst;
@ -755,7 +743,9 @@ const AVFilter ff_vf_greyedge = {
.uninit = uninit,
FILTER_INPUTS(colorconstancy_inputs),
FILTER_OUTPUTS(colorconstancy_outputs),
FILTER_QUERY_FUNC(query_formats),
// TODO: support more formats
// FIXME: error when saving to .jpg
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_GBRP),
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
};