Mercurial > libavcodec.hg
comparison avcodec.h @ 613:9bb356b23dd9 libavcodec
new ratecontrol code
sadly there are no (unsigned) int left in AVCodecContext so this breaks shared libavcodec libs :(
author | michaelni |
---|---|
date | Sun, 25 Aug 2002 21:41:57 +0000 |
parents | b1a191202f96 |
children | 4f3d4a07d374 |
comparison
equal
deleted
inserted
replaced
612:c0005de2be59 | 613:9bb356b23dd9 |
---|---|
3 | 3 |
4 #include "common.h" | 4 #include "common.h" |
5 | 5 |
6 #define LIBAVCODEC_VERSION_INT 0x000406 | 6 #define LIBAVCODEC_VERSION_INT 0x000406 |
7 #define LIBAVCODEC_VERSION "0.4.6" | 7 #define LIBAVCODEC_VERSION "0.4.6" |
8 #define LIBAVCODEC_BUILD 4619 | 8 #define LIBAVCODEC_BUILD 4620 |
9 #define LIBAVCODEC_BUILD_STR "4619" | 9 #define LIBAVCODEC_BUILD_STR "4620" |
10 | 10 |
11 enum CodecID { | 11 enum CodecID { |
12 CODEC_ID_NONE, | 12 CODEC_ID_NONE, |
13 CODEC_ID_MPEG1VIDEO, | 13 CODEC_ID_MPEG1VIDEO, |
14 CODEC_ID_H263, | 14 CODEC_ID_H263, |
79 ME_LOG, | 79 ME_LOG, |
80 ME_PHODS, | 80 ME_PHODS, |
81 ME_EPZS, | 81 ME_EPZS, |
82 ME_X1 | 82 ME_X1 |
83 }; | 83 }; |
84 | |
85 typedef struct RcOverride{ | |
86 int start_frame; | |
87 int end_frame; | |
88 int qscale; // if this is 0 then quality_factor will be used instead | |
89 float quality_factor; | |
90 } RcOverride; | |
84 | 91 |
85 /* only for ME compatiblity with old apps */ | 92 /* only for ME compatiblity with old apps */ |
86 extern int motion_estimation_method; | 93 extern int motion_estimation_method; |
87 | 94 |
88 /* ME algos sorted by quality */ | 95 /* ME algos sorted by quality */ |
192 float qblur; /* amount of qscale smoothing over time (0.0-1.0) */ | 199 float qblur; /* amount of qscale smoothing over time (0.0-1.0) */ |
193 int qmin; /* min qscale */ | 200 int qmin; /* min qscale */ |
194 int qmax; /* max qscale */ | 201 int qmax; /* max qscale */ |
195 int max_qdiff; /* max qscale difference between frames */ | 202 int max_qdiff; /* max qscale difference between frames */ |
196 int max_b_frames; /* maximum b frames, the output will be delayed by max_b_frames+1 relative to the input */ | 203 int max_b_frames; /* maximum b frames, the output will be delayed by max_b_frames+1 relative to the input */ |
197 float b_quant_factor;/* qscale factor between ips and b frames */ | 204 float b_quant_factor;/* qscale factor between ps and b frames */ |
198 int rc_strategy; | 205 int rc_strategy; /* obsolete FIXME remove */ |
199 int b_frame_strategy; | 206 int b_frame_strategy; |
200 | 207 |
201 int hurry_up; /* when set to 1 during decoding, b frames will be skiped | 208 int hurry_up; /* when set to 1 during decoding, b frames will be skiped |
202 when set to 2 idct/dequant will be skipped too */ | 209 when set to 2 idct/dequant will be skipped too */ |
203 | 210 |
272 | 279 |
273 int has_b_frames; // is 1 if the decoded stream contains b frames | 280 int has_b_frames; // is 1 if the decoded stream contains b frames |
274 int dr_uvstride; | 281 int dr_uvstride; |
275 int dr_ip_buffer_count; | 282 int dr_ip_buffer_count; |
276 int block_align; /* currently only for adpcm codec in wav/avi */ | 283 int block_align; /* currently only for adpcm codec in wav/avi */ |
277 | 284 |
278 int parse_only; /* decoding only: if true, only parsing is done | 285 int parse_only; /* decoding only: if true, only parsing is done |
279 (function avcodec_parse_frame()). The frame | 286 (function avcodec_parse_frame()). The frame |
280 data is returned. Only MPEG codecs support this now. */ | 287 data is returned. Only MPEG codecs support this now. */ |
288 | |
281 int mpeg_quant; /* 0-> h263 quant 1-> mpeg quant */ | 289 int mpeg_quant; /* 0-> h263 quant 1-> mpeg quant */ |
290 | |
291 char *stats_out; /* encoding statistics output buffer */ | |
292 char *stats_in; /* encoding statistics input buffer (concatenated stuff from stats_out of pass1 should be placed here)*/ | |
293 float rc_qsquish; | |
294 float rc_qmod_amp; | |
295 int rc_qmod_freq; | |
296 RcOverride *rc_override; | |
297 int rc_override_count; | |
298 char *rc_eq; | |
299 int rc_max_rate; | |
300 int rc_min_rate; | |
301 int rc_buffer_size; | |
302 float rc_buffer_aggressivity; | |
303 float i_quant_factor;/* qscale factor between i and p frames */ | |
304 float i_quant_offset;/* qscale offset between i and p frames */ | |
305 float rc_initial_cplx; | |
282 | 306 |
283 //FIXME this should be reordered after kabis API is finished ... | 307 //FIXME this should be reordered after kabis API is finished ... |
308 //TODO kill kabi | |
284 /* | 309 /* |
285 Note: Below are located reserved fields for further usage | 310 Note: Below are located reserved fields for further usage |
286 It requires for ABI !!! | 311 It requires for ABI !!! |
287 If you'll perform some changes then borrow new space from these fields | 312 If you'll perform some changes then borrow new space from these fields |
288 (void * can be safety replaced with struct * ;) | 313 (void * can be safety replaced with struct * ;) |
292 unsigned long long int | 317 unsigned long long int |
293 ull_res0,ull_res1,ull_res2,ull_res3,ull_res4,ull_res5, | 318 ull_res0,ull_res1,ull_res2,ull_res3,ull_res4,ull_res5, |
294 ull_res6,ull_res7,ull_res8,ull_res9,ull_res10,ull_res11,ull_res12; | 319 ull_res6,ull_res7,ull_res8,ull_res9,ull_res10,ull_res11,ull_res12; |
295 float | 320 float |
296 flt_res0,flt_res1,flt_res2,flt_res3,flt_res4,flt_res5, | 321 flt_res0,flt_res1,flt_res2,flt_res3,flt_res4,flt_res5, |
297 flt_res6,flt_res7,flt_res8,flt_res9,flt_res10,flt_res11; | 322 flt_res6,flt_res7,flt_res8,flt_res9,flt_res10,flt_res11,flt_res12; |
298 void | 323 void |
299 *ptr_res0,*ptr_res1,*ptr_res2,*ptr_res3,*ptr_res4,*ptr_res5, | 324 *ptr_res0,*ptr_res1,*ptr_res2,*ptr_res3,*ptr_res4,*ptr_res5, |
300 *ptr_res6; | 325 *ptr_res6,*ptr_res7,*ptr_res8,*ptr_res9,*ptr_res10,*ptr_res11,*ptr_res12; |
301 unsigned long int | 326 unsigned long int |
302 ul_res0,ul_res1,ul_res2,ul_res3,ul_res4,ul_res5, | 327 ul_res0,ul_res1,ul_res2,ul_res3,ul_res4,ul_res5, |
303 ul_res6,ul_res7,ul_res8,ul_res9,ul_res10,ul_res11,ul_res12; | 328 ul_res6,ul_res7,ul_res8,ul_res9,ul_res10,ul_res11,ul_res12; |
304 unsigned short int | 329 unsigned short int |
305 us_res0,us_res1,us_res2,us_res3,us_res4,us_res5, | 330 us_res0,us_res1,us_res2,us_res3,us_res4,us_res5, |
306 us_res6,us_res7,us_res8,us_res9,us_res10,us_res11,us_res12; | 331 us_res6,us_res7,us_res8,us_res9,us_res10,us_res11,us_res12; |
307 unsigned char | 332 unsigned char |
308 uc_res0,uc_res1,uc_res2,uc_res3,uc_res4,uc_res5, | 333 uc_res0,uc_res1,uc_res2,uc_res3,uc_res4,uc_res5, |
309 uc_res6,uc_res7,uc_res8,uc_res9,uc_res10,uc_res11,uc_res12; | 334 uc_res6,uc_res7,uc_res8,uc_res9,uc_res10,uc_res11,uc_res12; |
335 unsigned int | |
336 ui_res0,ui_res1,ui_res2,ui_res3,ui_res4,ui_res5,ui_res6,ui_res7,ui_res8,ui_res9, | |
337 ui_res10,ui_res11,ui_res12,ui_res13,ui_res14,ui_res15,ui_res16,ui_res17,ui_res18,ui_res19; | |
310 } AVCodecContext; | 338 } AVCodecContext; |
311 | 339 |
312 typedef struct AVCodec { | 340 typedef struct AVCodec { |
313 char *name; | 341 char *name; |
314 int type; | 342 int type; |