comparison avcodec.h @ 684:581678112a5d libavcodec

documenting most stuff in AVCodecContext
author michaelni
date Thu, 19 Sep 2002 17:44:54 +0000
parents b3869ffff47a
children 83d2c9d50d7d
comparison
equal deleted inserted replaced
683:aad2dedb8b6a 684:581678112a5d
103 /* encoding support 103 /* encoding support
104 these flags can be passed in AVCodecContext.flags before initing 104 these flags can be passed in AVCodecContext.flags before initing
105 Note: note not everything is supported yet 105 Note: note not everything is supported yet
106 */ 106 */
107 107
108 #define CODEC_FLAG_HQ 0x0001 /* high quality (non real time) encoding */ 108 #define CODEC_FLAG_HQ 0x0001 /* brute force MB-type decission mode (slow) */
109 #define CODEC_FLAG_QSCALE 0x0002 /* use fixed qscale */ 109 #define CODEC_FLAG_QSCALE 0x0002 /* use fixed qscale */
110 #define CODEC_FLAG_4MV 0x0004 /* 4 MV per MB allowed */ 110 #define CODEC_FLAG_4MV 0x0004 /* 4 MV per MB allowed */
111 #define CODEC_FLAG_QPEL 0x0010 /* use qpel MC */ 111 #define CODEC_FLAG_QPEL 0x0010 /* use qpel MC */
112 #define CODEC_FLAG_GMC 0x0020 /* use GMC */ 112 #define CODEC_FLAG_GMC 0x0020 /* use GMC */
113 #define CODEC_FLAG_TYPE 0x0040 /* fixed I/P frame type, from avctx->key_frame */ 113 #define CODEC_FLAG_TYPE 0x0040 /* fixed I/P frame type, from avctx->key_frame */
114 #define CODEC_FLAG_PART 0x0080 /* use data partitioning */ 114 #define CODEC_FLAG_PART 0x0080 /* use data partitioning */
115 /* parent program gurantees that the input for b-frame containing streams is not written to 115 /* parent program gurantees that the input for b-frame containing streams is not written to
116 for at least s->max_b_frames+1 frames, if this is not set than the input will be copied */ 116 for at least s->max_b_frames+1 frames, if this is not set than the input will be copied */
117 #define CODEC_FLAG_INPUT_PRESERVED 0x0100 117 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
118 #define CODEC_FLAG_PASS1 0x0200 /* use internal 2pass ratecontrol in first pass mode */ 118 #define CODEC_FLAG_PASS1 0x0200 /* use internal 2pass ratecontrol in first pass mode */
119 #define CODEC_FLAG_PASS2 0x0400 /* use internal 2pass ratecontrol in second pass mode */ 119 #define CODEC_FLAG_PASS2 0x0400 /* use internal 2pass ratecontrol in second pass mode */
120 #define CODEC_FLAG_EXTERN_HUFF 0x1000 /* use external huffman table (for mjpeg) */ 120 #define CODEC_FLAG_EXTERN_HUFF 0x1000 /* use external huffman table (for mjpeg) */
121 #define CODEC_FLAG_GRAY 0x2000 /* only decode/encode grayscale */ 121 #define CODEC_FLAG_GRAY 0x2000 /* only decode/encode grayscale */
122 #define CODEC_FLAG_EMU_EDGE 0x4000/* dont draw edges */ 122 #define CODEC_FLAG_EMU_EDGE 0x4000/* dont draw edges */
123 #define CODEC_FLAG_DR1 0x8000 /* dr1 */ 123 #define CODEC_FLAG_DR1 0x8000 /* direct renderig type 1 (store internal frames in external buffers) */
124 #define CODEC_FLAG_NOT_TRUNCATED 0x00010000 /* input bitstream is not truncated, except before a startcode */ 124 #define CODEC_FLAG_NOT_TRUNCATED 0x00010000 /* input bitstream is not truncated, except before a startcode
125 allows the last part of a frame to be decoded earlier */
125 /* codec capabilities */ 126 /* codec capabilities */
126 127
127 /* decoder can use draw_horiz_band callback */ 128 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 /* decoder can use draw_horiz_band callback */
128 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
129 #define CODEC_CAP_DR1 0x0002 /* direct rendering method 1 */ 129 #define CODEC_CAP_DR1 0x0002 /* direct rendering method 1 */
130 /* if 'parse_only' field is true, then avcodec_parse_frame() can be 130 /* if 'parse_only' field is true, then avcodec_parse_frame() can be
131 used */ 131 used */
132 #define CODEC_CAP_PARSE_ONLY 0x0004 132 #define CODEC_CAP_PARSE_ONLY 0x0004
133 133
134 #define FRAME_RATE_BASE 10000 134 #define FRAME_RATE_BASE 10000
135 135
136 typedef struct AVCodecContext { 136 typedef struct AVCodecContext {
137 /**
138 * the average bitrate
139 * encoding: set by user. unused for constant quantizer encoding
140 * decoding: set by lavc. 0 or some bitrate if this info is available in the stream
141 */
137 int bit_rate; 142 int bit_rate;
138 int bit_rate_tolerance; /* amount of +- bits (>0)*/ 143
144 /**
145 * number of bits the bitstream is allowed to diverge from the reference
146 * the reference can be CBR (for CBR pass1) or VBR (for pass2)
147 * encoding: set by user. unused for constant quantizer encoding
148 * decoding: unused
149 */
150 int bit_rate_tolerance;
151
152 /**
153 * CODEC_FLAG_*
154 * encoding: set by user.
155 * decoding: set by user.
156 */
139 int flags; 157 int flags;
140 int sub_id; /* some codecs needs additionnal format info. It is 158
141 stored there */ 159 /**
142 160 * some codecs needs additionnal format info. It is stored here
143 int me_method; /* ME algorithm used for video coding */ 161 * encoding: set by user.
144 162 * decoding: set by lavc. (FIXME is this ok?)
145 /* extra data from parent application to codec, e.g. huffman table 163 */
146 for mjpeg */ 164 int sub_id;
147 /* the parent should allocate and free this buffer */ 165
166 /**
167 * motion estimation algorithm used for video coding
168 * encoding: set by user.
169 * decoding: unused
170 */
171 int me_method;
172
173 /**
174 * some codecs need / can use extra-data like huffman tables
175 * mjpeg: huffman tables
176 * rv10: additional flags
177 * encoding: set/allocated/freed by user.
178 * decoding: set/allocated/freed by lavc. (can be NULL)
179 */
148 void *extradata; 180 void *extradata;
149 int extradata_size; 181 int extradata_size;
150 182
151 /* video only */ 183 /* video only */
152 int frame_rate; /* frames per sec multiplied by FRAME_RATE_BASE */ 184 /**
185 * frames per sec multiplied by FRAME_RATE_BASE
186 * for variable fps this is the precission, so if the timestamps
187 * can be specified in msec precssion then this is 1000*FRAME_RATE_BASE
188 * encoding: set by user
189 * decoding: set by lavc. 0 or the frame_rate if available
190 */
191 int frame_rate;
192
193 /**
194 * encoding: set by user.
195 * decoding: set by user, some codecs might override / change it during playback
196 */
153 int width, height; 197 int width, height;
198
199 /**
200 * encoding: set by user. 0 if not known
201 * decoding: set by lavc. 0 if not known
202 */
154 int aspect_ratio_info; 203 int aspect_ratio_info;
155 #define FF_ASPECT_SQUARE 1 204 #define FF_ASPECT_SQUARE 1
156 #define FF_ASPECT_4_3_625 2 205 #define FF_ASPECT_4_3_625 2
157 #define FF_ASPECT_4_3_525 3 206 #define FF_ASPECT_4_3_525 3
158 #define FF_ASPECT_16_9_625 4 207 #define FF_ASPECT_16_9_625 4
159 #define FF_ASPECT_16_9_525 5 208 #define FF_ASPECT_16_9_525 5
160 #define FF_ASPECT_EXTENDED 15 209 #define FF_ASPECT_EXTENDED 15
161 int gop_size; /* 0 = intra only */ 210
162 enum PixelFormat pix_fmt; /* pixel format, see PIX_FMT_xxx */ 211 /**
212 * the number of pictures in a group of pitures, or 0 for intra_only
213 * encoding: set by user.
214 * decoding: unused
215 */
216 int gop_size;
217
218 /**
219 * pixel format, see PIX_FMT_xxx
220 * encoding: unused
221 * decoding: set by lavc.
222 */
223 enum PixelFormat pix_fmt;
224
163 int repeat_pict; /* when decoding, this signal how much the picture */ 225 int repeat_pict; /* when decoding, this signal how much the picture */
164 /* must be delayed. */ 226 /* must be delayed. */
165 /* extra_delay = (repeat_pict / 2) * (1/fps) */ 227 /* extra_delay = (repeat_pict / 2) * (1/fps) */
166 /* if non NULL, 'draw_horiz_band' is called by the libavcodec 228
167 decoder to draw an horizontal band. It improve cache usage. Not 229 /**
168 all codecs can do that. You must check the codec capabilities 230 * if non NULL, 'draw_horiz_band' is called by the libavcodec
169 before */ 231 * decoder to draw an horizontal band. It improve cache usage. Not
232 * all codecs can do that. You must check the codec capabilities
233 * before
234 * encoding: unused
235 * decoding: set by user.
236 */
170 void (*draw_horiz_band)(struct AVCodecContext *s, 237 void (*draw_horiz_band)(struct AVCodecContext *s,
171 UINT8 **src_ptr, int linesize, 238 UINT8 **src_ptr, int linesize,
172 int y, int width, int height); 239 int y, int width, int height);
173 240
174 /* audio only */ 241 /* audio only */
179 /* the following data should not be initialized */ 246 /* the following data should not be initialized */
180 int frame_size; /* in samples, initialized when calling 'init' */ 247 int frame_size; /* in samples, initialized when calling 'init' */
181 int frame_number; /* audio or video frame number */ 248 int frame_number; /* audio or video frame number */
182 int real_pict_num; /* returns the real picture number of 249 int real_pict_num; /* returns the real picture number of
183 previous encoded frame */ 250 previous encoded frame */
184 int key_frame; /* true if the previous compressed frame was 251
185 a key frame (intra, or seekable) */ 252 /**
186 int pict_type; /* picture type of the previous 253 * 1 -> keyframe, 0-> not
187 en/decoded frame */ 254 * encoding: set by lavc (for the outputed bitstream, not the input frame)
255 * decoding: set by lavc (for the decoded bitstream, not the displayed frame)
256 */
257 int key_frame;
258
259 /**
260 * picture type of the previous en/decoded frame, see ?_TYPE below
261 * encoding: set by lavc (for the outputed bitstream, not the input frame)
262 * decoding: set by lavc (for the decoded bitstream, not the displayed frame)
263 */
264 int pict_type;
188 /* FIXME: these should have FF_ */ 265 /* FIXME: these should have FF_ */
189 #define I_TYPE 1 // Intra 266 #define I_TYPE 1 // Intra
190 #define P_TYPE 2 // Predicted 267 #define P_TYPE 2 // Predicted
191 #define B_TYPE 3 // Bi-dir predicted 268 #define B_TYPE 3 // Bi-dir predicted
192 #define S_TYPE 4 // S(GMC)-VOP MPEG4 269 #define S_TYPE 4 // S(GMC)-VOP MPEG4
193 270
194 int delay; /* number of frames the decoded output 271 /**
195 will be delayed relative to the encoded input */ 272 * number of frames the decoded output will be delayed relative to
196 uint8_t *mbskip_table; /* =1 if MB didnt change, is only valid for I/P frames 273 * the encoded input
197 stride= mb_width = (width+15)>>4 */ 274 * encoding: set by lavc.
275 * decoding: unused
276 */
277 int delay;
278
279 /**
280 * mbskip_table[mb]=1 if MB didnt change, is only valid for I/P frames
281 * stride= mb_width = (width+15)>>4 (FIXME export stride?)
282 * encoding: unused
283 * decoding: set by lavc
284 */
285 uint8_t *mbskip_table;
198 286
199 /* encoding parameters */ 287 /* encoding parameters */
200 int quality; /* quality of the previous encoded frame 288 int quality; /* quality of the previous encoded frame
201 (between 1 (good) and 31 (bad)) 289 (between 1 (good) and 31 (bad))
202 this is allso used to set the quality in vbr mode 290 this is allso used to set the quality in vbr mode
203 and the per frame quality in CODEC_FLAG_TYPE (second pass mode) */ 291 and the per frame quality in CODEC_FLAG_TYPE (second pass mode) */
204 float qcompress; /* amount of qscale change between easy & hard scenes (0.0-1.0)*/ 292 float qcompress; /* amount of qscale change between easy & hard scenes (0.0-1.0)*/
205 float qblur; /* amount of qscale smoothing over time (0.0-1.0) */ 293 float qblur; /* amount of qscale smoothing over time (0.0-1.0) */
206 int qmin; /* min qscale */ 294
207 int qmax; /* max qscale */ 295 /**
208 int max_qdiff; /* max qscale difference between frames */ 296 * minimum quantizer
209 int max_b_frames; /* maximum b frames, the output will be delayed by max_b_frames+1 relative to the input */ 297 * encoding: set by user.
210 float b_quant_factor;/* qscale factor between ps and b frames */ 298 * decoding: unused
211 int rc_strategy; /* obsolete FIXME remove */ 299 */
300 int qmin;
301
302 /**
303 * maximum quantizer
304 * encoding: set by user.
305 * decoding: unused
306 */
307 int qmax;
308
309 /**
310 * maximum quantizer difference etween frames
311 * encoding: set by user.
312 * decoding: unused
313 */
314 int max_qdiff;
315
316 /**
317 * maximum number of b frames between non b frames
318 * note: the output will be delayed by max_b_frames+1 relative to the input
319 * encoding: set by user.
320 * decoding: unused
321 */
322 int max_b_frames;
323
324 /**
325 * qscale factor between ip and b frames
326 * encoding: set by user.
327 * decoding: unused
328 */
329 float b_quant_factor;
330
331 /** obsolete FIXME remove */
332 int rc_strategy;
212 int b_frame_strategy; 333 int b_frame_strategy;
213 334
214 int hurry_up; /* when set to 1 during decoding, b frames will be skiped 335 /**
215 when set to 2 idct/dequant will be skipped too */ 336 * encoding: unused
337 * decoding: set by user. 1-> skip b frames, 2-> skip idct/dequant too
338 */
339 int hurry_up;
216 340
217 struct AVCodec *codec; 341 struct AVCodec *codec;
342
218 void *priv_data; 343 void *priv_data;
219 344
220 /* The following data is for RTP friendly coding */ 345 /* The following data is for RTP friendly coding */
221 /* By now only H.263/H.263+/MPEG4 coder honours this */ 346 /* By now only H.263/H.263+/MPEG4 coder honours this */
222 int rtp_mode; /* 1 for activate RTP friendly-mode */ 347 int rtp_mode; /* 1 for activate RTP friendly-mode */
235 /* every time the encoder as a packet to send */ 360 /* every time the encoder as a packet to send */
236 /* Depends on the encoder if the data starts */ 361 /* Depends on the encoder if the data starts */
237 /* with a Start Code (it should) H.263 does */ 362 /* with a Start Code (it should) H.263 does */
238 void (*rtp_callback)(void *data, int size, int packet_number); 363 void (*rtp_callback)(void *data, int size, int packet_number);
239 364
240 /* These are for PSNR calculation, if you set get_psnr to 1 */ 365 /**
241 /* after encoding you will have the PSNR on psnr_y/cb/cr */ 366 * if you set get_psnr to 1 then after encoding you will have the
367 * PSNR on psnr_y/cb/cr
368 * encoding: set by user (1-> on, 0-> off)
369 * decoding: unused
370 */
242 int get_psnr; 371 int get_psnr;
243 float psnr_y; 372 float psnr_y;
244 float psnr_cb; 373 float psnr_cb;
245 float psnr_cr; 374 float psnr_cr;
246 375
250 int i_tex_bits; 379 int i_tex_bits;
251 int p_tex_bits; 380 int p_tex_bits;
252 int i_count; 381 int i_count;
253 int p_count; 382 int p_count;
254 int skip_count; 383 int skip_count;
255 int misc_bits; // cbp, mb_type 384 int misc_bits;
385
386 /**
387 * number of bits used for the previously encoded frame
388 * encoding: set by lavc
389 * decoding: unused
390 */
256 int frame_bits; 391 int frame_bits;
257 392
258 /* the following fields are ignored */ 393 /**
259 void *opaque; /* can be used to carry app specific stuff */ 394 * private data of the user, can be used to carry app specific stuff
395 * encoding: set by user
396 * decoding: set by user
397 */
398 void *opaque;
399
260 char codec_name[32]; 400 char codec_name[32];
261 enum CodecType codec_type; /* see CODEC_TYPE_xxx */ 401 enum CodecType codec_type; /* see CODEC_TYPE_xxx */
262 enum CodecID codec_id; /* see CODEC_ID_xxx */ 402 enum CodecID codec_id; /* see CODEC_ID_xxx */
263 unsigned int codec_tag; /* codec tag, only used if unknown codec */ 403 unsigned int codec_tag; /* codec tag, only used if unknown codec */
264 404
265 int workaround_bugs; /* workaround bugs in encoders which cannot be detected automatically */ 405 /**
406 * workaround bugs in encoders which cannot be detected automatically
407 * encoding: unused
408 * decoding: set by user
409 */
410 int workaround_bugs;
411
412 /**
413 * encoding: set by user
414 * decoding: unused
415 */
266 int luma_elim_threshold; 416 int luma_elim_threshold;
417
418 /**
419 * encoding: set by user
420 * decoding: unused
421 */
267 int chroma_elim_threshold; 422 int chroma_elim_threshold;
268 int strict_std_compliance; /* strictly follow the std (MPEG4, ...) */ 423
269 float b_quant_offset;/* qscale offset between ips and b frames, not implemented yet */ 424 /**
425 * strictly follow the std (MPEG4, ...)
426 * encoding: set by user
427 * decoding: unused
428 */
429 int strict_std_compliance;
430
431 /**
432 * qscale offset between ip and b frames
433 * encoding: set by user.
434 * decoding: unused
435 */
436 float b_quant_offset;
437
438 /**
439 * error resilience {-1,0,1} higher values will detect more errors but may missdetect
440 * some more or less valid parts as errors
441 * encoding: unused
442 * decoding: set by user
443 */
270 int error_resilience; 444 int error_resilience;
271 445
272 #ifndef MBC 446 #ifndef MBC
273 #define MBC 128 447 #define MBC 128
274 #define MBR 96 448 #define MBR 96
276 #define QP_TYPE int //FIXME note xxx this might be changed to int8_t 450 #define QP_TYPE int //FIXME note xxx this might be changed to int8_t
277 451
278 QP_TYPE *quant_store; /* field for communicating with external postprocessing */ 452 QP_TYPE *quant_store; /* field for communicating with external postprocessing */
279 453
280 unsigned qstride; 454 unsigned qstride;
455
456 /**
457 * buffer, where the next picture should be decoded into
458 * encoding: unused
459 * decoding: set by user in get_buffer_callback to a buffer into which the next part
460 * of the bitstream will be decoded, and set by lavc at end of frame to the
461 * next frame which needs to be displayed
462 */
281 uint8_t *dr_buffer[3]; 463 uint8_t *dr_buffer[3];
464
465 /**
466 * stride of the luminance part of the dr buffer
467 * encoding: unused
468 * decoding: set by user
469 */
282 int dr_stride; 470 int dr_stride;
471
472 /**
473 * same behavior as dr_buffer, just for some private data of the user
474 * encoding: unused
475 * decoding: set by user in get_buffer_callback, and set by lavc at end of frame
476 */
283 void *dr_opaque_frame; 477 void *dr_opaque_frame;
478
479 /**
480 * called at the beginning of each frame to get a buffer for it
481 * encoding: unused
482 * decoding: set by user
483 */
284 void (*get_buffer_callback)(struct AVCodecContext *c, int width, int height, int pict_type); 484 void (*get_buffer_callback)(struct AVCodecContext *c, int width, int height, int pict_type);
285 485
286 int has_b_frames; // is 1 if the decoded stream contains b frames 486 /**
487 * is 1 if the decoded stream contains b frames, 0 otherwise
488 * encoding: unused
489 * decoding: set by lavc
490 */
491 int has_b_frames;
492
493 /**
494 * stride of the chrominance part of the dr buffer
495 * encoding: unused
496 * decoding: set by user
497 */
287 int dr_uvstride; 498 int dr_uvstride;
499
500 /**
501 * number of dr buffers
502 * encoding: unused
503 * decoding: set by user
504 */
288 int dr_ip_buffer_count; 505 int dr_ip_buffer_count;
506
289 int block_align; /* currently only for adpcm codec in wav/avi */ 507 int block_align; /* currently only for adpcm codec in wav/avi */
290 508
291 int parse_only; /* decoding only: if true, only parsing is done 509 int parse_only; /* decoding only: if true, only parsing is done
292 (function avcodec_parse_frame()). The frame 510 (function avcodec_parse_frame()). The frame
293 data is returned. Only MPEG codecs support this now. */ 511 data is returned. Only MPEG codecs support this now. */
294 512
295 int mpeg_quant; /* 0-> h263 quant 1-> mpeg quant */ 513 /**
296 514 * 0-> h263 quant 1-> mpeg quant
515 * encoding: set by user.
516 * decoding: unused
517 */
518 int mpeg_quant;
519
520 /**
521 * pass1 encoding statistics output buffer
522 * encoding: set by lavc
523 * decoding: unused
524 */
297 char *stats_out; /* encoding statistics output buffer */ 525 char *stats_out; /* encoding statistics output buffer */
298 char *stats_in; /* encoding statistics input buffer (concatenated stuff from stats_out of pass1 should be placed here)*/ 526
527 /**
528 * pass2 encoding statistics input buffer.
529 * concatenated stuff from stats_out of pass1 should be placed here
530 * encoding: allocated/set/freed by user
531 * decoding: unused
532 */
533 char *stats_in;
534
535 /**
536 * ratecontrol qmin qmax limiting method
537 * 0-> clipping, 1-> use a nice continous function to limit qscale wthin qmin/qmax
538 * encoding: set by user.
539 * decoding: unused
540 */
299 float rc_qsquish; 541 float rc_qsquish;
542
300 float rc_qmod_amp; 543 float rc_qmod_amp;
301 int rc_qmod_freq; 544 int rc_qmod_freq;
545
546 /**
547 * ratecontrol override, see RcOverride
548 * encoding: allocated/set/freed by user.
549 * decoding: unused
550 */
302 RcOverride *rc_override; 551 RcOverride *rc_override;
303 int rc_override_count; 552 int rc_override_count;
553
554 /**
555 * rate control equation
556 * encoding: set by user
557 * decoding: unused
558 */
304 char *rc_eq; 559 char *rc_eq;
560
561 /**
562 * maximum bitrate
563 * encoding: set by user.
564 * decoding: unused
565 */
305 int rc_max_rate; 566 int rc_max_rate;
567
568 /**
569 * minimum bitrate
570 * encoding: set by user.
571 * decoding: unused
572 */
306 int rc_min_rate; 573 int rc_min_rate;
574
575 /**
576 * decoder bitstream buffer size
577 * encoding: set by user.
578 * decoding: unused
579 */
307 int rc_buffer_size; 580 int rc_buffer_size;
308 float rc_buffer_aggressivity; 581 float rc_buffer_aggressivity;
309 float i_quant_factor;/* qscale factor between i and p frames */ 582
310 float i_quant_offset;/* qscale offset between i and p frames */ 583 /**
584 * qscale factor between p and i frames
585 * encoding: set by user.
586 * decoding: unused
587 */
588 float i_quant_factor;
589
590 /**
591 * qscale offset between p and i frames
592 * encoding: set by user.
593 * decoding: unused
594 */
595 float i_quant_offset;
596
597 /**
598 * initial complexity for pass1 ratecontrol
599 * encoding: set by user.
600 * decoding: unused
601 */
311 float rc_initial_cplx; 602 float rc_initial_cplx;
312 603
604 /**
605 * custom aspect ratio, used if aspect_info==FF_ASPECT_EXTENDED
606 * encoding: set by user.
607 * decoding: set by lavc.
608 */
313 int aspected_width; 609 int aspected_width;
314 int aspected_height; 610 int aspected_height;
315 611
612 /**
613 * dct algorithm, see FF_DCT_* below
614 * encoding: set by user
615 * decoding: unused
616 */
316 int dct_algo; 617 int dct_algo;
317 #define FF_DCT_AUTO 0 618 #define FF_DCT_AUTO 0
318 #define FF_DCT_FASTINT 1 619 #define FF_DCT_FASTINT 1
319 #define FF_DCT_INT 2 620 #define FF_DCT_INT 2
320 #define FF_DCT_MMX 3 621 #define FF_DCT_MMX 3
321 #define FF_DCT_MLIB 4 622 #define FF_DCT_MLIB 4
322 623
323 long long int pts; /* timestamp in micro seconds 624 /**
324 for decoding: the timestamp from the stream or 0 625 * presentation timestamp in micro seconds (time when frame should be shown to user)
325 for encoding: the timestamp which will be stored in the stream 626 * if 0 then the frame_rate will be used as reference
326 if 0 then the frame_rate will be used */ 627 * encoding: set by user
628 * decoding; set by lavc
629 */
630 long long int pts;
327 631
328 //FIXME this should be reordered after kabis API is finished ... 632 //FIXME this should be reordered after kabis API is finished ...
329 //TODO kill kabi 633 //TODO kill kabi
330 /* 634 /*
331 Note: Below are located reserved fields for further usage 635 Note: Below are located reserved fields for further usage
332 It requires for ABI !!! 636 It requires for ABI !!!
333 If you'll perform some changes then borrow new space from these fields 637 If you'll perform some changes then borrow new space from these fields
334 (void * can be safety replaced with struct * ;) 638 (void * can be safety replaced with struct * ;)
335 P L E A S E ! ! ! 639 P L E A S E ! ! !
336 IMPORTANT: Never change order of already declared fields!!! 640 Note: use avcodec_alloc_context instead of malloc to allocate this,
337 */ 641 otherwise the ABI compatibility will be broken between versions
642 IMPORTANT: Never change order of already declared fields!!!
643 */
644 //TODO: remove mess below
338 unsigned long long int 645 unsigned long long int
339 ull_res0,ull_res1,ull_res2,ull_res3,ull_res4,ull_res5, 646 ull_res0,ull_res1,ull_res2,ull_res3,ull_res4,ull_res5,
340 ull_res6,ull_res7,ull_res8,ull_res9,ull_res10,ull_res11; 647 ull_res6,ull_res7,ull_res8,ull_res9,ull_res10,ull_res11;
341 float 648 float
342 flt_res0,flt_res1,flt_res2,flt_res3,flt_res4,flt_res5, 649 flt_res0,flt_res1,flt_res2,flt_res3,flt_res4,flt_res5,