Mercurial > libavcodec.hg
annotate avcodec.h @ 1112:54be6aece1be libavcodec
more cosmetics so that doxygen output is readable ...
author | michaelni |
---|---|
date | Thu, 06 Mar 2003 15:56:56 +0000 |
parents | b773f9d23236 |
children | bbcb4fda2b86 |
rev | line source |
---|---|
92 | 1 #ifndef AVCODEC_H |
2 #define AVCODEC_H | |
3 | |
1048 | 4 /** |
5 * @file avcodec.h | |
1105 | 6 * external api header. |
1048 | 7 */ |
8 | |
9 | |
1041 | 10 #ifdef __cplusplus |
11 extern "C" { | |
12 #endif | |
13 | |
0 | 14 #include "common.h" |
15 | |
322 | 16 #define LIBAVCODEC_VERSION_INT 0x000406 |
17 #define LIBAVCODEC_VERSION "0.4.6" | |
1092 | 18 #define LIBAVCODEC_BUILD 4660 |
19 #define LIBAVCODEC_BUILD_STR "4660" | |
322 | 20 |
0 | 21 enum CodecID { |
22 CODEC_ID_NONE, | |
23 CODEC_ID_MPEG1VIDEO, | |
24 CODEC_ID_H263, | |
25 CODEC_ID_RV10, | |
26 CODEC_ID_MP2, | |
260
e1bacfb3f51f
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
27 CODEC_ID_MP3LAME, |
636
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
630
diff
changeset
|
28 CODEC_ID_VORBIS, |
0 | 29 CODEC_ID_AC3, |
30 CODEC_ID_MJPEG, | |
881 | 31 CODEC_ID_MJPEGB, |
67 | 32 CODEC_ID_MPEG4, |
0 | 33 CODEC_ID_RAWVIDEO, |
307 | 34 CODEC_ID_MSMPEG4V1, |
35 CODEC_ID_MSMPEG4V2, | |
36 CODEC_ID_MSMPEG4V3, | |
311 | 37 CODEC_ID_WMV1, |
485 | 38 CODEC_ID_WMV2, |
0 | 39 CODEC_ID_H263P, |
40 CODEC_ID_H263I, | |
521 | 41 CODEC_ID_SVQ1, |
724 | 42 CODEC_ID_DVVIDEO, |
43 CODEC_ID_DVAUDIO, | |
783 | 44 CODEC_ID_WMAV1, |
45 CODEC_ID_WMAV2, | |
827
770578c6c300
added MACE (Macintosh Audio Compression/Expansion) 3:1 & 6:1 support
michaelni
parents:
803
diff
changeset
|
46 CODEC_ID_MACE3, |
770578c6c300
added MACE (Macintosh Audio Compression/Expansion) 3:1 & 6:1 support
michaelni
parents:
803
diff
changeset
|
47 CODEC_ID_MACE6, |
866 | 48 CODEC_ID_HUFFYUV, |
1054
f874e2122d45
Creative YUV (CYUV) decoder by (Mike Melanson <melanson at pcisys dot net>)
michaelni
parents:
1053
diff
changeset
|
49 CODEC_ID_CYUV, |
92 | 50 |
51 /* various pcm "codecs" */ | |
52 CODEC_ID_PCM_S16LE, | |
53 CODEC_ID_PCM_S16BE, | |
54 CODEC_ID_PCM_U16LE, | |
55 CODEC_ID_PCM_U16BE, | |
56 CODEC_ID_PCM_S8, | |
57 CODEC_ID_PCM_U8, | |
58 CODEC_ID_PCM_MULAW, | |
59 CODEC_ID_PCM_ALAW, | |
573
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
556
diff
changeset
|
60 |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
556
diff
changeset
|
61 /* various adpcm codecs */ |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
556
diff
changeset
|
62 CODEC_ID_ADPCM_IMA_QT, |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
556
diff
changeset
|
63 CODEC_ID_ADPCM_IMA_WAV, |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
556
diff
changeset
|
64 CODEC_ID_ADPCM_MS, |
0 | 65 }; |
66 | |
67 enum CodecType { | |
371
8187bb132d85
* Start using enumerated types (makes debugging much easier)
philipjsg
parents:
367
diff
changeset
|
68 CODEC_TYPE_UNKNOWN = -1, |
0 | 69 CODEC_TYPE_VIDEO, |
70 CODEC_TYPE_AUDIO, | |
71 }; | |
72 | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
73 /** |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
74 * Pixel format. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
75 */ |
0 | 76 enum PixelFormat { |
77 PIX_FMT_YUV420P, | |
78 PIX_FMT_YUV422, | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
79 PIX_FMT_RGB24, ///< 3 bytes, R is first |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
80 PIX_FMT_BGR24, ///< 3 bytes, B is first |
27
b8723ec6c80f
added 422P and 444P formats (need to patch ffmpeg.c so that it is handled in all the program)
glantau
parents:
24
diff
changeset
|
81 PIX_FMT_YUV422P, |
b8723ec6c80f
added 422P and 444P formats (need to patch ffmpeg.c so that it is handled in all the program)
glantau
parents:
24
diff
changeset
|
82 PIX_FMT_YUV444P, |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
83 PIX_FMT_RGBA32, ///< always stored in cpu endianness |
733 | 84 PIX_FMT_YUV410P, |
867
48215b2c3888
16-bit and 15-bit rgb/bgr patch by (Joel Yliluoma <joel dot yliluoma at w-create dot com>) (note, rare formats disabled)
michaelni
parents:
866
diff
changeset
|
85 PIX_FMT_YUV411P, |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
86 PIX_FMT_RGB565, ///< always stored in cpu endianness |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
87 PIX_FMT_RGB555, ///< always stored in cpu endianness, most significant bit to 1 |
987
295ec9bebf93
new image formats - suppressed ill defined formats (endianness, unless specified, is always the one of the CPU) - added avcodec_get_pix_fmt_name()
bellard
parents:
984
diff
changeset
|
88 PIX_FMT_GRAY8, |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
89 PIX_FMT_MONOWHITE, ///< 0 is white |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
90 PIX_FMT_MONOBLACK, ///< 0 is black |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
91 PIX_FMT_PAL8, ///< 8 bit with RGBA palette |
987
295ec9bebf93
new image formats - suppressed ill defined formats (endianness, unless specified, is always the one of the CPU) - added avcodec_get_pix_fmt_name()
bellard
parents:
984
diff
changeset
|
92 PIX_FMT_NB, |
0 | 93 }; |
94 | |
92 | 95 /* currently unused, may be used if 24/32 bits samples ever supported */ |
96 enum SampleFormat { | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
97 SAMPLE_FMT_S16 = 0, ///< signed 16 bits |
92 | 98 }; |
99 | |
0 | 100 /* in bytes */ |
783 | 101 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 131072 |
0 | 102 |
842
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
103 /** |
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
104 * Required number of zero bytes at the end of the input bitstream for decoding. |
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
105 * to avoid overreading (and possibly segfaulting) |
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
106 */ |
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
107 #define FF_INPUT_BUFFER_PADDING_SIZE 8 |
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
108 |
320
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
109 /* motion estimation type, EPZS by default */ |
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
110 enum Motion_Est_ID { |
321 | 111 ME_ZERO = 1, |
320
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
112 ME_FULL, |
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
113 ME_LOG, |
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
114 ME_PHODS, |
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
115 ME_EPZS, |
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
116 ME_X1 |
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
117 }; |
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
118 |
613 | 119 typedef struct RcOverride{ |
120 int start_frame; | |
121 int end_frame; | |
122 int qscale; // if this is 0 then quality_factor will be used instead | |
123 float quality_factor; | |
124 } RcOverride; | |
125 | |
321 | 126 /* only for ME compatiblity with old apps */ |
127 extern int motion_estimation_method; | |
128 | |
320
cda7d0857baf
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
pulento
parents:
317
diff
changeset
|
129 /* ME algos sorted by quality */ |
367 | 130 static const int Motion_Est_QTab[] = { ME_ZERO, ME_PHODS, ME_LOG, |
131 ME_X1, ME_EPZS, ME_FULL }; | |
0 | 132 |
625
bb6a69f9d409
slow but accurate integer dct from IJG (should be ok with the LGPL as the old DCT is the fast integer DCT from IJG)
michaelni
parents:
618
diff
changeset
|
133 |
924 | 134 #define FF_MAX_B_FRAMES 8 |
324 | 135 |
681 | 136 /* encoding support |
137 these flags can be passed in AVCodecContext.flags before initing | |
138 Note: note not everything is supported yet | |
139 */ | |
0 | 140 |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
141 #define CODEC_FLAG_HQ 0x0001 ///< brute force MB-type decission mode (slow) |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
142 #define CODEC_FLAG_QSCALE 0x0002 ///< use fixed qscale |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
143 #define CODEC_FLAG_4MV 0x0004 ///< 4 MV per MB allowed |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
144 #define CODEC_FLAG_QPEL 0x0010 ///< use qpel MC |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
145 #define CODEC_FLAG_GMC 0x0020 ///< use GMC |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
146 #define CODEC_FLAG_PART 0x0080 ///< use data partitioning |
324 | 147 /* parent program gurantees that the input for b-frame containing streams is not written to |
148 for at least s->max_b_frames+1 frames, if this is not set than the input will be copied */ | |
329 | 149 #define CODEC_FLAG_INPUT_PRESERVED 0x0100 |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
150 #define CODEC_FLAG_PASS1 0x0200 ///< use internal 2pass ratecontrol in first pass mode |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
151 #define CODEC_FLAG_PASS2 0x0400 ///< use internal 2pass ratecontrol in second pass mode |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
152 #define CODEC_FLAG_EXTERN_HUFF 0x1000 ///< use external huffman table (for mjpeg) |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
153 #define CODEC_FLAG_GRAY 0x2000 ///< only decode/encode grayscale |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
154 #define CODEC_FLAG_EMU_EDGE 0x4000///< dont draw edges |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
155 #define CODEC_FLAG_PSNR 0x8000 ///< error[?] variables will be set during encoding |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
156 #define CODEC_FLAG_TRUNCATED 0x00010000 /** input bitstream might be truncated at a random location instead |
842
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
157 of only at frame boundaries */ |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
158 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 ///< normalize adaptive quantization |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
159 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< use interlaced dct |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
160 #define CODEC_FLAG_LOW_DELAY 0x00080000 ///< force low delay / will fail on b frames |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
161 #define CODEC_FLAG_ALT_SCAN 0x00100000 ///< use alternate scan |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
162 #define CODEC_FLAG_TRELLIS_QUANT 0x00200000 ///< use trellis quantization |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
163 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< place global headers in extradata instead of every keyframe |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
164 #define CODEC_FLAG_BITEXACT 0x00800000 ///< use only bitexact stuff (except (i)dct) |
1095
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
165 /* Fx : Flag for h263+ extra options */ |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
166 #define CODEC_FLAG_H263P_AIC 0x01000000 ///< Advanced intra coding |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
167 #define CODEC_FLAG_H263P_UMV 0x02000000 ///< Unlimited motion vector |
1095
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
168 /* For advanced prediction mode, we reuse the 4MV flag */ |
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
169 /* Unsupported options : |
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
170 * Syntax Arithmetic coding (SAC) |
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
171 * Deblocking filter internal loop |
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
172 * Slice structured |
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
173 * Reference Picture Selection |
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
174 * Independant Segment Decoding |
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
175 * Alternative Inter * VLC |
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
176 * Modified Quantization */ |
c7604e6291c5
extended option for h263+ patch by (fixounet at free dot fr) with some minor modifications
michaelni
parents:
1092
diff
changeset
|
177 /* /Fx */ |
67 | 178 /* codec capabilities */ |
179 | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
180 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< decoder can use draw_horiz_band callback |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
181 #define CODEC_CAP_DR1 0x0002 ///< direct rendering method 1 |
581
8adda0af04e2
added proposed API for parse_only mode to extract compressed frames from compressed streams
bellard
parents:
573
diff
changeset
|
182 /* if 'parse_only' field is true, then avcodec_parse_frame() can be |
8adda0af04e2
added proposed API for parse_only mode to extract compressed frames from compressed streams
bellard
parents:
573
diff
changeset
|
183 used */ |
8adda0af04e2
added proposed API for parse_only mode to extract compressed frames from compressed streams
bellard
parents:
573
diff
changeset
|
184 #define CODEC_CAP_PARSE_ONLY 0x0004 |
842
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
185 #define CODEC_CAP_TRUNCATED 0x0008 |
67 | 186 |
1091 | 187 #define FRAME_RATE_BASE 10010 |
0 | 188 |
925 | 189 #define FF_COMMON_FRAME \ |
903 | 190 uint8_t *data[4];\ |
191 int linesize[4];\ | |
192 /**\ | |
914 | 193 * pointer to the first allocated byte of the picture. can be used in get_buffer/release_buffer\ |
903 | 194 * this isnt used by lavc unless the default get/release_buffer() is used\ |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
195 * - encoding: \ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
196 * - decoding: \ |
903 | 197 */\ |
198 uint8_t *base[4];\ | |
199 /**\ | |
200 * 1 -> keyframe, 0-> not\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
201 * - encoding: set by lavc\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
202 * - decoding: set by lavc\ |
903 | 203 */\ |
204 int key_frame;\ | |
205 \ | |
206 /**\ | |
207 * picture type of the frame, see ?_TYPE below\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
208 * - encoding: set by lavc for coded_picture (and set by user for input)\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
209 * - decoding: set by lavc\ |
903 | 210 */\ |
211 int pict_type;\ | |
212 \ | |
213 /**\ | |
214 * presentation timestamp in micro seconds (time when frame should be shown to user)\ | |
215 * if 0 then the frame_rate will be used as reference\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
216 * - encoding: MUST be set by user\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
217 * - decoding: set by lavc\ |
903 | 218 */\ |
219 long long int pts;\ | |
220 \ | |
221 /**\ | |
222 * picture number in bitstream order.\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
223 * - encoding: set by\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
224 * - decoding: set by lavc\ |
903 | 225 */\ |
226 int coded_picture_number;\ | |
227 /**\ | |
228 * picture number in display order.\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
229 * - encoding: set by\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
230 * - decoding: set by lavc\ |
903 | 231 */\ |
232 int display_picture_number;\ | |
233 \ | |
234 /**\ | |
235 * quality (between 1 (good) and 31 (bad)) \ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
236 * - encoding: set by lavc for coded_picture (and set by user for input)\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
237 * - decoding: set by lavc\ |
903 | 238 */\ |
239 float quality; \ | |
240 \ | |
241 /**\ | |
242 * buffer age (1->was last buffer and dint change, 2->..., ...).\ | |
243 * set to something large if the buffer has not been used yet \ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
244 * - encoding: unused\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
245 * - decoding: MUST be set by get_buffer()\ |
903 | 246 */\ |
247 int age;\ | |
248 \ | |
249 /**\ | |
250 * is this picture used as reference\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
251 * - encoding: unused\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
252 * - decoding: set by lavc (before get_buffer() call))\ |
903 | 253 */\ |
254 int reference;\ | |
255 \ | |
256 /**\ | |
257 * QP table\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
258 * - encoding: unused\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
259 * - decoding: set by lavc\ |
903 | 260 */\ |
261 int8_t *qscale_table;\ | |
262 /**\ | |
263 * QP store stride\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
264 * - encoding: unused\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
265 * - decoding: set by lavc\ |
903 | 266 */\ |
267 int qstride;\ | |
268 \ | |
269 /**\ | |
270 * mbskip_table[mb]>=1 if MB didnt change\ | |
271 * stride= mb_width = (width+15)>>4\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
272 * - encoding: unused\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
273 * - decoding: set by lavc\ |
903 | 274 */\ |
275 uint8_t *mbskip_table;\ | |
276 \ | |
277 /**\ | |
278 * for some private data of the user\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
279 * - encoding: unused\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
280 * - decoding: set by user\ |
903 | 281 */\ |
282 void *opaque;\ | |
909
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
283 \ |
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
284 /**\ |
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
285 * error\ |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
286 * - encoding: set by lavc if flags&CODEC_FLAG_PSNR\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
287 * - decoding: unused\ |
909
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
288 */\ |
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
289 uint64_t error[4];\ |
924 | 290 \ |
291 /**\ | |
292 * type of the buffer (to keep track of who has to dealloc data[*])\ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
293 * - encoding: set by the one who allocs it\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
294 * - decoding: set by the one who allocs it\ |
924 | 295 * Note: user allocated (direct rendering) & internal buffers can not coexist currently\ |
296 */\ | |
297 int type;\ | |
1085
9acf4b552047
move repeat_pict field from AVCodecContext -> AVFrame (closes bug #683536)
michaelni
parents:
1084
diff
changeset
|
298 \ |
9acf4b552047
move repeat_pict field from AVCodecContext -> AVFrame (closes bug #683536)
michaelni
parents:
1084
diff
changeset
|
299 /**\ |
9acf4b552047
move repeat_pict field from AVCodecContext -> AVFrame (closes bug #683536)
michaelni
parents:
1084
diff
changeset
|
300 * when decoding, this signal how much the picture must be delayed.\ |
9acf4b552047
move repeat_pict field from AVCodecContext -> AVFrame (closes bug #683536)
michaelni
parents:
1084
diff
changeset
|
301 * extra_delay = repeat_pict / (2*fps)\ |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
302 * - encoding: unused\ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
303 * - decoding: set by lavc\ |
1085
9acf4b552047
move repeat_pict field from AVCodecContext -> AVFrame (closes bug #683536)
michaelni
parents:
1084
diff
changeset
|
304 */\ |
9acf4b552047
move repeat_pict field from AVCodecContext -> AVFrame (closes bug #683536)
michaelni
parents:
1084
diff
changeset
|
305 int repeat_pict; |
9acf4b552047
move repeat_pict field from AVCodecContext -> AVFrame (closes bug #683536)
michaelni
parents:
1084
diff
changeset
|
306 |
924 | 307 |
308 #define FF_BUFFER_TYPE_INTERNAL 1 | |
309 #define FF_BUFFER_TYPE_USER 2 // Direct rendering buffers | |
310 #define FF_BUFFER_TYPE_SHARED 4 // input frame for encoding(wont be dealloced) | |
311 | |
903 | 312 |
909
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
313 #define FF_I_TYPE 1 // Intra |
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
314 #define FF_P_TYPE 2 // Predicted |
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
315 #define FF_B_TYPE 3 // Bi-dir predicted |
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
316 #define FF_S_TYPE 4 // S(GMC)-VOP MPEG4 |
903 | 317 |
925 | 318 typedef struct AVFrame { |
319 FF_COMMON_FRAME | |
320 } AVFrame; | |
903 | 321 |
1105 | 322 |
323 /** | |
324 * main external api structure. | |
325 */ | |
0 | 326 typedef struct AVCodecContext { |
684 | 327 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
328 * the average bitrate. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
329 * - encoding: set by user. unused for constant quantizer encoding |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
330 * - decoding: set by lavc. 0 or some bitrate if this info is available in the stream |
684 | 331 */ |
0 | 332 int bit_rate; |
684 | 333 |
334 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
335 * number of bits the bitstream is allowed to diverge from the reference. |
684 | 336 * the reference can be CBR (for CBR pass1) or VBR (for pass2) |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
337 * - encoding: set by user. unused for constant quantizer encoding |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
338 * - decoding: unused |
684 | 339 */ |
340 int bit_rate_tolerance; | |
341 | |
342 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
343 * CODEC_FLAG_*. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
344 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
345 * - decoding: set by user. |
684 | 346 */ |
0 | 347 int flags; |
684 | 348 |
349 /** | |
350 * some codecs needs additionnal format info. It is stored here | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
351 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
352 * - decoding: set by lavc. (FIXME is this ok?) |
684 | 353 */ |
354 int sub_id; | |
355 | |
356 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
357 * motion estimation algorithm used for video coding. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
358 * - encoding: MUST be set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
359 * - decoding: unused |
684 | 360 */ |
361 int me_method; | |
362 | |
363 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
364 * some codecs need / can use extra-data like huffman tables. |
684 | 365 * mjpeg: huffman tables |
366 * rv10: additional flags | |
747
3d4377531f6c
mpeg4 header parser clenup (needed for parsing of VOL header in avctx->extradata)
michaelni
parents:
745
diff
changeset
|
367 * mpeg4: global headers (they can be in the bitstream or here) |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
368 * - encoding: set/allocated/freed by lavc. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
369 * - decoding: set/allocated/freed by user. |
684 | 370 */ |
349
34f6c77ff01a
Support for external huffman table and various fixes by Alex Beregszaszi <alex@naxine.org>
arpi_esp
parents:
345
diff
changeset
|
371 void *extradata; |
34f6c77ff01a
Support for external huffman table and various fixes by Alex Beregszaszi <alex@naxine.org>
arpi_esp
parents:
345
diff
changeset
|
372 int extradata_size; |
34f6c77ff01a
Support for external huffman table and various fixes by Alex Beregszaszi <alex@naxine.org>
arpi_esp
parents:
345
diff
changeset
|
373 |
0 | 374 /* video only */ |
684 | 375 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
376 * frames per sec multiplied by FRAME_RATE_BASE. |
684 | 377 * for variable fps this is the precission, so if the timestamps |
378 * can be specified in msec precssion then this is 1000*FRAME_RATE_BASE | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
379 * - encoding: MUST be set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
380 * - decoding: set by lavc. 0 or the frame_rate if available |
684 | 381 */ |
382 int frame_rate; | |
383 | |
384 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
385 * width / height. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
386 * - encoding: MUST be set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
387 * - decoding: set by user, some codecs might override / change it during playback |
684 | 388 */ |
0 | 389 int width, height; |
684 | 390 |
282 | 391 #define FF_ASPECT_SQUARE 1 |
392 #define FF_ASPECT_4_3_625 2 | |
393 #define FF_ASPECT_4_3_525 3 | |
394 #define FF_ASPECT_16_9_625 4 | |
395 #define FF_ASPECT_16_9_525 5 | |
618 | 396 #define FF_ASPECT_EXTENDED 15 |
684 | 397 |
398 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
399 * the number of pictures in a group of pitures, or 0 for intra_only. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
400 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
401 * - decoding: unused |
684 | 402 */ |
403 int gop_size; | |
404 | |
405 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
406 * pixel format, see PIX_FMT_xxx. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
407 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
408 * - decoding: set by lavc. |
684 | 409 */ |
410 enum PixelFormat pix_fmt; | |
1085
9acf4b552047
move repeat_pict field from AVCodecContext -> AVFrame (closes bug #683536)
michaelni
parents:
1084
diff
changeset
|
411 |
684 | 412 /** |
413 * if non NULL, 'draw_horiz_band' is called by the libavcodec | |
414 * decoder to draw an horizontal band. It improve cache usage. Not | |
415 * all codecs can do that. You must check the codec capabilities | |
416 * before | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
417 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
418 * - decoding: set by user. |
684 | 419 */ |
67 | 420 void (*draw_horiz_band)(struct AVCodecContext *s, |
1064 | 421 uint8_t **src_ptr, int linesize, |
67 | 422 int y, int width, int height); |
423 | |
0 | 424 /* audio only */ |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
425 int sample_rate; ///< samples per sec |
0 | 426 int channels; |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
427 int sample_fmt; ///< sample format, currenly unused |
0 | 428 |
429 /* the following data should not be initialized */ | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
430 int frame_size; ///< in samples, initialized when calling 'init' |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
431 int frame_number; ///< audio or video frame number |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
432 int real_pict_num; ///< returns the real picture number of previous encoded frame |
903 | 433 |
684 | 434 /** |
435 * number of frames the decoded output will be delayed relative to | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
436 * the encoded input. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
437 * - encoding: set by lavc. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
438 * - decoding: unused |
684 | 439 */ |
440 int delay; | |
336 | 441 |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
442 /* - encoding parameters */ |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
443 float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0) |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
444 float qblur; ///< amount of qscale smoothing over time (0.0-1.0) |
684 | 445 |
446 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
447 * minimum quantizer. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
448 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
449 * - decoding: unused |
684 | 450 */ |
451 int qmin; | |
452 | |
453 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
454 * maximum quantizer. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
455 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
456 * - decoding: unused |
684 | 457 */ |
458 int qmax; | |
459 | |
460 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
461 * maximum quantizer difference etween frames. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
462 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
463 * - decoding: unused |
684 | 464 */ |
465 int max_qdiff; | |
466 | |
467 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
468 * maximum number of b frames between non b frames. |
684 | 469 * note: the output will be delayed by max_b_frames+1 relative to the input |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
470 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
471 * - decoding: unused |
684 | 472 */ |
473 int max_b_frames; | |
474 | |
475 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
476 * qscale factor between ip and b frames. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
477 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
478 * - decoding: unused |
684 | 479 */ |
480 float b_quant_factor; | |
481 | |
482 /** obsolete FIXME remove */ | |
483 int rc_strategy; | |
329 | 484 int b_frame_strategy; |
324 | 485 |
684 | 486 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
487 * hurry up amount. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
488 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
489 * - decoding: set by user. 1-> skip b frames, 2-> skip idct/dequant too, 5-> skip everything except header |
684 | 490 */ |
491 int hurry_up; | |
345 | 492 |
0 | 493 struct AVCodec *codec; |
684 | 494 |
0 | 495 void *priv_data; |
496 | |
162 | 497 /* The following data is for RTP friendly coding */ |
460 | 498 /* By now only H.263/H.263+/MPEG4 coder honours this */ |
162 | 499 int rtp_mode; /* 1 for activate RTP friendly-mode */ |
500 /* highers numbers represent more error-prone */ | |
501 /* enviroments, by now just "1" exist */ | |
502 | |
503 int rtp_payload_size; /* The size of the RTP payload, the coder will */ | |
504 /* do it's best to deliver a chunk with size */ | |
505 /* below rtp_payload_size, the chunk will start */ | |
506 /* with a start code on some codecs like H.263 */ | |
507 /* This doesn't take account of any particular */ | |
508 /* headers inside the transmited RTP payload */ | |
231 | 509 |
510 | |
511 /* The RTP callcack: This function is called */ | |
512 /* every time the encoder as a packet to send */ | |
513 /* Depends on the encoder if the data starts */ | |
514 /* with a Start Code (it should) H.263 does */ | |
515 void (*rtp_callback)(void *data, int size, int packet_number); | |
516 | |
286 | 517 /* statistics, used for 2-pass encoding */ |
518 int mv_bits; | |
519 int header_bits; | |
520 int i_tex_bits; | |
521 int p_tex_bits; | |
522 int i_count; | |
523 int p_count; | |
524 int skip_count; | |
684 | 525 int misc_bits; |
526 | |
527 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
528 * number of bits used for the previously encoded frame. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
529 * - encoding: set by lavc |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
530 * - decoding: - for audio - bits_per_sample |
684 | 531 */ |
286 | 532 int frame_bits; |
162 | 533 |
684 | 534 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
535 * private data of the user, can be used to carry app specific stuff. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
536 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
537 * - decoding: set by user |
684 | 538 */ |
539 void *opaque; | |
540 | |
0 | 541 char codec_name[32]; |
371
8187bb132d85
* Start using enumerated types (makes debugging much easier)
philipjsg
parents:
367
diff
changeset
|
542 enum CodecType codec_type; /* see CODEC_TYPE_xxx */ |
8187bb132d85
* Start using enumerated types (makes debugging much easier)
philipjsg
parents:
367
diff
changeset
|
543 enum CodecID codec_id; /* see CODEC_ID_xxx */ |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
544 unsigned int codec_tag; ///< codec tag, only used if unknown codec |
411
5c8b3a717929
workaround dc_scale bug in old ffmpeg msmpeg4v3 encoder (set workaround_bugs=1 for this)
michaelni
parents:
399
diff
changeset
|
545 |
684 | 546 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
547 * workaround bugs in encoders which sometimes cannot be detected automatically. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
548 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
549 * - decoding: set by user |
684 | 550 */ |
551 int workaround_bugs; | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
552 #define FF_BUG_AUTODETECT 1 ///< autodetection |
745
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
553 #define FF_BUG_OLD_MSMPEG4 2 |
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
554 #define FF_BUG_XVID_ILACE 4 |
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
555 #define FF_BUG_UMP4 8 |
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
556 #define FF_BUG_NO_PADDING 16 |
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
557 #define FF_BUG_AC_VLC 32 |
760 | 558 #define FF_BUG_QPEL_CHROMA 64 |
984 | 559 #define FF_BUG_STD_QPEL 128 |
1048 | 560 #define FF_BUG_QPEL_CHROMA2 256 |
1053
f07fd48c23d4
direct blocksize in bframes fix (might fix qpel+bframe bug)
michaelni
parents:
1048
diff
changeset
|
561 #define FF_BUG_DIRECT_BLOCKSIZE 512 |
745
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
562 //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100% |
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
563 |
684 | 564 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
565 * luma single coeff elimination threshold. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
566 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
567 * - decoding: unused |
684 | 568 */ |
460 | 569 int luma_elim_threshold; |
684 | 570 |
571 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
572 * chroma single coeff elimination threshold. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
573 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
574 * - decoding: unused |
684 | 575 */ |
460 | 576 int chroma_elim_threshold; |
684 | 577 |
578 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
579 * strictly follow the std (MPEG4, ...). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
580 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
581 * - decoding: unused |
684 | 582 */ |
583 int strict_std_compliance; | |
584 | |
585 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
586 * qscale offset between ip and b frames. |
686
83d2c9d50d7d
fixing i_quant_factor, this should finally fix the bitrate bug with ffserver hopefully
michaelni
parents:
684
diff
changeset
|
587 * if > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset) |
83d2c9d50d7d
fixing i_quant_factor, this should finally fix the bitrate bug with ffserver hopefully
michaelni
parents:
684
diff
changeset
|
588 * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset) |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
589 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
590 * - decoding: unused |
684 | 591 */ |
592 float b_quant_offset; | |
593 | |
594 /** | |
905
2b93dc762f9a
fixing illegal 3. esc bug (the mpeg4 std only requires encoders to use unescaped symbols but not esc1 or esc2 if they are shorter than esc3, andjust beause its logical to use the shortest possible vlc doesnt mean encoders do that)
michaelni
parents:
903
diff
changeset
|
595 * error resilience higher values will detect more errors but may missdetect |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
596 * some more or less valid parts as errors. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
597 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
598 * - decoding: set by user |
684 | 599 */ |
460 | 600 int error_resilience; |
905
2b93dc762f9a
fixing illegal 3. esc bug (the mpeg4 std only requires encoders to use unescaped symbols but not esc1 or esc2 if they are shorter than esc3, andjust beause its logical to use the shortest possible vlc doesnt mean encoders do that)
michaelni
parents:
903
diff
changeset
|
601 #define FF_ER_CAREFULL 1 |
2b93dc762f9a
fixing illegal 3. esc bug (the mpeg4 std only requires encoders to use unescaped symbols but not esc1 or esc2 if they are shorter than esc3, andjust beause its logical to use the shortest possible vlc doesnt mean encoders do that)
michaelni
parents:
903
diff
changeset
|
602 #define FF_ER_COMPLIANT 2 |
2b93dc762f9a
fixing illegal 3. esc bug (the mpeg4 std only requires encoders to use unescaped symbols but not esc1 or esc2 if they are shorter than esc3, andjust beause its logical to use the shortest possible vlc doesnt mean encoders do that)
michaelni
parents:
903
diff
changeset
|
603 #define FF_ER_AGGRESSIVE 3 |
2b93dc762f9a
fixing illegal 3. esc bug (the mpeg4 std only requires encoders to use unescaped symbols but not esc1 or esc2 if they are shorter than esc3, andjust beause its logical to use the shortest possible vlc doesnt mean encoders do that)
michaelni
parents:
903
diff
changeset
|
604 #define FF_ER_VERY_AGGRESSIVE 4 |
466
805714c0c10f
new field for communicating with external postprocessing
nickols_k
parents:
460
diff
changeset
|
605 |
803
08423289ec57
exporting the internal qscale table, this allso fixes the ordering
michaelni
parents:
783
diff
changeset
|
606 /** |
903 | 607 * called at the beginning of each frame to get a buffer for it. |
608 * if pic.reference is set then the frame will be read later by lavc | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
609 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
610 * - decoding: set by lavc, user can override |
803
08423289ec57
exporting the internal qscale table, this allso fixes the ordering
michaelni
parents:
783
diff
changeset
|
611 */ |
925 | 612 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic); |
684 | 613 |
614 /** | |
903 | 615 * called to release buffers which where allocated with get_buffer. |
616 * a released buffer can be reused in get_buffer() | |
617 * pic.data[*] must be set to NULL | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
618 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
619 * - decoding: set by lavc, user can override |
684 | 620 */ |
925 | 621 void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic); |
556 | 622 |
684 | 623 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
624 * is 1 if the decoded stream contains b frames, 0 otherwise. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
625 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
626 * - decoding: set by lavc |
684 | 627 */ |
628 int has_b_frames; | |
629 | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
630 int block_align; ///< used by some WAV based audio codecs |
613 | 631 |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
632 int parse_only; /* - decoding only: if true, only parsing is done |
581
8adda0af04e2
added proposed API for parse_only mode to extract compressed frames from compressed streams
bellard
parents:
573
diff
changeset
|
633 (function avcodec_parse_frame()). The frame |
8adda0af04e2
added proposed API for parse_only mode to extract compressed frames from compressed streams
bellard
parents:
573
diff
changeset
|
634 data is returned. Only MPEG codecs support this now. */ |
613 | 635 |
684 | 636 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
637 * 0-> h263 quant 1-> mpeg quant. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
638 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
639 * - decoding: unused |
684 | 640 */ |
641 int mpeg_quant; | |
613 | 642 |
684 | 643 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
644 * pass1 encoding statistics output buffer. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
645 * - encoding: set by lavc |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
646 * - decoding: unused |
684 | 647 */ |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
648 char *stats_out; |
684 | 649 |
650 /** | |
651 * pass2 encoding statistics input buffer. | |
652 * concatenated stuff from stats_out of pass1 should be placed here | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
653 * - encoding: allocated/set/freed by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
654 * - decoding: unused |
684 | 655 */ |
656 char *stats_in; | |
657 | |
658 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
659 * ratecontrol qmin qmax limiting method. |
684 | 660 * 0-> clipping, 1-> use a nice continous function to limit qscale wthin qmin/qmax |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
661 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
662 * - decoding: unused |
684 | 663 */ |
613 | 664 float rc_qsquish; |
684 | 665 |
613 | 666 float rc_qmod_amp; |
667 int rc_qmod_freq; | |
684 | 668 |
669 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
670 * ratecontrol override, see RcOverride. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
671 * - encoding: allocated/set/freed by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
672 * - decoding: unused |
684 | 673 */ |
613 | 674 RcOverride *rc_override; |
675 int rc_override_count; | |
684 | 676 |
677 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
678 * rate control equation. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
679 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
680 * - decoding: unused |
684 | 681 */ |
613 | 682 char *rc_eq; |
684 | 683 |
684 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
685 * maximum bitrate. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
686 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
687 * - decoding: unused |
684 | 688 */ |
613 | 689 int rc_max_rate; |
684 | 690 |
691 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
692 * minimum bitrate. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
693 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
694 * - decoding: unused |
684 | 695 */ |
613 | 696 int rc_min_rate; |
684 | 697 |
698 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
699 * decoder bitstream buffer size. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
700 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
701 * - decoding: unused |
684 | 702 */ |
613 | 703 int rc_buffer_size; |
704 float rc_buffer_aggressivity; | |
684 | 705 |
706 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
707 * qscale factor between p and i frames. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
708 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
709 * - decoding: unused |
684 | 710 */ |
711 float i_quant_factor; | |
712 | |
713 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
714 * qscale offset between p and i frames. |
686
83d2c9d50d7d
fixing i_quant_factor, this should finally fix the bitrate bug with ffserver hopefully
michaelni
parents:
684
diff
changeset
|
715 * if > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset) |
83d2c9d50d7d
fixing i_quant_factor, this should finally fix the bitrate bug with ffserver hopefully
michaelni
parents:
684
diff
changeset
|
716 * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset) |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
717 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
718 * - decoding: unused |
684 | 719 */ |
720 float i_quant_offset; | |
721 | |
722 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
723 * initial complexity for pass1 ratecontrol. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
724 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
725 * - decoding: unused |
684 | 726 */ |
613 | 727 float rc_initial_cplx; |
581
8adda0af04e2
added proposed API for parse_only mode to extract compressed frames from compressed streams
bellard
parents:
573
diff
changeset
|
728 |
684 | 729 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
730 * dct algorithm, see FF_DCT_* below. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
731 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
732 * - decoding: unused |
684 | 733 */ |
625
bb6a69f9d409
slow but accurate integer dct from IJG (should be ok with the LGPL as the old DCT is the fast integer DCT from IJG)
michaelni
parents:
618
diff
changeset
|
734 int dct_algo; |
628
f596db4aa871
sun solaris compilation bugfix, patch by (Martin Olschewski <olschewski at zpr dot uni-koeln dot de>)
michaelni
parents:
625
diff
changeset
|
735 #define FF_DCT_AUTO 0 |
625
bb6a69f9d409
slow but accurate integer dct from IJG (should be ok with the LGPL as the old DCT is the fast integer DCT from IJG)
michaelni
parents:
618
diff
changeset
|
736 #define FF_DCT_FASTINT 1 |
628
f596db4aa871
sun solaris compilation bugfix, patch by (Martin Olschewski <olschewski at zpr dot uni-koeln dot de>)
michaelni
parents:
625
diff
changeset
|
737 #define FF_DCT_INT 2 |
f596db4aa871
sun solaris compilation bugfix, patch by (Martin Olschewski <olschewski at zpr dot uni-koeln dot de>)
michaelni
parents:
625
diff
changeset
|
738 #define FF_DCT_MMX 3 |
f596db4aa871
sun solaris compilation bugfix, patch by (Martin Olschewski <olschewski at zpr dot uni-koeln dot de>)
michaelni
parents:
625
diff
changeset
|
739 #define FF_DCT_MLIB 4 |
828
ace3ccd18dd2
Altivec Patch (Mark III) by (Dieter Shirley <dieters at schemasoft dot com>)
michaelni
parents:
827
diff
changeset
|
740 #define FF_DCT_ALTIVEC 5 |
690
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
741 |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
742 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
743 * luminance masking (0-> disabled). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
744 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
745 * - decoding: unused |
690
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
746 */ |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
747 float lumi_masking; |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
748 |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
749 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
750 * temporary complexity masking (0-> disabled). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
751 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
752 * - decoding: unused |
690
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
753 */ |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
754 float temporal_cplx_masking; |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
755 |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
756 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
757 * spatial complexity masking (0-> disabled). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
758 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
759 * - decoding: unused |
690
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
760 */ |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
761 float spatial_cplx_masking; |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
762 |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
763 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
764 * p block masking (0-> disabled). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
765 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
766 * - decoding: unused |
690
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
767 */ |
a1c69cb685b3
adaptive quantization (lumi/temporal & spatial complexity masking)
michaelni
parents:
686
diff
changeset
|
768 float p_masking; |
654 | 769 |
693
b6a7ff92df57
darkness masking (lumi masking does only bright stuff now)
michaelni
parents:
690
diff
changeset
|
770 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
771 * darkness masking (0-> disabled). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
772 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
773 * - decoding: unused |
693
b6a7ff92df57
darkness masking (lumi masking does only bright stuff now)
michaelni
parents:
690
diff
changeset
|
774 */ |
b6a7ff92df57
darkness masking (lumi masking does only bright stuff now)
michaelni
parents:
690
diff
changeset
|
775 float dark_masking; |
700
0fb4c66527e1
autodetect UMP4 (by adding a fourcc field to AVCodecContext)
michaelni
parents:
697
diff
changeset
|
776 |
0fb4c66527e1
autodetect UMP4 (by adding a fourcc field to AVCodecContext)
michaelni
parents:
697
diff
changeset
|
777 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
778 * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). |
700
0fb4c66527e1
autodetect UMP4 (by adding a fourcc field to AVCodecContext)
michaelni
parents:
697
diff
changeset
|
779 * this is used to workaround some encoder bugs |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
780 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
781 * - decoding: set by user, will be converted to upper case by lavc during init |
700
0fb4c66527e1
autodetect UMP4 (by adding a fourcc field to AVCodecContext)
michaelni
parents:
697
diff
changeset
|
782 */ |
0fb4c66527e1
autodetect UMP4 (by adding a fourcc field to AVCodecContext)
michaelni
parents:
697
diff
changeset
|
783 int fourcc; |
693
b6a7ff92df57
darkness masking (lumi masking does only bright stuff now)
michaelni
parents:
690
diff
changeset
|
784 |
706
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
785 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
786 * idct algorithm, see FF_IDCT_* below. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
787 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
788 * - decoding: set by user |
706
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
789 */ |
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
790 int idct_algo; |
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
791 #define FF_IDCT_AUTO 0 |
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
792 #define FF_IDCT_INT 1 |
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
793 #define FF_IDCT_SIMPLE 2 |
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
794 #define FF_IDCT_SIMPLEMMX 3 |
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
795 #define FF_IDCT_LIBMPEG2MMX 4 |
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
796 #define FF_IDCT_PS2 5 |
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
797 #define FF_IDCT_MLIB 6 |
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
798 #define FF_IDCT_ARM 7 |
828
ace3ccd18dd2
Altivec Patch (Mark III) by (Dieter Shirley <dieters at schemasoft dot com>)
michaelni
parents:
827
diff
changeset
|
799 #define FF_IDCT_ALTIVEC 8 |
706
e65798d228ea
idct permutation cleanup, idct can be selected per context now
michaelni
parents:
703
diff
changeset
|
800 |
713
e74a563eb643
rv10 cleanup (de)muxer still needs to be cleaned up (still searching volunteer for that ;) )
michaelni
parents:
706
diff
changeset
|
801 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
802 * slice count. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
803 * - encoding: set by lavc |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
804 * - decoding: set by user (or 0) |
713
e74a563eb643
rv10 cleanup (de)muxer still needs to be cleaned up (still searching volunteer for that ;) )
michaelni
parents:
706
diff
changeset
|
805 */ |
e74a563eb643
rv10 cleanup (de)muxer still needs to be cleaned up (still searching volunteer for that ;) )
michaelni
parents:
706
diff
changeset
|
806 int slice_count; |
e74a563eb643
rv10 cleanup (de)muxer still needs to be cleaned up (still searching volunteer for that ;) )
michaelni
parents:
706
diff
changeset
|
807 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
808 * slice offsets in the frame in bytes. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
809 * - encoding: set/allocated by lavc |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
810 * - decoding: set/allocated by user (or NULL) |
713
e74a563eb643
rv10 cleanup (de)muxer still needs to be cleaned up (still searching volunteer for that ;) )
michaelni
parents:
706
diff
changeset
|
811 */ |
e74a563eb643
rv10 cleanup (de)muxer still needs to be cleaned up (still searching volunteer for that ;) )
michaelni
parents:
706
diff
changeset
|
812 int *slice_offset; |
e74a563eb643
rv10 cleanup (de)muxer still needs to be cleaned up (still searching volunteer for that ;) )
michaelni
parents:
706
diff
changeset
|
813 |
745
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
814 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
815 * error concealment flags. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
816 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
817 * - decoding: set by user |
745
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
818 */ |
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
819 int error_concealment; |
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
820 #define FF_EC_GUESS_MVS 1 |
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
821 #define FF_EC_DEBLOCK 2 |
25d7fb7c89be
better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents:
733
diff
changeset
|
822 |
803
08423289ec57
exporting the internal qscale table, this allso fixes the ordering
michaelni
parents:
783
diff
changeset
|
823 /** |
849 | 824 * dsp_mask could be used to disable unwanted |
825 * CPU features (i.e. MMX, SSE. ...) | |
826 */ | |
827 unsigned dsp_mask; | |
866 | 828 |
829 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
830 * bits per sample/pixel from the demuxer (needed for huffyuv). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
831 * - encoding: set by lavc |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
832 * - decoding: set by user |
866 | 833 */ |
834 int bits_per_sample; | |
835 | |
836 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
837 * prediction method (needed for huffyuv). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
838 * - encoding: set by user |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
839 * - decoding: unused |
866 | 840 */ |
841 int prediction_method; | |
842 #define FF_PRED_LEFT 0 | |
843 #define FF_PRED_PLANE 1 | |
844 #define FF_PRED_MEDIAN 2 | |
880 | 845 |
846 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
847 * aspect ratio (0 if unknown). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
848 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
849 * - decoding: set by lavc. |
880 | 850 */ |
851 float aspect_ratio; | |
903 | 852 |
853 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
854 * the picture in the bitstream. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
855 * - encoding: set by lavc |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
856 * - decoding: set by lavc |
903 | 857 */ |
925 | 858 AVFrame *coded_frame; |
906 | 859 |
860 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
861 * debug. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
862 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
863 * - decoding: set by user. |
906 | 864 */ |
865 int debug; | |
866 #define FF_DEBUG_PICT_INFO 1 | |
867 #define FF_DEBUG_RC 2 | |
868 #define FF_DEBUG_BITSTREAM 4 | |
869 #define FF_DEBUG_MB_TYPE 8 | |
870 #define FF_DEBUG_QP 16 | |
871 #define FF_DEBUG_MV 32 | |
942 | 872 #define FF_DEBUG_VIS_MV 0x00000040 |
873 #define FF_DEBUG_SKIP 0x00000080 | |
874 #define FF_DEBUG_STARTCODE 0x00000100 | |
875 #define FF_DEBUG_PTS 0x00000200 | |
909
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
876 |
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
877 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
878 * error. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
879 * - encoding: set by lavc if flags&CODEC_FLAG_PSNR |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
880 * - decoding: unused |
909
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
881 */ |
8ae1e4c24e91
new PSNR code (now works with chroma, b frames, ...)
michaelni
parents:
906
diff
changeset
|
882 uint64_t error[4]; |
932 | 883 |
884 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
885 * minimum MB quantizer. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
886 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
887 * - decoding: unused |
932 | 888 */ |
889 int mb_qmin; | |
890 | |
891 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
892 * maximum MB quantizer. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
893 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
894 * - decoding: unused |
932 | 895 */ |
896 int mb_qmax; | |
936 | 897 |
898 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
899 * motion estimation compare function. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
900 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
901 * - decoding: unused |
936 | 902 */ |
903 int me_cmp; | |
904 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
905 * subpixel motion estimation compare function. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
906 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
907 * - decoding: unused |
936 | 908 */ |
909 int me_sub_cmp; | |
910 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
911 * macroblock compare function (not supported yet). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
912 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
913 * - decoding: unused |
936 | 914 */ |
915 int mb_cmp; | |
916 #define FF_CMP_SAD 0 | |
917 #define FF_CMP_SSE 1 | |
918 #define FF_CMP_SATD 2 | |
919 #define FF_CMP_DCT 3 | |
920 #define FF_CMP_PSNR 4 | |
921 #define FF_CMP_BIT 5 | |
922 #define FF_CMP_RD 6 | |
923 #define FF_CMP_ZERO 7 | |
924 #define FF_CMP_CHROMA 256 | |
925 | |
926 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
927 * ME diamond size & shape. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
928 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
929 * - decoding: unused |
936 | 930 */ |
931 int dia_size; | |
948 | 932 |
933 /** | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
934 * amount of previous MV predictors (2a+1 x 2a+1 square). |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
935 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
936 * - decoding: unused |
948 | 937 */ |
938 int last_predictor_count; | |
953 | 939 |
951 | 940 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
941 * pre pass for motion estimation. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
942 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
943 * - decoding: unused |
951 | 944 */ |
945 int pre_me; | |
948 | 946 |
953 | 947 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
948 * motion estimation pre pass compare function. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
949 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
950 * - decoding: unused |
953 | 951 */ |
952 int me_pre_cmp; | |
954 | 953 |
953 | 954 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
955 * ME pre pass diamond size & shape. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
956 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
957 * - decoding: unused |
953 | 958 */ |
959 int pre_dia_size; | |
960 | |
954 | 961 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
962 * subpel ME quality. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
963 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
964 * - decoding: unused |
954 | 965 */ |
966 int me_subpel_quality; | |
967 | |
998 | 968 /** |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
969 * callback to negotiate the pixelFormat. |
998 | 970 * @param fmt is the list of formats which are supported by the codec, |
971 * its terminated by -1 as 0 is a valid format, the formats are ordered by quality | |
972 * the first is allways the native one | |
973 * @return the choosen format | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
974 * - encoding: unused |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
975 * - decoding: set by user, if not set then the native format will always be choosen |
998 | 976 */ |
977 enum PixelFormat (*get_format)(struct AVCodecContext *s, enum PixelFormat * fmt); | |
1084 | 978 |
979 /** | |
980 * DTG active format information (additionnal aspect ratio | |
981 * information only used in DVB MPEG2 transport streams). 0 if | |
982 * not set. | |
983 * | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
984 * - encoding: unused. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
985 * - decoding: set by decoder |
1084 | 986 */ |
987 int dtg_active_format; | |
988 #define FF_DTG_AFD_SAME 8 | |
989 #define FF_DTG_AFD_4_3 9 | |
990 #define FF_DTG_AFD_16_9 10 | |
991 #define FF_DTG_AFD_14_9 11 | |
992 #define FF_DTG_AFD_4_3_SP_14_9 13 | |
993 #define FF_DTG_AFD_16_9_SP_14_9 14 | |
994 #define FF_DTG_AFD_SP_4_3 15 | |
995 | |
1086 | 996 int me_range; |
997 /** | |
998 * Maximum motion estimation search range in subpel units. | |
999 * if 0 then no limit | |
1000 * | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1001 * - encoding: set by user. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1002 * - decoding: unused. |
1086 | 1003 */ |
1004 | |
0 | 1005 } AVCodecContext; |
1006 | |
1058 | 1007 //void avcodec_getopt(AVCodecContext* avctx, const char* str, avc_config_t** config); |
1008 | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1009 /** |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1010 * AVOption. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1011 */ |
1058 | 1012 typedef struct AVOption { |
1013 /** options' name */ | |
1014 const char *name; /* if name is NULL, it indicates a link to next */ | |
1015 /** short English text help */ | |
1016 const char *help; | |
1017 /** offset to context structure where the parsed value should be stored */ | |
1018 int offset; | |
1019 /** options' type */ | |
1020 int type; | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1021 #define FF_OPT_TYPE_BOOL 1 ///< boolean - true,1,on (or simply presence) |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1022 #define FF_OPT_TYPE_DOUBLE 2 ///< double |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1023 #define FF_OPT_TYPE_INT 3 ///< integer |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1024 #define FF_OPT_TYPE_STRING 4 ///< string (finished with \0) |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1025 #define FF_OPT_TYPE_MASK 0x1f ///< mask for types - upper bits are various flags |
1058 | 1026 //#define FF_OPT_TYPE_EXPERT 0x20 // flag for expert option |
1027 #define FF_OPT_TYPE_FLAG (FF_OPT_TYPE_BOOL | 0x40) | |
1028 #define FF_OPT_TYPE_RCOVERRIDE (FF_OPT_TYPE_STRING | 0x80) | |
1029 /** min value (min == max -> no limits) */ | |
1030 double min; | |
1031 /** maximum value for double/int */ | |
1032 double max; | |
1033 /** default boo [0,1]l/double/int value */ | |
1034 double defval; | |
1035 /** | |
1036 * default string value (with optional semicolon delimited extra option-list | |
1037 * i.e. option1;option2;option3 | |
1038 * defval might select other then first argument as default | |
1039 */ | |
1040 const char *defstr; | |
1041 const struct AVOption *sub; /* used when name is NULL */ | |
1042 /* when it's NULL return to previous level (or finish reading) */ | |
1043 #define FF_OPT_MAX_DEPTH 10 | |
1044 } AVOption; | |
1045 | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1046 /** |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1047 * AVCodec. |
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1048 */ |
0 | 1049 typedef struct AVCodec { |
862 | 1050 const char *name; |
0 | 1051 int type; |
1052 int id; | |
1053 int priv_data_size; | |
1054 int (*init)(AVCodecContext *); | |
1064 | 1055 int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data); |
0 | 1056 int (*close)(AVCodecContext *); |
556 | 1057 int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, |
1064 | 1058 uint8_t *buf, int buf_size); |
67 | 1059 int capabilities; |
1058 | 1060 const AVOption *options; |
0 | 1061 struct AVCodec *next; |
1062 } AVCodec; | |
1063 | |
1058 | 1064 /** |
842
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
1065 * four components are given, that's all. |
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
1066 * the last component is alpha |
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
1067 */ |
0 | 1068 typedef struct AVPicture { |
1064 | 1069 uint8_t *data[4]; |
842
e460775adb38
cleanup (breaks compatibility, requested by fabrice)
michaelni
parents:
831
diff
changeset
|
1070 int linesize[4]; |
0 | 1071 } AVPicture; |
1072 | |
1073 extern AVCodec ac3_encoder; | |
1074 extern AVCodec mp2_encoder; | |
260
e1bacfb3f51f
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
1075 extern AVCodec mp3lame_encoder; |
636
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
630
diff
changeset
|
1076 extern AVCodec oggvorbis_encoder; |
0 | 1077 extern AVCodec mpeg1video_encoder; |
1078 extern AVCodec h263_encoder; | |
1079 extern AVCodec h263p_encoder; | |
1080 extern AVCodec rv10_encoder; | |
1081 extern AVCodec mjpeg_encoder; | |
67 | 1082 extern AVCodec mpeg4_encoder; |
307 | 1083 extern AVCodec msmpeg4v1_encoder; |
1084 extern AVCodec msmpeg4v2_encoder; | |
1085 extern AVCodec msmpeg4v3_encoder; | |
500 | 1086 extern AVCodec wmv1_encoder; |
1087 extern AVCodec wmv2_encoder; | |
866 | 1088 extern AVCodec huffyuv_encoder; |
0 | 1089 |
1090 extern AVCodec h263_decoder; | |
67 | 1091 extern AVCodec mpeg4_decoder; |
307 | 1092 extern AVCodec msmpeg4v1_decoder; |
1093 extern AVCodec msmpeg4v2_decoder; | |
1094 extern AVCodec msmpeg4v3_decoder; | |
311 | 1095 extern AVCodec wmv1_decoder; |
500 | 1096 extern AVCodec wmv2_decoder; |
0 | 1097 extern AVCodec mpeg_decoder; |
1098 extern AVCodec h263i_decoder; | |
1099 extern AVCodec rv10_decoder; | |
521 | 1100 extern AVCodec svq1_decoder; |
724 | 1101 extern AVCodec dvvideo_decoder; |
1102 extern AVCodec dvaudio_decoder; | |
783 | 1103 extern AVCodec wmav1_decoder; |
1104 extern AVCodec wmav2_decoder; | |
24 | 1105 extern AVCodec mjpeg_decoder; |
881 | 1106 extern AVCodec mjpegb_decoder; |
322 | 1107 extern AVCodec mp2_decoder; |
92 | 1108 extern AVCodec mp3_decoder; |
827
770578c6c300
added MACE (Macintosh Audio Compression/Expansion) 3:1 & 6:1 support
michaelni
parents:
803
diff
changeset
|
1109 extern AVCodec mace3_decoder; |
770578c6c300
added MACE (Macintosh Audio Compression/Expansion) 3:1 & 6:1 support
michaelni
parents:
803
diff
changeset
|
1110 extern AVCodec mace6_decoder; |
866 | 1111 extern AVCodec huffyuv_decoder; |
883 | 1112 extern AVCodec oggvorbis_decoder; |
1054
f874e2122d45
Creative YUV (CYUV) decoder by (Mike Melanson <melanson at pcisys dot net>)
michaelni
parents:
1053
diff
changeset
|
1113 extern AVCodec cyuv_decoder; |
0 | 1114 |
92 | 1115 /* pcm codecs */ |
1116 #define PCM_CODEC(id, name) \ | |
1117 extern AVCodec name ## _decoder; \ | |
846
ade627a74709
avoid duplicate ";" warnings (based upon a patch by mru at users dot sourceforge dot net (Mns Rullgrd))
michaelni
parents:
845
diff
changeset
|
1118 extern AVCodec name ## _encoder |
92 | 1119 |
1120 PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le); | |
1121 PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be); | |
1122 PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le); | |
1123 PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be); | |
1124 PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8); | |
1125 PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8); | |
1126 PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw); | |
1127 PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw); | |
1128 | |
573
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
556
diff
changeset
|
1129 /* adpcm codecs */ |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
556
diff
changeset
|
1130 |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
556
diff
changeset
|
1131 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:
556
diff
changeset
|
1132 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:
556
diff
changeset
|
1133 PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms); |
b0f52172f4c5
beos/mov/adpcm patch by Franois Revol <revol at free dot fr>
michaelni
parents:
556
diff
changeset
|
1134 |
92 | 1135 #undef PCM_CODEC |
1136 | |
1137 /* dummy raw video codec */ | |
0 | 1138 extern AVCodec rawvideo_codec; |
1139 | |
1140 /* the following codecs use external GPL libs */ | |
1141 extern AVCodec ac3_decoder; | |
1142 | |
1143 /* resample.c */ | |
1144 | |
1145 struct ReSampleContext; | |
1146 | |
1147 typedef struct ReSampleContext ReSampleContext; | |
1148 | |
1149 ReSampleContext *audio_resample_init(int output_channels, int input_channels, | |
1150 int output_rate, int input_rate); | |
1151 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples); | |
1152 void audio_resample_close(ReSampleContext *s); | |
1153 | |
1154 /* YUV420 format is assumed ! */ | |
1155 | |
1156 struct ImgReSampleContext; | |
1157 | |
1158 typedef struct ImgReSampleContext ImgReSampleContext; | |
1159 | |
1160 ImgReSampleContext *img_resample_init(int output_width, int output_height, | |
1161 int input_width, int input_height); | |
630
b4ee42142ad1
croping patch by (talus25 at speakeasy dot net) with fixes from atmos & me
michaelni
parents:
628
diff
changeset
|
1162 |
b4ee42142ad1
croping patch by (talus25 at speakeasy dot net) with fixes from atmos & me
michaelni
parents:
628
diff
changeset
|
1163 ImgReSampleContext *img_resample_full_init(int owidth, int oheight, |
b4ee42142ad1
croping patch by (talus25 at speakeasy dot net) with fixes from atmos & me
michaelni
parents:
628
diff
changeset
|
1164 int iwidth, int iheight, |
b4ee42142ad1
croping patch by (talus25 at speakeasy dot net) with fixes from atmos & me
michaelni
parents:
628
diff
changeset
|
1165 int topBand, int bottomBand, |
b4ee42142ad1
croping patch by (talus25 at speakeasy dot net) with fixes from atmos & me
michaelni
parents:
628
diff
changeset
|
1166 int leftBand, int rightBand); |
b4ee42142ad1
croping patch by (talus25 at speakeasy dot net) with fixes from atmos & me
michaelni
parents:
628
diff
changeset
|
1167 |
0 | 1168 void img_resample(ImgReSampleContext *s, |
1169 AVPicture *output, AVPicture *input); | |
1170 | |
1171 void img_resample_close(ImgReSampleContext *s); | |
1172 | |
1064 | 1173 int avpicture_fill(AVPicture *picture, uint8_t *ptr, |
991
2fabb7d709e7
build update - avpicture_fill() returns the image size
bellard
parents:
987
diff
changeset
|
1174 int pix_fmt, int width, int height); |
49 | 1175 int avpicture_get_size(int pix_fmt, int width, int height); |
987
295ec9bebf93
new image formats - suppressed ill defined formats (endianness, unless specified, is always the one of the CPU) - added avcodec_get_pix_fmt_name()
bellard
parents:
984
diff
changeset
|
1176 void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift); |
295ec9bebf93
new image formats - suppressed ill defined formats (endianness, unless specified, is always the one of the CPU) - added avcodec_get_pix_fmt_name()
bellard
parents:
984
diff
changeset
|
1177 const char *avcodec_get_pix_fmt_name(int pix_fmt); |
49 | 1178 |
1179 /* convert among pixel formats */ | |
1180 int img_convert(AVPicture *dst, int dst_pix_fmt, | |
1181 AVPicture *src, int pix_fmt, | |
1182 int width, int height); | |
1183 | |
1184 /* deinterlace a picture */ | |
1185 int avpicture_deinterlace(AVPicture *dst, AVPicture *src, | |
0 | 1186 int pix_fmt, int width, int height); |
1187 | |
1188 /* external high level API */ | |
1189 | |
1190 extern AVCodec *first_avcodec; | |
1191 | |
362 | 1192 /* returns LIBAVCODEC_VERSION_INT constant */ |
399 | 1193 unsigned avcodec_version(void); |
379 | 1194 /* returns LIBAVCODEC_BUILD constant */ |
399 | 1195 unsigned avcodec_build(void); |
0 | 1196 void avcodec_init(void); |
1197 | |
1198 void register_avcodec(AVCodec *format); | |
1199 AVCodec *avcodec_find_encoder(enum CodecID id); | |
177 | 1200 AVCodec *avcodec_find_encoder_by_name(const char *name); |
0 | 1201 AVCodec *avcodec_find_decoder(enum CodecID id); |
1202 AVCodec *avcodec_find_decoder_by_name(const char *name); | |
1203 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode); | |
1204 | |
903 | 1205 void avcodec_get_context_defaults(AVCodecContext *s); |
703 | 1206 AVCodecContext *avcodec_alloc_context(void); |
925 | 1207 AVFrame *avcodec_alloc_frame(void); |
903 | 1208 |
925 | 1209 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic); |
1210 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic); | |
903 | 1211 |
0 | 1212 int avcodec_open(AVCodecContext *avctx, AVCodec *codec); |
1064 | 1213 int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, |
0 | 1214 int *frame_size_ptr, |
1064 | 1215 uint8_t *buf, int buf_size); |
925 | 1216 int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, |
0 | 1217 int *got_picture_ptr, |
1064 | 1218 uint8_t *buf, int buf_size); |
1219 int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata, | |
581
8adda0af04e2
added proposed API for parse_only mode to extract compressed frames from compressed streams
bellard
parents:
573
diff
changeset
|
1220 int *data_size_ptr, |
1064 | 1221 uint8_t *buf, int buf_size); |
1222 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, | |
0 | 1223 const short *samples); |
1064 | 1224 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, |
925 | 1225 const AVFrame *pict); |
0 | 1226 |
1227 int avcodec_close(AVCodecContext *avctx); | |
1228 | |
1229 void avcodec_register_all(void); | |
92 | 1230 |
341 | 1231 void avcodec_flush_buffers(AVCodecContext *avctx); |
1232 | |
962
c5aef83c6a3f
* first shot for generaly usable option parser for codecs
kabi
parents:
954
diff
changeset
|
1233 |
c5aef83c6a3f
* first shot for generaly usable option parser for codecs
kabi
parents:
954
diff
changeset
|
1234 |
382 | 1235 /** |
1236 * Interface for 0.5.0 version | |
1237 * | |
1238 * do not even think about it's usage for this moment | |
1239 */ | |
1240 | |
1241 typedef struct { | |
1112
54be6aece1be
more cosmetics so that doxygen output is readable ...
michaelni
parents:
1105
diff
changeset
|
1242 /// compressed size used from given memory buffer |
382 | 1243 int size; |
1244 /// I/P/B frame type | |
1245 int frame_type; | |
1246 } avc_enc_result_t; | |
1247 | |
1248 /** | |
1249 * Commands | |
1250 * order can't be changed - once it was defined | |
1251 */ | |
1252 typedef enum { | |
1253 // general commands | |
1254 AVC_OPEN_BY_NAME = 0xACA000, | |
1255 AVC_OPEN_BY_CODEC_ID, | |
1256 AVC_OPEN_BY_FOURCC, | |
1257 AVC_CLOSE, | |
1258 | |
1259 AVC_FLUSH, | |
1260 // pin - struct { uint8_t* src, uint_t src_size } | |
1261 // pout - struct { AVPicture* img, consumed_bytes, | |
1262 AVC_DECODE, | |
1263 // pin - struct { AVPicture* img, uint8_t* dest, uint_t dest_size } | |
1264 // pout - uint_t used_from_dest_size | |
1265 AVC_ENCODE, | |
1266 | |
1267 // query/get video commands | |
1268 AVC_GET_VERSION = 0xACB000, | |
1269 AVC_GET_WIDTH, | |
1270 AVC_GET_HEIGHT, | |
1271 AVC_GET_DELAY, | |
1272 AVC_GET_QUANT_TABLE, | |
1273 // ... | |
1274 | |
1275 // query/get audio commands | |
1276 AVC_GET_FRAME_SIZE = 0xABC000, | |
1277 | |
1278 // maybe define some simple structure which | |
1279 // might be passed to the user - but they can't | |
1280 // contain any codec specific parts and these | |
1281 // calls are usualy necessary only few times | |
1282 | |
1283 // set video commands | |
1284 AVC_SET_WIDTH = 0xACD000, | |
1285 AVC_SET_HEIGHT, | |
1286 | |
1287 // set video encoding commands | |
1288 AVC_SET_FRAME_RATE = 0xACD800, | |
1289 AVC_SET_QUALITY, | |
1290 AVC_SET_HURRY_UP, | |
1291 | |
1292 // set audio commands | |
1293 AVC_SET_SAMPLE_RATE = 0xACE000, | |
1294 AVC_SET_CHANNELS, | |
1295 | |
1296 } avc_cmd_t; | |
1297 | |
1298 /** | |
1299 * \param handle allocated private structure by libavcodec | |
1300 * for initialization pass NULL - will be returned pout | |
1301 * user is supposed to know nothing about its structure | |
1302 * \param cmd type of operation to be performed | |
1303 * \param pint input parameter | |
1304 * \param pout output parameter | |
1305 * | |
1306 * \returns command status - eventually for query command it might return | |
1307 * integer resulting value | |
1308 */ | |
1309 int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout); | |
1310 | |
492 | 1311 /* memory */ |
862 | 1312 void *av_malloc(unsigned int size); |
1313 void *av_mallocz(unsigned int size); | |
1031
19de1445beb2
use av_malloc() functions - added av_strdup and av_realloc()
bellard
parents:
1026
diff
changeset
|
1314 void *av_realloc(void *ptr, unsigned int size); |
492 | 1315 void av_free(void *ptr); |
1031
19de1445beb2
use av_malloc() functions - added av_strdup and av_realloc()
bellard
parents:
1026
diff
changeset
|
1316 char *av_strdup(const char *s); |
492 | 1317 void __av_freep(void **ptr); |
1318 #define av_freep(p) __av_freep((void **)(p)) | |
1058 | 1319 void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size); |
902
6acc8394960d
* two functions to handle allocation of static data more simple
kabi
parents:
883
diff
changeset
|
1320 /* for static data only */ |
6acc8394960d
* two functions to handle allocation of static data more simple
kabi
parents:
883
diff
changeset
|
1321 /* call av_free_static to release all staticaly allocated tables */ |
962
c5aef83c6a3f
* first shot for generaly usable option parser for codecs
kabi
parents:
954
diff
changeset
|
1322 void av_free_static(void); |
902
6acc8394960d
* two functions to handle allocation of static data more simple
kabi
parents:
883
diff
changeset
|
1323 void *__av_mallocz_static(void** location, unsigned int size); |
6acc8394960d
* two functions to handle allocation of static data more simple
kabi
parents:
883
diff
changeset
|
1324 #define av_mallocz_static(p, s) __av_mallocz_static((void **)(p), s) |
492 | 1325 |
1041 | 1326 #ifdef __cplusplus |
1327 } | |
1328 #endif | |
1329 | |
92 | 1330 #endif /* AVCODEC_H */ |