allfilters.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. /*
  2. * filter registration
  3. * Copyright (c) 2008 Vitor Sessak
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include "libavutil/thread.h"
  22. #include "avfilter.h"
  23. #include "config.h"
  24. extern AVFilter ff_af_abench;
  25. extern AVFilter ff_af_acompressor;
  26. extern AVFilter ff_af_acontrast;
  27. extern AVFilter ff_af_acopy;
  28. extern AVFilter ff_af_acue;
  29. extern AVFilter ff_af_acrossfade;
  30. extern AVFilter ff_af_acrossover;
  31. extern AVFilter ff_af_acrusher;
  32. extern AVFilter ff_af_adeclick;
  33. extern AVFilter ff_af_adeclip;
  34. extern AVFilter ff_af_adelay;
  35. extern AVFilter ff_af_aderivative;
  36. extern AVFilter ff_af_aecho;
  37. extern AVFilter ff_af_aemphasis;
  38. extern AVFilter ff_af_aeval;
  39. extern AVFilter ff_af_afade;
  40. extern AVFilter ff_af_afftdn;
  41. extern AVFilter ff_af_afftfilt;
  42. extern AVFilter ff_af_afir;
  43. extern AVFilter ff_af_aformat;
  44. extern AVFilter ff_af_agate;
  45. extern AVFilter ff_af_aiir;
  46. extern AVFilter ff_af_aintegral;
  47. extern AVFilter ff_af_ainterleave;
  48. extern AVFilter ff_af_alimiter;
  49. extern AVFilter ff_af_allpass;
  50. extern AVFilter ff_af_aloop;
  51. extern AVFilter ff_af_amerge;
  52. extern AVFilter ff_af_ametadata;
  53. extern AVFilter ff_af_amix;
  54. extern AVFilter ff_af_amultiply;
  55. extern AVFilter ff_af_anequalizer;
  56. extern AVFilter ff_af_anlmdn;
  57. extern AVFilter ff_af_anull;
  58. extern AVFilter ff_af_apad;
  59. extern AVFilter ff_af_aperms;
  60. extern AVFilter ff_af_aphaser;
  61. extern AVFilter ff_af_apulsator;
  62. extern AVFilter ff_af_arealtime;
  63. extern AVFilter ff_af_aresample;
  64. extern AVFilter ff_af_areverse;
  65. extern AVFilter ff_af_aselect;
  66. extern AVFilter ff_af_asendcmd;
  67. extern AVFilter ff_af_asetnsamples;
  68. extern AVFilter ff_af_asetpts;
  69. extern AVFilter ff_af_asetrate;
  70. extern AVFilter ff_af_asettb;
  71. extern AVFilter ff_af_ashowinfo;
  72. extern AVFilter ff_af_asidedata;
  73. extern AVFilter ff_af_asoftclip;
  74. extern AVFilter ff_af_asplit;
  75. extern AVFilter ff_af_asr;
  76. extern AVFilter ff_af_astats;
  77. extern AVFilter ff_af_astreamselect;
  78. extern AVFilter ff_af_atempo;
  79. extern AVFilter ff_af_atrim;
  80. extern AVFilter ff_af_azmq;
  81. extern AVFilter ff_af_bandpass;
  82. extern AVFilter ff_af_bandreject;
  83. extern AVFilter ff_af_bass;
  84. extern AVFilter ff_af_biquad;
  85. extern AVFilter ff_af_bs2b;
  86. extern AVFilter ff_af_channelmap;
  87. extern AVFilter ff_af_channelsplit;
  88. extern AVFilter ff_af_chorus;
  89. extern AVFilter ff_af_compand;
  90. extern AVFilter ff_af_compensationdelay;
  91. extern AVFilter ff_af_crossfeed;
  92. extern AVFilter ff_af_crystalizer;
  93. extern AVFilter ff_af_dcshift;
  94. extern AVFilter ff_af_deesser;
  95. extern AVFilter ff_af_drmeter;
  96. extern AVFilter ff_af_dynaudnorm;
  97. extern AVFilter ff_af_earwax;
  98. extern AVFilter ff_af_ebur128;
  99. extern AVFilter ff_af_equalizer;
  100. extern AVFilter ff_af_extrastereo;
  101. extern AVFilter ff_af_firequalizer;
  102. extern AVFilter ff_af_flanger;
  103. extern AVFilter ff_af_haas;
  104. extern AVFilter ff_af_hdcd;
  105. extern AVFilter ff_af_headphone;
  106. extern AVFilter ff_af_highpass;
  107. extern AVFilter ff_af_highshelf;
  108. extern AVFilter ff_af_join;
  109. extern AVFilter ff_af_ladspa;
  110. extern AVFilter ff_af_loudnorm;
  111. extern AVFilter ff_af_lowpass;
  112. extern AVFilter ff_af_lowshelf;
  113. extern AVFilter ff_af_lv2;
  114. extern AVFilter ff_af_mcompand;
  115. extern AVFilter ff_af_pan;
  116. extern AVFilter ff_af_replaygain;
  117. extern AVFilter ff_af_resample;
  118. extern AVFilter ff_af_rubberband;
  119. extern AVFilter ff_af_sidechaincompress;
  120. extern AVFilter ff_af_sidechaingate;
  121. extern AVFilter ff_af_silencedetect;
  122. extern AVFilter ff_af_silenceremove;
  123. extern AVFilter ff_af_sofalizer;
  124. extern AVFilter ff_af_stereotools;
  125. extern AVFilter ff_af_stereowiden;
  126. extern AVFilter ff_af_superequalizer;
  127. extern AVFilter ff_af_surround;
  128. extern AVFilter ff_af_treble;
  129. extern AVFilter ff_af_tremolo;
  130. extern AVFilter ff_af_vibrato;
  131. extern AVFilter ff_af_volume;
  132. extern AVFilter ff_af_volumedetect;
  133. extern AVFilter ff_asrc_aevalsrc;
  134. extern AVFilter ff_asrc_anoisesrc;
  135. extern AVFilter ff_asrc_anullsrc;
  136. extern AVFilter ff_asrc_flite;
  137. extern AVFilter ff_asrc_hilbert;
  138. extern AVFilter ff_asrc_sinc;
  139. extern AVFilter ff_asrc_sine;
  140. extern AVFilter ff_asink_anullsink;
  141. extern AVFilter ff_vf_alphaextract;
  142. extern AVFilter ff_vf_alphamerge;
  143. extern AVFilter ff_vf_amplify;
  144. extern AVFilter ff_vf_ass;
  145. extern AVFilter ff_vf_atadenoise;
  146. extern AVFilter ff_vf_avgblur;
  147. extern AVFilter ff_vf_avgblur_opencl;
  148. extern AVFilter ff_vf_bbox;
  149. extern AVFilter ff_vf_bench;
  150. extern AVFilter ff_vf_bitplanenoise;
  151. extern AVFilter ff_vf_blackdetect;
  152. extern AVFilter ff_vf_blackframe;
  153. extern AVFilter ff_vf_blend;
  154. extern AVFilter ff_vf_bm3d;
  155. extern AVFilter ff_vf_boxblur;
  156. extern AVFilter ff_vf_boxblur_opencl;
  157. extern AVFilter ff_vf_bwdif;
  158. extern AVFilter ff_vf_chromahold;
  159. extern AVFilter ff_vf_chromakey;
  160. extern AVFilter ff_vf_chromashift;
  161. extern AVFilter ff_vf_ciescope;
  162. extern AVFilter ff_vf_codecview;
  163. extern AVFilter ff_vf_colorbalance;
  164. extern AVFilter ff_vf_colorchannelmixer;
  165. extern AVFilter ff_vf_colorkey;
  166. extern AVFilter ff_vf_colorkey_opencl;
  167. extern AVFilter ff_vf_colorhold;
  168. extern AVFilter ff_vf_colorlevels;
  169. extern AVFilter ff_vf_colormatrix;
  170. extern AVFilter ff_vf_colorspace;
  171. extern AVFilter ff_vf_convolution;
  172. extern AVFilter ff_vf_convolution_opencl;
  173. extern AVFilter ff_vf_convolve;
  174. extern AVFilter ff_vf_copy;
  175. extern AVFilter ff_vf_coreimage;
  176. extern AVFilter ff_vf_cover_rect;
  177. extern AVFilter ff_vf_crop;
  178. extern AVFilter ff_vf_cropdetect;
  179. extern AVFilter ff_vf_cue;
  180. extern AVFilter ff_vf_curves;
  181. extern AVFilter ff_vf_datascope;
  182. extern AVFilter ff_vf_dctdnoiz;
  183. extern AVFilter ff_vf_deband;
  184. extern AVFilter ff_vf_deblock;
  185. extern AVFilter ff_vf_decimate;
  186. extern AVFilter ff_vf_deconvolve;
  187. extern AVFilter ff_vf_dedot;
  188. extern AVFilter ff_vf_deflate;
  189. extern AVFilter ff_vf_deflicker;
  190. extern AVFilter ff_vf_deinterlace_qsv;
  191. extern AVFilter ff_vf_deinterlace_vaapi;
  192. extern AVFilter ff_vf_dejudder;
  193. extern AVFilter ff_vf_delogo;
  194. extern AVFilter ff_vf_denoise_vaapi;
  195. extern AVFilter ff_vf_derain;
  196. extern AVFilter ff_vf_deshake;
  197. extern AVFilter ff_vf_despill;
  198. extern AVFilter ff_vf_detelecine;
  199. extern AVFilter ff_vf_dilation;
  200. extern AVFilter ff_vf_dilation_opencl;
  201. extern AVFilter ff_vf_displace;
  202. extern AVFilter ff_vf_doubleweave;
  203. extern AVFilter ff_vf_drawbox;
  204. extern AVFilter ff_vf_drawgraph;
  205. extern AVFilter ff_vf_drawgrid;
  206. extern AVFilter ff_vf_drawtext;
  207. extern AVFilter ff_vf_edgedetect;
  208. extern AVFilter ff_vf_elbg;
  209. extern AVFilter ff_vf_entropy;
  210. extern AVFilter ff_vf_eq;
  211. extern AVFilter ff_vf_erosion;
  212. extern AVFilter ff_vf_erosion_opencl;
  213. extern AVFilter ff_vf_extractplanes;
  214. extern AVFilter ff_vf_fade;
  215. extern AVFilter ff_vf_fftdnoiz;
  216. extern AVFilter ff_vf_fftfilt;
  217. extern AVFilter ff_vf_field;
  218. extern AVFilter ff_vf_fieldhint;
  219. extern AVFilter ff_vf_fieldmatch;
  220. extern AVFilter ff_vf_fieldorder;
  221. extern AVFilter ff_vf_fillborders;
  222. extern AVFilter ff_vf_find_rect;
  223. extern AVFilter ff_vf_floodfill;
  224. extern AVFilter ff_vf_format;
  225. extern AVFilter ff_vf_fps;
  226. extern AVFilter ff_vf_framepack;
  227. extern AVFilter ff_vf_framerate;
  228. extern AVFilter ff_vf_framestep;
  229. extern AVFilter ff_vf_freezedetect;
  230. extern AVFilter ff_vf_frei0r;
  231. extern AVFilter ff_vf_fspp;
  232. extern AVFilter ff_vf_gblur;
  233. extern AVFilter ff_vf_geq;
  234. extern AVFilter ff_vf_gradfun;
  235. extern AVFilter ff_vf_graphmonitor;
  236. extern AVFilter ff_vf_greyedge;
  237. extern AVFilter ff_vf_haldclut;
  238. extern AVFilter ff_vf_hflip;
  239. extern AVFilter ff_vf_histeq;
  240. extern AVFilter ff_vf_histogram;
  241. extern AVFilter ff_vf_hqdn3d;
  242. extern AVFilter ff_vf_hqx;
  243. extern AVFilter ff_vf_hstack;
  244. extern AVFilter ff_vf_hue;
  245. extern AVFilter ff_vf_hwdownload;
  246. extern AVFilter ff_vf_hwmap;
  247. extern AVFilter ff_vf_hwupload;
  248. extern AVFilter ff_vf_hwupload_cuda;
  249. extern AVFilter ff_vf_hysteresis;
  250. extern AVFilter ff_vf_idet;
  251. extern AVFilter ff_vf_il;
  252. extern AVFilter ff_vf_inflate;
  253. extern AVFilter ff_vf_interlace;
  254. extern AVFilter ff_vf_interleave;
  255. extern AVFilter ff_vf_kerndeint;
  256. extern AVFilter ff_vf_lagfun;
  257. extern AVFilter ff_vf_lenscorrection;
  258. extern AVFilter ff_vf_lensfun;
  259. extern AVFilter ff_vf_libvmaf;
  260. extern AVFilter ff_vf_limiter;
  261. extern AVFilter ff_vf_loop;
  262. extern AVFilter ff_vf_lumakey;
  263. extern AVFilter ff_vf_lut;
  264. extern AVFilter ff_vf_lut1d;
  265. extern AVFilter ff_vf_lut2;
  266. extern AVFilter ff_vf_lut3d;
  267. extern AVFilter ff_vf_lutrgb;
  268. extern AVFilter ff_vf_lutyuv;
  269. extern AVFilter ff_vf_maskedclamp;
  270. extern AVFilter ff_vf_maskedmerge;
  271. extern AVFilter ff_vf_maskfun;
  272. extern AVFilter ff_vf_mcdeint;
  273. extern AVFilter ff_vf_mergeplanes;
  274. extern AVFilter ff_vf_mestimate;
  275. extern AVFilter ff_vf_metadata;
  276. extern AVFilter ff_vf_midequalizer;
  277. extern AVFilter ff_vf_minterpolate;
  278. extern AVFilter ff_vf_mix;
  279. extern AVFilter ff_vf_mpdecimate;
  280. extern AVFilter ff_vf_negate;
  281. extern AVFilter ff_vf_nlmeans;
  282. extern AVFilter ff_vf_nlmeans_opencl;
  283. extern AVFilter ff_vf_nnedi;
  284. extern AVFilter ff_vf_noformat;
  285. extern AVFilter ff_vf_noise;
  286. extern AVFilter ff_vf_normalize;
  287. extern AVFilter ff_vf_null;
  288. extern AVFilter ff_vf_ocr;
  289. extern AVFilter ff_vf_ocv;
  290. extern AVFilter ff_vf_oscilloscope;
  291. extern AVFilter ff_vf_overlay;
  292. extern AVFilter ff_vf_overlay_opencl;
  293. extern AVFilter ff_vf_overlay_qsv;
  294. extern AVFilter ff_vf_owdenoise;
  295. extern AVFilter ff_vf_pad;
  296. extern AVFilter ff_vf_palettegen;
  297. extern AVFilter ff_vf_paletteuse;
  298. extern AVFilter ff_vf_perms;
  299. extern AVFilter ff_vf_perspective;
  300. extern AVFilter ff_vf_phase;
  301. extern AVFilter ff_vf_pixdesctest;
  302. extern AVFilter ff_vf_pixscope;
  303. extern AVFilter ff_vf_pp;
  304. extern AVFilter ff_vf_pp7;
  305. extern AVFilter ff_vf_premultiply;
  306. extern AVFilter ff_vf_prewitt;
  307. extern AVFilter ff_vf_prewitt_opencl;
  308. extern AVFilter ff_vf_procamp_vaapi;
  309. extern AVFilter ff_vf_program_opencl;
  310. extern AVFilter ff_vf_pseudocolor;
  311. extern AVFilter ff_vf_psnr;
  312. extern AVFilter ff_vf_pullup;
  313. extern AVFilter ff_vf_qp;
  314. extern AVFilter ff_vf_random;
  315. extern AVFilter ff_vf_readeia608;
  316. extern AVFilter ff_vf_readvitc;
  317. extern AVFilter ff_vf_realtime;
  318. extern AVFilter ff_vf_remap;
  319. extern AVFilter ff_vf_removegrain;
  320. extern AVFilter ff_vf_removelogo;
  321. extern AVFilter ff_vf_repeatfields;
  322. extern AVFilter ff_vf_reverse;
  323. extern AVFilter ff_vf_rgbashift;
  324. extern AVFilter ff_vf_roberts;
  325. extern AVFilter ff_vf_roberts_opencl;
  326. extern AVFilter ff_vf_rotate;
  327. extern AVFilter ff_vf_sab;
  328. extern AVFilter ff_vf_scale;
  329. extern AVFilter ff_vf_scale_cuda;
  330. extern AVFilter ff_vf_scale_npp;
  331. extern AVFilter ff_vf_scale_qsv;
  332. extern AVFilter ff_vf_scale_vaapi;
  333. extern AVFilter ff_vf_scale2ref;
  334. extern AVFilter ff_vf_select;
  335. extern AVFilter ff_vf_selectivecolor;
  336. extern AVFilter ff_vf_sendcmd;
  337. extern AVFilter ff_vf_separatefields;
  338. extern AVFilter ff_vf_setdar;
  339. extern AVFilter ff_vf_setfield;
  340. extern AVFilter ff_vf_setparams;
  341. extern AVFilter ff_vf_setpts;
  342. extern AVFilter ff_vf_setrange;
  343. extern AVFilter ff_vf_setsar;
  344. extern AVFilter ff_vf_settb;
  345. extern AVFilter ff_vf_sharpness_vaapi;
  346. extern AVFilter ff_vf_showinfo;
  347. extern AVFilter ff_vf_showpalette;
  348. extern AVFilter ff_vf_shuffleframes;
  349. extern AVFilter ff_vf_shuffleplanes;
  350. extern AVFilter ff_vf_sidedata;
  351. extern AVFilter ff_vf_signalstats;
  352. extern AVFilter ff_vf_signature;
  353. extern AVFilter ff_vf_smartblur;
  354. extern AVFilter ff_vf_sobel;
  355. extern AVFilter ff_vf_sobel_opencl;
  356. extern AVFilter ff_vf_split;
  357. extern AVFilter ff_vf_spp;
  358. extern AVFilter ff_vf_sr;
  359. extern AVFilter ff_vf_ssim;
  360. extern AVFilter ff_vf_stereo3d;
  361. extern AVFilter ff_vf_streamselect;
  362. extern AVFilter ff_vf_subtitles;
  363. extern AVFilter ff_vf_super2xsai;
  364. extern AVFilter ff_vf_swaprect;
  365. extern AVFilter ff_vf_swapuv;
  366. extern AVFilter ff_vf_tblend;
  367. extern AVFilter ff_vf_telecine;
  368. extern AVFilter ff_vf_threshold;
  369. extern AVFilter ff_vf_thumbnail;
  370. extern AVFilter ff_vf_thumbnail_cuda;
  371. extern AVFilter ff_vf_tile;
  372. extern AVFilter ff_vf_tinterlace;
  373. extern AVFilter ff_vf_tlut2;
  374. extern AVFilter ff_vf_tmix;
  375. extern AVFilter ff_vf_tonemap;
  376. extern AVFilter ff_vf_tonemap_opencl;
  377. extern AVFilter ff_vf_tpad;
  378. extern AVFilter ff_vf_transpose;
  379. extern AVFilter ff_vf_transpose_npp;
  380. extern AVFilter ff_vf_transpose_opencl;
  381. extern AVFilter ff_vf_transpose_vaapi;
  382. extern AVFilter ff_vf_trim;
  383. extern AVFilter ff_vf_unpremultiply;
  384. extern AVFilter ff_vf_unsharp;
  385. extern AVFilter ff_vf_unsharp_opencl;
  386. extern AVFilter ff_vf_uspp;
  387. extern AVFilter ff_vf_vaguedenoiser;
  388. extern AVFilter ff_vf_vectorscope;
  389. extern AVFilter ff_vf_vflip;
  390. extern AVFilter ff_vf_vfrdet;
  391. extern AVFilter ff_vf_vibrance;
  392. extern AVFilter ff_vf_vidstabdetect;
  393. extern AVFilter ff_vf_vidstabtransform;
  394. extern AVFilter ff_vf_vignette;
  395. extern AVFilter ff_vf_vmafmotion;
  396. extern AVFilter ff_vf_vpp_qsv;
  397. extern AVFilter ff_vf_vstack;
  398. extern AVFilter ff_vf_w3fdif;
  399. extern AVFilter ff_vf_waveform;
  400. extern AVFilter ff_vf_weave;
  401. extern AVFilter ff_vf_xbr;
  402. extern AVFilter ff_vf_xmedian;
  403. extern AVFilter ff_vf_xstack;
  404. extern AVFilter ff_vf_yadif;
  405. extern AVFilter ff_vf_yadif_cuda;
  406. extern AVFilter ff_vf_zmq;
  407. extern AVFilter ff_vf_zoompan;
  408. extern AVFilter ff_vf_zscale;
  409. extern AVFilter ff_vsrc_allrgb;
  410. extern AVFilter ff_vsrc_allyuv;
  411. extern AVFilter ff_vsrc_cellauto;
  412. extern AVFilter ff_vsrc_color;
  413. extern AVFilter ff_vsrc_coreimagesrc;
  414. extern AVFilter ff_vsrc_frei0r_src;
  415. extern AVFilter ff_vsrc_haldclutsrc;
  416. extern AVFilter ff_vsrc_life;
  417. extern AVFilter ff_vsrc_mandelbrot;
  418. extern AVFilter ff_vsrc_mptestsrc;
  419. extern AVFilter ff_vsrc_nullsrc;
  420. extern AVFilter ff_vsrc_openclsrc;
  421. extern AVFilter ff_vsrc_pal75bars;
  422. extern AVFilter ff_vsrc_pal100bars;
  423. extern AVFilter ff_vsrc_rgbtestsrc;
  424. extern AVFilter ff_vsrc_smptebars;
  425. extern AVFilter ff_vsrc_smptehdbars;
  426. extern AVFilter ff_vsrc_testsrc;
  427. extern AVFilter ff_vsrc_testsrc2;
  428. extern AVFilter ff_vsrc_yuvtestsrc;
  429. extern AVFilter ff_vsink_nullsink;
  430. /* multimedia filters */
  431. extern AVFilter ff_avf_abitscope;
  432. extern AVFilter ff_avf_adrawgraph;
  433. extern AVFilter ff_avf_agraphmonitor;
  434. extern AVFilter ff_avf_ahistogram;
  435. extern AVFilter ff_avf_aphasemeter;
  436. extern AVFilter ff_avf_avectorscope;
  437. extern AVFilter ff_avf_concat;
  438. extern AVFilter ff_avf_showcqt;
  439. extern AVFilter ff_avf_showfreqs;
  440. extern AVFilter ff_avf_showspatial;
  441. extern AVFilter ff_avf_showspectrum;
  442. extern AVFilter ff_avf_showspectrumpic;
  443. extern AVFilter ff_avf_showvolume;
  444. extern AVFilter ff_avf_showwaves;
  445. extern AVFilter ff_avf_showwavespic;
  446. extern AVFilter ff_vaf_spectrumsynth;
  447. /* multimedia sources */
  448. extern AVFilter ff_avsrc_amovie;
  449. extern AVFilter ff_avsrc_movie;
  450. /* those filters are part of public or internal API,
  451. * they are formatted to not be found by the grep
  452. * as they are manually added again (due to their 'names'
  453. * being the same while having different 'types'). */
  454. extern AVFilter ff_asrc_abuffer;
  455. extern AVFilter ff_vsrc_buffer;
  456. extern AVFilter ff_asink_abuffer;
  457. extern AVFilter ff_vsink_buffer;
  458. extern AVFilter ff_af_afifo;
  459. extern AVFilter ff_vf_fifo;
  460. #include "libavfilter/filter_list.c"
  461. const AVFilter *av_filter_iterate(void **opaque)
  462. {
  463. uintptr_t i = (uintptr_t)*opaque;
  464. const AVFilter *f = filter_list[i];
  465. if (f)
  466. *opaque = (void*)(i + 1);
  467. return f;
  468. }
  469. const AVFilter *avfilter_get_by_name(const char *name)
  470. {
  471. const AVFilter *f = NULL;
  472. void *opaque = 0;
  473. if (!name)
  474. return NULL;
  475. while ((f = av_filter_iterate(&opaque)))
  476. if (!strcmp(f->name, name))
  477. return (AVFilter *)f;
  478. return NULL;
  479. }
  480. #if FF_API_NEXT
  481. FF_DISABLE_DEPRECATION_WARNINGS
  482. static AVOnce av_filter_next_init = AV_ONCE_INIT;
  483. static void av_filter_init_next(void)
  484. {
  485. AVFilter *prev = NULL, *p;
  486. void *i = 0;
  487. while ((p = (AVFilter*)av_filter_iterate(&i))) {
  488. if (prev)
  489. prev->next = p;
  490. prev = p;
  491. }
  492. }
  493. void avfilter_register_all(void)
  494. {
  495. ff_thread_once(&av_filter_next_init, av_filter_init_next);
  496. }
  497. int avfilter_register(AVFilter *filter)
  498. {
  499. ff_thread_once(&av_filter_next_init, av_filter_init_next);
  500. return 0;
  501. }
  502. const AVFilter *avfilter_next(const AVFilter *prev)
  503. {
  504. ff_thread_once(&av_filter_next_init, av_filter_init_next);
  505. return prev ? prev->next : filter_list[0];
  506. }
  507. FF_ENABLE_DEPRECATION_WARNINGS
  508. #endif