mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 09:52:17 +00:00
avfilter/vf_colormatrix: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
f182e0c64f
commit
b02929b70c
@ -404,18 +404,6 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
|
||||||
{
|
|
||||||
static const enum AVPixelFormat pix_fmts[] = {
|
|
||||||
AV_PIX_FMT_YUV444P,
|
|
||||||
AV_PIX_FMT_YUV422P,
|
|
||||||
AV_PIX_FMT_YUV420P,
|
|
||||||
AV_PIX_FMT_UYVY422,
|
|
||||||
AV_PIX_FMT_NONE
|
|
||||||
};
|
|
||||||
return ff_set_common_formats_from_list(ctx, pix_fmts);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int filter_frame(AVFilterLink *link, AVFrame *in)
|
static int filter_frame(AVFilterLink *link, AVFrame *in)
|
||||||
{
|
{
|
||||||
AVFilterContext *ctx = link->dst;
|
AVFilterContext *ctx = link->dst;
|
||||||
@ -509,7 +497,10 @@ const AVFilter ff_vf_colormatrix = {
|
|||||||
.init = init,
|
.init = init,
|
||||||
FILTER_INPUTS(colormatrix_inputs),
|
FILTER_INPUTS(colormatrix_inputs),
|
||||||
FILTER_OUTPUTS(colormatrix_outputs),
|
FILTER_OUTPUTS(colormatrix_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_PIXFMTS(AV_PIX_FMT_YUV444P,
|
||||||
|
AV_PIX_FMT_YUV422P,
|
||||||
|
AV_PIX_FMT_YUV420P,
|
||||||
|
AV_PIX_FMT_UYVY422),
|
||||||
.priv_class = &colormatrix_class,
|
.priv_class = &colormatrix_class,
|
||||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user