You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +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:
@@ -71,17 +71,6 @@ typedef struct TonemapContext {
|
|||||||
const struct LumaCoefficients *coeffs;
|
const struct LumaCoefficients *coeffs;
|
||||||
} TonemapContext;
|
} 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)
|
static av_cold int init(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
TonemapContext *s = ctx->priv;
|
TonemapContext *s = ctx->priv;
|
||||||
@@ -341,6 +330,6 @@ const AVFilter ff_vf_tonemap = {
|
|||||||
.priv_class = &tonemap_class,
|
.priv_class = &tonemap_class,
|
||||||
FILTER_INPUTS(tonemap_inputs),
|
FILTER_INPUTS(tonemap_inputs),
|
||||||
FILTER_OUTPUTS(tonemap_outputs),
|
FILTER_OUTPUTS(tonemap_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32),
|
||||||
.flags = AVFILTER_FLAG_SLICE_THREADS,
|
.flags = AVFILTER_FLAG_SLICE_THREADS,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user