libavfilter/allfilters.c
5c212e6f
 /*
  * filter registration
3fa77bde
  * Copyright (c) 2008 Vitor Sessak
5c212e6f
  *
  * This file is part of FFmpeg.
  *
  * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
  * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include "avfilter.h"
1d9c2dc8
 #include "config.h"
90793591
 #include "opencl_allkernels.h"
5c212e6f
 
 
c73c87b4
 #define REGISTER_FILTER(X, x, y)                                        \
     {                                                                   \
cd43ca04
         extern AVFilter ff_##y##_##x;                                   \
c73c87b4
         if (CONFIG_##X##_FILTER)                                        \
cd43ca04
             avfilter_register(&ff_##y##_##x);                           \
c73c87b4
     }
5c212e6f
 
69583bd3
 #define REGISTER_FILTER_UNCONDITIONAL(x)                                \
     {                                                                   \
cd43ca04
         extern AVFilter ff_##x;                                         \
         avfilter_register(&ff_##x);                                     \
69583bd3
     }
 
5c212e6f
 void avfilter_register_all(void)
 {
     static int initialized;
 
     if (initialized)
         return;
     initialized = 1;
 
9ab221f8
 #if FF_API_ACONVERT_FILTER
83d4a844
     REGISTER_FILTER(ACONVERT,       aconvert,       af);
9ab221f8
 #endif
9d05de22
     REGISTER_FILTER(ADELAY,         adelay,         af);
884c8905
     REGISTER_FILTER(AECHO,          aecho,          af);
e424abc3
     REGISTER_FILTER(AEVAL,          aeval,          af);
6ea8a830
     REGISTER_FILTER(AFADE,          afade,          af);
c73c87b4
     REGISTER_FILTER(AFORMAT,        aformat,        af);
3e40b856
     REGISTER_FILTER(AINTERLEAVE,    ainterleave,    af);
b70ea49c
     REGISTER_FILTER(ALLPASS,        allpass,        af);
83d4a844
     REGISTER_FILTER(AMERGE,         amerge,         af);
c73c87b4
     REGISTER_FILTER(AMIX,           amix,           af);
     REGISTER_FILTER(ANULL,          anull,          af);
83d4a844
     REGISTER_FILTER(APAD,           apad,           af);
3b2b636a
     REGISTER_FILTER(APERMS,         aperms,         af);
bf657528
     REGISTER_FILTER(APHASER,        aphaser,        af);
83d4a844
     REGISTER_FILTER(ARESAMPLE,      aresample,      af);
     REGISTER_FILTER(ASELECT,        aselect,        af);
     REGISTER_FILTER(ASENDCMD,       asendcmd,       af);
     REGISTER_FILTER(ASETNSAMPLES,   asetnsamples,   af);
     REGISTER_FILTER(ASETPTS,        asetpts,        af);
b57c23f8
     REGISTER_FILTER(ASETRATE,       asetrate,       af);
83d4a844
     REGISTER_FILTER(ASETTB,         asettb,         af);
c73c87b4
     REGISTER_FILTER(ASHOWINFO,      ashowinfo,      af);
     REGISTER_FILTER(ASPLIT,         asplit,         af);
cc5c1559
     REGISTER_FILTER(ASTATS,         astats,         af);
83d4a844
     REGISTER_FILTER(ASTREAMSYNC,    astreamsync,    af);
c73c87b4
     REGISTER_FILTER(ASYNCTS,        asyncts,        af);
83d4a844
     REGISTER_FILTER(ATEMPO,         atempo,         af);
a1e05b04
     REGISTER_FILTER(ATRIM,          atrim,          af);
7ddb0ef9
     REGISTER_FILTER(AZMQ,           azmq,           af);
b70ea49c
     REGISTER_FILTER(BANDPASS,       bandpass,       af);
     REGISTER_FILTER(BANDREJECT,     bandreject,     af);
     REGISTER_FILTER(BASS,           bass,           af);
     REGISTER_FILTER(BIQUAD,         biquad,         af);
1c0210c7
     REGISTER_FILTER(BS2B,           bs2b,           af);
c73c87b4
     REGISTER_FILTER(CHANNELMAP,     channelmap,     af);
     REGISTER_FILTER(CHANNELSPLIT,   channelsplit,   af);
6b68e2a4
     REGISTER_FILTER(COMPAND,        compand,        af);
83d4a844
     REGISTER_FILTER(EARWAX,         earwax,         af);
     REGISTER_FILTER(EBUR128,        ebur128,        af);
b70ea49c
     REGISTER_FILTER(EQUALIZER,      equalizer,      af);
b52c26c6
     REGISTER_FILTER(FLANGER,        flanger,        af);
b70ea49c
     REGISTER_FILTER(HIGHPASS,       highpass,       af);
c73c87b4
     REGISTER_FILTER(JOIN,           join,           af);
601eab2b
     REGISTER_FILTER(LADSPA,         ladspa,         af);
b70ea49c
     REGISTER_FILTER(LOWPASS,        lowpass,        af);
83d4a844
     REGISTER_FILTER(PAN,            pan,            af);
c9660999
     REGISTER_FILTER(REPLAYGAIN,     replaygain,     af);
c73c87b4
     REGISTER_FILTER(RESAMPLE,       resample,       af);
83d4a844
     REGISTER_FILTER(SILENCEDETECT,  silencedetect,  af);
42261964
     REGISTER_FILTER(SILENCEREMOVE,  silenceremove,  af);
b70ea49c
     REGISTER_FILTER(TREBLE,         treble,         af);
c73c87b4
     REGISTER_FILTER(VOLUME,         volume,         af);
83d4a844
     REGISTER_FILTER(VOLUMEDETECT,   volumedetect,   af);
99046339
 
83d4a844
     REGISTER_FILTER(AEVALSRC,       aevalsrc,       asrc);
c73c87b4
     REGISTER_FILTER(ANULLSRC,       anullsrc,       asrc);
83d4a844
     REGISTER_FILTER(FLITE,          flite,          asrc);
21b092de
     REGISTER_FILTER(SINE,           sine,           asrc);
1ee410f3
 
c73c87b4
     REGISTER_FILTER(ANULLSINK,      anullsink,      asink);
f0a55438
 
83d4a844
     REGISTER_FILTER(ALPHAEXTRACT,   alphaextract,   vf);
     REGISTER_FILTER(ALPHAMERGE,     alphamerge,     vf);
     REGISTER_FILTER(ASS,            ass,            vf);
     REGISTER_FILTER(BBOX,           bbox,           vf);
     REGISTER_FILTER(BLACKDETECT,    blackdetect,    vf);
c73c87b4
     REGISTER_FILTER(BLACKFRAME,     blackframe,     vf);
47619e41
     REGISTER_FILTER(BLEND,          blend,          vf);
c73c87b4
     REGISTER_FILTER(BOXBLUR,        boxblur,        vf);
f8883317
     REGISTER_FILTER(CODECVIEW,      codecview,      vf);
449cdd54
     REGISTER_FILTER(COLORBALANCE,   colorbalance,   vf);
212960ee
     REGISTER_FILTER(COLORCHANNELMIXER, colorchannelmixer, vf);
83d4a844
     REGISTER_FILTER(COLORMATRIX,    colormatrix,    vf);
c73c87b4
     REGISTER_FILTER(COPY,           copy,           vf);
     REGISTER_FILTER(CROP,           crop,           vf);
     REGISTER_FILTER(CROPDETECT,     cropdetect,     vf);
65fc80f0
     REGISTER_FILTER(CURVES,         curves,         vf);
7b43120c
     REGISTER_FILTER(DCTDNOIZ,       dctdnoiz,       vf);
7a92ec93
     REGISTER_FILTER(DECIMATE,       decimate,       vf);
b4d308c0
     REGISTER_FILTER(DEJUDDER,       dejudder,       vf);
c73c87b4
     REGISTER_FILTER(DELOGO,         delogo,         vf);
83d4a844
     REGISTER_FILTER(DESHAKE,        deshake,        vf);
c73c87b4
     REGISTER_FILTER(DRAWBOX,        drawbox,        vf);
47a628bf
     REGISTER_FILTER(DRAWGRID,       drawgrid,       vf);
c73c87b4
     REGISTER_FILTER(DRAWTEXT,       drawtext,       vf);
83d4a844
     REGISTER_FILTER(EDGEDETECT,     edgedetect,     vf);
8cd3685a
     REGISTER_FILTER(ELBG,           elbg,           vf);
ce322f4c
     REGISTER_FILTER(EXTRACTPLANES,  extractplanes,  vf);
c73c87b4
     REGISTER_FILTER(FADE,           fade,           vf);
83d4a844
     REGISTER_FILTER(FIELD,          field,          vf);
7a92ec93
     REGISTER_FILTER(FIELDMATCH,     fieldmatch,     vf);
c73c87b4
     REGISTER_FILTER(FIELDORDER,     fieldorder,     vf);
     REGISTER_FILTER(FORMAT,         format,         vf);
     REGISTER_FILTER(FPS,            fps,            vf);
a7d0e7ea
     REGISTER_FILTER(FRAMEPACK,      framepack,      vf);
83d4a844
     REGISTER_FILTER(FRAMESTEP,      framestep,      vf);
c73c87b4
     REGISTER_FILTER(FREI0R,         frei0r,         vf);
83d4a844
     REGISTER_FILTER(GEQ,            geq,            vf);
c73c87b4
     REGISTER_FILTER(GRADFUN,        gradfun,        vf);
158d96e3
     REGISTER_FILTER(HALDCLUT,       haldclut,       vf);
c73c87b4
     REGISTER_FILTER(HFLIP,          hflip,          vf);
01405663
     REGISTER_FILTER(HISTEQ,         histeq,         vf);
29a92c01
     REGISTER_FILTER(HISTOGRAM,      histogram,      vf);
c73c87b4
     REGISTER_FILTER(HQDN3D,         hqdn3d,         vf);
ded3c9fd
     REGISTER_FILTER(HQX,            hqx,            vf);
83d4a844
     REGISTER_FILTER(HUE,            hue,            vf);
     REGISTER_FILTER(IDET,           idet,           vf);
6e9abce5
     REGISTER_FILTER(IL,             il,             vf);
3fce1367
     REGISTER_FILTER(INTERLACE,      interlace,      vf);
3e40b856
     REGISTER_FILTER(INTERLEAVE,     interleave,     vf);
172505b8
     REGISTER_FILTER(KERNDEINT,      kerndeint,      vf);
9f617a14
     REGISTER_FILTER(LENSCORRECTION, lenscorrection, vf);
12f51c1f
     REGISTER_FILTER(LUT3D,          lut3d,          vf);
c73c87b4
     REGISTER_FILTER(LUT,            lut,            vf);
     REGISTER_FILTER(LUTRGB,         lutrgb,         vf);
     REGISTER_FILTER(LUTYUV,         lutyuv,         vf);
e89182fc
     REGISTER_FILTER(MCDEINT,        mcdeint,        vf);
292902ea
     REGISTER_FILTER(MERGEPLANES,    mergeplanes,    vf);
83d4a844
     REGISTER_FILTER(MP,             mp,             vf);
ab0ad6ec
     REGISTER_FILTER(MPDECIMATE,     mpdecimate,     vf);
c73c87b4
     REGISTER_FILTER(NEGATE,         negate,         vf);
     REGISTER_FILTER(NOFORMAT,       noformat,       vf);
af882e18
     REGISTER_FILTER(NOISE,          noise,          vf);
c73c87b4
     REGISTER_FILTER(NULL,           null,           vf);
     REGISTER_FILTER(OCV,            ocv,            vf);
     REGISTER_FILTER(OVERLAY,        overlay,        vf);
b1e84efa
     REGISTER_FILTER(OWDENOISE,      owdenoise,      vf);
c73c87b4
     REGISTER_FILTER(PAD,            pad,            vf);
3b2b636a
     REGISTER_FILTER(PERMS,          perms,          vf);
80c64459
     REGISTER_FILTER(PERSPECTIVE,    perspective,    vf);
3dd4b6ea
     REGISTER_FILTER(PHASE,          phase,          vf);
c73c87b4
     REGISTER_FILTER(PIXDESCTEST,    pixdesctest,    vf);
83d4a844
     REGISTER_FILTER(PP,             pp,             vf);
6150bec3
     REGISTER_FILTER(PSNR,           psnr,           vf);
9c774459
     REGISTER_FILTER(PULLUP,         pullup,         vf);
83d4a844
     REGISTER_FILTER(REMOVELOGO,     removelogo,     vf);
dc5e26d6
     REGISTER_FILTER(ROTATE,         rotate,         vf);
841df7bf
     REGISTER_FILTER(SAB,            sab,            vf);
c73c87b4
     REGISTER_FILTER(SCALE,          scale,          vf);
     REGISTER_FILTER(SELECT,         select,         vf);
83d4a844
     REGISTER_FILTER(SENDCMD,        sendcmd,        vf);
d0073c7a
     REGISTER_FILTER(SEPARATEFIELDS, separatefields, vf);
c73c87b4
     REGISTER_FILTER(SETDAR,         setdar,         vf);
83d4a844
     REGISTER_FILTER(SETFIELD,       setfield,       vf);
c73c87b4
     REGISTER_FILTER(SETPTS,         setpts,         vf);
     REGISTER_FILTER(SETSAR,         setsar,         vf);
     REGISTER_FILTER(SETTB,          settb,          vf);
     REGISTER_FILTER(SHOWINFO,       showinfo,       vf);
599b81ca
     REGISTER_FILTER(SHUFFLEPLANES,  shuffleplanes,  vf);
76bce46d
     REGISTER_FILTER(SIGNALSTATS,    signalstats,    vf);
83d4a844
     REGISTER_FILTER(SMARTBLUR,      smartblur,      vf);
c73c87b4
     REGISTER_FILTER(SPLIT,          split,          vf);
a2c547ff
     REGISTER_FILTER(SPP,            spp,            vf);
3f35f36a
     REGISTER_FILTER(STEREO3D,       stereo3d,       vf);
83d4a844
     REGISTER_FILTER(SUBTITLES,      subtitles,      vf);
     REGISTER_FILTER(SUPER2XSAI,     super2xsai,     vf);
     REGISTER_FILTER(SWAPUV,         swapuv,         vf);
661e284b
     REGISTER_FILTER(TELECINE,       telecine,       vf);
83d4a844
     REGISTER_FILTER(THUMBNAIL,      thumbnail,      vf);
     REGISTER_FILTER(TILE,           tile,           vf);
     REGISTER_FILTER(TINTERLACE,     tinterlace,     vf);
c73c87b4
     REGISTER_FILTER(TRANSPOSE,      transpose,      vf);
a1e05b04
     REGISTER_FILTER(TRIM,           trim,           vf);
c73c87b4
     REGISTER_FILTER(UNSHARP,        unsharp,        vf);
     REGISTER_FILTER(VFLIP,          vflip,          vf);
4364e1f1
     REGISTER_FILTER(VIDSTABDETECT,  vidstabdetect,  vf);
     REGISTER_FILTER(VIDSTABTRANSFORM, vidstabtransform, vf);
0ab9362f
     REGISTER_FILTER(VIGNETTE,       vignette,       vf);
898c6191
     REGISTER_FILTER(W3FDIF,         w3fdif,         vf);
c73c87b4
     REGISTER_FILTER(YADIF,          yadif,          vf);
7ddb0ef9
     REGISTER_FILTER(ZMQ,            zmq,            vf);
4b6cb1cc
     REGISTER_FILTER(ZOOMPAN,        zoompan,        vf);
dd08b83c
 
83d4a844
     REGISTER_FILTER(CELLAUTO,       cellauto,       vsrc);
c73c87b4
     REGISTER_FILTER(COLOR,          color,          vsrc);
     REGISTER_FILTER(FREI0R,         frei0r_src,     vsrc);
3cec29cf
     REGISTER_FILTER(HALDCLUTSRC,    haldclutsrc,    vsrc);
83d4a844
     REGISTER_FILTER(LIFE,           life,           vsrc);
     REGISTER_FILTER(MANDELBROT,     mandelbrot,     vsrc);
     REGISTER_FILTER(MPTESTSRC,      mptestsrc,      vsrc);
c73c87b4
     REGISTER_FILTER(NULLSRC,        nullsrc,        vsrc);
     REGISTER_FILTER(RGBTESTSRC,     rgbtestsrc,     vsrc);
83d4a844
     REGISTER_FILTER(SMPTEBARS,      smptebars,      vsrc);
03e2ec32
     REGISTER_FILTER(SMPTEHDBARS,    smptehdbars,    vsrc);
c73c87b4
     REGISTER_FILTER(TESTSRC,        testsrc,        vsrc);
006aa1a4
 
c73c87b4
     REGISTER_FILTER(NULLSINK,       nullsink,       vsink);
196c9e5c
 
61230797
     /* multimedia filters */
