diff mbox series

[FFmpeg-devel,1/8] lavfi/internal: move functions used by filters to filters.h

Message ID 20240817081358.2354-1-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,1/8] lavfi/internal: move functions used by filters to filters.h | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Anton Khirnov Aug. 17, 2024, 8:13 a.m. UTC
internal.h currently mixes interfaces intended to be used by filters
with those that should be limited to generic filter- or graph-level
code.
---
 libavfilter/af_acontrast.c          |   1 +
 libavfilter/af_acopy.c              |   1 +
 libavfilter/af_acrusher.c           |   1 +
 libavfilter/af_adecorrelate.c       |   1 +
 libavfilter/af_adenorm.c            |   1 +
 libavfilter/af_aderivative.c        |   1 +
 libavfilter/af_adynamicequalizer.c  |   1 +
 libavfilter/af_adynamicsmooth.c     |   1 +
 libavfilter/af_aemphasis.c          |   1 +
 libavfilter/af_aexciter.c           |   1 +
 libavfilter/af_aformat.c            |   1 +
 libavfilter/af_afreqshift.c         |   1 +
 libavfilter/af_alimiter.c           |   1 +
 libavfilter/af_anequalizer.c        |   1 +
 libavfilter/af_anull.c              |   1 +
 libavfilter/af_aphaser.c            |   1 +
 libavfilter/af_apulsator.c          |   1 +
 libavfilter/af_asetrate.c           |   1 +
 libavfilter/af_asoftclip.c          |   1 +
 libavfilter/af_asr.c                |   1 +
 libavfilter/af_astats.c             |   1 +
 libavfilter/af_asubboost.c          |   1 +
 libavfilter/af_asupercut.c          |   1 +
 libavfilter/af_atempo.c             |   1 +
 libavfilter/af_atilt.c              |   1 +
 libavfilter/af_bs2b.c               |   1 +
 libavfilter/af_channelmap.c         |   1 +
 libavfilter/af_chorus.c             |   1 +
 libavfilter/af_compand.c            |   1 +
 libavfilter/af_compensationdelay.c  |   1 +
 libavfilter/af_crystalizer.c        |   1 +
 libavfilter/af_dcshift.c            |   1 +
 libavfilter/af_deesser.c            |   1 +
 libavfilter/af_drmeter.c            |   1 +
 libavfilter/af_earwax.c             |   1 +
 libavfilter/af_extrastereo.c        |   1 +
 libavfilter/af_flanger.c            |   1 +
 libavfilter/af_haas.c               |   1 +
 libavfilter/af_hdcd.c               |   1 +
 libavfilter/af_ladspa.c             |   1 +
 libavfilter/af_mcompand.c           |   1 +
 libavfilter/af_pan.c                |   1 +
 libavfilter/af_silencedetect.c      |   1 +
 libavfilter/af_stereotools.c        |   1 +
 libavfilter/af_stereowiden.c        |   1 +
 libavfilter/af_tremolo.c            |   1 +
 libavfilter/af_vibrato.c            |   1 +
 libavfilter/af_volumedetect.c       |   1 +
 libavfilter/asink_anullsink.c       |   1 +
 libavfilter/audio.c                 |   1 +
 libavfilter/audio.h                 |   2 +-
 libavfilter/avfiltergraph.c         |   1 +
 libavfilter/dnn/dnn_interface.c     |   2 +
 libavfilter/f_bench.c               |   1 +
 libavfilter/f_realtime.c            |   1 +
 libavfilter/f_reverse.c             |   1 +
 libavfilter/f_sidedata.c            |   1 +
 libavfilter/f_zmq.c                 |   1 +
 libavfilter/filters.h               | 292 ++++++++++++++++++++++++++++
 libavfilter/formats.c               |   1 +
 libavfilter/graphdump.c             |   1 +
 libavfilter/graphparser.c           |   1 +
 libavfilter/internal.h              | 292 ----------------------------
 libavfilter/vf_addroi.c             |   1 +
 libavfilter/vf_amplify.c            |   1 +
 libavfilter/vf_aspect.c             |   1 +
 libavfilter/vf_atadenoise.c         |   1 +
 libavfilter/vf_avgblur.c            |   1 +
 libavfilter/vf_avgblur_opencl.c     |   1 +
 libavfilter/vf_avgblur_vulkan.c     |   2 +
 libavfilter/vf_backgroundkey.c      |   1 +
 libavfilter/vf_bilateral.c          |   1 +
 libavfilter/vf_bitplanenoise.c      |   1 +
 libavfilter/vf_blackframe.c         |   1 +
 libavfilter/vf_boxblur.c            |   1 +
 libavfilter/vf_bwdif.c              |   1 +
 libavfilter/vf_cas.c                |   1 +
 libavfilter/vf_chromaber_vulkan.c   |   2 +
 libavfilter/vf_chromakey.c          |   1 +
 libavfilter/vf_chromanr.c           |   1 +
 libavfilter/vf_chromashift.c        |   1 +
 libavfilter/vf_ciescope.c           |   1 +
 libavfilter/vf_codecview.c          |   1 +
 libavfilter/vf_colorbalance.c       |   1 +
 libavfilter/vf_colorchannelmixer.c  |   1 +
 libavfilter/vf_colorconstancy.c     |   1 +
 libavfilter/vf_colorcontrast.c      |   1 +
 libavfilter/vf_colorcorrect.c       |   1 +
 libavfilter/vf_colorize.c           |   1 +
 libavfilter/vf_colorkey.c           |   1 +
 libavfilter/vf_colorkey_opencl.c    |   1 +
 libavfilter/vf_colorlevels.c        |   1 +
 libavfilter/vf_colormatrix.c        |   1 +
 libavfilter/vf_colorspace.c         |   1 +
 libavfilter/vf_colortemperature.c   |   1 +
 libavfilter/vf_convolution.c        |   1 +
 libavfilter/vf_convolution_opencl.c |   1 +
 libavfilter/vf_copy.c               |   1 +
 libavfilter/vf_cropdetect.c         |   1 +
 libavfilter/vf_curves.c             |   1 +
 libavfilter/vf_dblur.c              |   1 +
 libavfilter/vf_dctdnoiz.c           |   2 +
 libavfilter/vf_deband.c             |   1 +
 libavfilter/vf_deblock.c            |   1 +
 libavfilter/vf_deflicker.c          |   1 +
 libavfilter/vf_derain.c             |   1 +
 libavfilter/vf_deshake.c            |   1 +
 libavfilter/vf_despill.c            |   1 +
 libavfilter/vf_drawbox.c            |   1 +
 libavfilter/vf_drawbox_vaapi.c      |   1 +
 libavfilter/vf_edgedetect.c         |   1 +
 libavfilter/vf_elbg.c               |   1 +
 libavfilter/vf_entropy.c            |   1 +
 libavfilter/vf_epx.c                |   2 +
 libavfilter/vf_exposure.c           |   1 +
 libavfilter/vf_fftdnoiz.c           |   2 +
 libavfilter/vf_field.c              |   1 +
 libavfilter/vf_fieldorder.c         |   1 +
 libavfilter/vf_fillborders.c        |   1 +
 libavfilter/vf_flip_vulkan.c        |   2 +
 libavfilter/vf_format.c             |   1 +
 libavfilter/vf_fspp.c               |   2 +
 libavfilter/vf_gblur.c              |   1 +
 libavfilter/vf_gblur_vulkan.c       |   2 +
 libavfilter/vf_gradfun.c            |   1 +
 libavfilter/vf_grayworld.c          |   1 +
 libavfilter/vf_hflip.c              |   1 +
 libavfilter/vf_histeq.c             |   1 +
 libavfilter/vf_histogram.c          |   1 +
 libavfilter/vf_hqdn3d.c             |   1 +
 libavfilter/vf_hqx.c                |   1 +
 libavfilter/vf_hsvkey.c             |   1 +
 libavfilter/vf_huesaturation.c      |   1 +
 libavfilter/vf_iccdetect.c          |   1 +
 libavfilter/vf_iccgen.c             |   1 +
 libavfilter/vf_idet.c               |   1 +
 libavfilter/vf_il.c                 |   1 +
 libavfilter/vf_kerndeint.c          |   1 +
 libavfilter/vf_lagfun.c             |   1 +
 libavfilter/vf_lenscorrection.c     |   1 +
 libavfilter/vf_libopencv.c          |   1 +
 libavfilter/vf_limiter.c            |   1 +
 libavfilter/vf_lumakey.c            |   1 +
 libavfilter/vf_lut.c                |   1 +
 libavfilter/vf_lut3d.c              |   1 +
 libavfilter/vf_maskfun.c            |   1 +
 libavfilter/vf_mcdeint.c            |   1 +
 libavfilter/vf_median.c             |   1 +
 libavfilter/vf_mestimate.c          |   1 +
 libavfilter/vf_misc_vaapi.c         |   1 +
 libavfilter/vf_monochrome.c         |   1 +
 libavfilter/vf_mpdecimate.c         |   1 +
 libavfilter/vf_negate.c             |   1 +
 libavfilter/vf_neighbor.c           |   1 +
 libavfilter/vf_neighbor_opencl.c    |   1 +
 libavfilter/vf_nlmeans.c            |   1 +
 libavfilter/vf_nlmeans_opencl.c     |   1 +
 libavfilter/vf_nlmeans_vulkan.c     |   2 +
 libavfilter/vf_noise.c              |   1 +
 libavfilter/vf_normalize.c          |   1 +
 libavfilter/vf_null.c               |   1 +
 libavfilter/vf_ocr.c                |   1 +
 libavfilter/vf_overlay_opencl.c     |   1 +
 libavfilter/vf_overlay_vulkan.c     |   2 +
 libavfilter/vf_owdenoise.c          |   1 +
 libavfilter/vf_pad.c                |   1 +
 libavfilter/vf_pad_opencl.c         |   1 +
 libavfilter/vf_pad_vaapi.c          |   1 +
 libavfilter/vf_palettegen.c         |   1 +
 libavfilter/vf_phase.c              |   1 +
 libavfilter/vf_pixdesctest.c        |   1 +
 libavfilter/vf_pixelize.c           |   1 +
 libavfilter/vf_pp.c                 |   1 +
 libavfilter/vf_pp7.c                |   2 +
 libavfilter/vf_procamp_vaapi.c      |   1 +
 libavfilter/vf_program_opencl.c     |   1 +
 libavfilter/vf_pseudocolor.c        |   1 +
 libavfilter/vf_pullup.c             |   1 +
 libavfilter/vf_qp.c                 |   1 +
 libavfilter/vf_quirc.c              |   1 +
 libavfilter/vf_random.c             |   1 +
 libavfilter/vf_readeia608.c         |   1 +
 libavfilter/vf_readvitc.c           |   1 +
 libavfilter/vf_removegrain.c        |   1 +
 libavfilter/vf_removelogo.c         |   1 +
 libavfilter/vf_sab.c                |   1 +
 libavfilter/vf_scale_vaapi.c        |   1 +
 libavfilter/vf_scale_vulkan.c       |   1 +
 libavfilter/vf_scroll.c             |   1 +
 libavfilter/vf_selectivecolor.c     |   1 +
 libavfilter/vf_setparams.c          |   1 +
 libavfilter/vf_shear.c              |   1 +
 libavfilter/vf_showpalette.c        |   1 +
 libavfilter/vf_shuffleframes.c      |   1 +
 libavfilter/vf_shufflepixels.c      |   1 +
 libavfilter/vf_shuffleplanes.c      |   1 +
 libavfilter/vf_siti.c               |   1 +
 libavfilter/vf_smartblur.c          |   1 +
 libavfilter/vf_spp.c                |   2 +
 libavfilter/vf_sr.c                 |   1 +
 libavfilter/vf_subtitles.c          |   2 +
 libavfilter/vf_super2xsai.c         |   1 +
 libavfilter/vf_swapuv.c             |   1 +
 libavfilter/vf_thumbnail.c          |   1 +
 libavfilter/vf_tiltandshift.c       |   1 +
 libavfilter/vf_tmidequalizer.c      |   1 +
 libavfilter/vf_tonemap.c            |   1 +
 libavfilter/vf_tonemap_opencl.c     |   1 +
 libavfilter/vf_tonemap_vaapi.c      |   1 +
 libavfilter/vf_transpose.c          |   1 +
 libavfilter/vf_unsharp.c            |   1 +
 libavfilter/vf_unsharp_opencl.c     |   1 +
 libavfilter/vf_uspp.c               |   2 +
 libavfilter/vf_v360.c               |   1 +
 libavfilter/vf_vaguedenoiser.c      |   1 +
 libavfilter/vf_vectorscope.c        |   1 +
 libavfilter/vf_vflip.c              |   1 +
 libavfilter/vf_vfrdet.c             |   2 +
 libavfilter/vf_vibrance.c           |   1 +
 libavfilter/vf_vidstabtransform.c   |   1 +
 libavfilter/vf_vmafmotion.c         |   1 +
 libavfilter/vf_waveform.c           |   1 +
 libavfilter/vf_xbr.c                |   2 +
 libavfilter/vf_yadif.c              |   1 +
 libavfilter/vf_yaepblur.c           |   1 +
 libavfilter/vf_zscale.c             |   1 +
 libavfilter/video.c                 |   1 +
 libavfilter/video.h                 |   2 +-
 libavfilter/vsink_nullsink.c        |   1 +
 229 files changed, 536 insertions(+), 294 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/af_acontrast.c b/libavfilter/af_acontrast.c
