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

avfilter/vf_tonemap: 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:34:32 +02:00
parent 5237a29d05
commit a4722a4aa0

View File

@ -71,17 +71,6 @@ typedef struct TonemapContext {
const struct LumaCoefficients *coeffs;
} TonemapContext;
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_GBRPF32,
AV_PIX_FMT_GBRAPF32,
AV_PIX_FMT_NONE,
};
static int query_formats(AVFilterContext *ctx)
{
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static av_cold int init(AVFilterContext *ctx)
{
TonemapContext *s = ctx->priv;
@ -341,6 +330,6 @@ const AVFilter ff_vf_tonemap = {
.priv_class = &tonemap_class,
FILTER_INPUTS(tonemap_inputs),
FILTER_OUTPUTS(tonemap_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32),
.flags = AVFILTER_FLAG_SLICE_THREADS,
};