typo
[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
5c5dea3f 48#ifdef CONFIG_LIBVORBIS
81e0d0b4 49 register_avcodec(&oggvorbis_encoder);
3aca208a 50 register_avcodec(&oggvorbis_decoder);
81e0d0b4 51#endif
5c5dea3f
NB
52#ifdef CONFIG_LIBTHEORA
53 register_avcodec(&oggtheora_encoder);
54 register_avcodec(&oggtheora_decoder);
55#endif
29d48296
MN
56#ifdef CONFIG_FAAC
57 register_avcodec(&faac_encoder);
58#endif
1ddadfa9
AT
59#ifdef CONFIG_XVID
60 register_avcodec(&xvid_encoder);
61#endif
771b9a70 62 register_avcodec(&mpeg1video_encoder);
0da71265 63// register_avcodec(&h264_encoder);
029911d1 64 register_avcodec(&mpeg2video_encoder);
1c3990db 65 register_avcodec(&h261_encoder);
771b9a70
FB
66 register_avcodec(&h263_encoder);
67 register_avcodec(&h263p_encoder);
dde38422 68 register_avcodec(&flv_encoder);
771b9a70 69 register_avcodec(&rv10_encoder);
d0271e8a 70 register_avcodec(&rv20_encoder);
771b9a70
FB
71 register_avcodec(&mpeg4_encoder);
72 register_avcodec(&msmpeg4v1_encoder);
73 register_avcodec(&msmpeg4v2_encoder);
74 register_avcodec(&msmpeg4v3_encoder);
0151a6f5 75 register_avcodec(&wmv1_encoder);
1457ab52 76 register_avcodec(&wmv2_encoder);
3b64893d 77 register_avcodec(&svq1_encoder);
1d0d55da 78 register_avcodec(&mjpeg_encoder);
b1e6b355 79 register_avcodec(&ljpeg_encoder);
6c3890b6 80#ifdef CONFIG_ZLIB
4eff7cf4 81 register_avcodec(&png_encoder);
6c3890b6 82#endif
5b6d5596
MN
83 register_avcodec(&ppm_encoder);
84 register_avcodec(&pgm_encoder);
85 register_avcodec(&pgmyuv_encoder);
86 register_avcodec(&pbm_encoder);
87 register_avcodec(&pam_encoder);
11f18faf 88 register_avcodec(&huffyuv_encoder);
f37b9768 89 register_avcodec(&ffvhuff_encoder);
3d2e8cce 90 register_avcodec(&asv1_encoder);
1149acdc 91 register_avcodec(&asv2_encoder);
5e20f836 92 register_avcodec(&ffv1_encoder);
791e7b83 93 register_avcodec(&snow_encoder);
a273bbfb 94 register_avcodec(&zlib_encoder);
6faa4645 95 register_avcodec(&dvvideo_encoder);
54f5fd22
AB
96 register_avcodec(&sonic_encoder);
97 register_avcodec(&sonic_ls_encoder);
6662ec29
MN
98#ifdef CONFIG_X264
99 register_avcodec(&x264_encoder);
100#endif
771b9a70 101#endif /* CONFIG_ENCODERS */
63167088
RS
102 register_avcodec(&rawvideo_encoder);
103 register_avcodec(&rawvideo_decoder);
771b9a70
FB
104
105 /* decoders */
106#ifdef CONFIG_DECODERS
107 register_avcodec(&h263_decoder);
c6148de2 108 register_avcodec(&h261_decoder);
771b9a70
FB
109 register_avcodec(&mpeg4_decoder);
110 register_avcodec(&msmpeg4v1_decoder);
111 register_avcodec(&msmpeg4v2_decoder);
112 register_avcodec(&msmpeg4v3_decoder);
113 register_avcodec(&wmv1_decoder);
1457ab52 114 register_avcodec(&wmv2_decoder);
4c12e8be
AB
115 register_avcodec(&vc9_decoder);
116 register_avcodec(&wmv3_decoder);
771b9a70 117 register_avcodec(&h263i_decoder);
dde38422 118 register_avcodec(&flv_decoder);
771b9a70 119 register_avcodec(&rv10_decoder);
68b94c35 120 register_avcodec(&rv20_decoder);
be8ffec9 121 register_avcodec(&svq1_decoder);
8b82a956 122 register_avcodec(&svq3_decoder);
1d0d55da
MN
123 register_avcodec(&wmav1_decoder);
124 register_avcodec(&wmav2_decoder);
856dbbff 125 register_avcodec(&indeo2_decoder);
deabd4fd 126 register_avcodec(&indeo3_decoder);
d0a0bbd2
MM
127 register_avcodec(&tscc_decoder);
128 register_avcodec(&ulti_decoder);
d08d7142 129 register_avcodec(&qdraw_decoder);
ab711b3c 130 register_avcodec(&xl_decoder);
acfd8f0f 131 register_avcodec(&qpeg_decoder);
9c7fb608 132 register_avcodec(&loco_decoder);
a8a15e9d 133 register_avcodec(&wnv1_decoder);
589f8220 134 register_avcodec(&aasc_decoder);
280bd7b7
ZK
135#ifdef CONFIG_FAAD
136 register_avcodec(&aac_decoder);
137 register_avcodec(&mpeg4aac_decoder);
138#endif
922bc38d
MN
139 register_avcodec(&mpeg1video_decoder);
140 register_avcodec(&mpeg2video_decoder);
c512b303 141 register_avcodec(&mpegvideo_decoder);
2e7b4c84
IK
142#ifdef HAVE_XVMC
143 register_avcodec(&mpeg_xvmc_decoder);
144#endif
020fcc94 145 register_avcodec(&dvvideo_decoder);
771b9a70 146 register_avcodec(&mjpeg_decoder);
b135d9fb 147 register_avcodec(&mjpegb_decoder);
5e83dec4 148 register_avcodec(&sp5x_decoder);
6c3890b6 149#ifdef CONFIG_ZLIB
4eff7cf4 150 register_avcodec(&png_decoder);
6c3890b6 151#endif
771b9a70
FB
152 register_avcodec(&mp2_decoder);
153 register_avcodec(&mp3_decoder);
1ede228a 154 register_avcodec(&mp3adu_decoder);
d2a7718d 155 register_avcodec(&mp3on4_decoder);
3f95e843
FR
156 register_avcodec(&mace3_decoder);
157 register_avcodec(&mace6_decoder);
11f18faf 158 register_avcodec(&huffyuv_decoder);
f37b9768 159 register_avcodec(&ffvhuff_decoder);
5e20f836 160 register_avcodec(&ffv1_decoder);
791e7b83 161 register_avcodec(&snow_decoder);
c78f73c8 162 register_avcodec(&cyuv_decoder);
0da71265 163 register_avcodec(&h264_decoder);
d86053a4 164 register_avcodec(&vp3_decoder);
f44ee2c3 165 register_avcodec(&theora_decoder);
3d2e8cce 166 register_avcodec(&asv1_decoder);
9b56edf5 167 register_avcodec(&asv2_decoder);
be3564ed 168 register_avcodec(&vcr1_decoder);
3aff069b 169 register_avcodec(&cljr_decoder);
8809cfee 170 register_avcodec(&fourxm_decoder);
c3bf0288 171 register_avcodec(&mdec_decoder);
3ef8be2b
MM
172 register_avcodec(&roq_decoder);
173 register_avcodec(&interplay_video_decoder);
9937e686 174 register_avcodec(&xan_wc3_decoder);
2fdf638b
MM
175 register_avcodec(&rpza_decoder);
176 register_avcodec(&cinepak_decoder);
177 register_avcodec(&msrle_decoder);
178 register_avcodec(&msvideo1_decoder);
6955a882 179 register_avcodec(&vqa_decoder);
4120a53a 180 register_avcodec(&idcin_decoder);
1dc1ed99 181 register_avcodec(&eightbps_decoder);
11e29a41 182 register_avcodec(&smc_decoder);
42cad81a 183 register_avcodec(&flic_decoder);
9a4117d5 184 register_avcodec(&truemotion1_decoder);
fafa0b75
MM
185 register_avcodec(&vmdvideo_decoder);
186 register_avcodec(&vmdaudio_decoder);
a273bbfb
RT
187 register_avcodec(&mszh_decoder);
188 register_avcodec(&zlib_decoder);
54f5fd22 189 register_avcodec(&sonic_decoder);
771b9a70
FB
190#ifdef CONFIG_AC3
191 register_avcodec(&ac3_decoder);
192#endif
23c99253
MN
193#ifdef CONFIG_DTS
194 register_avcodec(&dts_decoder);
195#endif
b8414bbd
NK
196 register_avcodec(&ra_144_decoder);
197 register_avcodec(&ra_288_decoder);
3ef8be2b
MM
198 register_avcodec(&roq_dpcm_decoder);
199 register_avcodec(&interplay_dpcm_decoder);
9937e686 200 register_avcodec(&xan_dpcm_decoder);
d08d7142 201 register_avcodec(&sol_dpcm_decoder);
070ed1bc 202 register_avcodec(&qtrle_decoder);
ac2570a8 203 register_avcodec(&flac_decoder);
85ad5695 204 register_avcodec(&shorten_decoder);
6d6d7970 205 register_avcodec(&alac_decoder);
034eeaa1 206 register_avcodec(&ws_snd1_decoder);
771b9a70
FB
207#endif /* CONFIG_DECODERS */
208
891f64b3 209#ifdef AMR_NB
210 register_avcodec(&amr_nb_decoder);
fc384777 211#ifdef CONFIG_ENCODERS
bc634f6f 212 register_avcodec(&amr_nb_encoder);
fc384777 213#endif //CONFIG_ENCODERS
891f64b3 214#endif /* AMR_NB */
d663a1fd
MN
215
216#ifdef AMR_WB
217 register_avcodec(&amr_wb_decoder);
fc384777 218#ifdef CONFIG_ENCODERS
d663a1fd 219 register_avcodec(&amr_wb_encoder);
fc384777 220#endif //CONFIG_ENCODERS
d663a1fd
MN
221#endif /* AMR_WB */
222
771b9a70
FB
223 /* pcm codecs */
224
fc384777 225#ifdef CONFIG_ENCODERS
771b9a70
FB
226#define PCM_CODEC(id, name) \
227 register_avcodec(& name ## _encoder); \
228 register_avcodec(& name ## _decoder); \
229
fc384777
MM
230#else
231#define PCM_CODEC(id, name) \
232 register_avcodec(& name ## _decoder);
233#endif
234
771b9a70
FB
235PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
236PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
237PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le);
238PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be);
239PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
240PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
241PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
242PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
243
0147f198
FR
244 /* adpcm codecs */
245PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
246PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
9937e686
MM
247PCM_CODEC(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3);
248PCM_CODEC(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4);
2fdf638b 249PCM_CODEC(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws);
7d8379f2 250PCM_CODEC(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg);
0147f198 251PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);
4b465299 252PCM_CODEC(CODEC_ID_ADPCM_4XM, adpcm_4xm);
fc384777
MM
253PCM_CODEC(CODEC_ID_ADPCM_XA, adpcm_xa);
254PCM_CODEC(CODEC_ID_ADPCM_ADX, adpcm_adx);
7d8379f2 255PCM_CODEC(CODEC_ID_ADPCM_EA, adpcm_ea);
13b4c18e 256PCM_CODEC(CODEC_ID_ADPCM_G726, adpcm_g726);
b3bfb299 257PCM_CODEC(CODEC_ID_ADPCM_CT, adpcm_ct);
659c3692 258PCM_CODEC(CODEC_ID_ADPCM_SWF, adpcm_swf);
0147f198 259
771b9a70 260#undef PCM_CODEC
8424cf50
FB
261
262 /* parsers */
263 av_register_codec_parser(&mpegvideo_parser);
264 av_register_codec_parser(&mpeg4video_parser);
c6148de2 265 av_register_codec_parser(&h261_parser);
8424cf50
FB
266 av_register_codec_parser(&h263_parser);
267 av_register_codec_parser(&h264_parser);
8e6325b9 268 av_register_codec_parser(&mjpeg_parser);
99f06236 269 av_register_codec_parser(&pnm_parser);
8424cf50
FB
270
271 av_register_codec_parser(&mpegaudio_parser);
272#ifdef CONFIG_AC3
273 av_register_codec_parser(&ac3_parser);
274#endif
771b9a70
FB
275}
276