Mercurial > libavcodec.hg
comparison avcodec.h @ 2967:ef2149182f1c libavcodec
COSMETICS: Remove all trailing whitespace.
author | diego |
---|---|
date | Sat, 17 Dec 2005 18:14:38 +0000 |
parents | 5f51b1e0bed6 |
children | 583b6ac45c07 |
comparison
equal
deleted
inserted
replaced
2966:564788471dd4 | 2967:ef2149182f1c |
---|---|
30 #define AV_NOPTS_VALUE int64_t_C(0x8000000000000000) | 30 #define AV_NOPTS_VALUE int64_t_C(0x8000000000000000) |
31 #define AV_TIME_BASE 1000000 | 31 #define AV_TIME_BASE 1000000 |
32 #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE} | 32 #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE} |
33 | 33 |
34 enum CodecID { | 34 enum CodecID { |
35 CODEC_ID_NONE, | 35 CODEC_ID_NONE, |
36 CODEC_ID_MPEG1VIDEO, | 36 CODEC_ID_MPEG1VIDEO, |
37 CODEC_ID_MPEG2VIDEO, /* prefered ID for MPEG Video 1 or 2 decoding */ | 37 CODEC_ID_MPEG2VIDEO, /* prefered ID for MPEG Video 1 or 2 decoding */ |
38 CODEC_ID_MPEG2VIDEO_XVMC, | 38 CODEC_ID_MPEG2VIDEO_XVMC, |
39 CODEC_ID_H261, | 39 CODEC_ID_H261, |
40 CODEC_ID_H263, | 40 CODEC_ID_H263, |
161 /* various DPCM codecs */ | 161 /* various DPCM codecs */ |
162 CODEC_ID_ROQ_DPCM= 0x14000, | 162 CODEC_ID_ROQ_DPCM= 0x14000, |
163 CODEC_ID_INTERPLAY_DPCM, | 163 CODEC_ID_INTERPLAY_DPCM, |
164 CODEC_ID_XAN_DPCM, | 164 CODEC_ID_XAN_DPCM, |
165 CODEC_ID_SOL_DPCM, | 165 CODEC_ID_SOL_DPCM, |
166 | 166 |
167 CODEC_ID_MP2= 0x15000, | 167 CODEC_ID_MP2= 0x15000, |
168 CODEC_ID_MP3, /* prefered ID for MPEG Audio layer 1, 2 or3 decoding */ | 168 CODEC_ID_MP3, /* prefered ID for MPEG Audio layer 1, 2 or3 decoding */ |
169 CODEC_ID_AAC, | 169 CODEC_ID_AAC, |
170 CODEC_ID_MPEG4AAC, | 170 CODEC_ID_MPEG4AAC, |
171 CODEC_ID_AC3, | 171 CODEC_ID_AC3, |
183 CODEC_ID_MP3ADU, | 183 CODEC_ID_MP3ADU, |
184 CODEC_ID_MP3ON4, | 184 CODEC_ID_MP3ON4, |
185 CODEC_ID_SHORTEN, | 185 CODEC_ID_SHORTEN, |
186 CODEC_ID_ALAC, | 186 CODEC_ID_ALAC, |
187 CODEC_ID_WESTWOOD_SND1, | 187 CODEC_ID_WESTWOOD_SND1, |
188 CODEC_ID_GSM, | 188 CODEC_ID_GSM, |
189 CODEC_ID_QDM2, | 189 CODEC_ID_QDM2, |
190 CODEC_ID_COOK, | 190 CODEC_ID_COOK, |
191 | 191 |
192 CODEC_ID_OGGTHEORA= 0x16000, | 192 CODEC_ID_OGGTHEORA= 0x16000, |
193 | 193 |
194 /* subtitle codecs */ | 194 /* subtitle codecs */ |
195 CODEC_ID_DVD_SUBTITLE= 0x17000, | 195 CODEC_ID_DVD_SUBTITLE= 0x17000, |
196 CODEC_ID_DVB_SUBTITLE, | 196 CODEC_ID_DVB_SUBTITLE, |
197 | 197 |
198 CODEC_ID_MPEG2TS= 0x20000, /* _FAKE_ codec to indicate a raw MPEG2 transport | 198 CODEC_ID_MPEG2TS= 0x20000, /* _FAKE_ codec to indicate a raw MPEG2 transport |
199 stream (only used by libavformat) */ | 199 stream (only used by libavformat) */ |
200 }; | 200 }; |
201 | 201 |
202 /* CODEC_ID_MP3LAME is absolete */ | 202 /* CODEC_ID_MP3LAME is absolete */ |
209 CODEC_TYPE_DATA, | 209 CODEC_TYPE_DATA, |
210 CODEC_TYPE_SUBTITLE, | 210 CODEC_TYPE_SUBTITLE, |
211 }; | 211 }; |
212 | 212 |
213 /** | 213 /** |
214 * Pixel format. Notes: | 214 * Pixel format. Notes: |
215 * | 215 * |
216 * PIX_FMT_RGBA32 is handled in an endian-specific manner. A RGBA | 216 * PIX_FMT_RGBA32 is handled in an endian-specific manner. A RGBA |
217 * color is put together as: | 217 * color is put together as: |
218 * (A << 24) | (R << 16) | (G << 8) | B | 218 * (A << 24) | (R << 16) | (G << 8) | B |
219 * This is stored as BGRA on little endian CPU architectures and ARGB on | 219 * This is stored as BGRA on little endian CPU architectures and ARGB on |
229 * to run on the IBM VGA graphics adapter use 6-bit palette components. | 229 * to run on the IBM VGA graphics adapter use 6-bit palette components. |
230 */ | 230 */ |
231 enum PixelFormat { | 231 enum PixelFormat { |
232 PIX_FMT_NONE= -1, | 232 PIX_FMT_NONE= -1, |
233 PIX_FMT_YUV420P, ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples) | 233 PIX_FMT_YUV420P, ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples) |
234 PIX_FMT_YUV422, ///< Packed pixel, Y0 Cb Y1 Cr | 234 PIX_FMT_YUV422, ///< Packed pixel, Y0 Cb Y1 Cr |
235 PIX_FMT_RGB24, ///< Packed pixel, 3 bytes per pixel, RGBRGB... | 235 PIX_FMT_RGB24, ///< Packed pixel, 3 bytes per pixel, RGBRGB... |
236 PIX_FMT_BGR24, ///< Packed pixel, 3 bytes per pixel, BGRBGR... | 236 PIX_FMT_BGR24, ///< Packed pixel, 3 bytes per pixel, BGRBGR... |
237 PIX_FMT_YUV422P, ///< Planar YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples) | 237 PIX_FMT_YUV422P, ///< Planar YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples) |
238 PIX_FMT_YUV444P, ///< Planar YUV 4:4:4 (1 Cr & Cb sample per 1x1 Y samples) | 238 PIX_FMT_YUV444P, ///< Planar YUV 4:4:4 (1 Cr & Cb sample per 1x1 Y samples) |
239 PIX_FMT_RGBA32, ///< Packed pixel, 4 bytes per pixel, BGRABGRA..., stored in cpu endianness | 239 PIX_FMT_RGBA32, ///< Packed pixel, 4 bytes per pixel, BGRABGRA..., stored in cpu endianness |
240 PIX_FMT_YUV410P, ///< Planar YUV 4:1:0 (1 Cr & Cb sample per 4x4 Y samples) | 240 PIX_FMT_YUV410P, ///< Planar YUV 4:1:0 (1 Cr & Cb sample per 4x4 Y samples) |
241 PIX_FMT_YUV411P, ///< Planar YUV 4:1:1 (1 Cr & Cb sample per 4x1 Y samples) | 241 PIX_FMT_YUV411P, ///< Planar YUV 4:1:1 (1 Cr & Cb sample per 4x1 Y samples) |
242 PIX_FMT_RGB565, ///< always stored in cpu endianness | 242 PIX_FMT_RGB565, ///< always stored in cpu endianness |
243 PIX_FMT_RGB555, ///< always stored in cpu endianness, most significant bit to 1 | 243 PIX_FMT_RGB555, ///< always stored in cpu endianness, most significant bit to 1 |
244 PIX_FMT_GRAY8, | 244 PIX_FMT_GRAY8, |
245 PIX_FMT_MONOWHITE, ///< 0 is white | 245 PIX_FMT_MONOWHITE, ///< 0 is white |
246 PIX_FMT_MONOBLACK, ///< 0 is black | 246 PIX_FMT_MONOBLACK, ///< 0 is black |
247 PIX_FMT_PAL8, ///< 8 bit with RGBA palette | 247 PIX_FMT_PAL8, ///< 8 bit with RGBA palette |
248 PIX_FMT_YUVJ420P, ///< Planar YUV 4:2:0 full scale (jpeg) | 248 PIX_FMT_YUVJ420P, ///< Planar YUV 4:2:0 full scale (jpeg) |
249 PIX_FMT_YUVJ422P, ///< Planar YUV 4:2:2 full scale (jpeg) | 249 PIX_FMT_YUVJ422P, ///< Planar YUV 4:2:2 full scale (jpeg) |
250 PIX_FMT_YUVJ444P, ///< Planar YUV 4:4:4 full scale (jpeg) | 250 PIX_FMT_YUVJ444P, ///< Planar YUV 4:4:4 full scale (jpeg) |
251 PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing(xvmc_render.h) | 251 PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing(xvmc_render.h) |
252 PIX_FMT_XVMC_MPEG2_IDCT, | 252 PIX_FMT_XVMC_MPEG2_IDCT, |
253 PIX_FMT_UYVY422, ///< Packed pixel, Cb Y0 Cr Y1 | 253 PIX_FMT_UYVY422, ///< Packed pixel, Cb Y0 Cr Y1 |
254 PIX_FMT_UYVY411, ///< Packed pixel, Cb Y0 Y1 Cr Y2 Y3 | 254 PIX_FMT_UYVY411, ///< Packed pixel, Cb Y0 Y1 Cr Y2 Y3 |
255 PIX_FMT_NB, | 255 PIX_FMT_NB, |
256 }; | 256 }; |
257 | 257 |
258 /* currently unused, may be used if 24/32 bits samples ever supported */ | 258 /* currently unused, may be used if 24/32 bits samples ever supported */ |
259 enum SampleFormat { | 259 enum SampleFormat { |
260 SAMPLE_FMT_S16 = 0, ///< signed 16 bits | 260 SAMPLE_FMT_S16 = 0, ///< signed 16 bits |
261 SAMPLE_FMT_S32, ///< signed 32 bits | 261 SAMPLE_FMT_S32, ///< signed 32 bits |
262 SAMPLE_FMT_FLT, ///< float | 262 SAMPLE_FMT_FLT, ///< float |
263 SAMPLE_FMT_DBL, ///< double | 263 SAMPLE_FMT_DBL, ///< double |
264 }; | 264 }; |
265 | 265 |
266 /* in bytes */ | 266 /* in bytes */ |
267 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 131072 | 267 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 131072 |
268 | 268 |
269 /** | 269 /** |
270 * Required number of additionally allocated bytes at the end of the input bitstream for decoding. | 270 * Required number of additionally allocated bytes at the end of the input bitstream for decoding. |
271 * this is mainly needed because some optimized bitstream readers read | 271 * this is mainly needed because some optimized bitstream readers read |
272 * 32 or 64 bit at once and could read over the end<br> | 272 * 32 or 64 bit at once and could read over the end<br> |
273 * Note, if the first 23 bits of the additional bytes are not 0 then damaged | 273 * Note, if the first 23 bits of the additional bytes are not 0 then damaged |
274 * MPEG bitstreams could cause overread and segfault | 274 * MPEG bitstreams could cause overread and segfault |
275 */ | 275 */ |
276 #define FF_INPUT_BUFFER_PADDING_SIZE 8 | 276 #define FF_INPUT_BUFFER_PADDING_SIZE 8 |
312 extern int motion_estimation_method; | 312 extern int motion_estimation_method; |
313 | 313 |
314 #define FF_MAX_B_FRAMES 8 | 314 #define FF_MAX_B_FRAMES 8 |
315 | 315 |
316 /* encoding support | 316 /* encoding support |
317 these flags can be passed in AVCodecContext.flags before initing | 317 these flags can be passed in AVCodecContext.flags before initing |
318 Note: not everything is supported yet. | 318 Note: not everything is supported yet. |
319 */ | 319 */ |
320 | 320 |
321 #define CODEC_FLAG_QSCALE 0x0002 ///< use fixed qscale | 321 #define CODEC_FLAG_QSCALE 0x0002 ///< use fixed qscale |
322 #define CODEC_FLAG_4MV 0x0004 ///< 4 MV per MB allowed / Advanced prediction for H263 | 322 #define CODEC_FLAG_4MV 0x0004 ///< 4 MV per MB allowed / Advanced prediction for H263 |
323 #define CODEC_FLAG_QPEL 0x0010 ///< use qpel MC | 323 #define CODEC_FLAG_QPEL 0x0010 ///< use qpel MC |
324 #define CODEC_FLAG_GMC 0x0020 ///< use GMC | 324 #define CODEC_FLAG_GMC 0x0020 ///< use GMC |
325 #define CODEC_FLAG_MV0 0x0040 ///< always try a MB with MV=<0,0> | 325 #define CODEC_FLAG_MV0 0x0040 ///< always try a MB with MV=<0,0> |
326 #define CODEC_FLAG_PART 0x0080 ///< use data partitioning | 326 #define CODEC_FLAG_PART 0x0080 ///< use data partitioning |
327 /* parent program gurantees that the input for b-frame containing streams is not written to | 327 /* parent program gurantees that the input for b-frame containing streams is not written to |
328 for at least s->max_b_frames+1 frames, if this is not set than the input will be copied */ | 328 for at least s->max_b_frames+1 frames, if this is not set than the input will be copied */ |
329 #define CODEC_FLAG_INPUT_PRESERVED 0x0100 | 329 #define CODEC_FLAG_INPUT_PRESERVED 0x0100 |
330 #define CODEC_FLAG_PASS1 0x0200 ///< use internal 2pass ratecontrol in first pass mode | 330 #define CODEC_FLAG_PASS1 0x0200 ///< use internal 2pass ratecontrol in first pass mode |
331 #define CODEC_FLAG_PASS2 0x0400 ///< use internal 2pass ratecontrol in second pass mode | 331 #define CODEC_FLAG_PASS2 0x0400 ///< use internal 2pass ratecontrol in second pass mode |
332 #define CODEC_FLAG_EXTERN_HUFF 0x1000 ///< use external huffman table (for mjpeg) | 332 #define CODEC_FLAG_EXTERN_HUFF 0x1000 ///< use external huffman table (for mjpeg) |
333 #define CODEC_FLAG_GRAY 0x2000 ///< only decode/encode grayscale | 333 #define CODEC_FLAG_GRAY 0x2000 ///< only decode/encode grayscale |
334 #define CODEC_FLAG_EMU_EDGE 0x4000///< don't draw edges | 334 #define CODEC_FLAG_EMU_EDGE 0x4000///< don't draw edges |
335 #define CODEC_FLAG_PSNR 0x8000 ///< error[?] variables will be set during encoding | 335 #define CODEC_FLAG_PSNR 0x8000 ///< error[?] variables will be set during encoding |
336 #define CODEC_FLAG_TRUNCATED 0x00010000 /** input bitstream might be truncated at a random location instead | 336 #define CODEC_FLAG_TRUNCATED 0x00010000 /** input bitstream might be truncated at a random location instead |
337 of only at frame boundaries */ | 337 of only at frame boundaries */ |
338 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 ///< normalize adaptive quantization | 338 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 ///< normalize adaptive quantization |
339 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< use interlaced dct | 339 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< use interlaced dct |
340 #define CODEC_FLAG_LOW_DELAY 0x00080000 ///< force low delay | 340 #define CODEC_FLAG_LOW_DELAY 0x00080000 ///< force low delay |
341 #define CODEC_FLAG_ALT_SCAN 0x00100000 ///< use alternate scan | 341 #define CODEC_FLAG_ALT_SCAN 0x00100000 ///< use alternate scan |
342 #define CODEC_FLAG_TRELLIS_QUANT 0x00200000 ///< use trellis quantization | 342 #define CODEC_FLAG_TRELLIS_QUANT 0x00200000 ///< use trellis quantization |
343 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< place global headers in extradata instead of every keyframe | 343 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< place global headers in extradata instead of every keyframe |
344 #define CODEC_FLAG_BITEXACT 0x00800000 ///< use only bitexact stuff (except (i)dct) | 344 #define CODEC_FLAG_BITEXACT 0x00800000 ///< use only bitexact stuff (except (i)dct) |
345 /* Fx : Flag for h263+ extra options */ | 345 /* Fx : Flag for h263+ extra options */ |
346 #define CODEC_FLAG_H263P_AIC 0x01000000 ///< H263 Advanced intra coding / MPEG4 AC prediction (remove this) | 346 #define CODEC_FLAG_H263P_AIC 0x01000000 ///< H263 Advanced intra coding / MPEG4 AC prediction (remove this) |
347 #define CODEC_FLAG_AC_PRED 0x01000000 ///< H263 Advanced intra coding / MPEG4 AC prediction | 347 #define CODEC_FLAG_AC_PRED 0x01000000 ///< H263 Advanced intra coding / MPEG4 AC prediction |
348 #define CODEC_FLAG_H263P_UMV 0x02000000 ///< Unlimited motion vector | 348 #define CODEC_FLAG_H263P_UMV 0x02000000 ///< Unlimited motion vector |
349 #define CODEC_FLAG_CBP_RD 0x04000000 ///< use rate distortion optimization for cbp | 349 #define CODEC_FLAG_CBP_RD 0x04000000 ///< use rate distortion optimization for cbp |
350 #define CODEC_FLAG_QP_RD 0x08000000 ///< use rate distortion optimization for qp selectioon | 350 #define CODEC_FLAG_QP_RD 0x08000000 ///< use rate distortion optimization for qp selectioon |
351 #define CODEC_FLAG_H263P_AIV 0x00000008 ///< H263 Alternative inter vlc | 351 #define CODEC_FLAG_H263P_AIV 0x00000008 ///< H263 Alternative inter vlc |
352 #define CODEC_FLAG_OBMC 0x00000001 ///< OBMC | 352 #define CODEC_FLAG_OBMC 0x00000001 ///< OBMC |
353 #define CODEC_FLAG_LOOP_FILTER 0x00000800 ///< loop filter | 353 #define CODEC_FLAG_LOOP_FILTER 0x00000800 ///< loop filter |
365 * Reference Picture Selection | 365 * Reference Picture Selection |
366 * Independant Segment Decoding */ | 366 * Independant Segment Decoding */ |
367 /* /Fx */ | 367 /* /Fx */ |
368 /* codec capabilities */ | 368 /* codec capabilities */ |
369 | 369 |
370 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< decoder can use draw_horiz_band callback | 370 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< decoder can use draw_horiz_band callback |
371 /** | 371 /** |
372 * Codec uses get_buffer() for allocating buffers. | 372 * Codec uses get_buffer() for allocating buffers. |
373 * direct rendering method 1 | 373 * direct rendering method 1 |
374 */ | 374 */ |
375 #define CODEC_CAP_DR1 0x0002 | 375 #define CODEC_CAP_DR1 0x0002 |
377 used */ | 377 used */ |
378 #define CODEC_CAP_PARSE_ONLY 0x0004 | 378 #define CODEC_CAP_PARSE_ONLY 0x0004 |
379 #define CODEC_CAP_TRUNCATED 0x0008 | 379 #define CODEC_CAP_TRUNCATED 0x0008 |
380 /* codec can export data for HW decoding (XvMC) */ | 380 /* codec can export data for HW decoding (XvMC) */ |
381 #define CODEC_CAP_HWACCEL 0x0010 | 381 #define CODEC_CAP_HWACCEL 0x0010 |
382 /** | 382 /** |
383 * codec has a non zero delay and needs to be feeded with NULL at the end to get the delayed data. | 383 * codec has a non zero delay and needs to be feeded with NULL at the end to get the delayed data. |
384 * if this is not set, the codec is guranteed to never be feeded with NULL data | 384 * if this is not set, the codec is guranteed to never be feeded with NULL data |
385 */ | 385 */ |
386 #define CODEC_CAP_DELAY 0x0020 | 386 #define CODEC_CAP_DELAY 0x0020 |
387 | 387 |
698 */ | 698 */ |
699 AVClass *av_class; | 699 AVClass *av_class; |
700 /** | 700 /** |
701 * the average bitrate. | 701 * the average bitrate. |
702 * - encoding: set by user. unused for constant quantizer encoding | 702 * - encoding: set by user. unused for constant quantizer encoding |
703 * - decoding: set by lavc. 0 or some bitrate if this info is available in the stream | 703 * - decoding: set by lavc. 0 or some bitrate if this info is available in the stream |
704 */ | 704 */ |
705 int bit_rate; | 705 int bit_rate; |
706 | 706 |
707 /** | 707 /** |
708 * number of bits the bitstream is allowed to diverge from the reference. | 708 * number of bits the bitstream is allowed to diverge from the reference. |
709 * the reference can be CBR (for CBR pass1) or VBR (for pass2) | 709 * the reference can be CBR (for CBR pass1) or VBR (for pass2) |
710 * - encoding: set by user. unused for constant quantizer encoding | 710 * - encoding: set by user. unused for constant quantizer encoding |
711 * - decoding: unused | 711 * - decoding: unused |
712 */ | 712 */ |
713 int bit_rate_tolerance; | 713 int bit_rate_tolerance; |
714 | 714 |
715 /** | 715 /** |
716 * CODEC_FLAG_*. | 716 * CODEC_FLAG_*. |
717 * - encoding: set by user. | 717 * - encoding: set by user. |
718 * - decoding: set by user. | 718 * - decoding: set by user. |
719 */ | 719 */ |
720 int flags; | 720 int flags; |
721 | 721 |
722 /** | 722 /** |
723 * some codecs needs additionnal format info. It is stored here | 723 * some codecs needs additionnal format info. It is stored here |
724 * - encoding: set by user. | 724 * - encoding: set by user. |
725 * - decoding: set by lavc. (FIXME is this ok?) | 725 * - decoding: set by lavc. (FIXME is this ok?) |
726 */ | 726 */ |
727 int sub_id; | 727 int sub_id; |
728 | 728 |
729 /** | 729 /** |
744 * - encoding: set/allocated/freed by lavc. | 744 * - encoding: set/allocated/freed by lavc. |
745 * - decoding: set/allocated/freed by user. | 745 * - decoding: set/allocated/freed by user. |
746 */ | 746 */ |
747 void *extradata; | 747 void *extradata; |
748 int extradata_size; | 748 int extradata_size; |
749 | 749 |
750 /** | 750 /** |
751 * this is the fundamental unit of time (in seconds) in terms | 751 * this is the fundamental unit of time (in seconds) in terms |
752 * of which frame timestamps are represented. for fixed-fps content, | 752 * of which frame timestamps are represented. for fixed-fps content, |
753 * timebase should be 1/framerate and timestamp increments should be | 753 * timebase should be 1/framerate and timestamp increments should be |
754 * identically 1. | 754 * identically 1. |
755 * - encoding: MUST be set by user | 755 * - encoding: MUST be set by user |
756 * - decoding: set by lavc. | 756 * - decoding: set by lavc. |
757 */ | 757 */ |
758 AVRational time_base; | 758 AVRational time_base; |
759 | 759 |
760 /* video only */ | 760 /* video only */ |
761 /** | 761 /** |
762 * picture width / height. | 762 * picture width / height. |
763 * - encoding: MUST be set by user. | 763 * - encoding: MUST be set by user. |
764 * - decoding: set by lavc. | 764 * - decoding: set by lavc. |
765 * Note, for compatibility its possible to set this instead of | 765 * Note, for compatibility its possible to set this instead of |
766 * coded_width/height before decoding | 766 * coded_width/height before decoding |
767 */ | 767 */ |
768 int width, height; | 768 int width, height; |
769 | 769 |
770 #define FF_ASPECT_EXTENDED 15 | 770 #define FF_ASPECT_EXTENDED 15 |
771 | 771 |
772 /** | 772 /** |
773 * the number of pictures in a group of pitures, or 0 for intra_only. | 773 * the number of pictures in a group of pitures, or 0 for intra_only. |
774 * - encoding: set by user. | 774 * - encoding: set by user. |
780 * pixel format, see PIX_FMT_xxx. | 780 * pixel format, see PIX_FMT_xxx. |
781 * - encoding: set by user. | 781 * - encoding: set by user. |
782 * - decoding: set by lavc. | 782 * - decoding: set by lavc. |
783 */ | 783 */ |
784 enum PixelFormat pix_fmt; | 784 enum PixelFormat pix_fmt; |
785 | 785 |
786 /** | 786 /** |
787 * Frame rate emulation. If not zero lower layer (i.e. format handler) | 787 * Frame rate emulation. If not zero lower layer (i.e. format handler) |
788 * has to read frames at native frame rate. | 788 * has to read frames at native frame rate. |
789 * - encoding: set by user. | 789 * - encoding: set by user. |
790 * - decoding: unused. | 790 * - decoding: unused. |
791 */ | 791 */ |
792 int rate_emu; | 792 int rate_emu; |
793 | 793 |
794 /** | 794 /** |
795 * if non NULL, 'draw_horiz_band' is called by the libavcodec | 795 * if non NULL, 'draw_horiz_band' is called by the libavcodec |
796 * decoder to draw an horizontal band. It improve cache usage. Not | 796 * decoder to draw an horizontal band. It improve cache usage. Not |
797 * all codecs can do that. You must check the codec capabilities | 797 * all codecs can do that. You must check the codec capabilities |
798 * before | 798 * before |
806 void (*draw_horiz_band)(struct AVCodecContext *s, | 806 void (*draw_horiz_band)(struct AVCodecContext *s, |
807 const AVFrame *src, int offset[4], | 807 const AVFrame *src, int offset[4], |
808 int y, int type, int height); | 808 int y, int type, int height); |
809 | 809 |
810 /* audio only */ | 810 /* audio only */ |
811 int sample_rate; ///< samples per sec | 811 int sample_rate; ///< samples per sec |
812 int channels; | 812 int channels; |
813 | 813 |
814 /** | 814 /** |
815 * audio sample format. | 815 * audio sample format. |
816 * - encoding: set by user. | 816 * - encoding: set by user. |
817 * - decoding: set by lavc. | 817 * - decoding: set by lavc. |
818 */ | 818 */ |
819 enum SampleFormat sample_fmt; ///< sample format, currenly unused | 819 enum SampleFormat sample_fmt; ///< sample format, currenly unused |
820 | 820 |
821 /* the following data should not be initialized */ | 821 /* the following data should not be initialized */ |
822 /** | 822 /** |
823 * samples per packet. initialized when calling 'init' | 823 * samples per packet. initialized when calling 'init' |
824 */ | 824 */ |
825 int frame_size; | 825 int frame_size; |
826 int frame_number; ///< audio or video frame number | 826 int frame_number; ///< audio or video frame number |
827 int real_pict_num; ///< returns the real picture number of previous encoded frame | 827 int real_pict_num; ///< returns the real picture number of previous encoded frame |
828 | 828 |
829 /** | 829 /** |
830 * number of frames the decoded output will be delayed relative to | 830 * number of frames the decoded output will be delayed relative to |
831 * the encoded input. | 831 * the encoded input. |
832 * - encoding: set by lavc. | 832 * - encoding: set by lavc. |
833 * - decoding: unused | 833 * - decoding: unused |
834 */ | 834 */ |
835 int delay; | 835 int delay; |
836 | 836 |
837 /* - encoding parameters */ | 837 /* - encoding parameters */ |
838 float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0) | 838 float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0) |
839 float qblur; ///< amount of qscale smoothing over time (0.0-1.0) | 839 float qblur; ///< amount of qscale smoothing over time (0.0-1.0) |
840 | 840 |
841 /** | 841 /** |
842 * minimum quantizer. | 842 * minimum quantizer. |
843 * - encoding: set by user. | 843 * - encoding: set by user. |
844 * - decoding: unused | 844 * - decoding: unused |
845 */ | 845 */ |
871 * qscale factor between ip and b frames. | 871 * qscale factor between ip and b frames. |
872 * - encoding: set by user. | 872 * - encoding: set by user. |
873 * - decoding: unused | 873 * - decoding: unused |
874 */ | 874 */ |
875 float b_quant_factor; | 875 float b_quant_factor; |
876 | 876 |
877 /** obsolete FIXME remove */ | 877 /** obsolete FIXME remove */ |
878 int rc_strategy; | 878 int rc_strategy; |
879 int b_frame_strategy; | 879 int b_frame_strategy; |
880 | 880 |
881 /** | 881 /** |
883 * deprecated in favor of skip_idct and skip_frame | 883 * deprecated in favor of skip_idct and skip_frame |
884 * - encoding: unused | 884 * - encoding: unused |
885 * - decoding: set by user. 1-> skip b frames, 2-> skip idct/dequant too, 5-> skip everything except header | 885 * - decoding: set by user. 1-> skip b frames, 2-> skip idct/dequant too, 5-> skip everything except header |
886 */ | 886 */ |
887 int hurry_up; | 887 int hurry_up; |
888 | 888 |
889 struct AVCodec *codec; | 889 struct AVCodec *codec; |
890 | 890 |
891 void *priv_data; | 891 void *priv_data; |
892 | 892 |
893 /* unused, FIXME remove*/ | 893 /* unused, FIXME remove*/ |
894 int rtp_mode; | 894 int rtp_mode; |
895 | 895 |
896 int rtp_payload_size; /* The size of the RTP payload: the coder will */ | 896 int rtp_payload_size; /* The size of the RTP payload: the coder will */ |
897 /* do it's best to deliver a chunk with size */ | 897 /* do it's best to deliver a chunk with size */ |
898 /* below rtp_payload_size, the chunk will start */ | 898 /* below rtp_payload_size, the chunk will start */ |
899 /* with a start code on some codecs like H.263 */ | 899 /* with a start code on some codecs like H.263 */ |
900 /* This doesn't take account of any particular */ | 900 /* This doesn't take account of any particular */ |
901 /* headers inside the transmited RTP payload */ | 901 /* headers inside the transmited RTP payload */ |
902 | 902 |
903 | 903 |
904 /* The RTP callback: This function is called */ | 904 /* The RTP callback: This function is called */ |
905 /* every time the encoder has a packet to send */ | 905 /* every time the encoder has a packet to send */ |
906 /* Depends on the encoder if the data starts */ | 906 /* Depends on the encoder if the data starts */ |
907 /* with a Start Code (it should) H.263 does. */ | 907 /* with a Start Code (it should) H.263 does. */ |
908 /* mb_nb contains the number of macroblocks */ | 908 /* mb_nb contains the number of macroblocks */ |
909 /* encoded in the RTP payload */ | 909 /* encoded in the RTP payload */ |
910 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); | 910 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); |
911 | 911 |
912 /* statistics, used for 2-pass encoding */ | 912 /* statistics, used for 2-pass encoding */ |
913 int mv_bits; | 913 int mv_bits; |
914 int header_bits; | 914 int header_bits; |
915 int i_tex_bits; | 915 int i_tex_bits; |
916 int p_tex_bits; | 916 int p_tex_bits; |
917 int i_count; | 917 int i_count; |
918 int p_count; | 918 int p_count; |
919 int skip_count; | 919 int skip_count; |
920 int misc_bits; | 920 int misc_bits; |
921 | 921 |
922 /** | 922 /** |
923 * number of bits used for the previously encoded frame. | 923 * number of bits used for the previously encoded frame. |
924 * - encoding: set by lavc | 924 * - encoding: set by lavc |
925 * - decoding: unused | 925 * - decoding: unused |
926 */ | 926 */ |
934 void *opaque; | 934 void *opaque; |
935 | 935 |
936 char codec_name[32]; | 936 char codec_name[32]; |
937 enum CodecType codec_type; /* see CODEC_TYPE_xxx */ | 937 enum CodecType codec_type; /* see CODEC_TYPE_xxx */ |
938 enum CodecID codec_id; /* see CODEC_ID_xxx */ | 938 enum CodecID codec_id; /* see CODEC_ID_xxx */ |
939 | 939 |
940 /** | 940 /** |
941 * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). | 941 * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). |
942 * this is used to workaround some encoder bugs | 942 * this is used to workaround some encoder bugs |
943 * - encoding: set by user, if not then the default based on codec_id will be used | 943 * - encoding: set by user, if not then the default based on codec_id will be used |
944 * - decoding: set by user, will be converted to upper case by lavc during init | 944 * - decoding: set by user, will be converted to upper case by lavc during init |
945 */ | 945 */ |
946 unsigned int codec_tag; | 946 unsigned int codec_tag; |
947 | 947 |
948 /** | 948 /** |
949 * workaround bugs in encoders which sometimes cannot be detected automatically. | 949 * workaround bugs in encoders which sometimes cannot be detected automatically. |
950 * - encoding: set by user | 950 * - encoding: set by user |
951 * - decoding: set by user | 951 * - decoding: set by user |
952 */ | 952 */ |
965 #define FF_BUG_EDGE 1024 | 965 #define FF_BUG_EDGE 1024 |
966 #define FF_BUG_HPEL_CHROMA 2048 | 966 #define FF_BUG_HPEL_CHROMA 2048 |
967 #define FF_BUG_DC_CLIP 4096 | 967 #define FF_BUG_DC_CLIP 4096 |
968 #define FF_BUG_MS 8192 ///< workaround various bugs in microsofts broken decoders | 968 #define FF_BUG_MS 8192 ///< workaround various bugs in microsofts broken decoders |
969 //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100% | 969 //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100% |
970 | 970 |
971 /** | 971 /** |
972 * luma single coeff elimination threshold. | 972 * luma single coeff elimination threshold. |
973 * - encoding: set by user | 973 * - encoding: set by user |
974 * - decoding: unused | 974 * - decoding: unused |
975 */ | 975 */ |
976 int luma_elim_threshold; | 976 int luma_elim_threshold; |
977 | 977 |
978 /** | 978 /** |
979 * chroma single coeff elimination threshold. | 979 * chroma single coeff elimination threshold. |
980 * - encoding: set by user | 980 * - encoding: set by user |
981 * - decoding: unused | 981 * - decoding: unused |
982 */ | 982 */ |
983 int chroma_elim_threshold; | 983 int chroma_elim_threshold; |
984 | 984 |
985 /** | 985 /** |
986 * strictly follow the std (MPEG4, ...). | 986 * strictly follow the std (MPEG4, ...). |
987 * - encoding: set by user | 987 * - encoding: set by user |
988 * - decoding: unused | 988 * - decoding: unused |
989 */ | 989 */ |
1000 * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset) | 1000 * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset) |
1001 * - encoding: set by user. | 1001 * - encoding: set by user. |
1002 * - decoding: unused | 1002 * - decoding: unused |
1003 */ | 1003 */ |
1004 float b_quant_offset; | 1004 float b_quant_offset; |
1005 | 1005 |
1006 /** | 1006 /** |
1007 * error resilience higher values will detect more errors but may missdetect | 1007 * error resilience higher values will detect more errors but may missdetect |
1008 * some more or less valid parts as errors. | 1008 * some more or less valid parts as errors. |
1009 * - encoding: unused | 1009 * - encoding: unused |
1010 * - decoding: set by user | 1010 * - decoding: set by user |
1012 int error_resilience; | 1012 int error_resilience; |
1013 #define FF_ER_CAREFUL 1 | 1013 #define FF_ER_CAREFUL 1 |
1014 #define FF_ER_COMPLIANT 2 | 1014 #define FF_ER_COMPLIANT 2 |
1015 #define FF_ER_AGGRESSIVE 3 | 1015 #define FF_ER_AGGRESSIVE 3 |
1016 #define FF_ER_VERY_AGGRESSIVE 4 | 1016 #define FF_ER_VERY_AGGRESSIVE 4 |
1017 | 1017 |
1018 /** | 1018 /** |
1019 * called at the beginning of each frame to get a buffer for it. | 1019 * called at the beginning of each frame to get a buffer for it. |
1020 * if pic.reference is set then the frame will be read later by lavc | 1020 * if pic.reference is set then the frame will be read later by lavc |
1021 * avcodec_align_dimensions() should be used to find the required width and | 1021 * avcodec_align_dimensions() should be used to find the required width and |
1022 * height, as they normally need to be rounded up to the next multiple of 16 | 1022 * height, as they normally need to be rounded up to the next multiple of 16 |
1023 * - encoding: unused | 1023 * - encoding: unused |
1024 * - decoding: set by lavc, user can override | 1024 * - decoding: set by lavc, user can override |
1025 */ | 1025 */ |
1026 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic); | 1026 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic); |
1027 | 1027 |
1028 /** | 1028 /** |
1029 * called to release buffers which where allocated with get_buffer. | 1029 * called to release buffers which where allocated with get_buffer. |
1030 * a released buffer can be reused in get_buffer() | 1030 * a released buffer can be reused in get_buffer() |
1031 * pic.data[*] must be set to NULL | 1031 * pic.data[*] must be set to NULL |
1032 * - encoding: unused | 1032 * - encoding: unused |
1044 /** | 1044 /** |
1045 * number of bytes per packet if constant and known or 0 | 1045 * number of bytes per packet if constant and known or 0 |
1046 * used by some WAV based audio codecs | 1046 * used by some WAV based audio codecs |
1047 */ | 1047 */ |
1048 int block_align; | 1048 int block_align; |
1049 | 1049 |
1050 int parse_only; /* - decoding only: if true, only parsing is done | 1050 int parse_only; /* - decoding only: if true, only parsing is done |
1051 (function avcodec_parse_frame()). The frame | 1051 (function avcodec_parse_frame()). The frame |
1052 data is returned. Only MPEG codecs support this now. */ | 1052 data is returned. Only MPEG codecs support this now. */ |
1053 | 1053 |
1054 /** | 1054 /** |
1055 * 0-> h263 quant 1-> mpeg quant. | 1055 * 0-> h263 quant 1-> mpeg quant. |
1056 * - encoding: set by user. | 1056 * - encoding: set by user. |
1057 * - decoding: unused | 1057 * - decoding: unused |
1058 */ | 1058 */ |
1059 int mpeg_quant; | 1059 int mpeg_quant; |
1060 | 1060 |
1061 /** | 1061 /** |
1062 * pass1 encoding statistics output buffer. | 1062 * pass1 encoding statistics output buffer. |
1063 * - encoding: set by lavc | 1063 * - encoding: set by lavc |
1064 * - decoding: unused | 1064 * - decoding: unused |
1065 */ | 1065 */ |
1066 char *stats_out; | 1066 char *stats_out; |
1067 | 1067 |
1068 /** | 1068 /** |
1069 * pass2 encoding statistics input buffer. | 1069 * pass2 encoding statistics input buffer. |
1070 * concatenated stuff from stats_out of pass1 should be placed here | 1070 * concatenated stuff from stats_out of pass1 should be placed here |
1071 * - encoding: allocated/set/freed by user | 1071 * - encoding: allocated/set/freed by user |
1072 * - decoding: unused | 1072 * - decoding: unused |
1073 */ | 1073 */ |
1074 char *stats_in; | 1074 char *stats_in; |
1075 | 1075 |
1076 /** | 1076 /** |
1077 * ratecontrol qmin qmax limiting method. | 1077 * ratecontrol qmin qmax limiting method. |
1078 * 0-> clipping, 1-> use a nice continous function to limit qscale wthin qmin/qmax | 1078 * 0-> clipping, 1-> use a nice continous function to limit qscale wthin qmin/qmax |
1079 * - encoding: set by user. | 1079 * - encoding: set by user. |
1080 * - decoding: unused | 1080 * - decoding: unused |
1081 */ | 1081 */ |
1082 float rc_qsquish; | 1082 float rc_qsquish; |
1083 | 1083 |
1084 float rc_qmod_amp; | 1084 float rc_qmod_amp; |
1085 int rc_qmod_freq; | 1085 int rc_qmod_freq; |
1086 | 1086 |
1087 /** | 1087 /** |
1088 * ratecontrol override, see RcOverride. | 1088 * ratecontrol override, see RcOverride. |
1089 * - encoding: allocated/set/freed by user. | 1089 * - encoding: allocated/set/freed by user. |
1090 * - decoding: unused | 1090 * - decoding: unused |
1091 */ | 1091 */ |
1092 RcOverride *rc_override; | 1092 RcOverride *rc_override; |
1093 int rc_override_count; | 1093 int rc_override_count; |
1094 | 1094 |
1095 /** | 1095 /** |
1096 * rate control equation. | 1096 * rate control equation. |
1097 * - encoding: set by user | 1097 * - encoding: set by user |
1098 * - decoding: unused | 1098 * - decoding: unused |
1099 */ | 1099 */ |
1100 char *rc_eq; | 1100 char *rc_eq; |
1101 | 1101 |
1102 /** | 1102 /** |
1103 * maximum bitrate. | 1103 * maximum bitrate. |
1104 * - encoding: set by user. | 1104 * - encoding: set by user. |
1105 * - decoding: unused | 1105 * - decoding: unused |
1106 */ | 1106 */ |
1107 int rc_max_rate; | 1107 int rc_max_rate; |
1108 | 1108 |
1109 /** | 1109 /** |
1110 * minimum bitrate. | 1110 * minimum bitrate. |
1111 * - encoding: set by user. | 1111 * - encoding: set by user. |
1112 * - decoding: unused | 1112 * - decoding: unused |
1113 */ | 1113 */ |
1114 int rc_min_rate; | 1114 int rc_min_rate; |
1115 | 1115 |
1116 /** | 1116 /** |
1117 * decoder bitstream buffer size. | 1117 * decoder bitstream buffer size. |
1118 * - encoding: set by user. | 1118 * - encoding: set by user. |
1119 * - decoding: unused | 1119 * - decoding: unused |
1120 */ | 1120 */ |
1127 * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset) | 1127 * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset) |
1128 * - encoding: set by user. | 1128 * - encoding: set by user. |
1129 * - decoding: unused | 1129 * - decoding: unused |
1130 */ | 1130 */ |
1131 float i_quant_factor; | 1131 float i_quant_factor; |
1132 | 1132 |
1133 /** | 1133 /** |
1134 * qscale offset between p and i frames. | 1134 * qscale offset between p and i frames. |
1135 * - encoding: set by user. | 1135 * - encoding: set by user. |
1136 * - decoding: unused | 1136 * - decoding: unused |
1137 */ | 1137 */ |
1138 float i_quant_offset; | 1138 float i_quant_offset; |
1139 | 1139 |
1140 /** | 1140 /** |
1141 * initial complexity for pass1 ratecontrol. | 1141 * initial complexity for pass1 ratecontrol. |
1142 * - encoding: set by user. | 1142 * - encoding: set by user. |
1143 * - decoding: unused | 1143 * - decoding: unused |
1144 */ | 1144 */ |
1155 #define FF_DCT_INT 2 | 1155 #define FF_DCT_INT 2 |
1156 #define FF_DCT_MMX 3 | 1156 #define FF_DCT_MMX 3 |
1157 #define FF_DCT_MLIB 4 | 1157 #define FF_DCT_MLIB 4 |
1158 #define FF_DCT_ALTIVEC 5 | 1158 #define FF_DCT_ALTIVEC 5 |
1159 #define FF_DCT_FAAN 6 | 1159 #define FF_DCT_FAAN 6 |
1160 | 1160 |
1161 /** | 1161 /** |
1162 * luminance masking (0-> disabled). | 1162 * luminance masking (0-> disabled). |
1163 * - encoding: set by user | 1163 * - encoding: set by user |
1164 * - decoding: unused | 1164 * - decoding: unused |
1165 */ | 1165 */ |
1166 float lumi_masking; | 1166 float lumi_masking; |
1167 | 1167 |
1168 /** | 1168 /** |
1169 * temporary complexity masking (0-> disabled). | 1169 * temporary complexity masking (0-> disabled). |
1170 * - encoding: set by user | 1170 * - encoding: set by user |
1171 * - decoding: unused | 1171 * - decoding: unused |
1172 */ | 1172 */ |
1173 float temporal_cplx_masking; | 1173 float temporal_cplx_masking; |
1174 | 1174 |
1175 /** | 1175 /** |
1176 * spatial complexity masking (0-> disabled). | 1176 * spatial complexity masking (0-> disabled). |
1177 * - encoding: set by user | 1177 * - encoding: set by user |
1178 * - decoding: unused | 1178 * - decoding: unused |
1179 */ | 1179 */ |
1180 float spatial_cplx_masking; | 1180 float spatial_cplx_masking; |
1181 | 1181 |
1182 /** | 1182 /** |
1183 * p block masking (0-> disabled). | 1183 * p block masking (0-> disabled). |
1184 * - encoding: set by user | 1184 * - encoding: set by user |
1185 * - decoding: unused | 1185 * - decoding: unused |
1186 */ | 1186 */ |
1190 * darkness masking (0-> disabled). | 1190 * darkness masking (0-> disabled). |
1191 * - encoding: set by user | 1191 * - encoding: set by user |
1192 * - decoding: unused | 1192 * - decoding: unused |
1193 */ | 1193 */ |
1194 float dark_masking; | 1194 float dark_masking; |
1195 | 1195 |
1196 | 1196 |
1197 /* for binary compatibility */ | 1197 /* for binary compatibility */ |
1198 int unused; | 1198 int unused; |
1199 | 1199 |
1200 /** | 1200 /** |
1201 * idct algorithm, see FF_IDCT_* below. | 1201 * idct algorithm, see FF_IDCT_* below. |
1202 * - encoding: set by user | 1202 * - encoding: set by user |
1203 * - decoding: set by user | 1203 * - decoding: set by user |
1204 */ | 1204 */ |
1268 * bits per sample/pixel from the demuxer (needed for huffyuv). | 1268 * bits per sample/pixel from the demuxer (needed for huffyuv). |
1269 * - encoding: set by lavc | 1269 * - encoding: set by lavc |
1270 * - decoding: set by user | 1270 * - decoding: set by user |
1271 */ | 1271 */ |
1272 int bits_per_sample; | 1272 int bits_per_sample; |
1273 | 1273 |
1274 /** | 1274 /** |
1275 * prediction method (needed for huffyuv). | 1275 * prediction method (needed for huffyuv). |
1276 * - encoding: set by user | 1276 * - encoding: set by user |
1277 * - decoding: unused | 1277 * - decoding: unused |
1278 */ | 1278 */ |
1279 int prediction_method; | 1279 int prediction_method; |
1280 #define FF_PRED_LEFT 0 | 1280 #define FF_PRED_LEFT 0 |
1281 #define FF_PRED_PLANE 1 | 1281 #define FF_PRED_PLANE 1 |
1282 #define FF_PRED_MEDIAN 2 | 1282 #define FF_PRED_MEDIAN 2 |
1283 | 1283 |
1284 /** | 1284 /** |
1285 * sample aspect ratio (0 if unknown). | 1285 * sample aspect ratio (0 if unknown). |
1286 * numerator and denominator must be relative prime and smaller then 256 for some video standards | 1286 * numerator and denominator must be relative prime and smaller then 256 for some video standards |
1287 * - encoding: set by user. | 1287 * - encoding: set by user. |
1288 * - decoding: set by lavc. | 1288 * - decoding: set by lavc. |
1315 #define FF_DEBUG_ER 0x00000400 | 1315 #define FF_DEBUG_ER 0x00000400 |
1316 #define FF_DEBUG_MMCO 0x00000800 | 1316 #define FF_DEBUG_MMCO 0x00000800 |
1317 #define FF_DEBUG_BUGS 0x00001000 | 1317 #define FF_DEBUG_BUGS 0x00001000 |
1318 #define FF_DEBUG_VIS_QP 0x00002000 | 1318 #define FF_DEBUG_VIS_QP 0x00002000 |
1319 #define FF_DEBUG_VIS_MB_TYPE 0x00004000 | 1319 #define FF_DEBUG_VIS_MB_TYPE 0x00004000 |
1320 | 1320 |
1321 /** | 1321 /** |
1322 * debug. | 1322 * debug. |
1323 * - encoding: set by user. | 1323 * - encoding: set by user. |
1324 * - decoding: set by user. | 1324 * - decoding: set by user. |
1325 */ | 1325 */ |
1332 * error. | 1332 * error. |
1333 * - encoding: set by lavc if flags&CODEC_FLAG_PSNR | 1333 * - encoding: set by lavc if flags&CODEC_FLAG_PSNR |
1334 * - decoding: unused | 1334 * - decoding: unused |
1335 */ | 1335 */ |
1336 uint64_t error[4]; | 1336 uint64_t error[4]; |
1337 | 1337 |
1338 /** | 1338 /** |
1339 * minimum MB quantizer. | 1339 * minimum MB quantizer. |
1340 * - encoding: unused | 1340 * - encoding: unused |
1341 * - decoding: unused | 1341 * - decoding: unused |
1342 */ | 1342 */ |
1346 * maximum MB quantizer. | 1346 * maximum MB quantizer. |
1347 * - encoding: unused | 1347 * - encoding: unused |
1348 * - decoding: unused | 1348 * - decoding: unused |
1349 */ | 1349 */ |
1350 int mb_qmax; | 1350 int mb_qmax; |
1351 | 1351 |
1352 /** | 1352 /** |
1353 * motion estimation compare function. | 1353 * motion estimation compare function. |
1354 * - encoding: set by user. | 1354 * - encoding: set by user. |
1355 * - decoding: unused | 1355 * - decoding: unused |
1356 */ | 1356 */ |
1386 #define FF_CMP_NSSE 10 | 1386 #define FF_CMP_NSSE 10 |
1387 #define FF_CMP_W53 11 | 1387 #define FF_CMP_W53 11 |
1388 #define FF_CMP_W97 12 | 1388 #define FF_CMP_W97 12 |
1389 #define FF_CMP_DCTMAX 13 | 1389 #define FF_CMP_DCTMAX 13 |
1390 #define FF_CMP_CHROMA 256 | 1390 #define FF_CMP_CHROMA 256 |
1391 | 1391 |
1392 /** | 1392 /** |
1393 * ME diamond size & shape. | 1393 * ME diamond size & shape. |
1394 * - encoding: set by user. | 1394 * - encoding: set by user. |
1395 * - decoding: unused | 1395 * - decoding: unused |
1396 */ | 1396 */ |
1444 | 1444 |
1445 /** | 1445 /** |
1446 * DTG active format information (additionnal aspect ratio | 1446 * DTG active format information (additionnal aspect ratio |
1447 * information only used in DVB MPEG2 transport streams). 0 if | 1447 * information only used in DVB MPEG2 transport streams). 0 if |
1448 * not set. | 1448 * not set. |
1449 * | 1449 * |
1450 * - encoding: unused. | 1450 * - encoding: unused. |
1451 * - decoding: set by decoder | 1451 * - decoding: set by decoder |
1452 */ | 1452 */ |
1453 int dtg_active_format; | 1453 int dtg_active_format; |
1454 #define FF_DTG_AFD_SAME 8 | 1454 #define FF_DTG_AFD_SAME 8 |
1455 #define FF_DTG_AFD_4_3 9 | 1455 #define FF_DTG_AFD_4_3 9 |
1456 #define FF_DTG_AFD_16_9 10 | 1456 #define FF_DTG_AFD_16_9 10 |
1460 #define FF_DTG_AFD_SP_4_3 15 | 1460 #define FF_DTG_AFD_SP_4_3 15 |
1461 | 1461 |
1462 /** | 1462 /** |
1463 * Maximum motion estimation search range in subpel units. | 1463 * Maximum motion estimation search range in subpel units. |
1464 * if 0 then no limit | 1464 * if 0 then no limit |
1465 * | 1465 * |
1466 * - encoding: set by user. | 1466 * - encoding: set by user. |
1467 * - decoding: unused. | 1467 * - decoding: unused. |
1468 */ | 1468 */ |
1469 int me_range; | 1469 int me_range; |
1470 | 1470 |
1473 * - encoding: set by user. | 1473 * - encoding: set by user. |
1474 * - decoding: unused | 1474 * - decoding: unused |
1475 */ | 1475 */ |
1476 int intra_quant_bias; | 1476 int intra_quant_bias; |
1477 #define FF_DEFAULT_QUANT_BIAS 999999 | 1477 #define FF_DEFAULT_QUANT_BIAS 999999 |
1478 | 1478 |
1479 /** | 1479 /** |
1480 * inter quantizer bias. | 1480 * inter quantizer bias. |
1481 * - encoding: set by user. | 1481 * - encoding: set by user. |
1482 * - decoding: unused | 1482 * - decoding: unused |
1483 */ | 1483 */ |
1488 * - encoding: unused. | 1488 * - encoding: unused. |
1489 * - decoding: which clrtable should be used for 8bit RGB images | 1489 * - decoding: which clrtable should be used for 8bit RGB images |
1490 * table have to be stored somewhere FIXME | 1490 * table have to be stored somewhere FIXME |
1491 */ | 1491 */ |
1492 int color_table_id; | 1492 int color_table_id; |
1493 | 1493 |
1494 /** | 1494 /** |
1495 * internal_buffer count. | 1495 * internal_buffer count. |
1496 * Don't touch, used by lavc default_get_buffer() | 1496 * Don't touch, used by lavc default_get_buffer() |
1497 */ | 1497 */ |
1498 int internal_buffer_count; | 1498 int internal_buffer_count; |
1499 | 1499 |
1500 /** | 1500 /** |
1501 * internal_buffers. | 1501 * internal_buffers. |
1502 * Don't touch, used by lavc default_get_buffer() | 1502 * Don't touch, used by lavc default_get_buffer() |
1503 */ | 1503 */ |
1504 void *internal_buffer; | 1504 void *internal_buffer; |
1505 | 1505 |
1506 #define FF_LAMBDA_SHIFT 7 | 1506 #define FF_LAMBDA_SHIFT 7 |
1514 * this should be proportional to MPEG1/2/4 qscale. | 1514 * this should be proportional to MPEG1/2/4 qscale. |
1515 * - encoding: set by user. | 1515 * - encoding: set by user. |
1516 * - decoding: unused | 1516 * - decoding: unused |
1517 */ | 1517 */ |
1518 int global_quality; | 1518 int global_quality; |
1519 | 1519 |
1520 #define FF_CODER_TYPE_VLC 0 | 1520 #define FF_CODER_TYPE_VLC 0 |
1521 #define FF_CODER_TYPE_AC 1 | 1521 #define FF_CODER_TYPE_AC 1 |
1522 /** | 1522 /** |
1523 * coder type | 1523 * coder type |
1524 * - encoding: set by user. | 1524 * - encoding: set by user. |
1530 * context model | 1530 * context model |
1531 * - encoding: set by user. | 1531 * - encoding: set by user. |
1532 * - decoding: unused | 1532 * - decoding: unused |
1533 */ | 1533 */ |
1534 int context_model; | 1534 int context_model; |
1535 | 1535 |
1536 /** | 1536 /** |
1537 * slice flags | 1537 * slice flags |
1538 * - encoding: unused | 1538 * - encoding: unused |
1539 * - decoding: set by user. | 1539 * - decoding: set by user. |
1540 */ | 1540 */ |
1547 * XVideo Motion Acceleration | 1547 * XVideo Motion Acceleration |
1548 * - encoding: forbidden | 1548 * - encoding: forbidden |
1549 * - decoding: set by decoder | 1549 * - decoding: set by decoder |
1550 */ | 1550 */ |
1551 int xvmc_acceleration; | 1551 int xvmc_acceleration; |
1552 | 1552 |
1553 /** | 1553 /** |
1554 * macroblock decision mode | 1554 * macroblock decision mode |
1555 * - encoding: set by user. | 1555 * - encoding: set by user. |
1556 * - decoding: unused | 1556 * - decoding: unused |
1557 */ | 1557 */ |
1571 * custom inter quantization matrix | 1571 * custom inter quantization matrix |
1572 * - encoding: set by user, can be NULL | 1572 * - encoding: set by user, can be NULL |
1573 * - decoding: set by lavc | 1573 * - decoding: set by lavc |
1574 */ | 1574 */ |
1575 uint16_t *inter_matrix; | 1575 uint16_t *inter_matrix; |
1576 | 1576 |
1577 /** | 1577 /** |
1578 * fourcc from the AVI stream header (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). | 1578 * fourcc from the AVI stream header (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). |
1579 * this is used to workaround some encoder bugs | 1579 * this is used to workaround some encoder bugs |
1580 * - encoding: unused | 1580 * - encoding: unused |
1581 * - decoding: set by user, will be converted to upper case by lavc during init | 1581 * - decoding: set by user, will be converted to upper case by lavc during init |
1615 * noise reduction strength | 1615 * noise reduction strength |
1616 * - encoding: set by user. | 1616 * - encoding: set by user. |
1617 * - decoding: unused | 1617 * - decoding: unused |
1618 */ | 1618 */ |
1619 int noise_reduction; | 1619 int noise_reduction; |
1620 | 1620 |
1621 /** | 1621 /** |
1622 * called at the beginning of a frame to get cr buffer for it. | 1622 * called at the beginning of a frame to get cr buffer for it. |
1623 * buffer type (size, hints) must be the same. lavc won't check it. | 1623 * buffer type (size, hints) must be the same. lavc won't check it. |
1624 * lavc will pass previous buffer in pic, function should return | 1624 * lavc will pass previous buffer in pic, function should return |
1625 * same buffer or new buffer with old frame "painted" into it. | 1625 * same buffer or new buffer with old frame "painted" into it. |
1654 * simulates errors in the bitstream to test error concealment. | 1654 * simulates errors in the bitstream to test error concealment. |
1655 * - encoding: set by user. | 1655 * - encoding: set by user. |
1656 * - decoding: unused. | 1656 * - decoding: unused. |
1657 */ | 1657 */ |
1658 int error_rate; | 1658 int error_rate; |
1659 | 1659 |
1660 /** | 1660 /** |
1661 * MP3 antialias algorithm, see FF_AA_* below. | 1661 * MP3 antialias algorithm, see FF_AA_* below. |
1662 * - encoding: unused | 1662 * - encoding: unused |
1663 * - decoding: set by user | 1663 * - decoding: set by user |
1664 */ | 1664 */ |
1679 * is used to decide how many independant tasks should be passed to execute() | 1679 * is used to decide how many independant tasks should be passed to execute() |
1680 * - encoding: set by user | 1680 * - encoding: set by user |
1681 * - decoding: set by user | 1681 * - decoding: set by user |
1682 */ | 1682 */ |
1683 int thread_count; | 1683 int thread_count; |
1684 | 1684 |
1685 /** | 1685 /** |
1686 * the codec may call this to execute several independant things. it will return only after | 1686 * the codec may call this to execute several independant things. it will return only after |
1687 * finishing all tasks, the user may replace this with some multithreaded implementation, the | 1687 * finishing all tasks, the user may replace this with some multithreaded implementation, the |
1688 * default implementation will execute the parts serially | 1688 * default implementation will execute the parts serially |
1689 * @param count the number of things to execute | 1689 * @param count the number of things to execute |
1690 * - encoding: set by lavc, user can override | 1690 * - encoding: set by lavc, user can override |
1691 * - decoding: set by lavc, user can override | 1691 * - decoding: set by lavc, user can override |
1692 */ | 1692 */ |
1693 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void **arg2, int *ret, int count); | 1693 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void **arg2, int *ret, int count); |
1694 | 1694 |
1695 /** | 1695 /** |
1696 * Thread opaque. | 1696 * Thread opaque. |
1697 * can be used by execute() to store some per AVCodecContext stuff. | 1697 * can be used by execute() to store some per AVCodecContext stuff. |
1698 * - encoding: set by execute() | 1698 * - encoding: set by execute() |
1699 * - decoding: set by execute() | 1699 * - decoding: set by execute() |
1700 */ | 1700 */ |
1701 void *thread_opaque; | 1701 void *thread_opaque; |
1702 | 1702 |
1703 /** | 1703 /** |
1704 * Motion estimation threshold. under which no motion estimation is | 1704 * Motion estimation threshold. under which no motion estimation is |
1705 * performed, but instead the user specified motion vectors are used | 1705 * performed, but instead the user specified motion vectors are used |
1706 * | 1706 * |
1707 * - encoding: set by user | 1707 * - encoding: set by user |
1708 * - decoding: unused | 1708 * - decoding: unused |
1709 */ | 1709 */ |
1710 int me_threshold; | 1710 int me_threshold; |
1711 | 1711 |
1824 * - decoding: unused | 1824 * - decoding: unused |
1825 */ | 1825 */ |
1826 int mb_lmax; | 1826 int mb_lmax; |
1827 | 1827 |
1828 /** | 1828 /** |
1829 * | 1829 * |
1830 * - encoding: set by user. | 1830 * - encoding: set by user. |
1831 * - decoding: unused | 1831 * - decoding: unused |
1832 */ | 1832 */ |
1833 int me_penalty_compensation; | 1833 int me_penalty_compensation; |
1834 | 1834 |
1835 /** | 1835 /** |
1836 * | 1836 * |
1837 * - encoding: unused | 1837 * - encoding: unused |
1838 * - decoding: set by user. | 1838 * - decoding: set by user. |
1839 */ | 1839 */ |
1840 enum AVDiscard skip_loop_filter; | 1840 enum AVDiscard skip_loop_filter; |
1841 | 1841 |
1842 /** | 1842 /** |
1843 * | 1843 * |
1844 * - encoding: unused | 1844 * - encoding: unused |
1845 * - decoding: set by user. | 1845 * - decoding: set by user. |
1846 */ | 1846 */ |
1847 enum AVDiscard skip_idct; | 1847 enum AVDiscard skip_idct; |
1848 | 1848 |
1849 /** | 1849 /** |
1850 * | 1850 * |
1851 * - encoding: unused | 1851 * - encoding: unused |
1852 * - decoding: set by user. | 1852 * - decoding: set by user. |
1853 */ | 1853 */ |
1854 enum AVDiscard skip_frame; | 1854 enum AVDiscard skip_frame; |
1855 } AVCodecContext; | 1855 } AVCodecContext; |
2138 struct ReSampleContext; | 2138 struct ReSampleContext; |
2139 struct AVResampleContext; | 2139 struct AVResampleContext; |
2140 | 2140 |
2141 typedef struct ReSampleContext ReSampleContext; | 2141 typedef struct ReSampleContext ReSampleContext; |
2142 | 2142 |
2143 ReSampleContext *audio_resample_init(int output_channels, int input_channels, | 2143 ReSampleContext *audio_resample_init(int output_channels, int input_channels, |
2144 int output_rate, int input_rate); | 2144 int output_rate, int input_rate); |
2145 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples); | 2145 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples); |
2146 void audio_resample_close(ReSampleContext *s); | 2146 void audio_resample_close(ReSampleContext *s); |
2147 | 2147 |
2148 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff); | 2148 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff); |
2165 int leftBand, int rightBand, | 2165 int leftBand, int rightBand, |
2166 int padtop, int padbottom, | 2166 int padtop, int padbottom, |
2167 int padleft, int padright); | 2167 int padleft, int padright); |
2168 | 2168 |
2169 | 2169 |
2170 void img_resample(ImgReSampleContext *s, | 2170 void img_resample(ImgReSampleContext *s, |
2171 AVPicture *output, const AVPicture *input); | 2171 AVPicture *output, const AVPicture *input); |
2172 | 2172 |
2173 void img_resample_close(ImgReSampleContext *s); | 2173 void img_resample_close(ImgReSampleContext *s); |
2174 | 2174 |
2175 /** | 2175 /** |
2214 int img_get_alpha_info(const AVPicture *src, | 2214 int img_get_alpha_info(const AVPicture *src, |
2215 int pix_fmt, int width, int height); | 2215 int pix_fmt, int width, int height); |
2216 | 2216 |
2217 /* convert among pixel formats */ | 2217 /* convert among pixel formats */ |
2218 int img_convert(AVPicture *dst, int dst_pix_fmt, | 2218 int img_convert(AVPicture *dst, int dst_pix_fmt, |
2219 const AVPicture *src, int pix_fmt, | 2219 const AVPicture *src, int pix_fmt, |
2220 int width, int height); | 2220 int width, int height); |
2221 | 2221 |
2222 /* deinterlace a picture */ | 2222 /* deinterlace a picture */ |
2223 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, | 2223 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, |
2224 int pix_fmt, int width, int height); | 2224 int pix_fmt, int width, int height); |
2262 * opens / inits the AVCodecContext. | 2262 * opens / inits the AVCodecContext. |
2263 * not thread save! | 2263 * not thread save! |
2264 */ | 2264 */ |
2265 int avcodec_open(AVCodecContext *avctx, AVCodec *codec); | 2265 int avcodec_open(AVCodecContext *avctx, AVCodec *codec); |
2266 | 2266 |
2267 int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, | 2267 int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, |
2268 int *frame_size_ptr, | 2268 int *frame_size_ptr, |
2269 uint8_t *buf, int buf_size); | 2269 uint8_t *buf, int buf_size); |
2270 int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, | 2270 int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, |
2271 int *got_picture_ptr, | 2271 int *got_picture_ptr, |
2272 uint8_t *buf, int buf_size); | 2272 uint8_t *buf, int buf_size); |
2273 int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub, | 2273 int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub, |
2274 int *got_sub_ptr, | 2274 int *got_sub_ptr, |
2275 const uint8_t *buf, int buf_size); | 2275 const uint8_t *buf, int buf_size); |
2276 int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata, | 2276 int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata, |
2277 int *data_size_ptr, | 2277 int *data_size_ptr, |
2278 uint8_t *buf, int buf_size); | 2278 uint8_t *buf, int buf_size); |
2279 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, | 2279 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, |
2280 const short *samples); | 2280 const short *samples); |
2281 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, | 2281 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, |
2282 const AVFrame *pict); | 2282 const AVFrame *pict); |
2283 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, | 2283 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, |
2284 const AVSubtitle *sub); | 2284 const AVSubtitle *sub); |
2285 | 2285 |
2286 int avcodec_close(AVCodecContext *avctx); | 2286 int avcodec_close(AVCodecContext *avctx); |
2287 | 2287 |
2288 void avcodec_register_all(void); | 2288 void avcodec_register_all(void); |
2302 /* frame parsing */ | 2302 /* frame parsing */ |
2303 typedef struct AVCodecParserContext { | 2303 typedef struct AVCodecParserContext { |
2304 void *priv_data; | 2304 void *priv_data; |
2305 struct AVCodecParser *parser; | 2305 struct AVCodecParser *parser; |
2306 int64_t frame_offset; /* offset of the current frame */ | 2306 int64_t frame_offset; /* offset of the current frame */ |
2307 int64_t cur_offset; /* current offset | 2307 int64_t cur_offset; /* current offset |
2308 (incremented by each av_parser_parse()) */ | 2308 (incremented by each av_parser_parse()) */ |
2309 int64_t last_frame_offset; /* offset of the last frame */ | 2309 int64_t last_frame_offset; /* offset of the last frame */ |
2310 /* video info */ | 2310 /* video info */ |
2311 int pict_type; /* XXX: put it back in AVCodecContext */ | 2311 int pict_type; /* XXX: put it back in AVCodecContext */ |
2312 int repeat_pict; /* XXX: put it back in AVCodecContext */ | 2312 int repeat_pict; /* XXX: put it back in AVCodecContext */ |
2321 #define AV_PARSER_PTS_NB 4 | 2321 #define AV_PARSER_PTS_NB 4 |
2322 int cur_frame_start_index; | 2322 int cur_frame_start_index; |
2323 int64_t cur_frame_offset[AV_PARSER_PTS_NB]; | 2323 int64_t cur_frame_offset[AV_PARSER_PTS_NB]; |
2324 int64_t cur_frame_pts[AV_PARSER_PTS_NB]; | 2324 int64_t cur_frame_pts[AV_PARSER_PTS_NB]; |
2325 int64_t cur_frame_dts[AV_PARSER_PTS_NB]; | 2325 int64_t cur_frame_dts[AV_PARSER_PTS_NB]; |
2326 | 2326 |
2327 int flags; | 2327 int flags; |
2328 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001 | 2328 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001 |
2329 } AVCodecParserContext; | 2329 } AVCodecParserContext; |
2330 | 2330 |
2331 typedef struct AVCodecParser { | 2331 typedef struct AVCodecParser { |
2332 int codec_ids[5]; /* several codec IDs are permitted */ | 2332 int codec_ids[5]; /* several codec IDs are permitted */ |
2333 int priv_data_size; | 2333 int priv_data_size; |
2334 int (*parser_init)(AVCodecParserContext *s); | 2334 int (*parser_init)(AVCodecParserContext *s); |
2335 int (*parser_parse)(AVCodecParserContext *s, | 2335 int (*parser_parse)(AVCodecParserContext *s, |
2336 AVCodecContext *avctx, | 2336 AVCodecContext *avctx, |
2337 uint8_t **poutbuf, int *poutbuf_size, | 2337 uint8_t **poutbuf, int *poutbuf_size, |
2338 const uint8_t *buf, int buf_size); | 2338 const uint8_t *buf, int buf_size); |
2339 void (*parser_close)(AVCodecParserContext *s); | 2339 void (*parser_close)(AVCodecParserContext *s); |
2340 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size); | 2340 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size); |
2341 struct AVCodecParser *next; | 2341 struct AVCodecParser *next; |
2342 } AVCodecParser; | 2342 } AVCodecParser; |
2343 | 2343 |
2344 extern AVCodecParser *av_first_parser; | 2344 extern AVCodecParser *av_first_parser; |
2345 | 2345 |
2346 void av_register_codec_parser(AVCodecParser *parser); | 2346 void av_register_codec_parser(AVCodecParser *parser); |
2347 AVCodecParserContext *av_parser_init(int codec_id); | 2347 AVCodecParserContext *av_parser_init(int codec_id); |
2348 int av_parser_parse(AVCodecParserContext *s, | 2348 int av_parser_parse(AVCodecParserContext *s, |
2349 AVCodecContext *avctx, | 2349 AVCodecContext *avctx, |
2350 uint8_t **poutbuf, int *poutbuf_size, | 2350 uint8_t **poutbuf, int *poutbuf_size, |
2351 const uint8_t *buf, int buf_size, | 2351 const uint8_t *buf, int buf_size, |
2352 int64_t pts, int64_t dts); | 2352 int64_t pts, int64_t dts); |
2353 int av_parser_change(AVCodecParserContext *s, | 2353 int av_parser_change(AVCodecParserContext *s, |
2354 AVCodecContext *avctx, | 2354 AVCodecContext *avctx, |
2355 uint8_t **poutbuf, int *poutbuf_size, | 2355 uint8_t **poutbuf, int *poutbuf_size, |
2356 const uint8_t *buf, int buf_size, int keyframe); | 2356 const uint8_t *buf, int buf_size, int keyframe); |
2357 void av_parser_close(AVCodecParserContext *s); | 2357 void av_parser_close(AVCodecParserContext *s); |
2358 | 2358 |
2359 extern AVCodecParser mpegvideo_parser; | 2359 extern AVCodecParser mpegvideo_parser; |
2360 extern AVCodecParser mpeg4video_parser; | 2360 extern AVCodecParser mpeg4video_parser; |