mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/vf_convolution: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
102131da32
commit
0fbdedc049
@ -77,8 +77,6 @@ static const int same7x7[49] = {0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0};
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
static const enum AVPixelFormat pix_fmts[] = {
|
||||
AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P,
|
||||
AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P,
|
||||
@ -101,9 +99,6 @@ static int query_formats(AVFilterContext *ctx)
|
||||
AV_PIX_FMT_NONE
|
||||
};
|
||||
|
||||
return ff_set_common_formats_from_list(ctx, pix_fmts);
|
||||
}
|
||||
|
||||
typedef struct ThreadData {
|
||||
AVFrame *in, *out;
|
||||
} ThreadData;
|
||||
@ -967,7 +962,7 @@ const AVFilter ff_vf_convolution = {
|
||||
.init = init,
|
||||
FILTER_INPUTS(convolution_inputs),
|
||||
FILTER_OUTPUTS(convolution_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||
.process_command = process_command,
|
||||
};
|
||||
@ -994,7 +989,7 @@ const AVFilter ff_vf_prewitt = {
|
||||
.init = init,
|
||||
FILTER_INPUTS(convolution_inputs),
|
||||
FILTER_OUTPUTS(convolution_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||
.process_command = process_command,
|
||||
};
|
||||
@ -1011,7 +1006,7 @@ const AVFilter ff_vf_sobel = {
|
||||
.init = init,
|
||||
FILTER_INPUTS(convolution_inputs),
|
||||
FILTER_OUTPUTS(convolution_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||
.process_command = process_command,
|
||||
};
|
||||
@ -1028,7 +1023,7 @@ const AVFilter ff_vf_roberts = {
|
||||
.init = init,
|
||||
FILTER_INPUTS(convolution_inputs),
|
||||
FILTER_OUTPUTS(convolution_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||
.process_command = process_command,
|
||||
};
|
||||
@ -1045,7 +1040,7 @@ const AVFilter ff_vf_kirsch = {
|
||||
.init = init,
|
||||
FILTER_INPUTS(convolution_inputs),
|
||||
FILTER_OUTPUTS(convolution_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||
.process_command = process_command,
|
||||
};
|
||||
@ -1062,7 +1057,7 @@ const AVFilter ff_vf_scharr = {
|
||||
.init = init,
|
||||
FILTER_INPUTS(convolution_inputs),
|
||||
FILTER_OUTPUTS(convolution_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||
.process_command = process_command,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user