H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
[ffmpeg.git] / libavcodec / allcodecs.c
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  */
19
20 /**
21  * @file allcodecs.c
22  * Utils for libavcodec.
23  */
24
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  */
33 void 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
48 #ifdef CONFIG_VORBIS
49     register_avcodec(&oggvorbis_encoder);
50     register_avcodec(&oggvorbis_decoder);
51 #endif
52 #ifdef CONFIG_FAAC
53     register_avcodec(&faac_encoder);
54 #endif
55 #ifdef CONFIG_XVID
56     register_avcodec(&xvid_encoder);
57 #endif
58     register_avcodec(&mpeg1video_encoder);
59 //    register_avcodec(&h264_encoder);
60 #ifdef CONFIG_RISKY
61     register_avcodec(&mpeg2video_encoder);
62     register_avcodec(&h261_encoder);
63     register_avcodec(&h263_encoder);
64     register_avcodec(&h263p_encoder);
65     register_avcodec(&flv_encoder);
66     register_avcodec(&rv10_encoder);
67     register_avcodec(&mpeg4_encoder);
68     register_avcodec(&msmpeg4v1_encoder);
69     register_avcodec(&msmpeg4v2_encoder);
70     register_avcodec(&msmpeg4v3_encoder);
71     register_avcodec(&wmv1_encoder);
72     register_avcodec(&wmv2_encoder);
73     register_avcodec(&svq1_encoder);
74 #endif
75     register_avcodec(&mjpeg_encoder);
76     register_avcodec(&ljpeg_encoder);
77     register_avcodec(&huffyuv_encoder);
78     register_avcodec(&asv1_encoder);
79     register_avcodec(&asv2_encoder);
80     register_avcodec(&ffv1_encoder);
81     register_avcodec(&snow_encoder);
82     register_avcodec(&zlib_encoder);
83     register_avcodec(&dvvideo_encoder);
84     register_avcodec(&sonic_encoder);
85     register_avcodec(&sonic_ls_encoder);
86 #endif /* CONFIG_ENCODERS */
87     register_avcodec(&rawvideo_encoder);
88     register_avcodec(&rawvideo_decoder);
89
90     /* decoders */
91 #ifdef CONFIG_DECODERS
92 #ifdef CONFIG_RISKY
93     register_avcodec(&h263_decoder);
94     register_avcodec(&h261_decoder);
95     register_avcodec(&mpeg4_decoder);
96     register_avcodec(&msmpeg4v1_decoder);
97     register_avcodec(&msmpeg4v2_decoder);
98     register_avcodec(&msmpeg4v3_decoder);
99     register_avcodec(&wmv1_decoder);
100     register_avcodec(&wmv2_decoder);
101     register_avcodec(&h263i_decoder);
102     register_avcodec(&flv_decoder);
103     register_avcodec(&rv10_decoder);
104     register_avcodec(&rv20_decoder);
105     register_avcodec(&svq1_decoder);
106     register_avcodec(&svq3_decoder);
107     register_avcodec(&wmav1_decoder);
108     register_avcodec(&wmav2_decoder);
109     register_avcodec(&indeo3_decoder);
110     register_avcodec(&tscc_decoder);
111     register_avcodec(&ulti_decoder);
112     register_avcodec(&qdraw_decoder);
113     register_avcodec(&xl_decoder);
114 #ifdef CONFIG_FAAD
115     register_avcodec(&aac_decoder);
116     register_avcodec(&mpeg4aac_decoder);
117 #endif
118 #endif
119     register_avcodec(&mpeg1video_decoder);
120     register_avcodec(&mpeg2video_decoder);
121     register_avcodec(&mpegvideo_decoder);
122 #ifdef HAVE_XVMC
123     register_avcodec(&mpeg_xvmc_decoder);
124 #endif
125     register_avcodec(&dvvideo_decoder);
126     register_avcodec(&mjpeg_decoder);
127     register_avcodec(&mjpegb_decoder);
128     register_avcodec(&sp5x_decoder);
129     register_avcodec(&mp2_decoder);
130     register_avcodec(&mp3_decoder);
131     register_avcodec(&mace3_decoder);
132     register_avcodec(&mace6_decoder);
133     register_avcodec(&huffyuv_decoder);
134     register_avcodec(&ffv1_decoder);
135     register_avcodec(&snow_decoder);
136     register_avcodec(&cyuv_decoder);
137     register_avcodec(&h264_decoder);
138     register_avcodec(&vp3_decoder);
139     register_avcodec(&theora_decoder);
140     register_avcodec(&asv1_decoder);
141     register_avcodec(&asv2_decoder);
142     register_avcodec(&vcr1_decoder);
143     register_avcodec(&cljr_decoder);
144     register_avcodec(&fourxm_decoder);
145     register_avcodec(&mdec_decoder);
146     register_avcodec(&roq_decoder);
147     register_avcodec(&interplay_video_decoder);
148     register_avcodec(&xan_wc3_decoder);
149     register_avcodec(&rpza_decoder);
150     register_avcodec(&cinepak_decoder);
151     register_avcodec(&msrle_decoder);
152     register_avcodec(&msvideo1_decoder);
153     register_avcodec(&vqa_decoder);
154     register_avcodec(&idcin_decoder);
155     register_avcodec(&eightbps_decoder);
156     register_avcodec(&smc_decoder);
157     register_avcodec(&flic_decoder);
158     register_avcodec(&truemotion1_decoder);
159     register_avcodec(&vmdvideo_decoder);
160     register_avcodec(&vmdaudio_decoder);
161     register_avcodec(&mszh_decoder);
162     register_avcodec(&zlib_decoder);
163     register_avcodec(&sonic_decoder);
164 #ifdef CONFIG_AC3
165     register_avcodec(&ac3_decoder);
166 #endif
167 #ifdef CONFIG_DTS
168     register_avcodec(&dts_decoder);
169 #endif
170     register_avcodec(&ra_144_decoder);
171     register_avcodec(&ra_288_decoder);
172     register_avcodec(&roq_dpcm_decoder);
173     register_avcodec(&interplay_dpcm_decoder);
174     register_avcodec(&xan_dpcm_decoder);
175     register_avcodec(&sol_dpcm_decoder);
176     register_avcodec(&qtrle_decoder);
177     register_avcodec(&flac_decoder);
178 #endif /* CONFIG_DECODERS */
179
180 #ifdef AMR_NB
181     register_avcodec(&amr_nb_decoder);
182 #ifdef CONFIG_ENCODERS
183     register_avcodec(&amr_nb_encoder);
184 #endif //CONFIG_ENCODERS
185 #endif /* AMR_NB */
186
187 #ifdef AMR_WB
188     register_avcodec(&amr_wb_decoder);
189 #ifdef CONFIG_ENCODERS
190     register_avcodec(&amr_wb_encoder);
191 #endif //CONFIG_ENCODERS
192 #endif /* AMR_WB */
193
194     /* pcm codecs */
195
196 #ifdef CONFIG_ENCODERS
197 #define PCM_CODEC(id, name) \
198     register_avcodec(& name ## _encoder); \
199     register_avcodec(& name ## _decoder); \
200
201 #else
202 #define PCM_CODEC(id, name) \
203     register_avcodec(& name ## _decoder);
204 #endif
205
206 PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
207 PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
208 PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le);
209 PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be);
210 PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
211 PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
212 PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
213 PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
214
215     /* adpcm codecs */
216 PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
217 PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
218 PCM_CODEC(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3);
219 PCM_CODEC(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4);
220 PCM_CODEC(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws);
221 PCM_CODEC(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg);
222 PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);
223 PCM_CODEC(CODEC_ID_ADPCM_4XM, adpcm_4xm);
224 PCM_CODEC(CODEC_ID_ADPCM_XA, adpcm_xa);
225 PCM_CODEC(CODEC_ID_ADPCM_ADX, adpcm_adx);
226 PCM_CODEC(CODEC_ID_ADPCM_EA, adpcm_ea);
227 PCM_CODEC(CODEC_ID_ADPCM_G726, adpcm_g726);
228 PCM_CODEC(CODEC_ID_ADPCM_CT, adpcm_ct);
229
230 #undef PCM_CODEC
231
232     /* parsers */ 
233     av_register_codec_parser(&mpegvideo_parser);
234     av_register_codec_parser(&mpeg4video_parser);
235     av_register_codec_parser(&h261_parser);
236     av_register_codec_parser(&h263_parser);
237     av_register_codec_parser(&h264_parser);
238     av_register_codec_parser(&mjpeg_parser);
239
240     av_register_codec_parser(&mpegaudio_parser);
241 #ifdef CONFIG_AC3
242     av_register_codec_parser(&ac3_parser);
243 #endif
244 }
245