005ee7a5
     REGISTER_FILTER(AVECTORSCOPE,   avectorscope,   avf);
83d4a844
     REGISTER_FILTER(CONCAT,         concat,         avf);
40e938a7
     REGISTER_FILTER(SHOWCQT,        showcqt,        avf);
83d4a844
     REGISTER_FILTER(SHOWSPECTRUM,   showspectrum,   avf);
     REGISTER_FILTER(SHOWWAVES,      showwaves,      avf);
3ea3e32e
 
32390d67
     /* multimedia sources */
83d4a844
     REGISTER_FILTER(AMOVIE,         amovie,         avsrc);
     REGISTER_FILTER(MOVIE,          movie,          avsrc);
32390d67
 
c14a8c83
 #if FF_API_AVFILTERBUFFER
981baf74
     REGISTER_FILTER_UNCONDITIONAL(vsink_ffbuffersink);
     REGISTER_FILTER_UNCONDITIONAL(asink_ffabuffersink);
c14a8c83
 #endif
8e1f063e
 
25b3babe
     /* those filters are part of public or internal API => registered
      * unconditionally */
69583bd3
     REGISTER_FILTER_UNCONDITIONAL(asrc_abuffer);
     REGISTER_FILTER_UNCONDITIONAL(vsrc_buffer);
9a268882
     REGISTER_FILTER_UNCONDITIONAL(asink_abuffer);
     REGISTER_FILTER_UNCONDITIONAL(vsink_buffer);
69583bd3
     REGISTER_FILTER_UNCONDITIONAL(af_afifo);
     REGISTER_FILTER_UNCONDITIONAL(vf_fifo);
90793591
     ff_opencl_register_filter_kernel_code_all();
5c212e6f
 }