allcodecs.c 12.5 KB
Newer Older
1
/*
2
 * Provides registration of all codecs, parsers and bitstream filters for libavcodec.
3 4
 * Copyright (c) 2002 Fabrice Bellard.
 *
5 6 7
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
8 9
 * modify it under the terms of the GNU Lesser General Public
 * 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 14 15 16 17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
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
 */
Michael Niedermayer's avatar
Michael Niedermayer committed
21 22 23

/**
 * @file allcodecs.c
24
 * Provides registration of all codecs, parsers and bitstream filters for libavcodec.
Michael Niedermayer's avatar
Michael Niedermayer committed
25 26
 */

27
#include "avcodec.h"
28

29 30 31 32 33 34
#define REGISTER_ENCODER(X,x) { \
          extern AVCodec x##_encoder; \
          if(ENABLE_##X##_ENCODER)  register_avcodec(&x##_encoder); }
#define REGISTER_DECODER(X,x) { \
          extern AVCodec x##_decoder; \
          if(ENABLE_##X##_DECODER)  register_avcodec(&x##_decoder); }
35 36
#define REGISTER_ENCDEC(X,x)  REGISTER_ENCODER(X,x); REGISTER_DECODER(X,x)

37 38 39 40 41 42
#define REGISTER_PARSER(X,x) { \
          extern AVCodecParser x##_parser; \
          if(ENABLE_##X##_PARSER)  av_register_codec_parser(&x##_parser); }
#define REGISTER_BSF(X,x) { \
          extern AVBitStreamFilter x##_bsf; \
          if(ENABLE_##X##_BSF)     av_register_bitstream_filter(&x##_bsf); }
43

44
/**
45 46 47 48 49 50 51 52
 * Register all the codecs, parsers and bitstream filters which were enabled at
 * configuration time. If you do not call this function you can select exactly
 * which formats you want to support, by using the individual registration
 * functions.
 *
 * @see register_avcodec
 * @see av_register_codec_parser
 * @see av_register_bitstream_filter
53 54 55
 */
void avcodec_register_all(void)
{
56
    static int initialized;
57

58
    if (initialized)
59
        return;
60
    initialized = 1;
61

62
    /* video codecs */
63
    REGISTER_DECODER (AASC, aasc);
Vladimir Voroshilov's avatar
Vladimir Voroshilov committed
64
    REGISTER_DECODER (AMV, amv);
65 66 67 68
    REGISTER_ENCDEC  (ASV1, asv1);
    REGISTER_ENCDEC  (ASV2, asv2);
    REGISTER_DECODER (AVS, avs);
    REGISTER_DECODER (BETHSOFTVID, bethsoftvid);
Sisir Koppaka's avatar
Sisir Koppaka committed
69
    REGISTER_DECODER (BFI, bfi);
70 71 72 73 74 75 76
    REGISTER_ENCDEC  (BMP, bmp);
    REGISTER_DECODER (C93, c93);
    REGISTER_DECODER (CAVS, cavs);
    REGISTER_DECODER (CINEPAK, cinepak);
    REGISTER_DECODER (CLJR, cljr);
    REGISTER_DECODER (CSCD, cscd);
    REGISTER_DECODER (CYUV, cyuv);
77
    REGISTER_ENCDEC  (DNXHD, dnxhd);
78 79 80
    REGISTER_DECODER (DSICINVIDEO, dsicinvideo);
    REGISTER_ENCDEC  (DVVIDEO, dvvideo);
    REGISTER_DECODER (DXA, dxa);
Peter Ross's avatar
Peter Ross committed
81
    REGISTER_DECODER (EACMV, eacmv);
Peter Ross's avatar
Peter Ross committed
82
    REGISTER_DECODER (EATGV, eatgv);
83
    REGISTER_DECODER (EIGHTBPS, eightbps);
Jai Menon's avatar
Jai Menon committed
84 85
    REGISTER_DECODER (EIGHTSVX_EXP, eightsvx_exp);
    REGISTER_DECODER (EIGHTSVX_FIB, eightsvx_fib);
Eli Friedman's avatar
Eli Friedman committed
86
    REGISTER_DECODER (ESCAPE124, escape124);
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
    REGISTER_ENCDEC  (FFV1, ffv1);
    REGISTER_ENCDEC  (FFVHUFF, ffvhuff);
    REGISTER_ENCDEC  (FLASHSV, flashsv);
    REGISTER_DECODER (FLIC, flic);
    REGISTER_ENCDEC  (FLV, flv);
    REGISTER_DECODER (FOURXM, fourxm);
    REGISTER_DECODER (FRAPS, fraps);
    REGISTER_ENCDEC  (GIF, gif);
    REGISTER_ENCDEC  (H261, h261);
    REGISTER_ENCDEC  (H263, h263);
    REGISTER_DECODER (H263I, h263i);
    REGISTER_ENCODER (H263P, h263p);
    REGISTER_DECODER (H264, h264);
    REGISTER_ENCDEC  (HUFFYUV, huffyuv);
    REGISTER_DECODER (IDCIN, idcin);
    REGISTER_DECODER (INDEO2, indeo2);
    REGISTER_DECODER (INDEO3, indeo3);
    REGISTER_DECODER (INTERPLAY_VIDEO, interplay_video);
    REGISTER_ENCDEC  (JPEGLS, jpegls);
    REGISTER_DECODER (KMVC, kmvc);
    REGISTER_ENCODER (LJPEG, ljpeg);
    REGISTER_DECODER (LOCO, loco);
    REGISTER_DECODER (MDEC, mdec);
Ramiro Polla's avatar
Ramiro Polla committed
110
    REGISTER_DECODER (MIMIC, mimic);
111 112 113
    REGISTER_ENCDEC  (MJPEG, mjpeg);
    REGISTER_DECODER (MJPEGB, mjpegb);
    REGISTER_DECODER (MMVIDEO, mmvideo);
Gregory Montoir's avatar
Gregory Montoir committed
114
    REGISTER_DECODER (MOTIONPIXELS, motionpixels);
115 116 117 118 119 120 121 122 123 124 125 126 127 128
    REGISTER_DECODER (MPEG_XVMC, mpeg_xvmc);
    REGISTER_ENCDEC  (MPEG1VIDEO, mpeg1video);
    REGISTER_ENCDEC  (MPEG2VIDEO, mpeg2video);
    REGISTER_ENCDEC  (MPEG4, mpeg4);
    REGISTER_DECODER (MPEGVIDEO, mpegvideo);
    REGISTER_ENCDEC  (MSMPEG4V1, msmpeg4v1);
    REGISTER_ENCDEC  (MSMPEG4V2, msmpeg4v2);
    REGISTER_ENCDEC  (MSMPEG4V3, msmpeg4v3);
    REGISTER_DECODER (MSRLE, msrle);
    REGISTER_DECODER (MSVIDEO1, msvideo1);
    REGISTER_DECODER (MSZH, mszh);
    REGISTER_DECODER (NUV, nuv);
    REGISTER_ENCODER (PAM, pam);
    REGISTER_ENCODER (PBM, pbm);
129
    REGISTER_DECODER (PCX, pcx);
130 131 132 133 134 135 136 137 138
    REGISTER_ENCODER (PGM, pgm);
    REGISTER_ENCODER (PGMYUV, pgmyuv);
    REGISTER_ENCDEC  (PNG, png);
    REGISTER_ENCODER (PPM, ppm);
    REGISTER_DECODER (PTX, ptx);
    REGISTER_DECODER (QDRAW, qdraw);
    REGISTER_DECODER (QPEG, qpeg);
    REGISTER_ENCDEC  (QTRLE, qtrle);
    REGISTER_ENCDEC  (RAWVIDEO, rawvideo);
Sascha Sommer's avatar
Sascha Sommer committed
139
    REGISTER_DECODER (RL2, rl2);
140 141 142 143 144 145 146 147 148
    REGISTER_ENCDEC  (ROQ, roq);
    REGISTER_DECODER (RPZA, rpza);
    REGISTER_ENCDEC  (RV10, rv10);
    REGISTER_ENCDEC  (RV20, rv20);
    REGISTER_ENCDEC  (SGI, sgi);
    REGISTER_DECODER (SMACKER, smacker);
    REGISTER_DECODER (SMC, smc);
    REGISTER_ENCDEC  (SNOW, snow);
    REGISTER_DECODER (SP5X, sp5x);
Ivo van Poorten's avatar
Ivo van Poorten committed
149
    REGISTER_DECODER (SUNRAST, sunrast);
150 151 152 153 154 155 156 157 158 159 160 161
    REGISTER_ENCDEC  (SVQ1, svq1);
    REGISTER_DECODER (SVQ3, svq3);
    REGISTER_ENCDEC  (TARGA, targa);
    REGISTER_DECODER (THEORA, theora);
    REGISTER_DECODER (THP, thp);
    REGISTER_DECODER (TIERTEXSEQVIDEO, tiertexseqvideo);
    REGISTER_ENCDEC  (TIFF, tiff);
    REGISTER_DECODER (TRUEMOTION1, truemotion1);
    REGISTER_DECODER (TRUEMOTION2, truemotion2);
    REGISTER_DECODER (TSCC, tscc);
    REGISTER_DECODER (TXD, txd);
    REGISTER_DECODER (ULTI, ulti);
162
    REGISTER_DECODER (VB, vb);
163 164 165 166 167 168 169
    REGISTER_DECODER (VC1, vc1);
    REGISTER_DECODER (VCR1, vcr1);
    REGISTER_DECODER (VMDVIDEO, vmdvideo);
    REGISTER_DECODER (VMNC, vmnc);
    REGISTER_DECODER (VP3, vp3);
    REGISTER_DECODER (VP5, vp5);
    REGISTER_DECODER (VP6, vp6);
170
    REGISTER_DECODER (VP6A, vp6a);
171 172 173 174 175 176 177 178 179 180 181
    REGISTER_DECODER (VP6F, vp6f);
    REGISTER_DECODER (VQA, vqa);
    REGISTER_ENCDEC  (WMV1, wmv1);
    REGISTER_ENCDEC  (WMV2, wmv2);
    REGISTER_DECODER (WMV3, wmv3);
    REGISTER_DECODER (WNV1, wnv1);
    REGISTER_DECODER (XAN_WC3, xan_wc3);
    REGISTER_DECODER (XL, xl);
    REGISTER_DECODER (XSUB, xsub);
    REGISTER_ENCDEC  (ZLIB, zlib);
    REGISTER_ENCDEC  (ZMBV, zmbv);
182

183
    /* audio codecs */
184
    REGISTER_DECODER (AAC, aac);
185
    REGISTER_ENCDEC  (AC3, ac3);
186
    REGISTER_ENCDEC  (ALAC, alac);
Kostya Shishkov's avatar
Kostya Shishkov committed
187
    REGISTER_DECODER (APE, ape);
188 189 190 191 192 193 194 195
    REGISTER_DECODER (ATRAC3, atrac3);
    REGISTER_DECODER (COOK, cook);
    REGISTER_DECODER (DCA, dca);
    REGISTER_DECODER (DSICINAUDIO, dsicinaudio);
    REGISTER_ENCDEC  (FLAC, flac);
    REGISTER_DECODER (IMC, imc);
    REGISTER_DECODER (MACE3, mace3);
    REGISTER_DECODER (MACE6, mace6);
Ramiro Polla's avatar
Ramiro Polla committed
196
    REGISTER_DECODER (MLP, mlp);
197 198 199 200 201
    REGISTER_ENCDEC  (MP2, mp2);
    REGISTER_DECODER (MP3, mp3);
    REGISTER_DECODER (MP3ADU, mp3adu);
    REGISTER_DECODER (MP3ON4, mp3on4);
    REGISTER_DECODER (MPC7, mpc7);
202
    REGISTER_DECODER (MPC8, mpc8);
203
    REGISTER_ENCDEC  (NELLYMOSER, nellymoser);
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
    REGISTER_DECODER (QDM2, qdm2);
    REGISTER_DECODER (RA_144, ra_144);
    REGISTER_DECODER (RA_288, ra_288);
    REGISTER_DECODER (SHORTEN, shorten);
    REGISTER_DECODER (SMACKAUD, smackaud);
    REGISTER_ENCDEC  (SONIC, sonic);
    REGISTER_ENCODER (SONIC_LS, sonic_ls);
    REGISTER_DECODER (TRUESPEECH, truespeech);
    REGISTER_DECODER (TTA, tta);
    REGISTER_DECODER (VMDAUDIO, vmdaudio);
    REGISTER_ENCDEC  (VORBIS, vorbis);
    REGISTER_DECODER (WAVPACK, wavpack);
    REGISTER_ENCDEC  (WMAV1, wmav1);
    REGISTER_ENCDEC  (WMAV2, wmav2);
    REGISTER_DECODER (WS_SND1, ws_snd1);
219

Diego Biurrun's avatar
Diego Biurrun committed
220
    /* PCM codecs */
221
    REGISTER_ENCDEC  (PCM_ALAW, pcm_alaw);
222
    REGISTER_DECODER (PCM_DVD, pcm_dvd);
223
    REGISTER_ENCDEC  (PCM_F32BE, pcm_f32be);
224 225 226
    REGISTER_ENCDEC  (PCM_F32LE, pcm_f32le);
    REGISTER_ENCDEC  (PCM_F64BE, pcm_f64be);
    REGISTER_ENCDEC  (PCM_F64LE, pcm_f64le);
227 228 229 230
    REGISTER_ENCDEC  (PCM_MULAW, pcm_mulaw);
    REGISTER_ENCDEC  (PCM_S8, pcm_s8);
    REGISTER_ENCDEC  (PCM_S16BE, pcm_s16be);
    REGISTER_ENCDEC  (PCM_S16LE, pcm_s16le);
231
    REGISTER_DECODER (PCM_S16LE_PLANAR, pcm_s16le_planar);
232 233 234 235 236 237 238 239 240 241 242 243 244
    REGISTER_ENCDEC  (PCM_S24BE, pcm_s24be);
    REGISTER_ENCDEC  (PCM_S24DAUD, pcm_s24daud);
    REGISTER_ENCDEC  (PCM_S24LE, pcm_s24le);
    REGISTER_ENCDEC  (PCM_S32BE, pcm_s32be);
    REGISTER_ENCDEC  (PCM_S32LE, pcm_s32le);
    REGISTER_ENCDEC  (PCM_U8, pcm_u8);
    REGISTER_ENCDEC  (PCM_U16BE, pcm_u16be);
    REGISTER_ENCDEC  (PCM_U16LE, pcm_u16le);
    REGISTER_ENCDEC  (PCM_U24BE, pcm_u24be);
    REGISTER_ENCDEC  (PCM_U24LE, pcm_u24le);
    REGISTER_ENCDEC  (PCM_U32BE, pcm_u32be);
    REGISTER_ENCDEC  (PCM_U32LE, pcm_u32le);
    REGISTER_ENCDEC  (PCM_ZORK , pcm_zork);
245

Diego Biurrun's avatar
Diego Biurrun committed
246
    /* DPCM codecs */
247 248 249 250
    REGISTER_DECODER (INTERPLAY_DPCM, interplay_dpcm);
    REGISTER_ENCDEC  (ROQ_DPCM, roq_dpcm);
    REGISTER_DECODER (SOL_DPCM, sol_dpcm);
    REGISTER_DECODER (XAN_DPCM, xan_dpcm);
251

Diego Biurrun's avatar
Diego Biurrun committed
252
    /* ADPCM codecs */
253
    REGISTER_DECODER (ADPCM_4XM, adpcm_4xm);
254
    REGISTER_ENCDEC  (ADPCM_ADX, adpcm_adx);
255 256
    REGISTER_DECODER (ADPCM_CT, adpcm_ct);
    REGISTER_DECODER (ADPCM_EA, adpcm_ea);
Robert Marston's avatar
Robert Marston committed
257
    REGISTER_DECODER (ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa);
Peter Ross's avatar
Peter Ross committed
258 259 260
    REGISTER_DECODER (ADPCM_EA_R1, adpcm_ea_r1);
    REGISTER_DECODER (ADPCM_EA_R2, adpcm_ea_r2);
    REGISTER_DECODER (ADPCM_EA_R3, adpcm_ea_r3);
261
    REGISTER_DECODER (ADPCM_EA_XAS, adpcm_ea_xas);
262
    REGISTER_ENCDEC  (ADPCM_G726, adpcm_g726);
Vitor Sessak's avatar
Vitor Sessak committed
263
    REGISTER_DECODER (ADPCM_IMA_AMV, adpcm_ima_amv);
264 265
    REGISTER_DECODER (ADPCM_IMA_DK3, adpcm_ima_dk3);
    REGISTER_DECODER (ADPCM_IMA_DK4, adpcm_ima_dk4);
Peter Ross's avatar
Peter Ross committed
266
    REGISTER_DECODER (ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs);
Peter Ross's avatar
Peter Ross committed
267
    REGISTER_DECODER (ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead);
268
    REGISTER_ENCDEC  (ADPCM_IMA_QT, adpcm_ima_qt);
269
    REGISTER_DECODER (ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg);
270
    REGISTER_ENCDEC  (ADPCM_IMA_WAV, adpcm_ima_wav);
271
    REGISTER_DECODER (ADPCM_IMA_WS, adpcm_ima_ws);
272
    REGISTER_ENCDEC  (ADPCM_MS, adpcm_ms);
273 274 275
    REGISTER_DECODER (ADPCM_SBPRO_2, adpcm_sbpro_2);
    REGISTER_DECODER (ADPCM_SBPRO_3, adpcm_sbpro_3);
    REGISTER_DECODER (ADPCM_SBPRO_4, adpcm_sbpro_4);
276 277
    REGISTER_ENCDEC  (ADPCM_SWF, adpcm_swf);
    REGISTER_DECODER (ADPCM_THP, adpcm_thp);
278
    REGISTER_DECODER (ADPCM_XA, adpcm_xa);
279
    REGISTER_ENCDEC  (ADPCM_YAMAHA, adpcm_yamaha);
Fabrice Bellard's avatar
Fabrice Bellard committed
280

281
    /* subtitles */
282 283
    REGISTER_ENCDEC  (DVBSUB, dvbsub);
    REGISTER_ENCDEC  (DVDSUB, dvdsub);
Fabrice Bellard's avatar
Fabrice Bellard committed
284

285 286 287 288
    /* external libraries */
    REGISTER_DECODER (LIBA52, liba52);
    REGISTER_ENCDEC  (LIBAMR_NB, libamr_nb);
    REGISTER_ENCDEC  (LIBAMR_WB, libamr_wb);
289
    REGISTER_ENCDEC  (LIBDIRAC, libdirac);
290 291 292 293 294
    REGISTER_ENCODER (LIBFAAC, libfaac);
    REGISTER_DECODER (LIBFAAD, libfaad);
    REGISTER_ENCDEC  (LIBGSM, libgsm);
    REGISTER_ENCDEC  (LIBGSM_MS, libgsm_ms);
    REGISTER_ENCODER (LIBMP3LAME, libmp3lame);
295
    REGISTER_ENCDEC  (LIBSCHROEDINGER, libschroedinger);
296
    REGISTER_ENCODER (LIBTHEORA, libtheora);
297
    REGISTER_ENCODER (LIBVORBIS, libvorbis);
298 299
    REGISTER_ENCODER (LIBX264, libx264);
    REGISTER_ENCODER (LIBXVID, libxvid);
300 301 302
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
    REGISTER_DECODER (MPEG4AAC, mpeg4aac);
#endif
303

304
    /* parsers */
305 306 307 308
    REGISTER_PARSER  (AAC, aac);
    REGISTER_PARSER  (AC3, ac3);
    REGISTER_PARSER  (CAVSVIDEO, cavsvideo);
    REGISTER_PARSER  (DCA, dca);
309
    REGISTER_PARSER  (DIRAC, dirac);
310 311 312 313 314 315
    REGISTER_PARSER  (DVBSUB, dvbsub);
    REGISTER_PARSER  (DVDSUB, dvdsub);
    REGISTER_PARSER  (H261, h261);
    REGISTER_PARSER  (H263, h263);
    REGISTER_PARSER  (H264, h264);
    REGISTER_PARSER  (MJPEG, mjpeg);
Ian Caulfield's avatar
Ian Caulfield committed
316
    REGISTER_PARSER  (MLP, mlp);
317 318 319 320 321
    REGISTER_PARSER  (MPEG4VIDEO, mpeg4video);
    REGISTER_PARSER  (MPEGAUDIO, mpegaudio);
    REGISTER_PARSER  (MPEGVIDEO, mpegvideo);
    REGISTER_PARSER  (PNM, pnm);
    REGISTER_PARSER  (VC1, vc1);
322
    REGISTER_PARSER  (VP3, vp3);
323

324
    /* bitstream filters */
325
    REGISTER_BSF     (DUMP_EXTRADATA, dump_extradata);
326
    REGISTER_BSF     (H264_MP4TOANNEXB, h264_mp4toannexb);
327 328 329 330
    REGISTER_BSF     (IMX_DUMP_HEADER, imx_dump_header);
    REGISTER_BSF     (MJPEGA_DUMP_HEADER, mjpega_dump_header);
    REGISTER_BSF     (MP3_HEADER_COMPRESS, mp3_header_compress);
    REGISTER_BSF     (MP3_HEADER_DECOMPRESS, mp3_header_decompress);
331
    REGISTER_BSF     (MOV2TEXTSUB, mov2textsub);
332 333
    REGISTER_BSF     (NOISE, noise);
    REGISTER_BSF     (REMOVE_EXTRADATA, remove_extradata);
334
    REGISTER_BSF     (TEXT2MOVSUB, text2movsub);
335 336
}