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