mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_curves: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
e6d233e362
commit
c355705ab1
|
@ -513,27 +513,6 @@ static av_cold int curves_init(AVFilterContext *ctx)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
static const enum AVPixelFormat pix_fmts[] = {
|
||||
AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
|
||||
AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA,
|
||||
AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR,
|
||||
AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR,
|
||||
AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0,
|
||||
AV_PIX_FMT_RGB48, AV_PIX_FMT_BGR48,
|
||||
AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64,
|
||||
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
|
||||
AV_PIX_FMT_GBRP9,
|
||||
AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10,
|
||||
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12,
|
||||
AV_PIX_FMT_GBRP14,
|
||||
AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP16,
|
||||
AV_PIX_FMT_NONE
|
||||
};
|
||||
return ff_set_common_formats_from_list(ctx, pix_fmts);
|
||||
}
|
||||
|
||||
static int filter_slice_packed(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
|
||||
{
|
||||
int x, y;
|
||||
|
@ -817,7 +796,19 @@ const AVFilter ff_vf_curves = {
|
|||
.uninit = curves_uninit,
|
||||
FILTER_INPUTS(curves_inputs),
|
||||
FILTER_OUTPUTS(curves_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS(AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
|
||||
AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA,
|
||||
AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR,
|
||||
AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR,
|
||||
AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0,
|
||||
AV_PIX_FMT_RGB48, AV_PIX_FMT_BGR48,
|
||||
AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64,
|
||||
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
|
||||
AV_PIX_FMT_GBRP9,
|
||||
AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10,
|
||||
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12,
|
||||
AV_PIX_FMT_GBRP14,
|
||||
AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP16),
|
||||
.priv_class = &curves_class,
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||
.process_command = process_command,
|
||||
|
|
Loading…
Reference in New Issue