mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avfilter/vf_grayworld: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
a07f84ca00
commit
485c4fb66f
@ -56,15 +56,6 @@ static const AVOption grayworld_options[] = {
|
||||
|
||||
AVFILTER_DEFINE_CLASS(grayworld);
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
static const enum AVPixelFormat pix_fmts[] = {
|
||||
AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32,
|
||||
AV_PIX_FMT_NONE,
|
||||
};
|
||||
return ff_set_common_formats_from_list(ctx, pix_fmts);
|
||||
}
|
||||
|
||||
static void apply_matrix(const float matrix[3][3], const float input[3], float output[3])
|
||||
{
|
||||
output[0] = matrix[0][0] * input[0] + matrix[0][1] * input[1] + matrix[0][2] * input[2];
|
||||
@ -331,7 +322,7 @@ const AVFilter ff_vf_grayworld = {
|
||||
.priv_class = &grayworld_class,
|
||||
FILTER_INPUTS(grayworld_inputs),
|
||||
FILTER_OUTPUTS(grayworld_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32),
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||
.uninit = uninit,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user