index 1fcbad8782..e520b1b66b 100644
--- a/libavfilter/af_acontrast.c
+++ b/libavfilter/af_acontrast.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 typedef struct AudioContrastContext {
     const AVClass *class;
diff --git a/libavfilter/af_acopy.c b/libavfilter/af_acopy.c
index f65f04d461..62faa9004c 100644
--- a/libavfilter/af_acopy.c
+++ b/libavfilter/af_acopy.c
@@ -18,6 +18,7 @@ 
 
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 static int filter_frame(AVFilterLink *inlink, AVFrame *in)
diff --git a/libavfilter/af_acrusher.c b/libavfilter/af_acrusher.c
index 48d7029b05..7c1f8706aa 100644
--- a/libavfilter/af_acrusher.c
+++ b/libavfilter/af_acrusher.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "audio.h"
 
diff --git a/libavfilter/af_adecorrelate.c b/libavfilter/af_adecorrelate.c
index 7216c3fc83..5cde9e7e18 100644
--- a/libavfilter/af_adecorrelate.c
+++ b/libavfilter/af_adecorrelate.c
@@ -27,6 +27,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 #define MAX_STAGES 16
 #define FILTER_FC  1100.0
diff --git a/libavfilter/af_adenorm.c b/libavfilter/af_adenorm.c
index f5f9039172..4182dd67f5 100644
--- a/libavfilter/af_adenorm.c
+++ b/libavfilter/af_adenorm.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 enum FilterType {
diff --git a/libavfilter/af_aderivative.c b/libavfilter/af_aderivative.c
index 4883972dcf..667bcee50a 100644
--- a/libavfilter/af_aderivative.c
+++ b/libavfilter/af_aderivative.c
@@ -19,6 +19,7 @@ 
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct ADerivativeContext {
diff --git a/libavfilter/af_adynamicequalizer.c b/libavfilter/af_adynamicequalizer.c
index 59fdaf99b7..7a102cad22 100644
--- a/libavfilter/af_adynamicequalizer.c
+++ b/libavfilter/af_adynamicequalizer.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "formats.h"
 
 enum DetectionModes {
diff --git a/libavfilter/af_adynamicsmooth.c b/libavfilter/af_adynamicsmooth.c
index 8afe592226..a0276616ca 100644
--- a/libavfilter/af_adynamicsmooth.c
+++ b/libavfilter/af_adynamicsmooth.c
@@ -20,6 +20,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 typedef struct AudioDynamicSmoothContext {
     const AVClass *class;
diff --git a/libavfilter/af_aemphasis.c b/libavfilter/af_aemphasis.c
index d808eec1ca..58931ad92b 100644
--- a/libavfilter/af_aemphasis.c
+++ b/libavfilter/af_aemphasis.c
@@ -20,6 +20,7 @@ 
 
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "audio.h"
 
diff --git a/libavfilter/af_aexciter.c b/libavfilter/af_aexciter.c
index 1f1639d24c..76a191dd87 100644
--- a/libavfilter/af_aexciter.c
+++ b/libavfilter/af_aexciter.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "audio.h"
 
diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c
index 8a3bdee7f8..6e0f88dbb0 100644
--- a/libavfilter/af_aformat.c
+++ b/libavfilter/af_aformat.c
@@ -30,6 +30,7 @@ 
 
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 
diff --git a/libavfilter/af_afreqshift.c b/libavfilter/af_afreqshift.c
index 9a6cfd2fc1..fa93eed995 100644
--- a/libavfilter/af_afreqshift.c
+++ b/libavfilter/af_afreqshift.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 #define MAX_NB_COEFFS 16
 
diff --git a/libavfilter/af_alimiter.c b/libavfilter/af_alimiter.c
index 6ccce2d7de..0150fd2d86 100644
--- a/libavfilter/af_alimiter.c
+++ b/libavfilter/af_alimiter.c
@@ -32,6 +32,7 @@ 
 
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct MetaItem {
diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c
index b85190db34..f50d0a034a 100644
--- a/libavfilter/af_anequalizer.c
+++ b/libavfilter/af_anequalizer.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "audio.h"
diff --git a/libavfilter/af_anull.c b/libavfilter/af_anull.c
index 257dba1a41..3ff45aa40f 100644
--- a/libavfilter/af_anull.c
+++ b/libavfilter/af_anull.c
@@ -24,6 +24,7 @@ 
 
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "libavutil/internal.h"
 
diff --git a/libavfilter/af_aphaser.c b/libavfilter/af_aphaser.c
index f3334aa2c4..7ed7d53bff 100644
--- a/libavfilter/af_aphaser.c
+++ b/libavfilter/af_aphaser.c
@@ -28,6 +28,7 @@ 
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "generate_wave_table.h"
 
diff --git a/libavfilter/af_apulsator.c b/libavfilter/af_apulsator.c
index e471936d16..6774e90607 100644
--- a/libavfilter/af_apulsator.c
+++ b/libavfilter/af_apulsator.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/channel_layout.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "audio.h"
diff --git a/libavfilter/af_asetrate.c b/libavfilter/af_asetrate.c
index 50ccfc91b9..7510fc7c31 100644
--- a/libavfilter/af_asetrate.c
+++ b/libavfilter/af_asetrate.c
@@ -20,6 +20,7 @@ 
 
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 
diff --git a/libavfilter/af_asoftclip.c b/libavfilter/af_asoftclip.c
index e6483c439c..232ed05c01 100644
--- a/libavfilter/af_asoftclip.c
+++ b/libavfilter/af_asoftclip.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 #define MAX_OVERSAMPLE 64
 
diff --git a/libavfilter/af_asr.c b/libavfilter/af_asr.c
index 9d3c88f2a0..dd95745179 100644
--- a/libavfilter/af_asr.c
+++ b/libavfilter/af_asr.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 
diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c
index c7e7c11b7d..dcdeff175d 100644
--- a/libavfilter/af_astats.c
+++ b/libavfilter/af_astats.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 #define HISTOGRAM_SIZE                  8192
diff --git a/libavfilter/af_asubboost.c b/libavfilter/af_asubboost.c
index f559895418..5698f50287 100644
--- a/libavfilter/af_asubboost.c
+++ b/libavfilter/af_asubboost.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 typedef struct ASubBoostContext {
     const AVClass *class;
diff --git a/libavfilter/af_asupercut.c b/libavfilter/af_asupercut.c
index 848388c520..76e9d4b969 100644
--- a/libavfilter/af_asupercut.c
+++ b/libavfilter/af_asupercut.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 typedef struct BiquadCoeffs {
     double a1, a2;
diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c
index 3658348c45..c3f87db05e 100644
--- a/libavfilter/af_atempo.c
+++ b/libavfilter/af_atempo.c
@@ -47,6 +47,7 @@ 
 #include "libavutil/tx.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "internal.h"
 
 /**
diff --git a/libavfilter/af_atilt.c b/libavfilter/af_atilt.c
index 172e3259db..c8f4ba1e94 100644
--- a/libavfilter/af_atilt.c
+++ b/libavfilter/af_atilt.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 #define MAX_ORDER 30
 
diff --git a/libavfilter/af_bs2b.c b/libavfilter/af_bs2b.c
index ebd50d4d77..e8c1a6ab88 100644
--- a/libavfilter/af_bs2b.c
+++ b/libavfilter/af_bs2b.c
@@ -29,6 +29,7 @@ 
 
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index 0429490d9f..4c7c269ae7 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -35,6 +35,7 @@ 
 
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 
diff --git a/libavfilter/af_chorus.c b/libavfilter/af_chorus.c
index 72dc8915d7..a53977b417 100644
--- a/libavfilter/af_chorus.c
+++ b/libavfilter/af_chorus.c
@@ -34,6 +34,7 @@ 
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "generate_wave_table.h"
 
diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c
index 880ee6241a..527b2260b4 100644
--- a/libavfilter/af_compand.c
+++ b/libavfilter/af_compand.c
@@ -35,6 +35,7 @@ 
 #include "libavutil/samplefmt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct ChanParam {
diff --git a/libavfilter/af_compensationdelay.c b/libavfilter/af_compensationdelay.c
index 924ccefe94..1236a6ae8c 100644
--- a/libavfilter/af_compensationdelay.c
+++ b/libavfilter/af_compensationdelay.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/samplefmt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct CompensationDelayContext {
diff --git a/libavfilter/af_crystalizer.c b/libavfilter/af_crystalizer.c
index 01cdf8bd63..f7f4b063bf 100644
--- a/libavfilter/af_crystalizer.c
+++ b/libavfilter/af_crystalizer.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 typedef struct CrystalizerContext {
     const AVClass *class;
diff --git a/libavfilter/af_dcshift.c b/libavfilter/af_dcshift.c
index 3e9ba7e528..784bba0fe0 100644
--- a/libavfilter/af_dcshift.c
+++ b/libavfilter/af_dcshift.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/samplefmt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct DCShiftContext {
diff --git a/libavfilter/af_deesser.c b/libavfilter/af_deesser.c
index 917ef2f43f..b5fad9789b 100644
--- a/libavfilter/af_deesser.c
+++ b/libavfilter/af_deesser.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 
 typedef struct DeesserChannel {
     double s1, s2, s3;
diff --git a/libavfilter/af_drmeter.c b/libavfilter/af_drmeter.c
index 0decc0fde6..3292736a9a 100644
--- a/libavfilter/af_drmeter.c
+++ b/libavfilter/af_drmeter.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 #define BINS 32768
diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c
index 38ff9c1f3f..cd19ac421e 100644
--- a/libavfilter/af_earwax.c
+++ b/libavfilter/af_earwax.c
@@ -32,6 +32,7 @@ 
 #include "libavutil/channel_layout.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "formats.h"
 
 #define NUMTAPS 32
diff --git a/libavfilter/af_extrastereo.c b/libavfilter/af_extrastereo.c
index 2b1b09f9c2..6563b39402 100644
--- a/libavfilter/af_extrastereo.c
+++ b/libavfilter/af_extrastereo.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "formats.h"
 
 typedef struct ExtraStereoContext {
diff --git a/libavfilter/af_flanger.c b/libavfilter/af_flanger.c
index 381cf96649..add1e9e9ad 100644
--- a/libavfilter/af_flanger.c
+++ b/libavfilter/af_flanger.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/samplefmt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "internal.h"
 #include "generate_wave_table.h"
 
diff --git a/libavfilter/af_haas.c b/libavfilter/af_haas.c
index 753a3505e5..6385b328e4 100644
--- a/libavfilter/af_haas.c
+++ b/libavfilter/af_haas.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "formats.h"
 
 #define MAX_HAAS_DELAY 40
diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
index 27f35dd196..90831d5b2a 100644
--- a/libavfilter/af_hdcd.c
+++ b/libavfilter/af_hdcd.c
@@ -47,6 +47,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/avassert.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "audio.h"
diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index 547e91979d..cb90b8f5ae 100644
--- a/libavfilter/af_ladspa.c
+++ b/libavfilter/af_ladspa.c
@@ -34,6 +34,7 @@ 
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 
diff --git a/libavfilter/af_mcompand.c b/libavfilter/af_mcompand.c
index e63820efce..60b21c12dc 100644
--- a/libavfilter/af_mcompand.c
+++ b/libavfilter/af_mcompand.c
@@ -35,6 +35,7 @@ 
 #include "libavutil/samplefmt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct CompandSegment {
diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index da32977c99..501cb4b7fa 100644
--- a/libavfilter/af_pan.c
+++ b/libavfilter/af_pan.c
@@ -35,6 +35,7 @@ 
 #include "libswresample/swresample.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 
diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c
index 1d2bf03f72..a481f40dfa 100644
--- a/libavfilter/af_silencedetect.c
+++ b/libavfilter/af_silencedetect.c
@@ -30,6 +30,7 @@ 
 #include "libavutil/timestamp.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct SilenceDetectContext {
diff --git a/libavfilter/af_stereotools.c b/libavfilter/af_stereotools.c
index 70d14ebe17..934c5d33aa 100644
--- a/libavfilter/af_stereotools.c
+++ b/libavfilter/af_stereotools.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "formats.h"
 
 typedef struct StereoToolsContext {
diff --git a/libavfilter/af_stereowiden.c b/libavfilter/af_stereowiden.c
index 96d77cd2ac..6718bb39a5 100644
--- a/libavfilter/af_stereowiden.c
+++ b/libavfilter/af_stereowiden.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "audio.h"
+#include "filters.h"
 #include "formats.h"
 
 typedef struct StereoWidenContext {
diff --git a/libavfilter/af_tremolo.c b/libavfilter/af_tremolo.c
index 30e35935b4..ae2ba77a37 100644
--- a/libavfilter/af_tremolo.c
+++ b/libavfilter/af_tremolo.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "audio.h"
 
diff --git a/libavfilter/af_vibrato.c b/libavfilter/af_vibrato.c
index 3d709d561e..a135490df8 100644
--- a/libavfilter/af_vibrato.c
+++ b/libavfilter/af_vibrato.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "audio.h"
 #include "generate_wave_table.h"
diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c
index 8b001d1cf2..a2cf5db637 100644
--- a/libavfilter/af_volumedetect.c
+++ b/libavfilter/af_volumedetect.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/avassert.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct VolDetectContext {
diff --git a/libavfilter/asink_anullsink.c b/libavfilter/asink_anullsink.c
index 64a733e165..162f951d23 100644
--- a/libavfilter/asink_anullsink.c
+++ b/libavfilter/asink_anullsink.c
@@ -20,6 +20,7 @@ 
 
 #include "libavutil/internal.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 static int null_filter_frame(AVFilterLink *link, AVFrame *frame)
diff --git a/libavfilter/audio.c b/libavfilter/audio.c
index 22f64d1733..1768b31184 100644
--- a/libavfilter/audio.c
+++ b/libavfilter/audio.c
@@ -27,6 +27,7 @@ 
 #include "audio.h"
 #include "avfilter.h"
 #include "avfilter_internal.h"
+#include "filters.h"
 #include "framepool.h"
 #include "internal.h"
 
diff --git a/libavfilter/audio.h b/libavfilter/audio.h
index be90fa347b..aab80baa50 100644
--- a/libavfilter/audio.h
+++ b/libavfilter/audio.h
@@ -23,7 +23,7 @@ 
 #define AVFILTER_AUDIO_H
 
 #include "avfilter.h"
-#include "internal.h"
+#include "filters.h"
 
 /**
  * An AVFilterPad array whose only entry has name "default"
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 6bfcc42430..0da2f8462b 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -36,6 +36,7 @@ 
 #include "avfilter.h"
 #include "avfilter_internal.h"
 #include "buffersink.h"
+#include "filters.h"
 #include "formats.h"
 #include "framequeue.h"
 #include "internal.h"
diff --git a/libavfilter/dnn/dnn_interface.c b/libavfilter/dnn/dnn_interface.c
index 8dec3b671a..abd07d8de1 100644
--- a/libavfilter/dnn/dnn_interface.c
+++ b/libavfilter/dnn/dnn_interface.c
@@ -27,6 +27,8 @@ 
 #include "libavutil/avassert.h"
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
+
+#include "libavfilter/filters.h"
 #include "libavfilter/internal.h"
 
 extern const DNNModule ff_dnn_backend_openvino;
diff --git a/libavfilter/f_bench.c b/libavfilter/f_bench.c
index a9bcd2149c..0e60b40c43 100644
--- a/libavfilter/f_bench.c
+++ b/libavfilter/f_bench.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/time.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/f_realtime.c b/libavfilter/f_realtime.c
index 83793bbe15..319be8dd10 100644
--- a/libavfilter/f_realtime.c
+++ b/libavfilter/f_realtime.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/time.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include <float.h>
diff --git a/libavfilter/f_reverse.c b/libavfilter/f_reverse.c
index 71ef30f9b5..0eee7c2588 100644
--- a/libavfilter/f_reverse.c
+++ b/libavfilter/f_reverse.c
@@ -22,6 +22,7 @@ 
 
 #include "libavutil/mem.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 #define DEFAULT_LENGTH 300
diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c
index 616fd0750c..2d0c080c3e 100644
--- a/libavfilter/f_sidedata.c
+++ b/libavfilter/f_sidedata.c
@@ -29,6 +29,7 @@ 
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c
index 03c6c65c93..aa5c692b62 100644
--- a/libavfilter/f_zmq.c
+++ b/libavfilter/f_zmq.c
@@ -30,6 +30,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "audio.h"
 #include "video.h"
diff --git a/libavfilter/filters.h b/libavfilter/filters.h
index ab16047e12..e78029a1b7 100644
--- a/libavfilter/filters.h
+++ b/libavfilter/filters.h
@@ -33,6 +33,92 @@ 
  */
 #define FFERROR_NOT_READY FFERRTAG('N','R','D','Y')
 
+/**
+ * A filter pad used for either input or output.
+ */
+struct AVFilterPad {
+    /**
+     * Pad name. The name is unique among inputs and among outputs, but an
+     * input may have the same name as an output. This may be NULL if this
+     * pad has no need to ever be referenced by name.
+     */
+    const char *name;
+
+    /**
+     * AVFilterPad type.
+     */
+    enum AVMediaType type;
+
+    /**
+     * The filter expects writable frames from its input link,
+     * duplicating data buffers if needed.
+     *
+     * input pads only.
+     */
+#define AVFILTERPAD_FLAG_NEEDS_WRITABLE                  (1 << 0)
+
+    /**
+     * The pad's name is allocated and should be freed generically.
+     */
+#define AVFILTERPAD_FLAG_FREE_NAME                       (1 << 1)
+
+    /**
+     * A combination of AVFILTERPAD_FLAG_* flags.
+     */
+    int flags;
+
+    /**
+     * Callback functions to get a video/audio buffers. If NULL,
+     * the filter system will use ff_default_get_video_buffer() for video
+     * and ff_default_get_audio_buffer() for audio.
+     *
+     * The state of the union is determined by type.
+     *
+     * Input pads only.
+     */
+    union {
+        AVFrame *(*video)(AVFilterLink *link, int w, int h);
+        AVFrame *(*audio)(AVFilterLink *link, int nb_samples);
+    } get_buffer;
+
+    /**
+     * Filtering callback. This is where a filter receives a frame with
+     * audio/video data and should do its processing.
+     *
+     * Input pads only.
+     *
+     * @return >= 0 on success, a negative AVERROR on error. This function
+     * must ensure that frame is properly unreferenced on error if it
+     * hasn't been passed on to another filter.
+     */
+    int (*filter_frame)(AVFilterLink *link, AVFrame *frame);
+
+    /**
+     * Frame request callback. A call to this should result in some progress
+     * towards producing output over the given link. This should return zero
+     * on success, and another value on error.
+     *
+     * Output pads only.
+     */
+    int (*request_frame)(AVFilterLink *link);
+
+    /**
+     * Link configuration callback.
+     *
+     * For output pads, this should set the link properties such as
+     * width/height. This should NOT set the format property - that is
+     * negotiated between filters by the filter system using the
+     * query_formats() callback before this function is called.
+     *
+     * For input pads, this should check the properties of the link, and update
+     * the filter's internal state as necessary.
+     *
+     * For both input and output filters, this should return zero on success,
+     * and another value on error.
+     */
+    int (*config_props)(AVFilterLink *link);
+};
+
 /**
  * Link properties exposed to filter code, but not external callers.
  *
@@ -114,6 +200,98 @@  static inline FilterLink* ff_filter_link(AVFilterLink *link)
     return (FilterLink*)link;
 }
 
+typedef struct FFFilterContext {
+    /**
+     * The public AVFilterContext. See avfilter.h for it.
+     */
+    AVFilterContext p;
+
+    avfilter_execute_func *execute;
+
+    // 1 when avfilter_init_*() was successfully called on this filter
+    // 0 otherwise
+    int initialized;
+} FFFilterContext;
+
+static inline FFFilterContext *fffilterctx(AVFilterContext *ctx)
+{
+    return (FFFilterContext*)ctx;
+}
+
+/**
+ * The filter is aware of hardware frames, and any hardware frame context
+ * should not be automatically propagated through it.
+ */
+#define FF_FILTER_FLAG_HWFRAME_AWARE (1 << 0)
+
+/**
+ * Find the index of a link.
+ *
+ * I.e. find i such that link == ctx->(in|out)puts[i]
+ */
+#define FF_INLINK_IDX(link)  ((int)((link)->dstpad - (link)->dst->input_pads))
+#define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads))
+
+enum FilterFormatsState {
+    /**
+     * The default value meaning that this filter supports all formats
+     * and (for audio) sample rates and channel layouts/counts as long
+     * as these properties agree for all inputs and outputs.
+     * This state is only allowed in case all inputs and outputs actually
+     * have the same type.
+     * The union is unused in this state.
+     *
+     * This value must always be zero (for default static initialization).
+     */
+    FF_FILTER_FORMATS_PASSTHROUGH = 0,
+    FF_FILTER_FORMATS_QUERY_FUNC,       ///< formats.query active.
+    FF_FILTER_FORMATS_PIXFMT_LIST,      ///< formats.pixels_list active.
+    FF_FILTER_FORMATS_SAMPLEFMTS_LIST,  ///< formats.samples_list active.
+    FF_FILTER_FORMATS_SINGLE_PIXFMT,    ///< formats.pix_fmt active
+    FF_FILTER_FORMATS_SINGLE_SAMPLEFMT, ///< formats.sample_fmt active.
+};
+
+#define FILTER_QUERY_FUNC(func)        \
+        .formats.query_func   = func,  \
+        .formats_state        = FF_FILTER_FORMATS_QUERY_FUNC
+#define FILTER_PIXFMTS_ARRAY(array)    \
+        .formats.pixels_list  = array, \
+        .formats_state        = FF_FILTER_FORMATS_PIXFMT_LIST
+#define FILTER_SAMPLEFMTS_ARRAY(array) \
+        .formats.samples_list = array, \
+        .formats_state        = FF_FILTER_FORMATS_SAMPLEFMTS_LIST
+#define FILTER_PIXFMTS(...)            \
+    FILTER_PIXFMTS_ARRAY(((const enum AVPixelFormat []) { __VA_ARGS__, AV_PIX_FMT_NONE }))
+#define FILTER_SAMPLEFMTS(...)         \
+    FILTER_SAMPLEFMTS_ARRAY(((const enum AVSampleFormat[]) { __VA_ARGS__, AV_SAMPLE_FMT_NONE }))
+#define FILTER_SINGLE_PIXFMT(pix_fmt_)  \
+        .formats.pix_fmt = pix_fmt_,    \
+        .formats_state   = FF_FILTER_FORMATS_SINGLE_PIXFMT
+#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_) \
+        .formats.sample_fmt = sample_fmt_,   \
+        .formats_state      = FF_FILTER_FORMATS_SINGLE_SAMPLEFMT
+
+#define FILTER_INOUTPADS(inout, array) \
+       .inout        = array, \
+       .nb_ ## inout = FF_ARRAY_ELEMS(array)
+#define FILTER_INPUTS(array) FILTER_INOUTPADS(inputs, (array))
+#define FILTER_OUTPUTS(array) FILTER_INOUTPADS(outputs, (array))
+
+#define AVFILTER_DEFINE_CLASS_EXT(name, desc, options) \
+    static const AVClass name##_class = {       \
+        .class_name = desc,                     \
+        .item_name  = av_default_item_name,     \
+        .option     = options,                  \
+        .version    = LIBAVUTIL_VERSION_INT,    \
+        .category   = AV_CLASS_CATEGORY_FILTER, \
+    }
+#define AVFILTER_DEFINE_CLASS(fname) \
+    AVFILTER_DEFINE_CLASS_EXT(fname, #fname, fname##_options)
+
+#define D2TS(d)      (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d))
+#define TS2D(ts)     ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))
+#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb))
+
 /**
  * Mark a filter ready and schedule it for activation.
  *
@@ -257,6 +435,15 @@  int ff_outlink_frame_wanted(AVFilterLink *link);
  */
 int ff_outlink_get_status(AVFilterLink *link);
 
+/**
+ * Set the status field of a link from the source filter.
+ * The pts should reflect the timestamp of the status change,
+ * in link time base and relative to the frames timeline.
+ * In particular, for AVERROR_EOF, it should reflect the
+ * end time of the last frame.
+ */
+void ff_avfilter_link_set_in_status(AVFilterLink *link, int status, int64_t pts);
+
 /**
  * Set the status field of a link from the source filter.
  * The pts should reflect the timestamp of the status change,
@@ -344,4 +531,109 @@  static inline void ff_outlink_set_status(AVFilterLink *link, int status, int64_t
  */
 int ff_inoutlink_check_flow(AVFilterLink *inlink, AVFilterLink *outlink);
 
+/**
+ * Perform any additional setup required for hardware frames.
+ *
+ * link->hw_frames_ctx must be set before calling this function.
+ * Inside link->hw_frames_ctx, the fields format, sw_format, width and
+ * height must be set.  If dynamically allocated pools are not supported,
+ * then initial_pool_size must also be set, to the minimum hardware frame
+ * pool size necessary for the filter to work (taking into account any
+ * frames which need to stored for use in operations as appropriate).  If
+ * default_pool_size is nonzero, then it will be used as the pool size if
+ * no other modification takes place (this can be used to preserve
+ * compatibility).
+ */
+int ff_filter_init_hw_frames(AVFilterContext *avctx, AVFilterLink *link,
+                             int default_pool_size);
+
+/**
+ * Generic processing of user supplied commands that are set
+ * in the same way as the filter options.
+ * NOTE: 'enable' option is handled separately, and not by
+ * this function.
+ */
+int ff_filter_process_command(AVFilterContext *ctx, const char *cmd,
+                              const char *arg, char *res, int res_len, int flags);
+
+/**
+ * Get number of threads for current filter instance.
+ * This number is always same or less than graph->nb_threads.
+ */
+int ff_filter_get_nb_threads(AVFilterContext *ctx) av_pure;
+
+/**
+ * Send a frame of data to the next filter.
+ *
+ * @param link   the output link over which the data is being sent
+ * @param frame a reference to the buffer of data being sent. The
+ *              receiving filter will free this reference when it no longer
+ *              needs it or pass it on to the next filter.
+ *
+ * @return >= 0 on success, a negative AVERROR on error. The receiving filter
+ * is responsible for unreferencing frame in case of error.
+ */
+int ff_filter_frame(AVFilterLink *link, AVFrame *frame);
+
+/**
+ * Request an input frame from the filter at the other end of the link.
+ *
+ * This function must not be used by filters using the activate callback,
+ * use ff_link_set_frame_wanted() instead.
+ *
+ * The input filter may pass the request on to its inputs, fulfill the
+ * request from an internal buffer or any other means specific to its function.
+ *
+ * When the end of a stream is reached AVERROR_EOF is returned and no further
+ * frames are returned after that.
+ *
+ * When a filter is unable to output a frame for example due to its sources
+ * being unable to do so or because it depends on external means pushing data
+ * into it then AVERROR(EAGAIN) is returned.
+ * It is important that a AVERROR(EAGAIN) return is returned all the way to the
+ * caller (generally eventually a user application) as this step may (but does
+ * not have to be) necessary to provide the input with the next frame.
+ *
+ * If a request is successful then some progress has been made towards
+ * providing a frame on the link (through ff_filter_frame()). A filter that
+ * needs several frames to produce one is allowed to return success if one
+ * more frame has been processed but no output has been produced yet. A
+ * filter is also allowed to simply forward a success return value.
+ *
+ * @param link the input link
+ * @return     zero on success
+ *             AVERROR_EOF on end of file
+ *             AVERROR(EAGAIN) if the previous filter cannot output a frame
+ *             currently and can neither guarantee that EOF has been reached.
+ */
+int ff_request_frame(AVFilterLink *link);
+
+/**
+ * Append a new input/output pad to the filter's list of such pads.
+ *
+ * The *_free_name versions will set the AVFILTERPAD_FLAG_FREE_NAME flag
+ * ensuring that the name will be freed generically (even on insertion error).
+ */
+int ff_append_inpad (AVFilterContext *f, AVFilterPad *p);
+int ff_append_outpad(AVFilterContext *f, AVFilterPad *p);
+int ff_append_inpad_free_name (AVFilterContext *f, AVFilterPad *p);
+int ff_append_outpad_free_name(AVFilterContext *f, AVFilterPad *p);
+
+/**
+ * Tell if an integer is contained in the provided -1-terminated list of integers.
+ * This is useful for determining (for instance) if an AVPixelFormat is in an
+ * array of supported formats.
+ *
+ * @param fmt provided format
+ * @param fmts -1-terminated list of formats
+ * @return 1 if present, 0 if absent
+ */
+int ff_fmt_is_in(int fmt, const int *fmts);
+
+static av_always_inline int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func,
+                                              void *arg, int *ret, int nb_jobs)
+{
+    return fffilterctx(ctx)->execute(ctx, func, arg, ret, nb_jobs);
+}
+
 #endif /* AVFILTER_FILTERS_H */
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 857f93113d..15099ac545 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "formats.h"
 
diff --git a/libavfilter/graphdump.c b/libavfilter/graphdump.c
index 20370f360f..a13f6981d0 100644
--- a/libavfilter/graphdump.c
+++ b/libavfilter/graphdump.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 static int print_link_prop(AVBPrint *buf, AVFilterLink *link)
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 5d6dcdb9d3..81267364bd 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -30,6 +30,7 @@ 
 
 #include "avfilter.h"
 #include "avfilter_internal.h"
+#include "filters.h"
 #include "internal.h"
 
 #define WHITESPACES " \n\t\r"
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 000f94cb16..4938612593 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -27,172 +27,6 @@ 
 #include "libavutil/internal.h"
 #include "avfilter.h"
 
-/**
- * A filter pad used for either input or output.
- */
-struct AVFilterPad {
-    /**
-     * Pad name. The name is unique among inputs and among outputs, but an
-     * input may have the same name as an output. This may be NULL if this
-     * pad has no need to ever be referenced by name.
-     */
-    const char *name;
-
-    /**
-     * AVFilterPad type.
-     */
-    enum AVMediaType type;
-
-    /**
-     * The filter expects writable frames from its input link,
-     * duplicating data buffers if needed.
-     *
-     * input pads only.
-     */
-#define AVFILTERPAD_FLAG_NEEDS_WRITABLE                  (1 << 0)
-
-    /**
-     * The pad's name is allocated and should be freed generically.
-     */
-#define AVFILTERPAD_FLAG_FREE_NAME                       (1 << 1)
-
-    /**
-     * A combination of AVFILTERPAD_FLAG_* flags.
-     */
-    int flags;
-
-    /**
-     * Callback functions to get a video/audio buffers. If NULL,
-     * the filter system will use ff_default_get_video_buffer() for video
-     * and ff_default_get_audio_buffer() for audio.
-     *
-     * The state of the union is determined by type.
-     *
-     * Input pads only.
-     */
-    union {
-        AVFrame *(*video)(AVFilterLink *link, int w, int h);
-        AVFrame *(*audio)(AVFilterLink *link, int nb_samples);
-    } get_buffer;
-
-    /**
-     * Filtering callback. This is where a filter receives a frame with
-     * audio/video data and should do its processing.
-     *
-     * Input pads only.
-     *
-     * @return >= 0 on success, a negative AVERROR on error. This function
-     * must ensure that frame is properly unreferenced on error if it
-     * hasn't been passed on to another filter.
-     */
-    int (*filter_frame)(AVFilterLink *link, AVFrame *frame);
-
-    /**
-     * Frame request callback. A call to this should result in some progress
-     * towards producing output over the given link. This should return zero
-     * on success, and another value on error.
-     *
-     * Output pads only.
-     */
-    int (*request_frame)(AVFilterLink *link);
-
-    /**
-     * Link configuration callback.
-     *
-     * For output pads, this should set the link properties such as
-     * width/height. This should NOT set the format property - that is
-     * negotiated between filters by the filter system using the
-     * query_formats() callback before this function is called.
-     *
-     * For input pads, this should check the properties of the link, and update
-     * the filter's internal state as necessary.
-     *
-     * For both input and output filters, this should return zero on success,
-     * and another value on error.
-     */
-    int (*config_props)(AVFilterLink *link);
-};
-
-typedef struct FFFilterContext {
-    /**
-     * The public AVFilterContext. See avfilter.h for it.
-     */
-    AVFilterContext p;
-
-    avfilter_execute_func *execute;
-
-    // 1 when avfilter_init_*() was successfully called on this filter
-    // 0 otherwise
-    int initialized;
-} FFFilterContext;
-
-static inline FFFilterContext *fffilterctx(AVFilterContext *ctx)
-{
-    return (FFFilterContext*)ctx;
-}
-
-static av_always_inline int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func,
-                                              void *arg, int *ret, int nb_jobs)
-{
-    return fffilterctx(ctx)->execute(ctx, func, arg, ret, nb_jobs);
-}
-
-enum FilterFormatsState {
-    /**
-     * The default value meaning that this filter supports all formats
-     * and (for audio) sample rates and channel layouts/counts as long
-     * as these properties agree for all inputs and outputs.
-     * This state is only allowed in case all inputs and outputs actually
-     * have the same type.
-     * The union is unused in this state.
-     *
-     * This value must always be zero (for default static initialization).
-     */
-    FF_FILTER_FORMATS_PASSTHROUGH = 0,
-    FF_FILTER_FORMATS_QUERY_FUNC,       ///< formats.query active.
-    FF_FILTER_FORMATS_PIXFMT_LIST,      ///< formats.pixels_list active.
-    FF_FILTER_FORMATS_SAMPLEFMTS_LIST,  ///< formats.samples_list active.
-    FF_FILTER_FORMATS_SINGLE_PIXFMT,    ///< formats.pix_fmt active
-    FF_FILTER_FORMATS_SINGLE_SAMPLEFMT, ///< formats.sample_fmt active.
-};
-
-#define FILTER_QUERY_FUNC(func)        \
-        .formats.query_func   = func,  \
-        .formats_state        = FF_FILTER_FORMATS_QUERY_FUNC
-#define FILTER_PIXFMTS_ARRAY(array)    \
-        .formats.pixels_list  = array, \
-        .formats_state        = FF_FILTER_FORMATS_PIXFMT_LIST
-#define FILTER_SAMPLEFMTS_ARRAY(array) \
-        .formats.samples_list = array, \
-        .formats_state        = FF_FILTER_FORMATS_SAMPLEFMTS_LIST
-#define FILTER_PIXFMTS(...)            \
-    FILTER_PIXFMTS_ARRAY(((const enum AVPixelFormat []) { __VA_ARGS__, AV_PIX_FMT_NONE }))
-#define FILTER_SAMPLEFMTS(...)         \
-    FILTER_SAMPLEFMTS_ARRAY(((const enum AVSampleFormat[]) { __VA_ARGS__, AV_SAMPLE_FMT_NONE }))
-#define FILTER_SINGLE_PIXFMT(pix_fmt_)  \
-        .formats.pix_fmt = pix_fmt_,    \
-        .formats_state   = FF_FILTER_FORMATS_SINGLE_PIXFMT
-#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_) \
-        .formats.sample_fmt = sample_fmt_,   \
-        .formats_state      = FF_FILTER_FORMATS_SINGLE_SAMPLEFMT
-
-#define FILTER_INOUTPADS(inout, array) \
-       .inout        = array, \
-       .nb_ ## inout = FF_ARRAY_ELEMS(array)
-#define FILTER_INPUTS(array) FILTER_INOUTPADS(inputs, (array))
-#define FILTER_OUTPUTS(array) FILTER_INOUTPADS(outputs, (array))
-
-/**
- * Tell if an integer is contained in the provided -1-terminated list of integers.
- * This is useful for determining (for instance) if an AVPixelFormat is in an
- * array of supported formats.
- *
- * @param fmt provided format
- * @param fmts -1-terminated list of formats
- * @return 1 if present, 0 if absent
- */
-int ff_fmt_is_in(int fmt, const int *fmts);
-
 /**
  * Returns true if a pixel format is "regular YUV", which includes all pixel
  * formats that are affected by YUV colorspace negotiation.
@@ -237,15 +71,6 @@  av_warn_unused_result
 int ff_parse_channel_layout(AVChannelLayout *ret, int *nret, const char *arg,
                             void *log_ctx);
 
-/**
- * Set the status field of a link from the source filter.
- * The pts should reflect the timestamp of the status change,
- * in link time base and relative to the frames timeline.
- * In particular, for AVERROR_EOF, it should reflect the
- * end time of the last frame.
- */
-void ff_avfilter_link_set_in_status(AVFilterLink *link, int status, int64_t pts);
-
 /**
  * Negotiate the media format, dimensions, etc of all inputs to a filter.
  *
@@ -254,10 +79,6 @@  void ff_avfilter_link_set_in_status(AVFilterLink *link, int status, int64_t pts)
  */
 int ff_filter_config_links(AVFilterContext *filter);
 
-#define D2TS(d)      (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d))
-#define TS2D(ts)     ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))
-#define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb))
-
 /* misc trace functions */
 
 #define FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func)
@@ -268,122 +89,9 @@  void ff_tlog_link(void *ctx, AVFilterLink *link, int end);
 #define ff_tlog_link(ctx, link, end) do { } while(0)
 #endif
 
-/**
- * Append a new input/output pad to the filter's list of such pads.
- *
- * The *_free_name versions will set the AVFILTERPAD_FLAG_FREE_NAME flag
- * ensuring that the name will be freed generically (even on insertion error).
- */
-int ff_append_inpad (AVFilterContext *f, AVFilterPad *p);
-int ff_append_outpad(AVFilterContext *f, AVFilterPad *p);
-int ff_append_inpad_free_name (AVFilterContext *f, AVFilterPad *p);
-int ff_append_outpad_free_name(AVFilterContext *f, AVFilterPad *p);
-
-/**
- * Request an input frame from the filter at the other end of the link.
- *
- * This function must not be used by filters using the activate callback,
- * use ff_link_set_frame_wanted() instead.
- *
- * The input filter may pass the request on to its inputs, fulfill the
- * request from an internal buffer or any other means specific to its function.
- *
- * When the end of a stream is reached AVERROR_EOF is returned and no further
- * frames are returned after that.
- *
- * When a filter is unable to output a frame for example due to its sources
- * being unable to do so or because it depends on external means pushing data
- * into it then AVERROR(EAGAIN) is returned.
- * It is important that a AVERROR(EAGAIN) return is returned all the way to the
- * caller (generally eventually a user application) as this step may (but does
- * not have to be) necessary to provide the input with the next frame.
- *
- * If a request is successful then some progress has been made towards
- * providing a frame on the link (through ff_filter_frame()). A filter that
- * needs several frames to produce one is allowed to return success if one
- * more frame has been processed but no output has been produced yet. A
- * filter is also allowed to simply forward a success return value.
- *
- * @param link the input link
- * @return     zero on success
- *             AVERROR_EOF on end of file
- *             AVERROR(EAGAIN) if the previous filter cannot output a frame
- *             currently and can neither guarantee that EOF has been reached.
- */
-int ff_request_frame(AVFilterLink *link);
-
-#define AVFILTER_DEFINE_CLASS_EXT(name, desc, options) \
-    static const AVClass name##_class = {       \
-        .class_name = desc,                     \
-        .item_name  = av_default_item_name,     \
-        .option     = options,                  \
-        .version    = LIBAVUTIL_VERSION_INT,    \
-        .category   = AV_CLASS_CATEGORY_FILTER, \
-    }
-#define AVFILTER_DEFINE_CLASS(fname) \
-    AVFILTER_DEFINE_CLASS_EXT(fname, #fname, fname##_options)
-
-/**
- * Find the index of a link.
- *
- * I.e. find i such that link == ctx->(in|out)puts[i]
- */
-#define FF_INLINK_IDX(link)  ((int)((link)->dstpad - (link)->dst->input_pads))
-#define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads))
-
-/**
- * Send a frame of data to the next filter.
- *
- * @param link   the output link over which the data is being sent
- * @param frame a reference to the buffer of data being sent. The
- *              receiving filter will free this reference when it no longer
- *              needs it or pass it on to the next filter.
- *
- * @return >= 0 on success, a negative AVERROR on error. The receiving filter
- * is responsible for unreferencing frame in case of error.
- */
-int ff_filter_frame(AVFilterLink *link, AVFrame *frame);
-
-/**
- * The filter is aware of hardware frames, and any hardware frame context
- * should not be automatically propagated through it.
- */
-#define FF_FILTER_FLAG_HWFRAME_AWARE (1 << 0)
-
 /**
  * Run one round of processing on a filter graph.
  */
 int ff_filter_graph_run_once(AVFilterGraph *graph);
 
-/**
- * Get number of threads for current filter instance.
- * This number is always same or less than graph->nb_threads.
- */
-int ff_filter_get_nb_threads(AVFilterContext *ctx) av_pure;
-
-/**
- * Generic processing of user supplied commands that are set
- * in the same way as the filter options.
- * NOTE: 'enable' option is handled separately, and not by
- * this function.
- */
-int ff_filter_process_command(AVFilterContext *ctx, const char *cmd,
-                              const char *arg, char *res, int res_len, int flags);
-
-/**
- * Perform any additional setup required for hardware frames.
- *
- * link->hw_frames_ctx must be set before calling this function.
- * Inside link->hw_frames_ctx, the fields format, sw_format, width and
- * height must be set.  If dynamically allocated pools are not supported,
- * then initial_pool_size must also be set, to the minimum hardware frame
- * pool size necessary for the filter to work (taking into account any
- * frames which need to stored for use in operations as appropriate).  If
- * default_pool_size is nonzero, then it will be used as the pool size if
- * no other modification takes place (this can be used to preserve
- * compatibility).
- */
-int ff_filter_init_hw_frames(AVFilterContext *avctx, AVFilterLink *link,
-                             int default_pool_size);
-
 #endif /* AVFILTER_INTERNAL_H */
diff --git a/libavfilter/vf_addroi.c b/libavfilter/vf_addroi.c
index e7ad916214..a07be2b426 100644
--- a/libavfilter/vf_addroi.c
+++ b/libavfilter/vf_addroi.c
@@ -20,6 +20,7 @@ 
 #include "libavutil/eval.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_amplify.c b/libavfilter/vf_amplify.c
index 7f2cf81150..0c0e15bde4 100644
--- a/libavfilter/vf_amplify.c
+++ b/libavfilter/vf_amplify.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index 129ae19d6d..e43a1c7c89 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -35,6 +35,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c
index da132db1b6..81ca644575 100644
--- a/libavfilter/vf_atadenoise.c
+++ b/libavfilter/vf_atadenoise.c
@@ -34,6 +34,7 @@ 
 #include "bufferqueue.h"
 
 #include "atadenoise.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c
index cbaeb974e5..b51c19dd79 100644
--- a/libavfilter/vf_avgblur.c
+++ b/libavfilter/vf_avgblur.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_avgblur_opencl.c b/libavfilter/vf_avgblur_opencl.c
index ad68b8be38..07be4b574c 100644
--- a/libavfilter/vf_avgblur_opencl.c
+++ b/libavfilter/vf_avgblur_opencl.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/opt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "opencl.h"
 #include "opencl_source.h"
diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c
index 6bc1b616a6..7599f251b0 100644
--- a/libavfilter/vf_avgblur_vulkan.c
+++ b/libavfilter/vf_avgblur_vulkan.c
@@ -22,6 +22,8 @@ 
 #include "libavutil/opt.h"
 #include "vulkan_filter.h"
 #include "vulkan_spirv.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_backgroundkey.c b/libavfilter/vf_backgroundkey.c
index 54f7621a10..444ec30600 100644
--- a/libavfilter/vf_backgroundkey.c
+++ b/libavfilter/vf_backgroundkey.c
@@ -20,6 +20,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c
index 3fe7e69b9f..010c291dfc 100644
--- a/libavfilter/vf_bilateral.c
+++ b/libavfilter/vf_bilateral.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_bitplanenoise.c b/libavfilter/vf_bitplanenoise.c
index 32235ff230..92ba1aa49b 100644
--- a/libavfilter/vf_bitplanenoise.c
+++ b/libavfilter/vf_bitplanenoise.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c
index 10062c995c..8d945f89a1 100644
--- a/libavfilter/vf_blackframe.c
+++ b/libavfilter/vf_blackframe.c
@@ -33,6 +33,7 @@ 
 #include "libavutil/internal.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c
index 669b32afd8..0a1920b12b 100644
--- a/libavfilter/vf_boxblur.c
+++ b/libavfilter/vf_boxblur.c
@@ -29,6 +29,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
index b8759d8243..7b6557b2a9 100644
--- a/libavfilter/vf_bwdif.c
+++ b/libavfilter/vf_bwdif.c
@@ -34,6 +34,7 @@ 
 #include "avfilter.h"
 #include "bwdifdsp.h"
 #include "ccfifo.h"
+#include "filters.h"
 #include "internal.h"
 #include "yadif.h"
 
diff --git a/libavfilter/vf_cas.c b/libavfilter/vf_cas.c
index 5fa5055d76..ed5e8fec34 100644
--- a/libavfilter/vf_cas.c
+++ b/libavfilter/vf_cas.c
@@ -19,6 +19,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/imgutils.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_chromaber_vulkan.c b/libavfilter/vf_chromaber_vulkan.c
index 0b96a7400f..39be1feb8c 100644
--- a/libavfilter/vf_chromaber_vulkan.c
+++ b/libavfilter/vf_chromaber_vulkan.c
@@ -22,6 +22,8 @@ 
 #include "libavutil/opt.h"
 #include "vulkan_filter.h"
 #include "vulkan_spirv.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_chromakey.c b/libavfilter/vf_chromakey.c
index 9c0918bb4d..5671cf2ae8 100644
--- a/libavfilter/vf_chromakey.c
+++ b/libavfilter/vf_chromakey.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/intreadwrite.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct ChromakeyContext {
diff --git a/libavfilter/vf_chromanr.c b/libavfilter/vf_chromanr.c
index ff77313311..ddf3ce30ca 100644
--- a/libavfilter/vf_chromanr.c
+++ b/libavfilter/vf_chromanr.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c
index 6c929472a7..ea07ac071f 100644
--- a/libavfilter/vf_chromashift.c
+++ b/libavfilter/vf_chromashift.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c
index d5f33a530e..3eed4b22fc 100644
--- a/libavfilter/vf_ciescope.c
+++ b/libavfilter/vf_ciescope.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/parseutils.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c
index 3cbe3ee2bd..bd82624d87 100644
--- a/libavfilter/vf_codecview.c
+++ b/libavfilter/vf_codecview.c
@@ -35,6 +35,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/video_enc_params.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "qp_table.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c
index 676e74c770..8561763a85 100644
--- a/libavfilter/vf_colorbalance.c
+++ b/libavfilter/vf_colorbalance.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_colorchannelmixer.c b/libavfilter/vf_colorchannelmixer.c
index 006a8ee289..f74b07af56 100644
--- a/libavfilter/vf_colorchannelmixer.c
+++ b/libavfilter/vf_colorchannelmixer.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "preserve_color.h"
diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c
index f638ec0dc6..1c15afb80f 100644
--- a/libavfilter/vf_colorconstancy.c
+++ b/libavfilter/vf_colorconstancy.c
@@ -33,6 +33,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_colorcontrast.c b/libavfilter/vf_colorcontrast.c
index b086de71e5..f675924171 100644
--- a/libavfilter/vf_colorcontrast.c
+++ b/libavfilter/vf_colorcontrast.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_colorcorrect.c b/libavfilter/vf_colorcorrect.c
index d86d9f1927..acc654fb23 100644
--- a/libavfilter/vf_colorcorrect.c
+++ b/libavfilter/vf_colorcorrect.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_colorize.c b/libavfilter/vf_colorize.c
index e6c563e3e2..dfad9191ed 100644
--- a/libavfilter/vf_colorize.c
+++ b/libavfilter/vf_colorize.c
@@ -19,6 +19,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_colorkey.c b/libavfilter/vf_colorkey.c
index 58dd513b31..ce7227f4a8 100644
--- a/libavfilter/vf_colorkey.c
+++ b/libavfilter/vf_colorkey.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct ColorkeyContext {
diff --git a/libavfilter/vf_colorkey_opencl.c b/libavfilter/vf_colorkey_opencl.c
index 72a36df2d3..d1c877521a 100644
--- a/libavfilter/vf_colorkey_opencl.c
+++ b/libavfilter/vf_colorkey_opencl.c
@@ -18,6 +18,7 @@ 
 
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "opencl.h"
 #include "opencl_source.h"
diff --git a/libavfilter/vf_colorlevels.c b/libavfilter/vf_colorlevels.c
index 6f54628ec5..728e5048f3 100644
--- a/libavfilter/vf_colorlevels.c
+++ b/libavfilter/vf_colorlevels.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "preserve_color.h"
diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
index 81254b0463..03e4f63a25 100644
--- a/libavfilter/vf_colormatrix.c
+++ b/libavfilter/vf_colormatrix.c
@@ -30,6 +30,7 @@ 
 
 #include <float.h>
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "libavutil/opt.h"
diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 7bacd7892a..68c9419727 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -33,6 +33,7 @@ 
 
 #include "avfilter.h"
 #include "colorspacedsp.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_colortemperature.c b/libavfilter/vf_colortemperature.c
index b06b04e704..b7de6bb53a 100644
--- a/libavfilter/vf_colortemperature.c
+++ b/libavfilter/vf_colortemperature.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c
index bb78e33d80..5aca907a18 100644
--- a/libavfilter/vf_convolution.c
+++ b/libavfilter/vf_convolution.c
@@ -30,6 +30,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "convolution.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_convolution_opencl.c b/libavfilter/vf_convolution_opencl.c
index 40938436f2..82def57056 100644
--- a/libavfilter/vf_convolution_opencl.c
+++ b/libavfilter/vf_convolution_opencl.c
@@ -30,6 +30,7 @@ 
 
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "opencl.h"
 #include "opencl_source.h"
diff --git a/libavfilter/vf_copy.c b/libavfilter/vf_copy.c
index 52ac9fb0ec..54cb12c426 100644
--- a/libavfilter/vf_copy.c
+++ b/libavfilter/vf_copy.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/imgutils.h"
 #include "libavutil/internal.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c
index 486f723a4b..4912927e51 100644
--- a/libavfilter/vf_cropdetect.c
+++ b/libavfilter/vf_cropdetect.c
@@ -31,6 +31,7 @@ 
 #include "libavutil/qsort.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "edge_common.h"
diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c
index 97f284db22..85b493d5ad 100644
--- a/libavfilter/vf_curves.c
+++ b/libavfilter/vf_curves.c
@@ -29,6 +29,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_dblur.c b/libavfilter/vf_dblur.c
index 5202c57489..ab8bdbbad4 100644
--- a/libavfilter/vf_dblur.c
+++ b/libavfilter/vf_dblur.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c
index ef68337816..66fe154010 100644
--- a/libavfilter/vf_dctdnoiz.c
+++ b/libavfilter/vf_dctdnoiz.c
@@ -33,6 +33,8 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/mem_internal.h"
 #include "libavutil/opt.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c
index 9888285586..013324a766 100644
--- a/libavfilter/vf_deband.c
+++ b/libavfilter/vf_deband.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_deblock.c b/libavfilter/vf_deblock.c
index 7e4b1799d3..7b6cd04ffc 100644
--- a/libavfilter/vf_deblock.c
+++ b/libavfilter/vf_deblock.c
@@ -27,6 +27,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_deflicker.c b/libavfilter/vf_deflicker.c
index c17a8c8a3b..474f00df35 100644
--- a/libavfilter/vf_deflicker.c
+++ b/libavfilter/vf_deflicker.c
@@ -28,6 +28,7 @@ 
 #define FF_BUFQUEUE_SIZE 129
 #include "bufferqueue.h"
 
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_derain.c b/libavfilter/vf_derain.c
index 5cefca6b55..fa5e073671 100644
--- a/libavfilter/vf_derain.c
+++ b/libavfilter/vf_derain.c
@@ -27,6 +27,7 @@ 
 #include "libavutil/opt.h"
 #include "avfilter.h"
 #include "dnn_filter_common.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index 05a2df652e..33c460c01e 100644
--- a/libavfilter/vf_deshake.c
+++ b/libavfilter/vf_deshake.c
@@ -50,6 +50,7 @@ 
  */
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "transform.h"
 #include "video.h"
diff --git a/libavfilter/vf_despill.c b/libavfilter/vf_despill.c
index 7e8ccf7fe8..ca9b075f0c 100644
--- a/libavfilter/vf_despill.c
+++ b/libavfilter/vf_despill.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct DespillContext {
diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c
index 27739dc89f..ac6395fc62 100644
--- a/libavfilter/vf_drawbox.c
+++ b/libavfilter/vf_drawbox.c
@@ -36,6 +36,7 @@ 
 #include "libavutil/detection_bbox.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_drawbox_vaapi.c b/libavfilter/vf_drawbox_vaapi.c
index 1081d463e9..c3e6e0943d 100644
--- a/libavfilter/vf_drawbox_vaapi.c
+++ b/libavfilter/vf_drawbox_vaapi.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/opt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "vaapi_vpp.h"
 #include "video.h"
diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c
index dcf20ab11c..72280c8ba7 100644
--- a/libavfilter/vf_edgedetect.c
+++ b/libavfilter/vf_edgedetect.c
@@ -30,6 +30,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_elbg.c b/libavfilter/vf_elbg.c
index dd22da07b6..93d416a216 100644
--- a/libavfilter/vf_elbg.c
+++ b/libavfilter/vf_elbg.c
@@ -31,6 +31,7 @@ 
 
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_entropy.c b/libavfilter/vf_entropy.c
index a26cbb19d8..4db3d2b70b 100644
--- a/libavfilter/vf_entropy.c
+++ b/libavfilter/vf_entropy.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_epx.c b/libavfilter/vf_epx.c
index bae1b898bc..af32e21163 100644
--- a/libavfilter/vf_epx.c
+++ b/libavfilter/vf_epx.c
@@ -18,6 +18,8 @@ 
 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_exposure.c b/libavfilter/vf_exposure.c
index 926d784a81..75be794d00 100644
--- a/libavfilter/vf_exposure.c
+++ b/libavfilter/vf_exposure.c
@@ -22,6 +22,7 @@ 
 
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_fftdnoiz.c b/libavfilter/vf_fftdnoiz.c
index 93d068d046..f525cbf635 100644
--- a/libavfilter/vf_fftdnoiz.c
+++ b/libavfilter/vf_fftdnoiz.c
@@ -24,6 +24,8 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "libavutil/tx.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "window_func.h"
diff --git a/libavfilter/vf_field.c b/libavfilter/vf_field.c
index 525f1da4a0..0e981fabf5 100644
--- a/libavfilter/vf_field.c
+++ b/libavfilter/vf_field.c
@@ -27,6 +27,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 enum FieldType { FIELD_TYPE_TOP = 0, FIELD_TYPE_BOTTOM };
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index 21d62b93f1..82f88f43be 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -28,6 +28,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_fillborders.c b/libavfilter/vf_fillborders.c
index 2778cb486b..1bd4e2081f 100644
--- a/libavfilter/vf_fillborders.c
+++ b/libavfilter/vf_fillborders.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_flip_vulkan.c b/libavfilter/vf_flip_vulkan.c
index ecd2567ebc..bad617d024 100644
--- a/libavfilter/vf_flip_vulkan.c
+++ b/libavfilter/vf_flip_vulkan.c
@@ -23,6 +23,8 @@ 
 #include "libavutil/opt.h"
 #include "vulkan_filter.h"
 #include "vulkan_spirv.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index 3a353bbb0d..2b88b10f65 100644
--- a/libavfilter/vf_format.c
+++ b/libavfilter/vf_format.c
@@ -33,6 +33,7 @@ 
 #include "libavutil/opt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_fspp.c b/libavfilter/vf_fspp.c
index da32326b94..d1945d26ff 100644
--- a/libavfilter/vf_fspp.c
+++ b/libavfilter/vf_fspp.c
@@ -41,6 +41,8 @@ 
 #include "libavutil/mem_internal.h"
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "qp_table.h"
 #include "vf_fspp.h"
diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c
index 812fad72a3..07e151a0b1 100644
--- a/libavfilter/vf_gblur.c
+++ b/libavfilter/vf_gblur.c
@@ -32,6 +32,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "gblur.h"
 #include "internal.h"
 #include "vf_gblur_init.h"
diff --git a/libavfilter/vf_gblur_vulkan.c b/libavfilter/vf_gblur_vulkan.c
index 09be6015c3..27cac920ec 100644
--- a/libavfilter/vf_gblur_vulkan.c
+++ b/libavfilter/vf_gblur_vulkan.c
@@ -24,6 +24,8 @@ 
 #include "libavutil/opt.h"
 #include "vulkan_filter.h"
 #include "vulkan_spirv.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index e854e320c6..5a70467a7e 100644
--- a/libavfilter/vf_gradfun.c
+++ b/libavfilter/vf_gradfun.c
@@ -40,6 +40,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "gradfun.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_grayworld.c b/libavfilter/vf_grayworld.c
index 0b6d673168..60ee444887 100644
--- a/libavfilter/vf_grayworld.c
+++ b/libavfilter/vf_grayworld.c
@@ -29,6 +29,7 @@ 
 #include "libavutil/mem.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 9f5958a392..769df9e3c0 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -27,6 +27,7 @@ 
 #include <string.h>
 
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "hflip.h"
 #include "internal.h"
diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c
index 24c95a0249..e714cf2ad2 100644
--- a/libavfilter/vf_histeq.c
+++ b/libavfilter/vf_histeq.c
@@ -34,6 +34,7 @@ 
 
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index 7da6d5d727..697ae21ed3 100644
--- a/libavfilter/vf_histogram.c
+++ b/libavfilter/vf_histogram.c
@@ -27,6 +27,7 @@ 
 #include "libavutil/imgutils.h"
 #include "libavutil/intreadwrite.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
index 9f32b943c9..0aaa37dfe4 100644
--- a/libavfilter/vf_hqdn3d.c
+++ b/libavfilter/vf_hqdn3d.c
@@ -38,6 +38,7 @@ 
 #include "libavutil/opt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "vf_hqdn3d.h"
diff --git a/libavfilter/vf_hqx.c b/libavfilter/vf_hqx.c
index 4a8ed184f4..932313cac1 100644
--- a/libavfilter/vf_hqx.c
+++ b/libavfilter/vf_hqx.c
@@ -30,6 +30,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/avassert.h"
 #include "libavutil/pixdesc.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_hsvkey.c b/libavfilter/vf_hsvkey.c
index 0bd8cace37..f0954e0460 100644
--- a/libavfilter/vf_hsvkey.c
+++ b/libavfilter/vf_hsvkey.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/intreadwrite.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 typedef struct HSVKeyContext {
diff --git a/libavfilter/vf_huesaturation.c b/libavfilter/vf_huesaturation.c
index bea13deca9..e5891f8b17 100644
--- a/libavfilter/vf_huesaturation.c
+++ b/libavfilter/vf_huesaturation.c
@@ -20,6 +20,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_iccdetect.c b/libavfilter/vf_iccdetect.c
index 16eacbbb56..18a7e2ba9c 100644
--- a/libavfilter/vf_iccdetect.c
+++ b/libavfilter/vf_iccdetect.c
@@ -30,6 +30,7 @@ 
 
 #include "avfilter.h"
 #include "fflcms2.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_iccgen.c b/libavfilter/vf_iccgen.c
index aae7ae5d26..8ae1d84161 100644
--- a/libavfilter/vf_iccgen.c
+++ b/libavfilter/vf_iccgen.c
@@ -29,6 +29,7 @@ 
 
 #include "avfilter.h"
 #include "fflcms2.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index abd375230a..197e33f2d2 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/common.h"
 #include "libavutil/opt.h"
 #include "internal.h"
+#include "filters.h"
 #include "vf_idet.h"
 
 #define OFFSET(x) offsetof(IDETContext, x)
diff --git a/libavfilter/vf_il.c b/libavfilter/vf_il.c
index 5eaa40a6f8..ac79990964 100644
--- a/libavfilter/vf_il.c
+++ b/libavfilter/vf_il.c
@@ -28,6 +28,7 @@ 
 #include "libavutil/imgutils.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c
index 5baa8d1897..61fa53a5d5 100644
--- a/libavfilter/vf_kerndeint.c
+++ b/libavfilter/vf_kerndeint.c
@@ -33,6 +33,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_lagfun.c b/libavfilter/vf_lagfun.c
index 4d7496c3eb..9d781b9f7f 100644
--- a/libavfilter/vf_lagfun.c
+++ b/libavfilter/vf_lagfun.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c
index 06ab662b5f..c9d4818b06 100644
--- a/libavfilter/vf_lenscorrection.c
+++ b/libavfilter/vf_lenscorrection.c
@@ -33,6 +33,7 @@ 
 
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index 8a35985b20..237af6e227 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -37,6 +37,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_limiter.c b/libavfilter/vf_limiter.c
index f67f590d60..0df104156e 100644
--- a/libavfilter/vf_limiter.c
+++ b/libavfilter/vf_limiter.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "limiter.h"
 #include "video.h"
diff --git a/libavfilter/vf_lumakey.c b/libavfilter/vf_lumakey.c
index d426a5b67a..ee243dda48 100644
--- a/libavfilter/vf_lumakey.c
+++ b/libavfilter/vf_lumakey.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 01df8f287d..7e0abdebc6 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -35,6 +35,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c
index 929bf61b87..9f10502e28 100644
--- a/libavfilter/vf_lut3d.c
+++ b/libavfilter/vf_lut3d.c
@@ -35,6 +35,7 @@ 
 #include "libavutil/avassert.h"
 #include "libavutil/avstring.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "lut3d.h"
diff --git a/libavfilter/vf_maskfun.c b/libavfilter/vf_maskfun.c
index 1ac152fc8b..53c3b91824 100644
--- a/libavfilter/vf_maskfun.c
+++ b/libavfilter/vf_maskfun.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c
index 76ab59912e..713df31308 100644
--- a/libavfilter/vf_mcdeint.c
+++ b/libavfilter/vf_mcdeint.c
@@ -52,6 +52,7 @@ 
 #include "libavutil/opt.h"
 #include "libavcodec/avcodec.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_median.c b/libavfilter/vf_median.c
index 5ed787af5e..c4e3ca400d 100644
--- a/libavfilter/vf_median.c
+++ b/libavfilter/vf_median.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "median.h"
 #include "video.h"
diff --git a/libavfilter/vf_mestimate.c b/libavfilter/vf_mestimate.c
index 3397109831..842932c17b 100644
--- a/libavfilter/vf_mestimate.c
+++ b/libavfilter/vf_mestimate.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/motion_vector.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_misc_vaapi.c b/libavfilter/vf_misc_vaapi.c
index d68e18b52b..a007d6aac3 100644
--- a/libavfilter/vf_misc_vaapi.c
+++ b/libavfilter/vf_misc_vaapi.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "vaapi_vpp.h"
 #include "video.h"
diff --git a/libavfilter/vf_monochrome.c b/libavfilter/vf_monochrome.c
index 05c001707a..46287781b9 100644
--- a/libavfilter/vf_monochrome.c
+++ b/libavfilter/vf_monochrome.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_mpdecimate.c b/libavfilter/vf_mpdecimate.c
index dab8941e46..c9670f2429 100644
--- a/libavfilter/vf_mpdecimate.c
+++ b/libavfilter/vf_mpdecimate.c
@@ -29,6 +29,7 @@ 
 #include "libavutil/pixelutils.h"
 #include "libavutil/timestamp.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_negate.c b/libavfilter/vf_negate.c
index 40c0c2608b..b6b5299799 100644
--- a/libavfilter/vf_negate.c
+++ b/libavfilter/vf_negate.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_neighbor.c b/libavfilter/vf_neighbor.c
index 915347d6ba..d1e5b179b2 100644
--- a/libavfilter/vf_neighbor.c
+++ b/libavfilter/vf_neighbor.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_neighbor_opencl.c b/libavfilter/vf_neighbor_opencl.c
index ba661bd665..9d6d1e9e66 100644
--- a/libavfilter/vf_neighbor_opencl.c
+++ b/libavfilter/vf_neighbor_opencl.c
@@ -28,6 +28,7 @@ 
 
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "opencl.h"
 #include "opencl_source.h"
diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c
index 64877317ed..968311d03d 100644
--- a/libavfilter/vf_nlmeans.c
+++ b/libavfilter/vf_nlmeans.c
@@ -34,6 +34,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "vf_nlmeans.h"
 #include "vf_nlmeans_init.h"
diff --git a/libavfilter/vf_nlmeans_opencl.c b/libavfilter/vf_nlmeans_opencl.c
index 5149be02ca..e5316d04f1 100644
--- a/libavfilter/vf_nlmeans_opencl.c
+++ b/libavfilter/vf_nlmeans_opencl.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "opencl.h"
 #include "opencl_source.h"
diff --git a/libavfilter/vf_nlmeans_vulkan.c b/libavfilter/vf_nlmeans_vulkan.c
index be9305854b..96d51548a2 100644
--- a/libavfilter/vf_nlmeans_vulkan.c
+++ b/libavfilter/vf_nlmeans_vulkan.c
@@ -23,6 +23,8 @@ 
 #include "libavutil/opt.h"
 #include "vulkan_filter.h"
 #include "vulkan_spirv.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index c559c9843d..1d9646cb32 100644
--- a/libavfilter/vf_noise.c
+++ b/libavfilter/vf_noise.c
@@ -31,6 +31,7 @@ 
 #include "libavutil/lfg.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "vf_noise.h"
diff --git a/libavfilter/vf_normalize.c b/libavfilter/vf_normalize.c
index 337c37f0ab..c713946f9c 100644
--- a/libavfilter/vf_normalize.c
+++ b/libavfilter/vf_normalize.c
@@ -78,6 +78,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_null.c b/libavfilter/vf_null.c
index 1502774f98..af06a340d7 100644
--- a/libavfilter/vf_null.c
+++ b/libavfilter/vf_null.c
@@ -23,6 +23,7 @@ 
 
 #include "libavutil/internal.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c
index 3cece91edf..f88a1a6e35 100644
--- a/libavfilter/vf_ocr.c
+++ b/libavfilter/vf_ocr.c
@@ -22,6 +22,7 @@ 
 
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_overlay_opencl.c b/libavfilter/vf_overlay_opencl.c
index 9beb09f05a..219d4fef37 100644
--- a/libavfilter/vf_overlay_opencl.c
+++ b/libavfilter/vf_overlay_opencl.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "framesync.h"
 #include "internal.h"
 #include "opencl.h"
diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c
index c09de24142..233c5a68d6 100644
--- a/libavfilter/vf_overlay_vulkan.c
+++ b/libavfilter/vf_overlay_vulkan.c
@@ -22,6 +22,8 @@ 
 #include "libavutil/opt.h"
 #include "vulkan_filter.h"
 #include "vulkan_spirv.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "framesync.h"
 #include "video.h"
diff --git a/libavfilter/vf_owdenoise.c b/libavfilter/vf_owdenoise.c
index 9bcab5a75e..4df8f972a8 100644
--- a/libavfilter/vf_owdenoise.c
+++ b/libavfilter/vf_owdenoise.c
@@ -39,6 +39,7 @@ 
 #include "libavutil/mem_internal.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index 2cced46f29..584bcc9847 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -27,6 +27,7 @@ 
 #include <float.h>  /* DBL_MAX */
 
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_pad_opencl.c b/libavfilter/vf_pad_opencl.c
index 7c163a1d0e..a30236d5dd 100644
--- a/libavfilter/vf_pad_opencl.c
+++ b/libavfilter/vf_pad_opencl.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "opencl.h"
 #include "opencl_source.h"
diff --git a/libavfilter/vf_pad_vaapi.c b/libavfilter/vf_pad_vaapi.c
index 98f6285222..7b4e45bc1b 100644
--- a/libavfilter/vf_pad_vaapi.c
+++ b/libavfilter/vf_pad_vaapi.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/opt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "vaapi_vpp.h"
 #include "video.h"
diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c
index 81897a69ec..d29f4b8e2a 100644
--- a/libavfilter/vf_palettegen.c
+++ b/libavfilter/vf_palettegen.c
@@ -30,6 +30,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/intreadwrite.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "palette.h"
diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c
index 4fd6d2b6e5..a66ed33e3a 100644
--- a/libavfilter/vf_phase.c
+++ b/libavfilter/vf_phase.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c
index 02145a327f..c2e9014968 100644
--- a/libavfilter/vf_pixdesctest.c
+++ b/libavfilter/vf_pixdesctest.c
@@ -27,6 +27,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_pixelize.c b/libavfilter/vf_pixelize.c
index 4eb236f121..59c0a659b0 100644
--- a/libavfilter/vf_pixelize.c
+++ b/libavfilter/vf_pixelize.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/opt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_pp.c b/libavfilter/vf_pp.c
index 44705789e6..366a35fcf2 100644
--- a/libavfilter/vf_pp.c
+++ b/libavfilter/vf_pp.c
@@ -28,6 +28,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 
+#include "filters.h"
 #include "internal.h"
 #include "qp_table.h"
 #include "video.h"
diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c
index 24b39eebd2..d3baa69d50 100644
--- a/libavfilter/vf_pp7.c
+++ b/libavfilter/vf_pp7.c
@@ -33,6 +33,8 @@ 
 #include "libavutil/mem_internal.h"
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "qp_table.h"
 #include "vf_pp7.h"
diff --git a/libavfilter/vf_procamp_vaapi.c b/libavfilter/vf_procamp_vaapi.c
index b535a36d33..7550040945 100644
--- a/libavfilter/vf_procamp_vaapi.c
+++ b/libavfilter/vf_procamp_vaapi.c
@@ -21,6 +21,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "vaapi_vpp.h"
 #include "video.h"
diff --git a/libavfilter/vf_program_opencl.c b/libavfilter/vf_program_opencl.c
index 8a4881b38e..eddf13ea27 100644
--- a/libavfilter/vf_program_opencl.c
+++ b/libavfilter/vf_program_opencl.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "framesync.h"
 #include "internal.h"
 #include "opencl.h"
diff --git a/libavfilter/vf_pseudocolor.c b/libavfilter/vf_pseudocolor.c
index cfdfac7842..2fa26e6b14 100644
--- a/libavfilter/vf_pseudocolor.c
+++ b/libavfilter/vf_pseudocolor.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c
index 39a6cb14c2..128ebb71d6 100644
--- a/libavfilter/vf_pullup.c
+++ b/libavfilter/vf_pullup.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "vf_pullup.h"
diff --git a/libavfilter/vf_qp.c b/libavfilter/vf_qp.c
index 37e575447d..86dd7eae29 100644
--- a/libavfilter/vf_qp.c
+++ b/libavfilter/vf_qp.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/video_enc_params.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_quirc.c b/libavfilter/vf_quirc.c
index 760f5d97de..afd172fa34 100644
--- a/libavfilter/vf_quirc.c
+++ b/libavfilter/vf_quirc.c
@@ -27,6 +27,7 @@ 
 #include "libavutil/imgutils.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "video.h"
 #include <quirc.h>
diff --git a/libavfilter/vf_random.c b/libavfilter/vf_random.c
index 8c7cf8b806..1b433be08b 100644
--- a/libavfilter/vf_random.c
+++ b/libavfilter/vf_random.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/random_seed.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 #define MAX_FRAMES 512
diff --git a/libavfilter/vf_readeia608.c b/libavfilter/vf_readeia608.c
index 7fb143cde0..f663c88a05 100644
--- a/libavfilter/vf_readeia608.c
+++ b/libavfilter/vf_readeia608.c
@@ -32,6 +32,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_readvitc.c b/libavfilter/vf_readvitc.c
index cb63a4d127..1847152249 100644
--- a/libavfilter/vf_readvitc.c
+++ b/libavfilter/vf_readvitc.c
@@ -29,6 +29,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/timecode.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_removegrain.c b/libavfilter/vf_removegrain.c
index 6e6e99198c..a07857893d 100644
--- a/libavfilter/vf_removegrain.c
+++ b/libavfilter/vf_removegrain.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/qsort.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "removegrain.h"
 #include "video.h"
diff --git a/libavfilter/vf_removelogo.c b/libavfilter/vf_removelogo.c
index 77f0f64ba3..43f1948076 100644
--- a/libavfilter/vf_removelogo.c
+++ b/libavfilter/vf_removelogo.c
@@ -73,6 +73,7 @@ 
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "bbox.h"
diff --git a/libavfilter/vf_sab.c b/libavfilter/vf_sab.c
index 9e83e08355..2bd2bfd73a 100644
--- a/libavfilter/vf_sab.c
+++ b/libavfilter/vf_sab.c
@@ -29,6 +29,7 @@ 
 #include "libswscale/swscale.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c
index 5f20b8a43c..27ec0e6e26 100644
--- a/libavfilter/vf_scale_vaapi.c
+++ b/libavfilter/vf_scale_vaapi.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "scale_eval.h"
 #include "video.h"
diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c
index 7210509de3..d53789e6c5 100644
--- a/libavfilter/vf_scale_vulkan.c
+++ b/libavfilter/vf_scale_vulkan.c
@@ -23,6 +23,7 @@ 
 #include "vulkan_filter.h"
 #include "vulkan_spirv.h"
 #include "scale_eval.h"
+#include "filters.h"
 #include "internal.h"
 #include "colorspace.h"
 #include "video.h"
diff --git a/libavfilter/vf_scroll.c b/libavfilter/vf_scroll.c
index eebf12e902..229c28876d 100644
--- a/libavfilter/vf_scroll.c
+++ b/libavfilter/vf_scroll.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_selectivecolor.c b/libavfilter/vf_selectivecolor.c
index eea79b7815..b0e98bfb87 100644
--- a/libavfilter/vf_selectivecolor.c
+++ b/libavfilter/vf_selectivecolor.c
@@ -32,6 +32,7 @@ 
 #include "libavcodec/mathops.h" // for mid_pred(), which is a macro so no link dependency
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c
index b7da8eb54b..ecca2c2360 100644
--- a/libavfilter/vf_setparams.c
+++ b/libavfilter/vf_setparams.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/pixfmt.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_shear.c b/libavfilter/vf_shear.c
index 5008db3f46..1598d5b283 100644
--- a/libavfilter/vf_shear.c
+++ b/libavfilter/vf_shear.c
@@ -26,6 +26,7 @@ 
 
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_showpalette.c b/libavfilter/vf_showpalette.c
index 0405bdb947..5e3aa08672 100644
--- a/libavfilter/vf_showpalette.c
+++ b/libavfilter/vf_showpalette.c
@@ -23,6 +23,7 @@ 
 
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_shuffleframes.c b/libavfilter/vf_shuffleframes.c
index 000be9c090..3d677f64e2 100644
--- a/libavfilter/vf_shuffleframes.c
+++ b/libavfilter/vf_shuffleframes.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/opt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_shufflepixels.c b/libavfilter/vf_shufflepixels.c
index a5de7d67f3..fcc5b14204 100644
--- a/libavfilter/vf_shufflepixels.c
+++ b/libavfilter/vf_shufflepixels.c
@@ -29,6 +29,7 @@ 
 #include "libavutil/random_seed.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_shuffleplanes.c b/libavfilter/vf_shuffleplanes.c
index fb2f85cf55..8b1791f078 100644
--- a/libavfilter/vf_shuffleplanes.c
+++ b/libavfilter/vf_shuffleplanes.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/pixfmt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_siti.c b/libavfilter/vf_siti.c
index 722e7cecc7..ca69211f60 100644
--- a/libavfilter/vf_siti.c
+++ b/libavfilter/vf_siti.c
@@ -32,6 +32,7 @@ 
 #include "libavutil/opt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_smartblur.c b/libavfilter/vf_smartblur.c
index dbbb74339d..5d1a13df52 100644
--- a/libavfilter/vf_smartblur.c
+++ b/libavfilter/vf_smartblur.c
@@ -30,6 +30,7 @@ 
 #include "libswscale/swscale.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c
index d6c7297985..02f53af6ea 100644
--- a/libavfilter/vf_spp.c
+++ b/libavfilter/vf_spp.c
@@ -37,6 +37,8 @@ 
 #include "libavutil/mem_internal.h"
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "qp_table.h"
 #include "vf_spp.h"
diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c
index 3bfca7f042..4b08a632ce 100644
--- a/libavfilter/vf_sr.c
+++ b/libavfilter/vf_sr.c
@@ -26,6 +26,7 @@ 
  */
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "libavutil/opt.h"
diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c
index bd955d1b37..8a632c11a5 100644
--- a/libavfilter/vf_subtitles.c
+++ b/libavfilter/vf_subtitles.c
@@ -38,6 +38,8 @@ 
 #include "libavutil/avstring.h"
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
+
+#include "filters.h"
 #include "drawutils.h"
 #include "avfilter.h"
 #include "internal.h"
diff --git a/libavfilter/vf_super2xsai.c b/libavfilter/vf_super2xsai.c
index 65144cbf1b..fb46d18da5 100644
--- a/libavfilter/vf_super2xsai.c
+++ b/libavfilter/vf_super2xsai.c
@@ -29,6 +29,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/intreadwrite.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c
index 7965dc5dd1..dacd2f6f46 100644
--- a/libavfilter/vf_swapuv.c
+++ b/libavfilter/vf_swapuv.c
@@ -25,6 +25,7 @@ 
 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_thumbnail.c b/libavfilter/vf_thumbnail.c
index f7001c4ada..dab6ddecab 100644
--- a/libavfilter/vf_thumbnail.c
+++ b/libavfilter/vf_thumbnail.c
@@ -31,6 +31,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 
 #define HIST_SIZE (3*256)
diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c
index 08bcb06247..25544d3e70 100644
--- a/libavfilter/vf_tiltandshift.c
+++ b/libavfilter/vf_tiltandshift.c
@@ -31,6 +31,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_tmidequalizer.c b/libavfilter/vf_tmidequalizer.c
index 9e7b14cb67..557df5c1c5 100644
--- a/libavfilter/vf_tmidequalizer.c
+++ b/libavfilter/vf_tmidequalizer.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c
index 8029f69663..afc966683d 100644
--- a/libavfilter/vf_tonemap.c
+++ b/libavfilter/vf_tonemap.c
@@ -35,6 +35,7 @@ 
 
 #include "avfilter.h"
 #include "colorspace.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c
index 03219857d4..935f8dcdaa 100644
--- a/libavfilter/vf_tonemap_opencl.c
+++ b/libavfilter/vf_tonemap_opencl.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "opencl.h"
 #include "opencl_source.h"
diff --git a/libavfilter/vf_tonemap_vaapi.c b/libavfilter/vf_tonemap_vaapi.c
index 7ebcb18f79..ca9b9975aa 100644
--- a/libavfilter/vf_tonemap_vaapi.c
+++ b/libavfilter/vf_tonemap_vaapi.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/mastering_display_metadata.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "vaapi_vpp.h"
 #include "video.h"
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index bfd6f45fbd..4f23c5cbae 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -35,6 +35,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index 2705ac5270..3548b850a5 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -37,6 +37,7 @@ 
  */
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 #include "libavutil/common.h"
diff --git a/libavfilter/vf_unsharp_opencl.c b/libavfilter/vf_unsharp_opencl.c
index 1b7cbde9fd..2a9f61dc18 100644
--- a/libavfilter/vf_unsharp_opencl.c
+++ b/libavfilter/vf_unsharp_opencl.c
@@ -23,6 +23,7 @@ 
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "opencl.h"
 #include "opencl_source.h"
diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c
index ac3e8ea0da..1d06b57bd8 100644
--- a/libavfilter/vf_uspp.c
+++ b/libavfilter/vf_uspp.c
@@ -35,6 +35,8 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/video_enc_params.h"
 #include "libavcodec/avcodec.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "qp_table.h"
 #include "avfilter.h"
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 9a6c31228d..28a09a0857 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -40,6 +40,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_vaguedenoiser.c b/libavfilter/vf_vaguedenoiser.c
index 7c92736df2..1c6f65c2e1 100644
--- a/libavfilter/vf_vaguedenoiser.c
+++ b/libavfilter/vf_vaguedenoiser.c
@@ -28,6 +28,7 @@ 
 #include "libavutil/opt.h"
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_vectorscope.c b/libavfilter/vf_vectorscope.c
index a1f98ece68..2d6da65f26 100644
--- a/libavfilter/vf_vectorscope.c
+++ b/libavfilter/vf_vectorscope.c
@@ -25,6 +25,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/xga_font_data.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c
index d72605bef0..7dfd94e5fe 100644
--- a/libavfilter/vf_vflip.c
+++ b/libavfilter/vf_vflip.c
@@ -26,6 +26,7 @@ 
 #include "libavutil/internal.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_vfrdet.c b/libavfilter/vf_vfrdet.c
index 8d641dd368..a96ebd3b81 100644
--- a/libavfilter/vf_vfrdet.c
+++ b/libavfilter/vf_vfrdet.c
@@ -20,6 +20,8 @@ 
 
 #include "libavutil/common.h"
 #include "libavutil/opt.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_vibrance.c b/libavfilter/vf_vibrance.c
index e1d6e64aeb..d60e50b7d9 100644
--- a/libavfilter/vf_vibrance.c
+++ b/libavfilter/vf_vibrance.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "drawutils.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_vidstabtransform.c b/libavfilter/vf_vidstabtransform.c
index dd86c4d819..e54a99d1b3 100644
--- a/libavfilter/vf_vidstabtransform.c
+++ b/libavfilter/vf_vidstabtransform.c
@@ -27,6 +27,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c
index d1b67c7fb2..3c9813a0ca 100644
--- a/libavfilter/vf_vmafmotion.c
+++ b/libavfilter/vf_vmafmotion.c
@@ -29,6 +29,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index f45b445443..8be5963186 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -24,6 +24,7 @@ 
 #include "libavutil/pixdesc.h"
 #include "libavutil/xga_font_data.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/vf_xbr.c b/libavfilter/vf_xbr.c
index 1750da043e..05e621b1c3 100644
--- a/libavfilter/vf_xbr.c
+++ b/libavfilter/vf_xbr.c
@@ -30,6 +30,8 @@ 
 
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
+
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index aa5ca4a889..3b76362c27 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/common.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "yadif.h"
 
diff --git a/libavfilter/vf_yaepblur.c b/libavfilter/vf_yaepblur.c
index 9b5ec0348f..c48d99762c 100644
--- a/libavfilter/vf_yaepblur.c
+++ b/libavfilter/vf_yaepblur.c
@@ -31,6 +31,7 @@ 
 #include "libavutil/opt.h"
 #include "libavutil/imgutils.h"
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "video.h"
 
diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
index 45f1bd25ce..5f473cfa25 100644
--- a/libavfilter/vf_zscale.c
+++ b/libavfilter/vf_zscale.c
@@ -31,6 +31,7 @@ 
 #include <zimg.h>
 
 #include "avfilter.h"
+#include "filters.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/video.c b/libavfilter/video.c
index e4b1ba2251..b8a815eb01 100644
--- a/libavfilter/video.c
+++ b/libavfilter/video.c
@@ -30,6 +30,7 @@ 
 
 #include "avfilter.h"
 #include "avfilter_internal.h"
+#include "filters.h"
 #include "framepool.h"
 #include "internal.h"
 #include "video.h"
diff --git a/libavfilter/video.h b/libavfilter/video.h
index 81331c3199..8c5f6c84e7 100644
--- a/libavfilter/video.h
+++ b/libavfilter/video.h
@@ -22,7 +22,7 @@ 
 #define AVFILTER_VIDEO_H
 
 #include "avfilter.h"
-#include "internal.h"
+#include "filters.h"
 
 /**
  * An AVFilterPad array whose only entry has name "default"
diff --git a/libavfilter/vsink_nullsink.c b/libavfilter/vsink_nullsink.c
index f21299c6f0..4f61f84500 100644
--- a/libavfilter/vsink_nullsink.c
+++ b/libavfilter/vsink_nullsink.c
@@ -17,6 +17,7 @@ 
  */
 
 #include "avfilter.h"
+#include "filters.h"
 #include "internal.h"
 #include "libavutil/internal.h"