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