FFmpeg coverage


Directory: ../../../ffmpeg/
File: src/libavcodec/allcodecs.c
Date: 2021-09-24 20:55:06
Exec Total Coverage
Lines: 41 44 93.2%
Branches: 19 24 79.2%

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