Mercurial > libavcodec.hg
annotate allcodecs.c @ 1051:e5a9dbf597d4 libavcodec
mpeg1 bframe encoding patch by (Raphal LEGRAND) with some modifications by me
author | michaelni |
---|---|
date | Sat, 08 Feb 2003 12:00:57 +0000 |
parents | a78f6f72d54e |
children | eb403f8158eb |
rev | line source |
---|---|
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
1 /* |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
2 * Utils for libavcodec |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
3 * Copyright (c) 2002 Fabrice Bellard. |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
4 * |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
5 * This library is free software; you can redistribute it and/or |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
6 * modify it under the terms of the GNU Lesser General Public |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
7 * License as published by the Free Software Foundation; either |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
8 * version 2 of the License, or (at your option) any later version. |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
9 * |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
10 * This library is distributed in the hope that it will be useful, |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
13 * Lesser General Public License for more details. |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
14 * |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
15 * You should have received a copy of the GNU Lesser General Public |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
16 * License along with this library; if not, write to the Free Software |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
18 */ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
19 #include "avcodec.h" |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
20 |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
21 /* If you do not call this function, then you can select exactly which |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
22 formats you want to support */ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
23 |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
24 /** |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
25 * simple call to register all the codecs. |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
26 */ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
27 void avcodec_register_all(void) |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
28 { |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
29 static int inited = 0; |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
30 |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
31 if (inited != 0) |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
32 return; |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
33 inited = 1; |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
34 |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
35 /* encoders */ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
36 #ifdef CONFIG_ENCODERS |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
37 register_avcodec(&ac3_encoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
38 register_avcodec(&mp2_encoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
39 #ifdef CONFIG_MP3LAME |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
40 register_avcodec(&mp3lame_encoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
41 #endif |
636
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
573
diff
changeset
|
42 #ifdef CONFIG_VORBIS |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
573
diff
changeset
|
43 register_avcodec(&oggvorbis_encoder); |
883 | 44 register_avcodec(&oggvorbis_decoder); |
636
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
573
diff
changeset
|
45 #endif |
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
46 register_avcodec(&mpeg1video_encoder); |
1042 | 47 #ifdef CONFIG_RISKY |
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
48 register_avcodec(&h263_encoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
49 register_avcodec(&h263p_encoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
50 register_avcodec(&rv10_encoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
51 register_avcodec(&mpeg4_encoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
52 register_avcodec(&msmpeg4v1_encoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
53 register_avcodec(&msmpeg4v2_encoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
54 register_avcodec(&msmpeg4v3_encoder); |
500 | 55 register_avcodec(&wmv1_encoder); |
936 | 56 register_avcodec(&wmv2_encoder); |
1042 | 57 #endif |
58 register_avcodec(&mjpeg_encoder); | |
866 | 59 register_avcodec(&huffyuv_encoder); |
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
60 #endif /* CONFIG_ENCODERS */ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
61 register_avcodec(&rawvideo_codec); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
62 |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
63 /* decoders */ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
64 #ifdef CONFIG_DECODERS |
1042 | 65 #ifdef CONFIG_RISKY |
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
66 register_avcodec(&h263_decoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
67 register_avcodec(&mpeg4_decoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
68 register_avcodec(&msmpeg4v1_decoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
69 register_avcodec(&msmpeg4v2_decoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
70 register_avcodec(&msmpeg4v3_decoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
71 register_avcodec(&wmv1_decoder); |
936 | 72 register_avcodec(&wmv2_decoder); |
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
73 register_avcodec(&h263i_decoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
74 register_avcodec(&rv10_decoder); |
521 | 75 register_avcodec(&svq1_decoder); |
1042 | 76 register_avcodec(&wmav1_decoder); |
77 register_avcodec(&wmav2_decoder); | |
78 #endif | |
79 register_avcodec(&mpeg_decoder); | |
724 | 80 register_avcodec(&dvvideo_decoder); |
1036 | 81 register_avcodec(&dvaudio_decoder); |
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
82 register_avcodec(&mjpeg_decoder); |
881 | 83 register_avcodec(&mjpegb_decoder); |
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
84 register_avcodec(&mp2_decoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
85 register_avcodec(&mp3_decoder); |
827
770578c6c300
added MACE (Macintosh Audio Compression/Expansion) 3:1 & 6:1 support
michaelni
parents:
783
diff
changeset
|
86 register_avcodec(&mace3_decoder); |
770578c6c300
added MACE (Macintosh Audio Compression/Expansion) 3:1 & 6:1 support
michaelni
parents:
783
diff
changeset
|
87 register_avcodec(&mace6_decoder); |
866 | 88 register_avcodec(&huffyuv_decoder); |
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
89 #ifdef CONFIG_AC3 |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
90 register_avcodec(&ac3_decoder); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
91 #endif |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
92 #endif /* CONFIG_DECODERS */ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
93 |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
94 /* pcm codecs */ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
95 |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
96 #define PCM_CODEC(id, name) \ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
97 register_avcodec(& name ## _encoder); \ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
98 register_avcodec(& name ## _decoder); \ |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
99 |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
100 PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
101 PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
102 PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
103 PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
104 PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
105 PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
106 PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
107 PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw); |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
108 |
573
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
521
diff
changeset
|
109 /* adpcm codecs */ |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
521
diff
changeset
|
110 PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt); |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
521
diff
changeset
|
111 PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav); |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
521
diff
changeset
|
112 PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms); |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
521
diff
changeset
|
113 |
491
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
114 #undef PCM_CODEC |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
115 } |
66d470d19feb
put codec registering in another file so that the user can install the codecs he wants
bellard
parents:
diff
changeset
|
116 |