Mercurial > libavcodec.hg
comparison avcodec.h @ 842:e460775adb38 libavcodec
cleanup (breaks compatibility, requested by fabrice)
remove CODEC_FLAG_NOT_TRUNCATED & add CODEC_FLAG_TRUNCATED
add CODEC_CAP_TRUNCATED
add alpha plane to AVPicture
remove CODEC_ID_MSMPEG4
remove various unused stuff
support "truncated" mpeg4 streams
author | michaelni |
---|---|
date | Fri, 08 Nov 2002 18:35:39 +0000 |
parents | 14f4598ec793 |
children | 8c81f1ee9271 |
comparison
equal
deleted
inserted
replaced
841:4033915880d9 | 842:e460775adb38 |
---|---|
3 | 3 |
4 #include "common.h" | 4 #include "common.h" |
5 | 5 |
6 #define LIBAVCODEC_VERSION_INT 0x000406 | 6 #define LIBAVCODEC_VERSION_INT 0x000406 |
7 #define LIBAVCODEC_VERSION "0.4.6" | 7 #define LIBAVCODEC_VERSION "0.4.6" |
8 #define LIBAVCODEC_BUILD 4634 | 8 #define LIBAVCODEC_BUILD 4635 |
9 #define LIBAVCODEC_BUILD_STR "4634" | 9 #define LIBAVCODEC_BUILD_STR "4635" |
10 | 10 |
11 enum CodecID { | 11 enum CodecID { |
12 CODEC_ID_NONE, | 12 CODEC_ID_NONE, |
13 CODEC_ID_MPEG1VIDEO, | 13 CODEC_ID_MPEG1VIDEO, |
14 CODEC_ID_H263, | 14 CODEC_ID_H263, |
48 /* various adpcm codecs */ | 48 /* various adpcm codecs */ |
49 CODEC_ID_ADPCM_IMA_QT, | 49 CODEC_ID_ADPCM_IMA_QT, |
50 CODEC_ID_ADPCM_IMA_WAV, | 50 CODEC_ID_ADPCM_IMA_WAV, |
51 CODEC_ID_ADPCM_MS, | 51 CODEC_ID_ADPCM_MS, |
52 }; | 52 }; |
53 #define CODEC_ID_MSMPEG4 CODEC_ID_MSMPEG4V3 | |
54 | 53 |
55 enum CodecType { | 54 enum CodecType { |
56 CODEC_TYPE_UNKNOWN = -1, | 55 CODEC_TYPE_UNKNOWN = -1, |
57 CODEC_TYPE_VIDEO, | 56 CODEC_TYPE_VIDEO, |
58 CODEC_TYPE_AUDIO, | 57 CODEC_TYPE_AUDIO, |
77 SAMPLE_FMT_S16 = 0, /* signed 16 bits */ | 76 SAMPLE_FMT_S16 = 0, /* signed 16 bits */ |
78 }; | 77 }; |
79 | 78 |
80 /* in bytes */ | 79 /* in bytes */ |
81 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 131072 | 80 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 131072 |
81 | |
82 /** | |
83 * Required number of zero bytes at the end of the input bitstream for decoding. | |
84 * to avoid overreading (and possibly segfaulting) | |
85 */ | |
86 #define FF_INPUT_BUFFER_PADDING_SIZE 8 | |
82 | 87 |
83 /* motion estimation type, EPZS by default */ | 88 /* motion estimation type, EPZS by default */ |
84 enum Motion_Est_ID { | 89 enum Motion_Est_ID { |
85 ME_ZERO = 1, | 90 ME_ZERO = 1, |
86 ME_FULL, | 91 ME_FULL, |
126 #define CODEC_FLAG_PASS2 0x0400 /* use internal 2pass ratecontrol in second pass mode */ | 131 #define CODEC_FLAG_PASS2 0x0400 /* use internal 2pass ratecontrol in second pass mode */ |
127 #define CODEC_FLAG_EXTERN_HUFF 0x1000 /* use external huffman table (for mjpeg) */ | 132 #define CODEC_FLAG_EXTERN_HUFF 0x1000 /* use external huffman table (for mjpeg) */ |
128 #define CODEC_FLAG_GRAY 0x2000 /* only decode/encode grayscale */ | 133 #define CODEC_FLAG_GRAY 0x2000 /* only decode/encode grayscale */ |
129 #define CODEC_FLAG_EMU_EDGE 0x4000/* dont draw edges */ | 134 #define CODEC_FLAG_EMU_EDGE 0x4000/* dont draw edges */ |
130 #define CODEC_FLAG_DR1 0x8000 /* direct renderig type 1 (store internal frames in external buffers) */ | 135 #define CODEC_FLAG_DR1 0x8000 /* direct renderig type 1 (store internal frames in external buffers) */ |
131 #define CODEC_FLAG_NOT_TRUNCATED 0x00010000 /* input bitstream is not truncated, except before a startcode | 136 #define CODEC_FLAG_TRUNCATED 0x00010000 /* input bitstream might be truncated at a random location instead |
132 allows the last part of a frame to be decoded earlier */ | 137 of only at frame boundaries */ |
133 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 /* normalize adaptive quantization */ | 138 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 /* normalize adaptive quantization */ |
134 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 /* use interlaced dct */ | 139 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 /* use interlaced dct */ |
135 #define CODEC_FLAG_LOW_DELAY 0x00080000 /* force low delay / will fail on b frames */ | 140 #define CODEC_FLAG_LOW_DELAY 0x00080000 /* force low delay / will fail on b frames */ |
136 | 141 |
137 /* codec capabilities */ | 142 /* codec capabilities */ |
139 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 /* decoder can use draw_horiz_band callback */ | 144 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 /* decoder can use draw_horiz_band callback */ |
140 #define CODEC_CAP_DR1 0x0002 /* direct rendering method 1 */ | 145 #define CODEC_CAP_DR1 0x0002 /* direct rendering method 1 */ |
141 /* if 'parse_only' field is true, then avcodec_parse_frame() can be | 146 /* if 'parse_only' field is true, then avcodec_parse_frame() can be |
142 used */ | 147 used */ |
143 #define CODEC_CAP_PARSE_ONLY 0x0004 | 148 #define CODEC_CAP_PARSE_ONLY 0x0004 |
149 #define CODEC_CAP_TRUNCATED 0x0008 | |
144 | 150 |
145 #define FRAME_RATE_BASE 10000 | 151 #define FRAME_RATE_BASE 10000 |
146 | 152 |
147 typedef struct AVCodecContext { | 153 typedef struct AVCodecContext { |
148 /** | 154 /** |
768 UINT8 *buf, int buf_size); | 774 UINT8 *buf, int buf_size); |
769 int capabilities; | 775 int capabilities; |
770 struct AVCodec *next; | 776 struct AVCodec *next; |
771 } AVCodec; | 777 } AVCodec; |
772 | 778 |
773 /* three components are given, that's all */ | 779 /** |
780 * four components are given, that's all. | |
781 * the last component is alpha | |
782 */ | |
774 typedef struct AVPicture { | 783 typedef struct AVPicture { |
775 UINT8 *data[3]; | 784 UINT8 *data[4]; |
776 int linesize[3]; | 785 int linesize[4]; |
777 } AVPicture; | 786 } AVPicture; |
778 | 787 |
779 extern AVCodec ac3_encoder; | 788 extern AVCodec ac3_encoder; |
780 extern AVCodec mp2_encoder; | 789 extern AVCodec mp2_encoder; |
781 extern AVCodec mp3lame_encoder; | 790 extern AVCodec mp3lame_encoder; |
923 | 932 |
924 void avcodec_register_all(void); | 933 void avcodec_register_all(void); |
925 | 934 |
926 void avcodec_flush_buffers(AVCodecContext *avctx); | 935 void avcodec_flush_buffers(AVCodecContext *avctx); |
927 | 936 |
928 // deprecated / obsolete stuff, WILL be removed | |
929 #ifndef MBC | |
930 #define MBC 128 | |
931 #define MBR 96 | |
932 #endif | |
933 #define QP_TYPE int | |
934 | |
935 /** | 937 /** |
936 * Interface for 0.5.0 version | 938 * Interface for 0.5.0 version |
937 * | 939 * |
938 * do not even think about it's usage for this moment | 940 * do not even think about it's usage for this moment |
939 */ | 941 */ |