diff mbox series

[FFmpeg-devel,3/4] avfilter/vf_convolve: Deduplicate framesync auxiliary functions

Message ID AM7PR03MB6660774C98FF18EE378373AC8FDF9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit c1b6165b7341a6a83d289463c65119a5843aae5a
Headers show
Series [FFmpeg-devel,1/4] avfilter/framesync: Separate framesync AVClass and auxiliary functions
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 19, 2021, 4:46 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_convolve.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Paul B Mahol Sept. 19, 2021, 9:36 a.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavfilter/vf_convolve.c b/libavfilter/vf_convolve.c
index ab6d1a271f..2fa33587e3 100644
--- a/libavfilter/vf_convolve.c
+++ b/libavfilter/vf_convolve.c
@@ -655,9 +655,11 @@  static const AVFilterPad convolve_outputs[] = {
     },
 };
 
+FRAMESYNC_AUXILIARY_FUNCS(convolve, ConvolveContext, fs)
+
 #if CONFIG_CONVOLVE_FILTER
 
-FRAMESYNC_DEFINE_CLASS(convolve, ConvolveContext, fs);
+FRAMESYNC_DEFINE_PURE_CLASS(convolve, "convolve", convolve, convolve_options);
 
 const AVFilter ff_vf_convolve = {
     .name          = "convolve",
@@ -687,12 +689,12 @@  static const AVOption deconvolve_options[] = {
     { NULL },
 };
 
-FRAMESYNC_DEFINE_CLASS(deconvolve, ConvolveContext, fs);
+FRAMESYNC_DEFINE_PURE_CLASS(deconvolve, "deconvolve", convolve, deconvolve_options);
 
 const AVFilter ff_vf_deconvolve = {
     .name          = "deconvolve",
     .description   = NULL_IF_CONFIG_SMALL("Deconvolve first video stream with second video stream."),
-    .preinit       = deconvolve_framesync_preinit,
+    .preinit       = convolve_framesync_preinit,
     .init          = init,
     .uninit        = uninit,
     .query_formats = query_formats,