allcodecs.c 5.98 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
 * Utils for libavcodec
 * Copyright (c) 2002 Fabrice Bellard.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * 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
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
Michael Niedermayer's avatar
Michael Niedermayer committed
19 20 21 22 23 24

/**
 * @file allcodecs.c
 * Utils for libavcodec.
 */

25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
#include "avcodec.h"

/* If you do not call this function, then you can select exactly which
   formats you want to support */

/**
 * simple call to register all the codecs. 
 */
void avcodec_register_all(void)
{
    static int inited = 0;
    
    if (inited != 0)
	return;
    inited = 1;

    /* encoders */
#ifdef CONFIG_ENCODERS
    register_avcodec(&ac3_encoder);
    register_avcodec(&mp2_encoder);
#ifdef CONFIG_MP3LAME
    register_avcodec(&mp3lame_encoder);
47 48 49
#endif
#ifdef CONFIG_VORBIS
    register_avcodec(&oggvorbis_encoder);
Mark Hills's avatar
Mark Hills committed
50
    register_avcodec(&oggvorbis_decoder);
51 52 53
#endif
#ifdef CONFIG_FAAC
    register_avcodec(&faac_encoder);
54 55
#endif
    register_avcodec(&mpeg1video_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
56
//    register_avcodec(&h264_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
57
#ifdef CONFIG_RISKY
Michael Niedermayer's avatar
Michael Niedermayer committed
58
    register_avcodec(&mpeg2video_encoder);
59 60
    register_avcodec(&h263_encoder);
    register_avcodec(&h263p_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
61
    register_avcodec(&flv_encoder);
62 63 64 65 66
    register_avcodec(&rv10_encoder);
    register_avcodec(&mpeg4_encoder);
    register_avcodec(&msmpeg4v1_encoder);
    register_avcodec(&msmpeg4v2_encoder);
    register_avcodec(&msmpeg4v3_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
67
    register_avcodec(&wmv1_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
68
    register_avcodec(&wmv2_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
69 70
#endif
    register_avcodec(&mjpeg_encoder);
71
    register_avcodec(&ljpeg_encoder);
Michael Niedermayer's avatar
huffyuv  
Michael Niedermayer committed
72
    register_avcodec(&huffyuv_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
73
    register_avcodec(&asv1_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
74
    register_avcodec(&asv2_encoder);
75
    register_avcodec(&ffv1_encoder);
76
#endif /* CONFIG_ENCODERS */
77 78
    register_avcodec(&rawvideo_encoder);
    register_avcodec(&rawvideo_decoder);
79 80 81

    /* decoders */
#ifdef CONFIG_DECODERS
Michael Niedermayer's avatar
Michael Niedermayer committed
82
#ifdef CONFIG_RISKY
83 84 85 86 87 88
    register_avcodec(&h263_decoder);
    register_avcodec(&mpeg4_decoder);
    register_avcodec(&msmpeg4v1_decoder);
    register_avcodec(&msmpeg4v2_decoder);
    register_avcodec(&msmpeg4v3_decoder);
    register_avcodec(&wmv1_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
89
    register_avcodec(&wmv2_decoder);
90
    register_avcodec(&h263i_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
91
    register_avcodec(&flv_decoder);
92
    register_avcodec(&rv10_decoder);
Nick Kurshev's avatar
Nick Kurshev committed
93
    register_avcodec(&svq1_decoder);
94
    register_avcodec(&svq3_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
95 96
    register_avcodec(&wmav1_decoder);
    register_avcodec(&wmav2_decoder);
97
    register_avcodec(&indeo3_decoder);
98 99 100 101
#ifdef CONFIG_FAAD
    register_avcodec(&aac_decoder);
    register_avcodec(&mpeg4aac_decoder);
#endif
Michael Niedermayer's avatar
Michael Niedermayer committed
102
#endif
Michael Niedermayer's avatar
Michael Niedermayer committed
103 104
    register_avcodec(&mpeg1video_decoder);
    register_avcodec(&mpeg2video_decoder);
Ivan Kalvachev's avatar
Ivan Kalvachev committed
105 106 107
#ifdef HAVE_XVMC
    register_avcodec(&mpeg_xvmc_decoder);
#endif
Fabrice Bellard's avatar
Fabrice Bellard committed
108
    register_avcodec(&dvvideo_decoder);
109
    register_avcodec(&mjpeg_decoder);
110
    register_avcodec(&mjpegb_decoder);
111
    register_avcodec(&sp5x_decoder);
112 113
    register_avcodec(&mp2_decoder);
    register_avcodec(&mp3_decoder);
114 115
    register_avcodec(&mace3_decoder);
    register_avcodec(&mace6_decoder);
Michael Niedermayer's avatar
huffyuv  
Michael Niedermayer committed
116
    register_avcodec(&huffyuv_decoder);
117
    register_avcodec(&ffv1_decoder);
Mike Melanson's avatar
Mike Melanson committed
118
    register_avcodec(&cyuv_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
119
    register_avcodec(&h264_decoder);
120
    register_avcodec(&vp3_decoder);
121
    register_avcodec(&theora_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
122
    register_avcodec(&asv1_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
123
    register_avcodec(&asv2_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
124
    register_avcodec(&vcr1_decoder);
Alex Beregszaszi's avatar
Alex Beregszaszi committed
125
    register_avcodec(&cljr_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
126
    register_avcodec(&fourxm_decoder);
127
    register_avcodec(&mdec_decoder);
128 129
    register_avcodec(&roq_decoder);
    register_avcodec(&interplay_video_decoder);
130
    register_avcodec(&xan_wc3_decoder);
131 132 133 134
    register_avcodec(&rpza_decoder);
    register_avcodec(&cinepak_decoder);
    register_avcodec(&msrle_decoder);
    register_avcodec(&msvideo1_decoder);
135
    register_avcodec(&vqa_decoder);
136
    register_avcodec(&idcin_decoder);
Roberto Togni's avatar
Roberto Togni committed
137
    register_avcodec(&eightbps_decoder);
138
    register_avcodec(&smc_decoder);
139 140 141
#ifdef CONFIG_AC3
    register_avcodec(&ac3_decoder);
#endif
142 143
    register_avcodec(&ra_144_decoder);
    register_avcodec(&ra_288_decoder);
144 145
    register_avcodec(&roq_dpcm_decoder);
    register_avcodec(&interplay_dpcm_decoder);
146
    register_avcodec(&xan_dpcm_decoder);
147 148
#endif /* CONFIG_DECODERS */

149 150
#ifdef AMR_NB
    register_avcodec(&amr_nb_decoder);
151
#ifdef CONFIG_ENCODERS
Zdenek Kabelac's avatar
Zdenek Kabelac committed
152
    register_avcodec(&amr_nb_encoder);
153
#endif //CONFIG_ENCODERS
154
#endif /* AMR_NB */
155 156 157

#ifdef AMR_WB
    register_avcodec(&amr_wb_decoder);
158
#ifdef CONFIG_ENCODERS
159
    register_avcodec(&amr_wb_encoder);
160
#endif //CONFIG_ENCODERS
161 162
#endif /* AMR_WB */

163 164
    /* pcm codecs */

165
#ifdef CONFIG_ENCODERS
166 167 168 169
#define PCM_CODEC(id, name) \
    register_avcodec(& name ## _encoder); \
    register_avcodec(& name ## _decoder); \

170 171 172 173 174
#else
#define PCM_CODEC(id, name) \
    register_avcodec(& name ## _decoder);
#endif

175 176 177 178 179 180 181 182 183
PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le);
PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be);
PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);

184 185 186
    /* adpcm codecs */
PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
187 188
PCM_CODEC(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3);
PCM_CODEC(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4);
189
PCM_CODEC(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws);
190
PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);
Michael Niedermayer's avatar
Michael Niedermayer committed
191
PCM_CODEC(CODEC_ID_ADPCM_4XM, adpcm_4xm);
192 193
PCM_CODEC(CODEC_ID_ADPCM_XA, adpcm_xa);
PCM_CODEC(CODEC_ID_ADPCM_ADX, adpcm_adx);
194

195 196 197
#undef PCM_CODEC
}