summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 23:18:51 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:58:28 +0200
commit0fbdedc04910b2c64e2d93b6211d829e81c0de2a (patch)
tree160646e760f840910fedecebe43f48e23f8a7c01 /libavfilter
parent102131da32b9168abfe65848e3ab4c4b9008a4cd (diff)
avfilter/vf_convolution: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_convolution.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c
index 707f2dd4e3..6d42d8e385 100644
--- a/libavfilter/vf_convolution.c
+++ b/libavfilter/vf_convolution.c
@@ -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,
};