..
[libav.git] / libavcodec / allcodecs.c
CommitLineData
771b9a70
FB
1/*
2 * Utils for libavcodec
3 * Copyright (c) 2002 Fabrice Bellard.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
983e3246
MN
19
20/**
21 * @file allcodecs.c
22 * Utils for libavcodec.
23 */
24
771b9a70
FB
25#include "avcodec.h"
26
27/* If you do not call this function, then you can select exactly which
28 formats you want to support */
29
30/**
31 * simple call to register all the codecs.
32 */
33void avcodec_register_all(void)
34{
35 static int inited = 0;
36
37 if (inited != 0)
38 return;
39 inited = 1;
40
41 /* encoders */
42#ifdef CONFIG_ENCODERS
43 register_avcodec(&ac3_encoder);
44 register_avcodec(&mp2_encoder);
45#ifdef CONFIG_MP3LAME
46 register_avcodec(&mp3lame_encoder);
47#endif
81e0d0b4
MH
48#ifdef CONFIG_VORBIS
49 register_avcodec(&oggvorbis_encoder);
3aca208a 50 register_avcodec(&oggvorbis_decoder);
81e0d0b4 51#endif
771b9a70 52 register_avcodec(&mpeg1video_encoder);
0da71265 53// register_avcodec(&h264_encoder);
1d0d55da 54#ifdef CONFIG_RISKY
771b9a70
FB
55 register_avcodec(&h263_encoder);
56 register_avcodec(&h263p_encoder);
57 register_avcodec(&rv10_encoder);
771b9a70
FB
58 register_avcodec(&mpeg4_encoder);
59 register_avcodec(&msmpeg4v1_encoder);
60 register_avcodec(&msmpeg4v2_encoder);
61 register_avcodec(&msmpeg4v3_encoder);
0151a6f5 62 register_avcodec(&wmv1_encoder);
1457ab52 63 register_avcodec(&wmv2_encoder);
1d0d55da
MN
64#endif
65 register_avcodec(&mjpeg_encoder);
11f18faf 66 register_avcodec(&huffyuv_encoder);
3d2e8cce 67 register_avcodec(&asv1_encoder);
5e20f836 68 register_avcodec(&ffv1_encoder);
771b9a70 69#endif /* CONFIG_ENCODERS */
63167088
RS
70 register_avcodec(&rawvideo_encoder);
71 register_avcodec(&rawvideo_decoder);
771b9a70
FB
72
73 /* decoders */
74#ifdef CONFIG_DECODERS
1d0d55da 75#ifdef CONFIG_RISKY
771b9a70
FB
76 register_avcodec(&h263_decoder);
77 register_avcodec(&mpeg4_decoder);
78 register_avcodec(&msmpeg4v1_decoder);
79 register_avcodec(&msmpeg4v2_decoder);
80 register_avcodec(&msmpeg4v3_decoder);
81 register_avcodec(&wmv1_decoder);
1457ab52 82 register_avcodec(&wmv2_decoder);
771b9a70
FB
83 register_avcodec(&h263i_decoder);
84 register_avcodec(&rv10_decoder);
be8ffec9 85 register_avcodec(&svq1_decoder);
8b82a956 86 register_avcodec(&svq3_decoder);
1d0d55da
MN
87 register_avcodec(&wmav1_decoder);
88 register_avcodec(&wmav2_decoder);
deabd4fd 89 register_avcodec(&indeo3_decoder);
280bd7b7
ZK
90#ifdef CONFIG_FAAD
91 register_avcodec(&aac_decoder);
92 register_avcodec(&mpeg4aac_decoder);
93#endif
1d0d55da
MN
94#endif
95 register_avcodec(&mpeg_decoder);
020fcc94 96 register_avcodec(&dvvideo_decoder);
425ed6e2 97 register_avcodec(&dvaudio_decoder);
771b9a70 98 register_avcodec(&mjpeg_decoder);
b135d9fb 99 register_avcodec(&mjpegb_decoder);
771b9a70
FB
100 register_avcodec(&mp2_decoder);
101 register_avcodec(&mp3_decoder);
3f95e843
FR
102 register_avcodec(&mace3_decoder);
103 register_avcodec(&mace6_decoder);
11f18faf 104 register_avcodec(&huffyuv_decoder);
5e20f836 105 register_avcodec(&ffv1_decoder);
c78f73c8 106 register_avcodec(&cyuv_decoder);
0da71265 107 register_avcodec(&h264_decoder);
d86053a4 108 register_avcodec(&vp3_decoder);
3d2e8cce 109 register_avcodec(&asv1_decoder);
8809cfee 110 register_avcodec(&fourxm_decoder);
771b9a70
FB
111#ifdef CONFIG_AC3
112 register_avcodec(&ac3_decoder);
113#endif
114#endif /* CONFIG_DECODERS */
115
891f64b3 116#ifdef AMR_NB
117 register_avcodec(&amr_nb_decoder);
bc634f6f 118 register_avcodec(&amr_nb_encoder);
891f64b3 119#endif /* AMR_NB */
771b9a70
FB
120 /* pcm codecs */
121
122#define PCM_CODEC(id, name) \
123 register_avcodec(& name ## _encoder); \
124 register_avcodec(& name ## _decoder); \
125
126PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
127PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
128PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le);
129PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be);
130PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
131PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
132PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
133PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
134
0147f198
FR
135 /* adpcm codecs */
136PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
137PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
138PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);
4b465299 139PCM_CODEC(CODEC_ID_ADPCM_4XM, adpcm_4xm);
0147f198 140
771b9a70
FB
141#undef PCM_CODEC
142}
143