2
0

allcodecs.c 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911
  1. /*
  2. * Provide registration of all codecs, parsers and bitstream filters for libavcodec.
  3. * Copyright (c) 2002 Fabrice Bellard
  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. /**
  22. * @file
  23. * Provide registration of all codecs, parsers and bitstream filters for libavcodec.
  24. */
  25. #include "config.h"
  26. #include "libavutil/thread.h"
  27. #include "avcodec.h"
  28. #include "version.h"
  29. extern AVCodec ff_a64multi_encoder;
  30. extern AVCodec ff_a64multi5_encoder;
  31. extern AVCodec ff_aasc_decoder;
  32. extern AVCodec ff_aic_decoder;
  33. extern AVCodec ff_alias_pix_encoder;
  34. extern AVCodec ff_alias_pix_decoder;
  35. extern AVCodec ff_amv_encoder;
  36. extern AVCodec ff_amv_decoder;
  37. extern AVCodec ff_anm_decoder;
  38. extern AVCodec ff_ansi_decoder;
  39. extern AVCodec ff_apng_encoder;
  40. extern AVCodec ff_apng_decoder;
  41. extern AVCodec ff_asv1_encoder;
  42. extern AVCodec ff_asv1_decoder;
  43. extern AVCodec ff_asv2_encoder;
  44. extern AVCodec ff_asv2_decoder;
  45. extern AVCodec ff_aura_decoder;
  46. extern AVCodec ff_aura2_decoder;
  47. extern AVCodec ff_avrp_encoder;
  48. extern AVCodec ff_avrp_decoder;
  49. extern AVCodec ff_avrn_decoder;
  50. extern AVCodec ff_avs_decoder;
  51. extern AVCodec ff_avui_encoder;
  52. extern AVCodec ff_avui_decoder;
  53. extern AVCodec ff_ayuv_encoder;
  54. extern AVCodec ff_ayuv_decoder;
  55. extern AVCodec ff_bethsoftvid_decoder;
  56. extern AVCodec ff_bfi_decoder;
  57. extern AVCodec ff_bink_decoder;
  58. extern AVCodec ff_bitpacked_decoder;
  59. extern AVCodec ff_bmp_encoder;
  60. extern AVCodec ff_bmp_decoder;
  61. extern AVCodec ff_bmv_video_decoder;
  62. extern AVCodec ff_brender_pix_decoder;
  63. extern AVCodec ff_c93_decoder;
  64. extern AVCodec ff_cavs_decoder;
  65. extern AVCodec ff_cdgraphics_decoder;
  66. extern AVCodec ff_cdxl_decoder;
  67. extern AVCodec ff_cfhd_decoder;
  68. extern AVCodec ff_cinepak_encoder;
  69. extern AVCodec ff_cinepak_decoder;
  70. extern AVCodec ff_clearvideo_decoder;
  71. extern AVCodec ff_cljr_encoder;
  72. extern AVCodec ff_cljr_decoder;
  73. extern AVCodec ff_cllc_decoder;
  74. extern AVCodec ff_comfortnoise_encoder;
  75. extern AVCodec ff_comfortnoise_decoder;
  76. extern AVCodec ff_cpia_decoder;
  77. extern AVCodec ff_cscd_decoder;
  78. extern AVCodec ff_cyuv_decoder;
  79. extern AVCodec ff_dds_decoder;
  80. extern AVCodec ff_dfa_decoder;
  81. extern AVCodec ff_dirac_decoder;
  82. extern AVCodec ff_dnxhd_encoder;
  83. extern AVCodec ff_dnxhd_decoder;
  84. extern AVCodec ff_dpx_encoder;
  85. extern AVCodec ff_dpx_decoder;
  86. extern AVCodec ff_dsicinvideo_decoder;
  87. extern AVCodec ff_dvaudio_decoder;
  88. extern AVCodec ff_dvvideo_encoder;
  89. extern AVCodec ff_dvvideo_decoder;
  90. extern AVCodec ff_dxa_decoder;
  91. extern AVCodec ff_dxtory_decoder;
  92. extern AVCodec ff_dxv_decoder;
  93. extern AVCodec ff_eacmv_decoder;
  94. extern AVCodec ff_eamad_decoder;
  95. extern AVCodec ff_eatgq_decoder;
  96. extern AVCodec ff_eatgv_decoder;
  97. extern AVCodec ff_eatqi_decoder;
  98. extern AVCodec ff_eightbps_decoder;
  99. extern AVCodec ff_eightsvx_exp_decoder;
  100. extern AVCodec ff_eightsvx_fib_decoder;
  101. extern AVCodec ff_escape124_decoder;
  102. extern AVCodec ff_escape130_decoder;
  103. extern AVCodec ff_exr_decoder;
  104. extern AVCodec ff_ffv1_encoder;
  105. extern AVCodec ff_ffv1_decoder;
  106. extern AVCodec ff_ffvhuff_encoder;
  107. extern AVCodec ff_ffvhuff_decoder;
  108. extern AVCodec ff_fic_decoder;
  109. extern AVCodec ff_fits_encoder;
  110. extern AVCodec ff_fits_decoder;
  111. extern AVCodec ff_flashsv_encoder;
  112. extern AVCodec ff_flashsv_decoder;
  113. extern AVCodec ff_flashsv2_encoder;
  114. extern AVCodec ff_flashsv2_decoder;
  115. extern AVCodec ff_flic_decoder;
  116. extern AVCodec ff_flv_encoder;
  117. extern AVCodec ff_flv_decoder;
  118. extern AVCodec ff_fmvc_decoder;
  119. extern AVCodec ff_fourxm_decoder;
  120. extern AVCodec ff_fraps_decoder;
  121. extern AVCodec ff_frwu_decoder;
  122. extern AVCodec ff_g2m_decoder;
  123. extern AVCodec ff_gdv_decoder;
  124. extern AVCodec ff_gif_encoder;
  125. extern AVCodec ff_gif_decoder;
  126. extern AVCodec ff_h261_encoder;
  127. extern AVCodec ff_h261_decoder;
  128. extern AVCodec ff_h263_encoder;
  129. extern AVCodec ff_h263_decoder;
  130. extern AVCodec ff_h263i_decoder;
  131. extern AVCodec ff_h263p_encoder;
  132. extern AVCodec ff_h263p_decoder;
  133. extern AVCodec ff_h263_v4l2m2m_decoder;
  134. extern AVCodec ff_h264_decoder;
  135. extern AVCodec ff_h264_crystalhd_decoder;
  136. extern AVCodec ff_h264_v4l2m2m_decoder;
  137. extern AVCodec ff_h264_mediacodec_decoder;
  138. extern AVCodec ff_h264_mmal_decoder;
  139. extern AVCodec ff_h264_qsv_decoder;
  140. extern AVCodec ff_h264_rkmpp_decoder;
  141. extern AVCodec ff_hap_encoder;
  142. extern AVCodec ff_hap_decoder;
  143. extern AVCodec ff_hevc_decoder;
  144. extern AVCodec ff_hevc_qsv_decoder;
  145. extern AVCodec ff_hevc_rkmpp_decoder;
  146. extern AVCodec ff_hevc_v4l2m2m_decoder;
  147. extern AVCodec ff_hnm4_video_decoder;
  148. extern AVCodec ff_hq_hqa_decoder;
  149. extern AVCodec ff_hqx_decoder;
  150. extern AVCodec ff_huffyuv_encoder;
  151. extern AVCodec ff_huffyuv_decoder;
  152. extern AVCodec ff_idcin_decoder;
  153. extern AVCodec ff_iff_ilbm_decoder;
  154. extern AVCodec ff_imm4_decoder;
  155. extern AVCodec ff_indeo2_decoder;
  156. extern AVCodec ff_indeo3_decoder;
  157. extern AVCodec ff_indeo4_decoder;
  158. extern AVCodec ff_indeo5_decoder;
  159. extern AVCodec ff_interplay_video_decoder;
  160. extern AVCodec ff_jpeg2000_encoder;
  161. extern AVCodec ff_jpeg2000_decoder;
  162. extern AVCodec ff_jpegls_encoder;
  163. extern AVCodec ff_jpegls_decoder;
  164. extern AVCodec ff_jv_decoder;
  165. extern AVCodec ff_kgv1_decoder;
  166. extern AVCodec ff_kmvc_decoder;
  167. extern AVCodec ff_lagarith_decoder;
  168. extern AVCodec ff_ljpeg_encoder;
  169. extern AVCodec ff_loco_decoder;
  170. extern AVCodec ff_m101_decoder;
  171. extern AVCodec ff_magicyuv_encoder;
  172. extern AVCodec ff_magicyuv_decoder;
  173. extern AVCodec ff_mdec_decoder;
  174. extern AVCodec ff_mimic_decoder;
  175. extern AVCodec ff_mjpeg_encoder;
  176. extern AVCodec ff_mjpeg_decoder;
  177. extern AVCodec ff_mjpegb_decoder;
  178. extern AVCodec ff_mmvideo_decoder;
  179. extern AVCodec ff_motionpixels_decoder;
  180. extern AVCodec ff_mpeg1video_encoder;
  181. extern AVCodec ff_mpeg1video_decoder;
  182. extern AVCodec ff_mpeg2video_encoder;
  183. extern AVCodec ff_mpeg2video_decoder;
  184. extern AVCodec ff_mpeg4_encoder;
  185. extern AVCodec ff_mpeg4_decoder;
  186. extern AVCodec ff_mpeg4_crystalhd_decoder;
  187. extern AVCodec ff_mpeg4_v4l2m2m_decoder;
  188. extern AVCodec ff_mpeg4_mmal_decoder;
  189. extern AVCodec ff_mpegvideo_decoder;
  190. extern AVCodec ff_mpeg1_v4l2m2m_decoder;
  191. extern AVCodec ff_mpeg2_mmal_decoder;
  192. extern AVCodec ff_mpeg2_crystalhd_decoder;
  193. extern AVCodec ff_mpeg2_v4l2m2m_decoder;
  194. extern AVCodec ff_mpeg2_qsv_decoder;
  195. extern AVCodec ff_mpeg2_mediacodec_decoder;
  196. extern AVCodec ff_msa1_decoder;
  197. extern AVCodec ff_mscc_decoder;
  198. extern AVCodec ff_msmpeg4v1_decoder;
  199. extern AVCodec ff_msmpeg4v2_encoder;
  200. extern AVCodec ff_msmpeg4v2_decoder;
  201. extern AVCodec ff_msmpeg4v3_encoder;
  202. extern AVCodec ff_msmpeg4v3_decoder;
  203. extern AVCodec ff_msmpeg4_crystalhd_decoder;
  204. extern AVCodec ff_msrle_decoder;
  205. extern AVCodec ff_mss1_decoder;
  206. extern AVCodec ff_mss2_decoder;
  207. extern AVCodec ff_msvideo1_encoder;
  208. extern AVCodec ff_msvideo1_decoder;
  209. extern AVCodec ff_mszh_decoder;
  210. extern AVCodec ff_mts2_decoder;
  211. extern AVCodec ff_mvc1_decoder;
  212. extern AVCodec ff_mvc2_decoder;
  213. extern AVCodec ff_mwsc_decoder;
  214. extern AVCodec ff_mxpeg_decoder;
  215. extern AVCodec ff_nuv_decoder;
  216. extern AVCodec ff_paf_video_decoder;
  217. extern AVCodec ff_pam_encoder;
  218. extern AVCodec ff_pam_decoder;
  219. extern AVCodec ff_pbm_encoder;
  220. extern AVCodec ff_pbm_decoder;
  221. extern AVCodec ff_pcx_encoder;
  222. extern AVCodec ff_pcx_decoder;
  223. extern AVCodec ff_pgm_encoder;
  224. extern AVCodec ff_pgm_decoder;
  225. extern AVCodec ff_pgmyuv_encoder;
  226. extern AVCodec ff_pgmyuv_decoder;
  227. extern AVCodec ff_pictor_decoder;
  228. extern AVCodec ff_pixlet_decoder;
  229. extern AVCodec ff_png_encoder;
  230. extern AVCodec ff_png_decoder;
  231. extern AVCodec ff_ppm_encoder;
  232. extern AVCodec ff_ppm_decoder;
  233. extern AVCodec ff_prores_encoder;
  234. extern AVCodec ff_prores_decoder;
  235. extern AVCodec ff_prores_aw_encoder;
  236. extern AVCodec ff_prores_ks_encoder;
  237. extern AVCodec ff_prosumer_decoder;
  238. extern AVCodec ff_psd_decoder;
  239. extern AVCodec ff_ptx_decoder;
  240. extern AVCodec ff_qdraw_decoder;
  241. extern AVCodec ff_qpeg_decoder;
  242. extern AVCodec ff_qtrle_encoder;
  243. extern AVCodec ff_qtrle_decoder;
  244. extern AVCodec ff_r10k_encoder;
  245. extern AVCodec ff_r10k_decoder;
  246. extern AVCodec ff_r210_encoder;
  247. extern AVCodec ff_r210_decoder;
  248. extern AVCodec ff_rasc_decoder;
  249. extern AVCodec ff_rawvideo_encoder;
  250. extern AVCodec ff_rawvideo_decoder;
  251. extern AVCodec ff_rl2_decoder;
  252. extern AVCodec ff_roq_encoder;
  253. extern AVCodec ff_roq_decoder;
  254. extern AVCodec ff_rpza_decoder;
  255. extern AVCodec ff_rscc_decoder;
  256. extern AVCodec ff_rv10_encoder;
  257. extern AVCodec ff_rv10_decoder;
  258. extern AVCodec ff_rv20_encoder;
  259. extern AVCodec ff_rv20_decoder;
  260. extern AVCodec ff_rv30_decoder;
  261. extern AVCodec ff_rv40_decoder;
  262. extern AVCodec ff_s302m_encoder;
  263. extern AVCodec ff_s302m_decoder;
  264. extern AVCodec ff_sanm_decoder;
  265. extern AVCodec ff_scpr_decoder;
  266. extern AVCodec ff_screenpresso_decoder;
  267. extern AVCodec ff_sdx2_dpcm_decoder;
  268. extern AVCodec ff_sgi_encoder;
  269. extern AVCodec ff_sgi_decoder;
  270. extern AVCodec ff_sgirle_decoder;
  271. extern AVCodec ff_sheervideo_decoder;
  272. extern AVCodec ff_smacker_decoder;
  273. extern AVCodec ff_smc_decoder;
  274. extern AVCodec ff_smvjpeg_decoder;
  275. extern AVCodec ff_snow_encoder;
  276. extern AVCodec ff_snow_decoder;
  277. extern AVCodec ff_sp5x_decoder;
  278. extern AVCodec ff_speedhq_decoder;
  279. extern AVCodec ff_srgc_decoder;
  280. extern AVCodec ff_sunrast_encoder;
  281. extern AVCodec ff_sunrast_decoder;
  282. extern AVCodec ff_svq1_encoder;
  283. extern AVCodec ff_svq1_decoder;
  284. extern AVCodec ff_svq3_decoder;
  285. extern AVCodec ff_targa_encoder;
  286. extern AVCodec ff_targa_decoder;
  287. extern AVCodec ff_targa_y216_decoder;
  288. extern AVCodec ff_tdsc_decoder;
  289. extern AVCodec ff_theora_decoder;
  290. extern AVCodec ff_thp_decoder;
  291. extern AVCodec ff_tiertexseqvideo_decoder;
  292. extern AVCodec ff_tiff_encoder;
  293. extern AVCodec ff_tiff_decoder;
  294. extern AVCodec ff_tmv_decoder;
  295. extern AVCodec ff_truemotion1_decoder;
  296. extern AVCodec ff_truemotion2_decoder;
  297. extern AVCodec ff_truemotion2rt_decoder;
  298. extern AVCodec ff_tscc_decoder;
  299. extern AVCodec ff_tscc2_decoder;
  300. extern AVCodec ff_txd_decoder;
  301. extern AVCodec ff_ulti_decoder;
  302. extern AVCodec ff_utvideo_encoder;
  303. extern AVCodec ff_utvideo_decoder;
  304. extern AVCodec ff_v210_encoder;
  305. extern AVCodec ff_v210_decoder;
  306. extern AVCodec ff_v210x_decoder;
  307. extern AVCodec ff_v308_encoder;
  308. extern AVCodec ff_v308_decoder;
  309. extern AVCodec ff_v408_encoder;
  310. extern AVCodec ff_v408_decoder;
  311. extern AVCodec ff_v410_encoder;
  312. extern AVCodec ff_v410_decoder;
  313. extern AVCodec ff_vb_decoder;
  314. extern AVCodec ff_vble_decoder;
  315. extern AVCodec ff_vc1_decoder;
  316. extern AVCodec ff_vc1_crystalhd_decoder;
  317. extern AVCodec ff_vc1image_decoder;
  318. extern AVCodec ff_vc1_mmal_decoder;
  319. extern AVCodec ff_vc1_qsv_decoder;
  320. extern AVCodec ff_vc1_v4l2m2m_decoder;
  321. extern AVCodec ff_vc2_encoder;
  322. extern AVCodec ff_vcr1_decoder;
  323. extern AVCodec ff_vmdvideo_decoder;
  324. extern AVCodec ff_vmnc_decoder;
  325. extern AVCodec ff_vp3_decoder;
  326. extern AVCodec ff_vp5_decoder;
  327. extern AVCodec ff_vp6_decoder;
  328. extern AVCodec ff_vp6a_decoder;
  329. extern AVCodec ff_vp6f_decoder;
  330. extern AVCodec ff_vp7_decoder;
  331. extern AVCodec ff_vp8_decoder;
  332. extern AVCodec ff_vp8_rkmpp_decoder;
  333. extern AVCodec ff_vp8_v4l2m2m_decoder;
  334. extern AVCodec ff_vp9_decoder;
  335. extern AVCodec ff_vp9_rkmpp_decoder;
  336. extern AVCodec ff_vp9_v4l2m2m_decoder;
  337. extern AVCodec ff_vqa_decoder;
  338. extern AVCodec ff_webp_decoder;
  339. extern AVCodec ff_wcmv_decoder;
  340. extern AVCodec ff_wrapped_avframe_encoder;
  341. extern AVCodec ff_wrapped_avframe_decoder;
  342. extern AVCodec ff_wmv1_encoder;
  343. extern AVCodec ff_wmv1_decoder;
  344. extern AVCodec ff_wmv2_encoder;
  345. extern AVCodec ff_wmv2_decoder;
  346. extern AVCodec ff_wmv3_decoder;
  347. extern AVCodec ff_wmv3_crystalhd_decoder;
  348. extern AVCodec ff_wmv3image_decoder;
  349. extern AVCodec ff_wnv1_decoder;
  350. extern AVCodec ff_xan_wc3_decoder;
  351. extern AVCodec ff_xan_wc4_decoder;
  352. extern AVCodec ff_xbm_encoder;
  353. extern AVCodec ff_xbm_decoder;
  354. extern AVCodec ff_xface_encoder;
  355. extern AVCodec ff_xface_decoder;
  356. extern AVCodec ff_xl_decoder;
  357. extern AVCodec ff_xpm_decoder;
  358. extern AVCodec ff_xwd_encoder;
  359. extern AVCodec ff_xwd_decoder;
  360. extern AVCodec ff_y41p_encoder;
  361. extern AVCodec ff_y41p_decoder;
  362. extern AVCodec ff_ylc_decoder;
  363. extern AVCodec ff_yop_decoder;
  364. extern AVCodec ff_yuv4_encoder;
  365. extern AVCodec ff_yuv4_decoder;
  366. extern AVCodec ff_zero12v_decoder;
  367. extern AVCodec ff_zerocodec_decoder;
  368. extern AVCodec ff_zlib_encoder;
  369. extern AVCodec ff_zlib_decoder;
  370. extern AVCodec ff_zmbv_encoder;
  371. extern AVCodec ff_zmbv_decoder;
  372. /* audio codecs */
  373. extern AVCodec ff_aac_encoder;
  374. extern AVCodec ff_aac_decoder;
  375. extern AVCodec ff_aac_fixed_decoder;
  376. extern AVCodec ff_aac_latm_decoder;
  377. extern AVCodec ff_ac3_encoder;
  378. extern AVCodec ff_ac3_decoder;
  379. extern AVCodec ff_ac3_fixed_encoder;
  380. extern AVCodec ff_ac3_fixed_decoder;
  381. extern AVCodec ff_alac_encoder;
  382. extern AVCodec ff_alac_decoder;
  383. extern AVCodec ff_als_decoder;
  384. extern AVCodec ff_amrnb_decoder;
  385. extern AVCodec ff_amrwb_decoder;
  386. extern AVCodec ff_ape_decoder;
  387. extern AVCodec ff_aptx_encoder;
  388. extern AVCodec ff_aptx_decoder;
  389. extern AVCodec ff_aptx_hd_encoder;
  390. extern AVCodec ff_aptx_hd_decoder;
  391. extern AVCodec ff_atrac1_decoder;
  392. extern AVCodec ff_atrac3_decoder;
  393. extern AVCodec ff_atrac3al_decoder;
  394. extern AVCodec ff_atrac3p_decoder;
  395. extern AVCodec ff_atrac3pal_decoder;
  396. extern AVCodec ff_atrac9_decoder;
  397. extern AVCodec ff_binkaudio_dct_decoder;
  398. extern AVCodec ff_binkaudio_rdft_decoder;
  399. extern AVCodec ff_bmv_audio_decoder;
  400. extern AVCodec ff_cook_decoder;
  401. extern AVCodec ff_dca_encoder;
  402. extern AVCodec ff_dca_decoder;
  403. extern AVCodec ff_dolby_e_decoder;
  404. extern AVCodec ff_dsd_lsbf_decoder;
  405. extern AVCodec ff_dsd_msbf_decoder;
  406. extern AVCodec ff_dsd_lsbf_planar_decoder;
  407. extern AVCodec ff_dsd_msbf_planar_decoder;
  408. extern AVCodec ff_dsicinaudio_decoder;
  409. extern AVCodec ff_dss_sp_decoder;
  410. extern AVCodec ff_dst_decoder;
  411. extern AVCodec ff_eac3_encoder;
  412. extern AVCodec ff_eac3_decoder;
  413. extern AVCodec ff_evrc_decoder;
  414. extern AVCodec ff_ffwavesynth_decoder;
  415. extern AVCodec ff_flac_encoder;
  416. extern AVCodec ff_flac_decoder;
  417. extern AVCodec ff_g723_1_encoder;
  418. extern AVCodec ff_g723_1_decoder;
  419. extern AVCodec ff_g729_decoder;
  420. extern AVCodec ff_gsm_decoder;
  421. extern AVCodec ff_gsm_ms_decoder;
  422. extern AVCodec ff_iac_decoder;
  423. extern AVCodec ff_ilbc_decoder;
  424. extern AVCodec ff_imc_decoder;
  425. extern AVCodec ff_interplay_acm_decoder;
  426. extern AVCodec ff_mace3_decoder;
  427. extern AVCodec ff_mace6_decoder;
  428. extern AVCodec ff_metasound_decoder;
  429. extern AVCodec ff_mlp_encoder;
  430. extern AVCodec ff_mlp_decoder;
  431. extern AVCodec ff_mp1_decoder;
  432. extern AVCodec ff_mp1float_decoder;
  433. extern AVCodec ff_mp2_encoder;
  434. extern AVCodec ff_mp2_decoder;
  435. extern AVCodec ff_mp2float_decoder;
  436. extern AVCodec ff_mp2fixed_encoder;
  437. extern AVCodec ff_mp3float_decoder;
  438. extern AVCodec ff_mp3_decoder;
  439. extern AVCodec ff_mp3adufloat_decoder;
  440. extern AVCodec ff_mp3adu_decoder;
  441. extern AVCodec ff_mp3on4float_decoder;
  442. extern AVCodec ff_mp3on4_decoder;
  443. extern AVCodec ff_mpc7_decoder;
  444. extern AVCodec ff_mpc8_decoder;
  445. extern AVCodec ff_nellymoser_encoder;
  446. extern AVCodec ff_nellymoser_decoder;
  447. extern AVCodec ff_on2avc_decoder;
  448. extern AVCodec ff_opus_encoder;
  449. extern AVCodec ff_opus_decoder;
  450. extern AVCodec ff_paf_audio_decoder;
  451. extern AVCodec ff_qcelp_decoder;
  452. extern AVCodec ff_qdm2_decoder;
  453. extern AVCodec ff_qdmc_decoder;
  454. extern AVCodec ff_ra_144_encoder;
  455. extern AVCodec ff_ra_144_decoder;
  456. extern AVCodec ff_ra_288_decoder;
  457. extern AVCodec ff_ralf_decoder;
  458. extern AVCodec ff_sbc_encoder;
  459. extern AVCodec ff_sbc_decoder;
  460. extern AVCodec ff_shorten_decoder;
  461. extern AVCodec ff_sipr_decoder;
  462. extern AVCodec ff_smackaud_decoder;
  463. extern AVCodec ff_sonic_encoder;
  464. extern AVCodec ff_sonic_decoder;
  465. extern AVCodec ff_sonic_ls_encoder;
  466. extern AVCodec ff_tak_decoder;
  467. extern AVCodec ff_truehd_encoder;
  468. extern AVCodec ff_truehd_decoder;
  469. extern AVCodec ff_truespeech_decoder;
  470. extern AVCodec ff_tta_encoder;
  471. extern AVCodec ff_tta_decoder;
  472. extern AVCodec ff_twinvq_decoder;
  473. extern AVCodec ff_vmdaudio_decoder;
  474. extern AVCodec ff_vorbis_encoder;
  475. extern AVCodec ff_vorbis_decoder;
  476. extern AVCodec ff_wavpack_encoder;
  477. extern AVCodec ff_wavpack_decoder;
  478. extern AVCodec ff_wmalossless_decoder;
  479. extern AVCodec ff_wmapro_decoder;
  480. extern AVCodec ff_wmav1_encoder;
  481. extern AVCodec ff_wmav1_decoder;
  482. extern AVCodec ff_wmav2_encoder;
  483. extern AVCodec ff_wmav2_decoder;
  484. extern AVCodec ff_wmavoice_decoder;
  485. extern AVCodec ff_ws_snd1_decoder;
  486. extern AVCodec ff_xma1_decoder;
  487. extern AVCodec ff_xma2_decoder;
  488. /* PCM codecs */
  489. extern AVCodec ff_pcm_alaw_encoder;
  490. extern AVCodec ff_pcm_alaw_decoder;
  491. extern AVCodec ff_pcm_bluray_decoder;
  492. extern AVCodec ff_pcm_dvd_decoder;
  493. extern AVCodec ff_pcm_f16le_decoder;
  494. extern AVCodec ff_pcm_f24le_decoder;
  495. extern AVCodec ff_pcm_f32be_encoder;
  496. extern AVCodec ff_pcm_f32be_decoder;
  497. extern AVCodec ff_pcm_f32le_encoder;
  498. extern AVCodec ff_pcm_f32le_decoder;
  499. extern AVCodec ff_pcm_f64be_encoder;
  500. extern AVCodec ff_pcm_f64be_decoder;
  501. extern AVCodec ff_pcm_f64le_encoder;
  502. extern AVCodec ff_pcm_f64le_decoder;
  503. extern AVCodec ff_pcm_lxf_decoder;
  504. extern AVCodec ff_pcm_mulaw_encoder;
  505. extern AVCodec ff_pcm_mulaw_decoder;
  506. extern AVCodec ff_pcm_s8_encoder;
  507. extern AVCodec ff_pcm_s8_decoder;
  508. extern AVCodec ff_pcm_s8_planar_encoder;
  509. extern AVCodec ff_pcm_s8_planar_decoder;
  510. extern AVCodec ff_pcm_s16be_encoder;
  511. extern AVCodec ff_pcm_s16be_decoder;
  512. extern AVCodec ff_pcm_s16be_planar_encoder;
  513. extern AVCodec ff_pcm_s16be_planar_decoder;
  514. extern AVCodec ff_pcm_s16le_encoder;
  515. extern AVCodec ff_pcm_s16le_decoder;
  516. extern AVCodec ff_pcm_s16le_planar_encoder;
  517. extern AVCodec ff_pcm_s16le_planar_decoder;
  518. extern AVCodec ff_pcm_s24be_encoder;
  519. extern AVCodec ff_pcm_s24be_decoder;
  520. extern AVCodec ff_pcm_s24daud_encoder;
  521. extern AVCodec ff_pcm_s24daud_decoder;
  522. extern AVCodec ff_pcm_s24le_encoder;
  523. extern AVCodec ff_pcm_s24le_decoder;
  524. extern AVCodec ff_pcm_s24le_planar_encoder;
  525. extern AVCodec ff_pcm_s24le_planar_decoder;
  526. extern AVCodec ff_pcm_s32be_encoder;
  527. extern AVCodec ff_pcm_s32be_decoder;
  528. extern AVCodec ff_pcm_s32le_encoder;
  529. extern AVCodec ff_pcm_s32le_decoder;
  530. extern AVCodec ff_pcm_s32le_planar_encoder;
  531. extern AVCodec ff_pcm_s32le_planar_decoder;
  532. extern AVCodec ff_pcm_s64be_encoder;
  533. extern AVCodec ff_pcm_s64be_decoder;
  534. extern AVCodec ff_pcm_s64le_encoder;
  535. extern AVCodec ff_pcm_s64le_decoder;
  536. extern AVCodec ff_pcm_u8_encoder;
  537. extern AVCodec ff_pcm_u8_decoder;
  538. extern AVCodec ff_pcm_u16be_encoder;
  539. extern AVCodec ff_pcm_u16be_decoder;
  540. extern AVCodec ff_pcm_u16le_encoder;
  541. extern AVCodec ff_pcm_u16le_decoder;
  542. extern AVCodec ff_pcm_u24be_encoder;
  543. extern AVCodec ff_pcm_u24be_decoder;
  544. extern AVCodec ff_pcm_u24le_encoder;
  545. extern AVCodec ff_pcm_u24le_decoder;
  546. extern AVCodec ff_pcm_u32be_encoder;
  547. extern AVCodec ff_pcm_u32be_decoder;
  548. extern AVCodec ff_pcm_u32le_encoder;
  549. extern AVCodec ff_pcm_u32le_decoder;
  550. extern AVCodec ff_pcm_vidc_encoder;
  551. extern AVCodec ff_pcm_vidc_decoder;
  552. extern AVCodec ff_pcm_zork_decoder;
  553. /* DPCM codecs */
  554. extern AVCodec ff_gremlin_dpcm_decoder;
  555. extern AVCodec ff_interplay_dpcm_decoder;
  556. extern AVCodec ff_roq_dpcm_encoder;
  557. extern AVCodec ff_roq_dpcm_decoder;
  558. extern AVCodec ff_sol_dpcm_decoder;
  559. extern AVCodec ff_xan_dpcm_decoder;
  560. /* ADPCM codecs */
  561. extern AVCodec ff_adpcm_4xm_decoder;
  562. extern AVCodec ff_adpcm_adx_encoder;
  563. extern AVCodec ff_adpcm_adx_decoder;
  564. extern AVCodec ff_adpcm_afc_decoder;
  565. extern AVCodec ff_adpcm_aica_decoder;
  566. extern AVCodec ff_adpcm_ct_decoder;
  567. extern AVCodec ff_adpcm_dtk_decoder;
  568. extern AVCodec ff_adpcm_ea_decoder;
  569. extern AVCodec ff_adpcm_ea_maxis_xa_decoder;
  570. extern AVCodec ff_adpcm_ea_r1_decoder;
  571. extern AVCodec ff_adpcm_ea_r2_decoder;
  572. extern AVCodec ff_adpcm_ea_r3_decoder;
  573. extern AVCodec ff_adpcm_ea_xas_decoder;
  574. extern AVCodec ff_adpcm_g722_encoder;
  575. extern AVCodec ff_adpcm_g722_decoder;
  576. extern AVCodec ff_adpcm_g726_encoder;
  577. extern AVCodec ff_adpcm_g726_decoder;
  578. extern AVCodec ff_adpcm_g726le_encoder;
  579. extern AVCodec ff_adpcm_g726le_decoder;
  580. extern AVCodec ff_adpcm_ima_amv_decoder;
  581. extern AVCodec ff_adpcm_ima_apc_decoder;
  582. extern AVCodec ff_adpcm_ima_dat4_decoder;
  583. extern AVCodec ff_adpcm_ima_dk3_decoder;
  584. extern AVCodec ff_adpcm_ima_dk4_decoder;
  585. extern AVCodec ff_adpcm_ima_ea_eacs_decoder;
  586. extern AVCodec ff_adpcm_ima_ea_sead_decoder;
  587. extern AVCodec ff_adpcm_ima_iss_decoder;
  588. extern AVCodec ff_adpcm_ima_oki_decoder;
  589. extern AVCodec ff_adpcm_ima_qt_encoder;
  590. extern AVCodec ff_adpcm_ima_qt_decoder;
  591. extern AVCodec ff_adpcm_ima_rad_decoder;
  592. extern AVCodec ff_adpcm_ima_smjpeg_decoder;
  593. extern AVCodec ff_adpcm_ima_wav_encoder;
  594. extern AVCodec ff_adpcm_ima_wav_decoder;
  595. extern AVCodec ff_adpcm_ima_ws_decoder;
  596. extern AVCodec ff_adpcm_ms_encoder;
  597. extern AVCodec ff_adpcm_ms_decoder;
  598. extern AVCodec ff_adpcm_mtaf_decoder;
  599. extern AVCodec ff_adpcm_psx_decoder;
  600. extern AVCodec ff_adpcm_sbpro_2_decoder;
  601. extern AVCodec ff_adpcm_sbpro_3_decoder;
  602. extern AVCodec ff_adpcm_sbpro_4_decoder;
  603. extern AVCodec ff_adpcm_swf_encoder;
  604. extern AVCodec ff_adpcm_swf_decoder;
  605. extern AVCodec ff_adpcm_thp_decoder;
  606. extern AVCodec ff_adpcm_thp_le_decoder;
  607. extern AVCodec ff_adpcm_vima_decoder;
  608. extern AVCodec ff_adpcm_xa_decoder;
  609. extern AVCodec ff_adpcm_yamaha_encoder;
  610. extern AVCodec ff_adpcm_yamaha_decoder;
  611. /* subtitles */
  612. extern AVCodec ff_ssa_encoder;
  613. extern AVCodec ff_ssa_decoder;
  614. extern AVCodec ff_ass_encoder;
  615. extern AVCodec ff_ass_decoder;
  616. extern AVCodec ff_ccaption_decoder;
  617. extern AVCodec ff_dvbsub_encoder;
  618. extern AVCodec ff_dvbsub_decoder;
  619. extern AVCodec ff_dvdsub_encoder;
  620. extern AVCodec ff_dvdsub_decoder;
  621. extern AVCodec ff_jacosub_decoder;
  622. extern AVCodec ff_microdvd_decoder;
  623. extern AVCodec ff_movtext_encoder;
  624. extern AVCodec ff_movtext_decoder;
  625. extern AVCodec ff_mpl2_decoder;
  626. extern AVCodec ff_pgssub_decoder;
  627. extern AVCodec ff_pjs_decoder;
  628. extern AVCodec ff_realtext_decoder;
  629. extern AVCodec ff_sami_decoder;
  630. extern AVCodec ff_srt_encoder;
  631. extern AVCodec ff_srt_decoder;
  632. extern AVCodec ff_stl_decoder;
  633. extern AVCodec ff_subrip_encoder;
  634. extern AVCodec ff_subrip_decoder;
  635. extern AVCodec ff_subviewer_decoder;
  636. extern AVCodec ff_subviewer1_decoder;
  637. extern AVCodec ff_text_encoder;
  638. extern AVCodec ff_text_decoder;
  639. extern AVCodec ff_vplayer_decoder;
  640. extern AVCodec ff_webvtt_encoder;
  641. extern AVCodec ff_webvtt_decoder;
  642. extern AVCodec ff_xsub_encoder;
  643. extern AVCodec ff_xsub_decoder;
  644. /* external libraries */
  645. extern AVCodec ff_aac_at_encoder;
  646. extern AVCodec ff_aac_at_decoder;
  647. extern AVCodec ff_ac3_at_decoder;
  648. extern AVCodec ff_adpcm_ima_qt_at_decoder;
  649. extern AVCodec ff_alac_at_encoder;
  650. extern AVCodec ff_alac_at_decoder;
  651. extern AVCodec ff_amr_nb_at_decoder;
  652. extern AVCodec ff_eac3_at_decoder;
  653. extern AVCodec ff_gsm_ms_at_decoder;
  654. extern AVCodec ff_ilbc_at_encoder;
  655. extern AVCodec ff_ilbc_at_decoder;
  656. extern AVCodec ff_mp1_at_decoder;
  657. extern AVCodec ff_mp2_at_decoder;
  658. extern AVCodec ff_mp3_at_decoder;
  659. extern AVCodec ff_pcm_alaw_at_encoder;
  660. extern AVCodec ff_pcm_alaw_at_decoder;
  661. extern AVCodec ff_pcm_mulaw_at_encoder;
  662. extern AVCodec ff_pcm_mulaw_at_decoder;
  663. extern AVCodec ff_qdmc_at_decoder;
  664. extern AVCodec ff_qdm2_at_decoder;
  665. extern AVCodec ff_libaom_av1_decoder;
  666. extern AVCodec ff_libaom_av1_encoder;
  667. extern AVCodec ff_libcelt_decoder;
  668. extern AVCodec ff_libcodec2_encoder;
  669. extern AVCodec ff_libcodec2_decoder;
  670. extern AVCodec ff_libdavs2_decoder;
  671. extern AVCodec ff_libfdk_aac_encoder;
  672. extern AVCodec ff_libfdk_aac_decoder;
  673. extern AVCodec ff_libgsm_encoder;
  674. extern AVCodec ff_libgsm_decoder;
  675. extern AVCodec ff_libgsm_ms_encoder;
  676. extern AVCodec ff_libgsm_ms_decoder;
  677. extern AVCodec ff_libilbc_encoder;
  678. extern AVCodec ff_libilbc_decoder;
  679. extern AVCodec ff_libmp3lame_encoder;
  680. extern AVCodec ff_libopencore_amrnb_encoder;
  681. extern AVCodec ff_libopencore_amrnb_decoder;
  682. extern AVCodec ff_libopencore_amrwb_decoder;
  683. extern AVCodec ff_libopenjpeg_encoder;
  684. extern AVCodec ff_libopenjpeg_decoder;
  685. extern AVCodec ff_libopus_encoder;
  686. extern AVCodec ff_libopus_decoder;
  687. extern AVCodec ff_librsvg_decoder;
  688. extern AVCodec ff_libshine_encoder;
  689. extern AVCodec ff_libspeex_encoder;
  690. extern AVCodec ff_libspeex_decoder;
  691. extern AVCodec ff_libtheora_encoder;
  692. extern AVCodec ff_libtwolame_encoder;
  693. extern AVCodec ff_libvo_amrwbenc_encoder;
  694. extern AVCodec ff_libvorbis_encoder;
  695. extern AVCodec ff_libvorbis_decoder;
  696. extern AVCodec ff_libvpx_vp8_encoder;
  697. extern AVCodec ff_libvpx_vp8_decoder;
  698. extern AVCodec ff_libvpx_vp9_encoder;
  699. extern AVCodec ff_libvpx_vp9_decoder;
  700. extern AVCodec ff_libwavpack_encoder;
  701. /* preferred over libwebp */
  702. extern AVCodec ff_libwebp_anim_encoder;
  703. extern AVCodec ff_libwebp_encoder;
  704. extern AVCodec ff_libx262_encoder;
  705. extern AVCodec ff_libx264_encoder;
  706. extern AVCodec ff_libx264rgb_encoder;
  707. extern AVCodec ff_libx265_encoder;
  708. extern AVCodec ff_libxavs_encoder;
  709. extern AVCodec ff_libxavs2_encoder;
  710. extern AVCodec ff_libxvid_encoder;
  711. extern AVCodec ff_libzvbi_teletext_decoder;
  712. /* text */
  713. extern AVCodec ff_bintext_decoder;
  714. extern AVCodec ff_xbin_decoder;
  715. extern AVCodec ff_idf_decoder;
  716. /* external libraries, that shouldn't be used by default if one of the
  717. * above is available */
  718. extern AVCodec ff_h263_v4l2m2m_encoder;
  719. extern AVCodec ff_libopenh264_encoder;
  720. extern AVCodec ff_libopenh264_decoder;
  721. extern AVCodec ff_h264_amf_encoder;
  722. extern AVCodec ff_h264_cuvid_decoder;
  723. extern AVCodec ff_h264_nvenc_encoder;
  724. extern AVCodec ff_h264_omx_encoder;
  725. extern AVCodec ff_h264_qsv_encoder;
  726. extern AVCodec ff_h264_v4l2m2m_encoder;
  727. extern AVCodec ff_h264_vaapi_encoder;
  728. extern AVCodec ff_h264_videotoolbox_encoder;
  729. #if FF_API_NVENC_OLD_NAME
  730. extern AVCodec ff_nvenc_encoder;
  731. extern AVCodec ff_nvenc_h264_encoder;
  732. extern AVCodec ff_nvenc_hevc_encoder;
  733. #endif
  734. extern AVCodec ff_hevc_amf_encoder;
  735. extern AVCodec ff_hevc_cuvid_decoder;
  736. extern AVCodec ff_hevc_mediacodec_decoder;
  737. extern AVCodec ff_hevc_nvenc_encoder;
  738. extern AVCodec ff_hevc_qsv_encoder;
  739. extern AVCodec ff_hevc_v4l2m2m_encoder;
  740. extern AVCodec ff_hevc_vaapi_encoder;
  741. extern AVCodec ff_hevc_videotoolbox_encoder;
  742. extern AVCodec ff_libkvazaar_encoder;
  743. extern AVCodec ff_mjpeg_cuvid_decoder;
  744. extern AVCodec ff_mjpeg_qsv_encoder;
  745. extern AVCodec ff_mjpeg_vaapi_encoder;
  746. extern AVCodec ff_mpeg1_cuvid_decoder;
  747. extern AVCodec ff_mpeg2_cuvid_decoder;
  748. extern AVCodec ff_mpeg2_qsv_encoder;
  749. extern AVCodec ff_mpeg2_vaapi_encoder;
  750. extern AVCodec ff_mpeg4_cuvid_decoder;
  751. extern AVCodec ff_mpeg4_mediacodec_decoder;
  752. extern AVCodec ff_mpeg4_v4l2m2m_encoder;
  753. extern AVCodec ff_vc1_cuvid_decoder;
  754. extern AVCodec ff_vp8_cuvid_decoder;
  755. extern AVCodec ff_vp8_mediacodec_decoder;
  756. extern AVCodec ff_vp8_qsv_decoder;
  757. extern AVCodec ff_vp8_v4l2m2m_encoder;
  758. extern AVCodec ff_vp8_vaapi_encoder;
  759. extern AVCodec ff_vp9_cuvid_decoder;
  760. extern AVCodec ff_vp9_mediacodec_decoder;
  761. extern AVCodec ff_vp9_vaapi_encoder;
  762. // The iterate API is not usable with ossfuzz due to the excessive size of binaries created
  763. #if CONFIG_OSSFUZZ
  764. AVCodec * codec_list[] = {
  765. NULL,
  766. NULL
  767. };
  768. #else
  769. #include "libavcodec/codec_list.c"
  770. #endif
  771. static AVOnce av_codec_static_init = AV_ONCE_INIT;
  772. static void av_codec_init_static(void)
  773. {
  774. for (int i = 0; codec_list[i]; i++) {
  775. if (codec_list[i]->init_static_data)
  776. codec_list[i]->init_static_data((AVCodec*)codec_list[i]);
  777. }
  778. }
  779. const AVCodec *av_codec_iterate(void **opaque)
  780. {
  781. uintptr_t i = (uintptr_t)*opaque;
  782. const AVCodec *c = codec_list[i];
  783. ff_thread_once(&av_codec_static_init, av_codec_init_static);
  784. if (c)
  785. *opaque = (void*)(i + 1);
  786. return c;
  787. }
  788. #if FF_API_NEXT
  789. FF_DISABLE_DEPRECATION_WARNINGS
  790. static AVOnce av_codec_next_init = AV_ONCE_INIT;
  791. static void av_codec_init_next(void)
  792. {
  793. AVCodec *prev = NULL, *p;
  794. void *i = 0;
  795. while ((p = (AVCodec*)av_codec_iterate(&i))) {
  796. if (prev)
  797. prev->next = p;
  798. prev = p;
  799. }
  800. }
  801. av_cold void avcodec_register(AVCodec *codec)
  802. {
  803. ff_thread_once(&av_codec_next_init, av_codec_init_next);
  804. }
  805. AVCodec *av_codec_next(const AVCodec *c)
  806. {
  807. ff_thread_once(&av_codec_next_init, av_codec_init_next);
  808. if (c)
  809. return c->next;
  810. else
  811. return (AVCodec*)codec_list[0];
  812. }
  813. void avcodec_register_all(void)
  814. {
  815. ff_thread_once(&av_codec_next_init, av_codec_init_next);
  816. }
  817. FF_ENABLE_DEPRECATION_WARNINGS
  818. #endif
  819. static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
  820. {
  821. switch(id){
  822. //This is for future deprecatec codec ids, its empty since
  823. //last major bump but will fill up again over time, please don't remove it
  824. default : return id;
  825. }
  826. }
  827. static AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *))
  828. {
  829. const AVCodec *p, *experimental = NULL;
  830. void *i = 0;
  831. id = remap_deprecated_codec_id(id);
  832. while ((p = av_codec_iterate(&i))) {
  833. if (!x(p))
  834. continue;
  835. if (p->id == id) {
  836. if (p->capabilities & AV_CODEC_CAP_EXPERIMENTAL && !experimental) {
  837. experimental = p;
  838. } else
  839. return (AVCodec*)p;
  840. }
  841. }
  842. return (AVCodec*)experimental;
  843. }
  844. AVCodec *avcodec_find_encoder(enum AVCodecID id)
  845. {
  846. return find_codec(id, av_codec_is_encoder);
  847. }
  848. AVCodec *avcodec_find_decoder(enum AVCodecID id)
  849. {
  850. return find_codec(id, av_codec_is_decoder);
  851. }
  852. static AVCodec *find_codec_by_name(const char *name, int (*x)(const AVCodec *))
  853. {
  854. void *i = 0;
  855. const AVCodec *p;
  856. if (!name)
  857. return NULL;
  858. while ((p = av_codec_iterate(&i))) {
  859. if (!x(p))
  860. continue;
  861. if (strcmp(name, p->name) == 0)
  862. return (AVCodec*)p;
  863. }
  864. return NULL;
  865. }
  866. AVCodec *avcodec_find_encoder_by_name(const char *name)
  867. {
  868. return find_codec_by_name(name, av_codec_is_encoder);
  869. }
  870. AVCodec *avcodec_find_decoder_by_name(const char *name)
  871. {
  872. return find_codec_by_name(name, av_codec_is_decoder);
  873. }