Audacity 3.2.0
ffmpeg-2.3.6-single-header.h
Go to the documentation of this file.
1// This header was generated from the FFMPEG headers
2#pragma once
3
4#include <errno.h>
5#include <time.h>
6#include <stdint.h>
7#include <stdlib.h>
8#include <limits.h>
9#include <stddef.h>
10#include <math.h>
11#include <stdarg.h>
12#include <inttypes.h>
13#include <stdio.h>
14#include <string.h>
15
16#define AVCODEC_AVCODEC_H
17
18#define AVUTIL_SAMPLEFMT_H
19
20#define AVUTIL_AVUTIL_H
21
22unsigned avutil_version(void);
23
24const char *avutil_configuration(void);
25
26const char *avutil_license(void);
27
36};
37
38const char *av_get_media_type_string(enum AVMediaType media_type);
39
40#define FF_LAMBDA_SHIFT 7
41#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
42#define FF_QP2LAMBDA 118
43#define FF_LAMBDA_MAX (256*128-1)
44
45#define FF_QUALITY_SCALE FF_LAMBDA_SCALE
46
47#define AV_NOPTS_VALUE ((int64_t)UINT64_C(0x8000000000000000))
48
49#define AV_TIME_BASE 1000000
50
51#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
52
62};
63
65
66#define AVUTIL_COMMON_H
67
68#define AVUTIL_ATTRIBUTES_H
69
70# define AV_GCC_VERSION_AT_LEAST(x,y) 0
71
72# define av_always_inline inline
73
74# define av_extern_inline inline
75
76# define av_noinline
77
78# define av_pure
79
80# define av_const
81
82# define av_cold
83
84# define av_flatten
85
86# define attribute_deprecated
87
88# define AV_NOWARN_DEPRECATED(code) code
89
90# define av_unused
91
92# define av_used
93
94# define av_alias
95
96# define av_uninit(x) x
97
98# define av_builtin_constant_p(x) 0
99# define av_printf_format(fmtpos, attrpos)
100
101# define av_noreturn
102
103#define AVUTIL_VERSION_H
104
105#define AVUTIL_MACROS_H
106
107#define AV_STRINGIFY(s) AV_TOSTRING(s)
108#define AV_TOSTRING(s) #s
109
110#define AV_GLUE(a, b) a ## b
111#define AV_JOIN(a, b) AV_GLUE(a, b)
112
113#define AV_PRAGMA(s) _Pragma(#s)
114
115#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
116#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
117#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
118
119#define LIBAVUTIL_VERSION_MAJOR 52
120#define LIBAVUTIL_VERSION_MINOR 92
121#define LIBAVUTIL_VERSION_MICRO 100
122
123#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
124 LIBAVUTIL_VERSION_MINOR, \
125 LIBAVUTIL_VERSION_MICRO)
126#define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \
127 LIBAVUTIL_VERSION_MINOR, \
128 LIBAVUTIL_VERSION_MICRO)
129#define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT
130
131#define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
132
133#define FF_API_GET_BITS_PER_SAMPLE_FMT (LIBAVUTIL_VERSION_MAJOR < 54)
134#define FF_API_FIND_OPT (LIBAVUTIL_VERSION_MAJOR < 54)
135#define FF_API_OLD_AVOPTIONS (LIBAVUTIL_VERSION_MAJOR < 54)
136#define FF_API_PIX_FMT (LIBAVUTIL_VERSION_MAJOR < 54)
137#define FF_API_CONTEXT_SIZE (LIBAVUTIL_VERSION_MAJOR < 54)
138#define FF_API_PIX_FMT_DESC (LIBAVUTIL_VERSION_MAJOR < 54)
139#define FF_API_AV_REVERSE (LIBAVUTIL_VERSION_MAJOR < 54)
140#define FF_API_AUDIOCONVERT (LIBAVUTIL_VERSION_MAJOR < 54)
141#define FF_API_CPU_FLAG_MMX2 (LIBAVUTIL_VERSION_MAJOR < 54)
142#define FF_API_SAMPLES_UTILS_RETURN_ZERO (LIBAVUTIL_VERSION_MAJOR < 54)
143#define FF_API_LLS_PRIVATE (LIBAVUTIL_VERSION_MAJOR < 54)
144#define FF_API_LLS1 (LIBAVUTIL_VERSION_MAJOR < 54)
145#define FF_API_AVFRAME_LAVC (LIBAVUTIL_VERSION_MAJOR < 54)
146#define FF_API_VDPAU (LIBAVUTIL_VERSION_MAJOR < 54)
147#define FF_API_GET_CHANNEL_LAYOUT_COMPAT (LIBAVUTIL_VERSION_MAJOR < 54)
148#define FF_API_OLD_OPENCL (LIBAVUTIL_VERSION_MAJOR < 54)
149#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 54)
150#define FF_API_INTFLOAT (LIBAVUTIL_VERSION_MAJOR < 54)
151#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 54)
152#define FF_API_AVFRAME_COLORSPACE (LIBAVUTIL_VERSION_MAJOR >= 52)
153
154#define FF_CONST_AVUTIL53
155
156# define AV_NE(be, le) (le)
157
158#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
159
160#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
161
162#define FF_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
163 : ((a) + (1<<(b)) - 1) >> (b))
164#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
165#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))
166#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
167#define FFSIGN(a) ((a) > 0 ? 1 : -1)
168
169#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
170#define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c)
171#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
172#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
173
174#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
175#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
176#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1))
177
178extern attribute_deprecated const uint8_t av_reverse[256];
179
180# define av_ceil_log2 av_ceil_log2_c
181# define av_clip av_clip_c
182# define av_clip64 av_clip64_c
183# define av_clip_uint8 av_clip_uint8_c
184# define av_clip_int8 av_clip_int8_c
185# define av_clip_uint16 av_clip_uint16_c
186# define av_clip_int16 av_clip_int16_c
187# define av_clipl_int32 av_clipl_int32_c
188# define av_clip_uintp2 av_clip_uintp2_c
189# define av_sat_add32 av_sat_add32_c
190# define av_sat_dadd32 av_sat_dadd32_c
191# define av_clipf av_clipf_c
192# define av_clipd av_clipd_c
193# define av_popcount av_popcount_c
194# define av_popcount64 av_popcount64_c
195
196av_const int av_log2(unsigned v);
197
198av_const int av_log2_16bit(unsigned v);
199
200static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
201{
202 if (a < amin) return amin;
203 else if (a > amax) return amax;
204 else return a;
205}
206
207static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax)
208{
209 if (a < amin) return amin;
210 else if (a > amax) return amax;
211 else return a;
212}
213
215{
216 if (a&(~0xFF)) return (-a)>>31;
217 else return a;
218}
219
221{
222 if ((a+0x80) & ~0xFF) return (a>>31) ^ 0x7F;
223 else return a;
224}
225
227{
228 if (a&(~0xFFFF)) return (-a)>>31;
229 else return a;
230}
231
233{
234 if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
235 else return a;
236}
237
239{
240 if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF);
241 else return (int32_t)a;
242}
243
244static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
245{
246 if (a & ~((1<<p) - 1)) return -a >> 31 & ((1<<p) - 1);
247 else return a;
248}
249
250static av_always_inline int av_sat_add32_c(int a, int b)
251{
252 return av_clipl_int32((int64_t)a + b);
253}
254
255static av_always_inline int av_sat_dadd32_c(int a, int b)
256{
257 return av_sat_add32(a, av_sat_add32(b, b));
258}
259
260static av_always_inline av_const float av_clipf_c(float a, float amin, float amax)
261{
262 if (a < amin) return amin;
263 else if (a > amax) return amax;
264 else return a;
265}
266
267static av_always_inline av_const double av_clipd_c(double a, double amin, double amax)
268{
269 if (a < amin) return amin;
270 else if (a > amax) return amax;
271 else return a;
272}
273
275{
276 return av_log2((x - 1) << 1);
277}
278
280{
281 x -= (x >> 1) & 0x55555555;
282 x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
283 x = (x + (x >> 4)) & 0x0F0F0F0F;
284 x += x >> 8;
285 return (x + (x >> 16)) & 0x3F;
286}
287
289{
290 return av_popcount((uint32_t)x) + av_popcount((uint32_t)(x >> 32));
291}
292
293#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
294#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
295
296#define GET_UTF8(val, GET_BYTE, ERROR)\
297 val= GET_BYTE;\
298 {\
299 uint32_t top = (val & 128) >> 1;\
300 if ((val & 0xc0) == 0x80 || val >= 0xFE)\
301 ERROR\
302 while (val & top) {\
303 int tmp= GET_BYTE - 128;\
304 if(tmp>>6)\
305 ERROR\
306 val= (val<<6) + tmp;\
307 top <<= 5;\
308 }\
309 val &= (top << 1) - 1;\
310 }
311
312#define GET_UTF16(val, GET_16BIT, ERROR)\
313 val = GET_16BIT;\
314 {\
315 unsigned int hi = val - 0xD800;\
316 if (hi < 0x800) {\
317 val = GET_16BIT - 0xDC00;\
318 if (val > 0x3FFU || hi > 0x3FFU)\
319 ERROR\
320 val += (hi<<10) + 0x10000;\
321 }\
322 }\
323
324#define PUT_UTF8(val, tmp, PUT_BYTE)\
325 {\
326 int bytes, shift;\
327 uint32_t in = val;\
328 if (in < 0x80) {\
329 tmp = in;\
330 PUT_BYTE\
331 } else {\
332 bytes = (av_log2(in) + 4) / 5;\
333 shift = (bytes - 1) * 6;\
334 tmp = (256 - (256 >> bytes)) | (in >> shift);\
335 PUT_BYTE\
336 while (shift >= 6) {\
337 shift -= 6;\
338 tmp = 0x80 | ((in >> shift) & 0x3f);\
339 PUT_BYTE\
340 }\
341 }\
342 }
343
344#define PUT_UTF16(val, tmp, PUT_16BIT)\
345 {\
346 uint32_t in = val;\
347 if (in < 0x10000) {\
348 tmp = in;\
349 PUT_16BIT\
350 } else {\
351 tmp = 0xD800 | ((in - 0x10000) >> 10);\
352 PUT_16BIT\
353 tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
354 PUT_16BIT\
355 }\
356 }\
357
358#define AVUTIL_MEM_H
359
360#define AVUTIL_ERROR_H
361
362#define AVERROR(e) (e)
363#define AVUNERROR(e) (e)
364
365#define FFERRTAG(a, b, c, d) (-(int)MKTAG(a, b, c, d))
366
367#define AVERROR_BSF_NOT_FOUND FFERRTAG(0xF8,'B','S','F')
368#define AVERROR_BUG FFERRTAG( 'B','U','G','!')
369#define AVERROR_BUFFER_TOO_SMALL FFERRTAG( 'B','U','F','S')
370#define AVERROR_DECODER_NOT_FOUND FFERRTAG(0xF8,'D','E','C')
371#define AVERROR_DEMUXER_NOT_FOUND FFERRTAG(0xF8,'D','E','M')
372#define AVERROR_ENCODER_NOT_FOUND FFERRTAG(0xF8,'E','N','C')
373#define AVERROR_EOF FFERRTAG( 'E','O','F',' ')
374#define AVERROR_EXIT FFERRTAG( 'E','X','I','T')
375#define AVERROR_EXTERNAL FFERRTAG( 'E','X','T',' ')
376#define AVERROR_FILTER_NOT_FOUND FFERRTAG(0xF8,'F','I','L')
377#define AVERROR_INVALIDDATA FFERRTAG( 'I','N','D','A')
378#define AVERROR_MUXER_NOT_FOUND FFERRTAG(0xF8,'M','U','X')
379#define AVERROR_OPTION_NOT_FOUND FFERRTAG(0xF8,'O','P','T')
380#define AVERROR_PATCHWELCOME FFERRTAG( 'P','A','W','E')
381#define AVERROR_PROTOCOL_NOT_FOUND FFERRTAG(0xF8,'P','R','O')
382
383#define AVERROR_STREAM_NOT_FOUND FFERRTAG(0xF8,'S','T','R')
384
385#define AVERROR_BUG2 FFERRTAG( 'B','U','G',' ')
386#define AVERROR_UNKNOWN FFERRTAG( 'U','N','K','N')
387#define AVERROR_EXPERIMENTAL (-0x2bb2afa8)
388
389#define AV_ERROR_MAX_STRING_SIZE 64
390
391int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
392
393static inline char *av_make_error_string(char *errbuf, size_t errbuf_size, int errnum)
394{
395 av_strerror(errnum, errbuf, errbuf_size);
396 return errbuf;
397}
398
399#define av_err2str(errnum) \
400 av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum)
401
402 #define DECLARE_ALIGNED(n,t,v) t v
403 #define DECLARE_ASM_CONST(n,t,v) static const t v
404
405 #define av_malloc_attrib
406
407 #define av_alloc_size(...)
408
410
411av_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t size)
412{
413 if (!size || nmemb >= INT_MAX / size)
414 return NULL;
416}
417
418void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
419
420void *av_realloc_f(void *ptr, size_t nelem, size_t elsize);
421
422int av_reallocp(void *ptr, size_t size);
423
424av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size);
425
426av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
427
428void av_free(void *ptr);
429
431
432void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib;
433
434av_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t size)
435{
436 if (!size || nmemb >= INT_MAX / size)
437 return NULL;
439}
440
441char *av_strdup(const char *s) av_malloc_attrib;
442
443void *av_memdup(const void *p, size_t size);
444
445void av_freep(void *ptr);
446
447void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);
448
449int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem);
450
451void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
452 const uint8_t *elem_data);
453
454static inline int av_size_mult(size_t a, size_t b, size_t *r)
455{
456 size_t t = a * b;
457
458 if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)
459 return AVERROR(EINVAL);
460 *r = t;
461 return 0;
462}
463
464void av_max_alloc(size_t max);
465
466void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
467
468void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
469
470void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
471
472#define AVUTIL_RATIONAL_H
473
474typedef struct AVRational{
475 int num;
476 int den;
478
479static inline AVRational av_make_q(int num, int den)
480{
481 AVRational r = { num, den };
482 return r;
483}
484
485static inline int av_cmp_q(AVRational a, AVRational b){
486 const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den;
487
488 if(tmp) return (int)((tmp ^ a.den ^ b.den)>>63)|1;
489 else if(b.den && a.den) return 0;
490 else if(a.num && b.num) return (a.num>>31) - (b.num>>31);
491 else return INT_MIN;
492}
493
494static inline double av_q2d(AVRational a){
495 return a.num / (double) a.den;
496}
497
498int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max);
499
501
503
505
507
509{
510 AVRational r = { q.den, q.num };
511 return r;
512}
513
514AVRational av_d2q(double d, int max) av_const;
515
517
519
520#define AVUTIL_MATHEMATICS_H
521
522#define AVUTIL_INTFLOAT_H
523
525 uint32_t i;
526 float f;
527};
528
530 uint64_t i;
531 double f;
532};
533
534static av_always_inline float av_int2float(uint32_t i)
535{
536 union av_intfloat32 v;
537 v.i = i;
538 return v.f;
539}
540
541static av_always_inline uint32_t av_float2int(float f)
542{
543 union av_intfloat32 v;
544 v.f = f;
545 return v.i;
546}
547
548static av_always_inline double av_int2double(uint64_t i)
549{
550 union av_intfloat64 v;
551 v.i = i;
552 return v.f;
553}
554
555static av_always_inline uint64_t av_double2int(double f)
556{
557 union av_intfloat64 v;
558 v.f = f;
559 return v.i;
560}
561
562#define M_E 2.7182818284590452354
563#define M_LN2 0.69314718055994530942
564#define M_LN10 2.30258509299404568402
565#define M_LOG2_10 3.32192809488736234787
566#define M_PHI 1.61803398874989484820
567#define M_PI 3.14159265358979323846
568#define M_PI_2 1.57079632679489661923
569#define M_SQRT1_2 0.70710678118654752440
570#define M_SQRT2 1.41421356237309504880
571#define NAN av_int2float(0x7fc00000)
572#define INFINITY av_int2float(0x7f800000)
573
581};
582
583int64_t av_const av_gcd(int64_t a, int64_t b);
584
585int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const;
586
587int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const;
588
589int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const;
590
591int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq,
592 enum AVRounding) av_const;
593
594int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
595
596int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);
597
598int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb);
599
600int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc);
601
602#define AVUTIL_LOG_H
603
604typedef enum {
624
625struct AVOptionRanges;
626
627typedef struct AVClass {
628
629 const char* class_name;
630
631 const char* (*item_name)(void* ctx);
632
633 const struct AVOption *option;
634
636
638
640
641 void* (*child_next)(void *obj, void *prev);
642
643 const struct AVClass* (*child_class_next)(const struct AVClass *prev);
644
646
648
649 int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
651
652#define AV_LOG_QUIET -8
653
654#define AV_LOG_PANIC 0
655
656#define AV_LOG_FATAL 8
657
658#define AV_LOG_ERROR 16
659
660#define AV_LOG_WARNING 24
661
662#define AV_LOG_INFO 32
663
664#define AV_LOG_VERBOSE 40
665
666#define AV_LOG_DEBUG 48
667
668#define AV_LOG_MAX_OFFSET (AV_LOG_DEBUG - AV_LOG_QUIET)
669
670#define AV_LOG_C(x) (x << 8)
671
672void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
673
674void av_vlog(void *avcl, int level, const char *fmt, va_list vl);
675
677
678void av_log_set_level(int level);
679
680void av_log_set_callback(void (*callback)(void*, int, const char*, va_list));
681
682void av_log_default_callback(void *avcl, int level, const char *fmt,
683 va_list vl);
684
685const char* av_default_item_name(void* ctx);
687
688void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
689 char *line, int line_size, int *print_prefix);
690
691# define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
692
693#define AV_LOG_SKIP_REPEATED 1
694
695#define AV_LOG_PRINT_LEVEL 2
696
697void av_log_set_flags(int arg);
699
700#define AVUTIL_PIXFMT_H
701
702#define AVPALETTE_SIZE 1024
703#define AVPALETTE_COUNT 256
704
724#define AV_PIX_FMT_XVMC AV_PIX_FMT_XVMC_MPEG2_IDCT
735
740
753
758
763
767
776
784
798
806
809
828
830
836
841
843
845
856
877
890
892
893#define AVUTIL_OLD_PIX_FMTS_H
894
923
928
941
946
951
955
964
972
986
994
999 PIX_FMT_0RGB=0x123+4,
1005
1022
1024};
1025
1026#define AV_PIX_FMT_Y400A AV_PIX_FMT_GRAY8A
1027#define AV_PIX_FMT_GBR24P AV_PIX_FMT_GBRP
1028
1029# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##le
1030
1031#define AV_PIX_FMT_RGB32 AV_PIX_FMT_NE(ARGB, BGRA)
1032#define AV_PIX_FMT_RGB32_1 AV_PIX_FMT_NE(RGBA, ABGR)
1033#define AV_PIX_FMT_BGR32 AV_PIX_FMT_NE(ABGR, RGBA)
1034#define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB)
1035#define AV_PIX_FMT_0RGB32 AV_PIX_FMT_NE(0RGB, BGR0)
1036#define AV_PIX_FMT_0BGR32 AV_PIX_FMT_NE(0BGR, RGB0)
1037
1038#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
1039#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
1040#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
1041#define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE)
1042#define AV_PIX_FMT_RGB444 AV_PIX_FMT_NE(RGB444BE, RGB444LE)
1043#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE)
1044#define AV_PIX_FMT_BGR48 AV_PIX_FMT_NE(BGR48BE, BGR48LE)
1045#define AV_PIX_FMT_BGR565 AV_PIX_FMT_NE(BGR565BE, BGR565LE)
1046#define AV_PIX_FMT_BGR555 AV_PIX_FMT_NE(BGR555BE, BGR555LE)
1047#define AV_PIX_FMT_BGR444 AV_PIX_FMT_NE(BGR444BE, BGR444LE)
1048#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE)
1049
1050#define AV_PIX_FMT_YUV420P9 AV_PIX_FMT_NE(YUV420P9BE , YUV420P9LE)
1051#define AV_PIX_FMT_YUV422P9 AV_PIX_FMT_NE(YUV422P9BE , YUV422P9LE)
1052#define AV_PIX_FMT_YUV444P9 AV_PIX_FMT_NE(YUV444P9BE , YUV444P9LE)
1053#define AV_PIX_FMT_YUV420P10 AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE)
1054#define AV_PIX_FMT_YUV422P10 AV_PIX_FMT_NE(YUV422P10BE, YUV422P10LE)
1055#define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE)
1056#define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE)
1057#define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE)
1058#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE)
1059#define AV_PIX_FMT_YUV420P14 AV_PIX_FMT_NE(YUV420P14BE, YUV420P14LE)
1060#define AV_PIX_FMT_YUV422P14 AV_PIX_FMT_NE(YUV422P14BE, YUV422P14LE)
1061#define AV_PIX_FMT_YUV444P14 AV_PIX_FMT_NE(YUV444P14BE, YUV444P14LE)
1062#define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE)
1063#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
1064#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
1065
1066#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE)
1067#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
1068#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE)
1069#define AV_PIX_FMT_GBRP14 AV_PIX_FMT_NE(GBRP14BE, GBRP14LE)
1070#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
1071#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
1072
1073#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE)
1074#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE)
1075#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE)
1076#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE)
1077
1078#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
1079#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
1080#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
1081#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE)
1082#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE)
1083#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE)
1084#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE)
1085#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE)
1086#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)
1087
1088#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE)
1089#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE)
1090
1091#define PixelFormat AVPixelFormat
1092
1093#define PIX_FMT_Y400A AV_PIX_FMT_Y400A
1094#define PIX_FMT_GBR24P AV_PIX_FMT_GBR24P
1095
1096#define PIX_FMT_NE(be, le) AV_PIX_FMT_NE(be, le)
1097
1098#define PIX_FMT_RGB32 AV_PIX_FMT_RGB32
1099#define PIX_FMT_RGB32_1 AV_PIX_FMT_RGB32_1
1100#define PIX_FMT_BGR32 AV_PIX_FMT_BGR32
1101#define PIX_FMT_BGR32_1 AV_PIX_FMT_BGR32_1
1102#define PIX_FMT_0RGB32 AV_PIX_FMT_0RGB32
1103#define PIX_FMT_0BGR32 AV_PIX_FMT_0BGR32
1104
1105#define PIX_FMT_GRAY16 AV_PIX_FMT_GRAY16
1106#define PIX_FMT_RGB48 AV_PIX_FMT_RGB48
1107#define PIX_FMT_RGB565 AV_PIX_FMT_RGB565
1108#define PIX_FMT_RGB555 AV_PIX_FMT_RGB555
1109#define PIX_FMT_RGB444 AV_PIX_FMT_RGB444
1110#define PIX_FMT_BGR48 AV_PIX_FMT_BGR48
1111#define PIX_FMT_BGR565 AV_PIX_FMT_BGR565
1112#define PIX_FMT_BGR555 AV_PIX_FMT_BGR555
1113#define PIX_FMT_BGR444 AV_PIX_FMT_BGR444
1114
1115#define PIX_FMT_YUV420P9 AV_PIX_FMT_YUV420P9
1116#define PIX_FMT_YUV422P9 AV_PIX_FMT_YUV422P9
1117#define PIX_FMT_YUV444P9 AV_PIX_FMT_YUV444P9
1118#define PIX_FMT_YUV420P10 AV_PIX_FMT_YUV420P10
1119#define PIX_FMT_YUV422P10 AV_PIX_FMT_YUV422P10
1120#define PIX_FMT_YUV444P10 AV_PIX_FMT_YUV444P10
1121#define PIX_FMT_YUV420P12 AV_PIX_FMT_YUV420P12
1122#define PIX_FMT_YUV422P12 AV_PIX_FMT_YUV422P12
1123#define PIX_FMT_YUV444P12 AV_PIX_FMT_YUV444P12
1124#define PIX_FMT_YUV420P14 AV_PIX_FMT_YUV420P14
1125#define PIX_FMT_YUV422P14 AV_PIX_FMT_YUV422P14
1126#define PIX_FMT_YUV444P14 AV_PIX_FMT_YUV444P14
1127#define PIX_FMT_YUV420P16 AV_PIX_FMT_YUV420P16
1128#define PIX_FMT_YUV422P16 AV_PIX_FMT_YUV422P16
1129#define PIX_FMT_YUV444P16 AV_PIX_FMT_YUV444P16
1130
1131#define PIX_FMT_RGBA64 AV_PIX_FMT_RGBA64
1132#define PIX_FMT_BGRA64 AV_PIX_FMT_BGRA64
1133#define PIX_FMT_GBRP9 AV_PIX_FMT_GBRP9
1134#define PIX_FMT_GBRP10 AV_PIX_FMT_GBRP10
1135#define PIX_FMT_GBRP12 AV_PIX_FMT_GBRP12
1136#define PIX_FMT_GBRP14 AV_PIX_FMT_GBRP14
1137#define PIX_FMT_GBRP16 AV_PIX_FMT_GBRP16
1138
1150};
1151
1169};
1170
1184};
1185#define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG
1186
1192};
1193
1203};
1204
1205static inline void *av_x_if_null(const void *p, const void *x)
1206{
1207 return (void *)(intptr_t)(p ? p : x);
1208}
1209
1210unsigned av_int_list_length_for_size(unsigned elsize,
1211 const void *list, uint64_t term) av_pure;
1212
1213#define av_int_list_length(list, term) \
1214 av_int_list_length_for_size(sizeof(*(list)), list, term)
1215
1216FILE *av_fopen_utf8(const char *path, const char *mode);
1217
1219
1227
1233
1236
1237const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);
1238
1240
1241enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar);
1242
1244
1246
1247char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
1248
1251
1253
1255
1256int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
1257 enum AVSampleFormat sample_fmt, int align);
1258
1259int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
1260 const uint8_t *buf,
1261 int nb_channels, int nb_samples,
1262 enum AVSampleFormat sample_fmt, int align);
1263
1264int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
1265 int nb_samples, enum AVSampleFormat sample_fmt, int align);
1266
1267int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,
1268 int nb_samples, enum AVSampleFormat sample_fmt, int align);
1269
1270int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset,
1271 int src_offset, int nb_samples, int nb_channels,
1272 enum AVSampleFormat sample_fmt);
1273
1274int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples,
1275 int nb_channels, enum AVSampleFormat sample_fmt);
1276
1277#define AVUTIL_BUFFER_H
1278
1279typedef struct AVBuffer AVBuffer;
1280
1281typedef struct AVBufferRef {
1283
1284 uint8_t *data;
1285
1286 int size;
1288
1290
1292
1293#define AV_BUFFER_FLAG_READONLY (1 << 0)
1294
1296 void (*free)(void *opaque, uint8_t *data),
1297 void *opaque, int flags);
1298
1299void av_buffer_default_free(void *opaque, uint8_t *data);
1300
1302
1304
1306
1308
1310
1312
1314
1316
1318
1320
1322
1323#define AVUTIL_CPU_H
1324
1325#define AV_CPU_FLAG_FORCE 0x80000000
1326
1327#define AV_CPU_FLAG_MMX 0x0001
1328#define AV_CPU_FLAG_MMXEXT 0x0002
1329#define AV_CPU_FLAG_MMX2 0x0002
1330#define AV_CPU_FLAG_3DNOW 0x0004
1331#define AV_CPU_FLAG_SSE 0x0008
1332#define AV_CPU_FLAG_SSE2 0x0010
1333#define AV_CPU_FLAG_SSE2SLOW 0x40000000
1334
1335#define AV_CPU_FLAG_3DNOWEXT 0x0020
1336#define AV_CPU_FLAG_SSE3 0x0040
1337#define AV_CPU_FLAG_SSE3SLOW 0x20000000
1338
1339#define AV_CPU_FLAG_SSSE3 0x0080
1340#define AV_CPU_FLAG_ATOM 0x10000000
1341#define AV_CPU_FLAG_SSE4 0x0100
1342#define AV_CPU_FLAG_SSE42 0x0200
1343#define AV_CPU_FLAG_AVX 0x4000
1344#define AV_CPU_FLAG_XOP 0x0400
1345#define AV_CPU_FLAG_FMA4 0x0800
1346
1347#define AV_CPU_FLAG_CMOV 0x1001000
1348
1349#define AV_CPU_FLAG_AVX2 0x8000
1350#define AV_CPU_FLAG_FMA3 0x10000
1351#define AV_CPU_FLAG_BMI1 0x20000
1352#define AV_CPU_FLAG_BMI2 0x40000
1353
1354#define AV_CPU_FLAG_ALTIVEC 0x0001
1355
1356#define AV_CPU_FLAG_ARMV5TE (1 << 0)
1357#define AV_CPU_FLAG_ARMV6 (1 << 1)
1358#define AV_CPU_FLAG_ARMV6T2 (1 << 2)
1359#define AV_CPU_FLAG_VFP (1 << 3)
1360#define AV_CPU_FLAG_VFPV3 (1 << 4)
1361#define AV_CPU_FLAG_NEON (1 << 5)
1362#define AV_CPU_FLAG_ARMV8 (1 << 6)
1363
1365
1366void av_force_cpu_flags(int flags);
1367
1369
1371int av_parse_cpu_flags(const char *s);
1372
1373int av_parse_cpu_caps(unsigned *flags, const char *s);
1374
1376
1377#define AVUTIL_CHANNEL_LAYOUT_H
1378
1379#define AV_CH_FRONT_LEFT 0x00000001
1380#define AV_CH_FRONT_RIGHT 0x00000002
1381#define AV_CH_FRONT_CENTER 0x00000004
1382#define AV_CH_LOW_FREQUENCY 0x00000008
1383#define AV_CH_BACK_LEFT 0x00000010
1384#define AV_CH_BACK_RIGHT 0x00000020
1385#define AV_CH_FRONT_LEFT_OF_CENTER 0x00000040
1386#define AV_CH_FRONT_RIGHT_OF_CENTER 0x00000080
1387#define AV_CH_BACK_CENTER 0x00000100
1388#define AV_CH_SIDE_LEFT 0x00000200
1389#define AV_CH_SIDE_RIGHT 0x00000400
1390#define AV_CH_TOP_CENTER 0x00000800
1391#define AV_CH_TOP_FRONT_LEFT 0x00001000
1392#define AV_CH_TOP_FRONT_CENTER 0x00002000
1393#define AV_CH_TOP_FRONT_RIGHT 0x00004000
1394#define AV_CH_TOP_BACK_LEFT 0x00008000
1395#define AV_CH_TOP_BACK_CENTER 0x00010000
1396#define AV_CH_TOP_BACK_RIGHT 0x00020000
1397#define AV_CH_STEREO_LEFT 0x20000000
1398#define AV_CH_STEREO_RIGHT 0x40000000
1399#define AV_CH_WIDE_LEFT 0x0000000080000000ULL
1400#define AV_CH_WIDE_RIGHT 0x0000000100000000ULL
1401#define AV_CH_SURROUND_DIRECT_LEFT 0x0000000200000000ULL
1402#define AV_CH_SURROUND_DIRECT_RIGHT 0x0000000400000000ULL
1403#define AV_CH_LOW_FREQUENCY_2 0x0000000800000000ULL
1404
1405#define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL
1406
1407#define AV_CH_LAYOUT_MONO (AV_CH_FRONT_CENTER)
1408#define AV_CH_LAYOUT_STEREO (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
1409#define AV_CH_LAYOUT_2POINT1 (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY)
1410#define AV_CH_LAYOUT_2_1 (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER)
1411#define AV_CH_LAYOUT_SURROUND (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER)
1412#define AV_CH_LAYOUT_3POINT1 (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY)
1413#define AV_CH_LAYOUT_4POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER)
1414#define AV_CH_LAYOUT_4POINT1 (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY)
1415#define AV_CH_LAYOUT_2_2 (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
1416#define AV_CH_LAYOUT_QUAD (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1417#define AV_CH_LAYOUT_5POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
1418#define AV_CH_LAYOUT_5POINT1 (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY)
1419#define AV_CH_LAYOUT_5POINT0_BACK (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1420#define AV_CH_LAYOUT_5POINT1_BACK (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY)
1421#define AV_CH_LAYOUT_6POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)
1422#define AV_CH_LAYOUT_6POINT0_FRONT (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1423#define AV_CH_LAYOUT_HEXAGONAL (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)
1424#define AV_CH_LAYOUT_6POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)
1425#define AV_CH_LAYOUT_6POINT1_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)
1426#define AV_CH_LAYOUT_6POINT1_FRONT (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)
1427#define AV_CH_LAYOUT_7POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1428#define AV_CH_LAYOUT_7POINT0_FRONT (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1429#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1430#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1431#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1432#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
1433#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
1434
1445
1446uint64_t av_get_channel_layout(const char *name);
1447
1448void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
1449
1450struct AVBPrint;
1451
1452void av_bprint_channel_layout(struct AVBPrint *bp, int nb_channels, uint64_t channel_layout);
1453
1454int av_get_channel_layout_nb_channels(uint64_t channel_layout);
1455
1456int64_t av_get_default_channel_layout(int nb_channels);
1457
1458int av_get_channel_layout_channel_index(uint64_t channel_layout,
1459 uint64_t channel);
1460
1461uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index);
1462
1463const char *av_get_channel_name(uint64_t channel);
1464
1465const char *av_get_channel_description(uint64_t channel);
1466
1467int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
1468 const char **name);
1469
1470#define AVUTIL_DICT_H
1471
1472#define AV_DICT_MATCH_CASE 1
1473#define AV_DICT_IGNORE_SUFFIX 2
1474
1475#define AV_DICT_DONT_STRDUP_KEY 4
1476
1477#define AV_DICT_DONT_STRDUP_VAL 8
1478
1479#define AV_DICT_DONT_OVERWRITE 16
1480#define AV_DICT_APPEND 32
1481
1482typedef struct AVDictionaryEntry {
1483 char *key;
1484 char *value;
1486
1488
1490 const AVDictionaryEntry *prev, int flags);
1491
1493
1494int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
1495
1497 const char *key_val_sep, const char *pairs_sep,
1498 int flags);
1499
1501
1503
1504#define AVUTIL_FRAME_H
1505
1507
1509
1511
1513
1515
1517
1519
1521};
1522
1523typedef struct AVFrameSideData {
1525 uint8_t *data;
1526 int size;
1529
1530typedef struct AVFrame {
1531#define AV_NUM_DATA_POINTERS 8
1532
1534
1536
1537 uint8_t **extended_data;
1538
1540
1542
1544
1546
1548
1551
1553
1554 int64_t pts;
1555
1556 int64_t pkt_pts;
1557
1558 int64_t pkt_dts;
1559
1561
1563
1565
1568
1571
1574
1577
1580
1581 int16_t (*motion_val[2])[2];
1582
1584 uint32_t *mb_type;
1585
1588
1590 int8_t *ref_index[2];
1591
1592 void *opaque;
1593
1595
1597 int type;
1598
1600
1602
1604
1606
1609
1612
1614
1616
1621
1623
1625
1627
1629
1631
1633
1636
1637#define AV_FRAME_FLAG_CORRUPT (1 << 0)
1638
1640
1642
1644
1646
1648
1650
1652
1653 int64_t pkt_pos;
1654
1656
1658
1660#define FF_DECODE_ERROR_INVALID_BITSTREAM 1
1661#define FF_DECODE_ERROR_MISSING_REFERENCE 2
1662
1664
1666
1669
1672int64_t av_frame_get_pkt_duration (const AVFrame *frame);
1673void av_frame_set_pkt_duration (AVFrame *frame, int64_t val);
1674int64_t av_frame_get_pkt_pos (const AVFrame *frame);
1675void av_frame_set_pkt_pos (AVFrame *frame, int64_t val);
1677void av_frame_set_channel_layout (AVFrame *frame, int64_t val);
1679void av_frame_set_channels (AVFrame *frame, int val);
1681void av_frame_set_sample_rate (AVFrame *frame, int val);
1687void av_frame_set_pkt_size(AVFrame *frame, int val);
1689int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type);
1690int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type);
1695
1697
1699
1701
1702int av_frame_ref(AVFrame *dst, const AVFrame *src);
1703
1705
1707
1709
1710int av_frame_get_buffer(AVFrame *frame, int align);
1711
1713
1715
1716int av_frame_copy(AVFrame *dst, const AVFrame *src);
1717
1719
1721
1723 enum AVFrameSideDataType type,
1724 int size);
1725
1727 enum AVFrameSideDataType type);
1728
1730
1731#define AVCODEC_VERSION_H
1732
1733#define LIBAVCODEC_VERSION_MAJOR 55
1734#define LIBAVCODEC_VERSION_MINOR 69
1735#define LIBAVCODEC_VERSION_MICRO 100
1736
1737#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
1738 LIBAVCODEC_VERSION_MINOR, \
1739 LIBAVCODEC_VERSION_MICRO)
1740#define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
1741 LIBAVCODEC_VERSION_MINOR, \
1742 LIBAVCODEC_VERSION_MICRO)
1743#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
1744
1745#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
1746
1747#define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 56)
1748#define FF_API_OLD_DECODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 56)
1749#define FF_API_OLD_ENCODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 56)
1750#define FF_API_OLD_ENCODE_VIDEO (LIBAVCODEC_VERSION_MAJOR < 56)
1751#define FF_API_CODEC_ID (LIBAVCODEC_VERSION_MAJOR < 56)
1752#define FF_API_AUDIO_CONVERT (LIBAVCODEC_VERSION_MAJOR < 56)
1753#define FF_API_AVCODEC_RESAMPLE FF_API_AUDIO_CONVERT
1754#define FF_API_DEINTERLACE (LIBAVCODEC_VERSION_MAJOR < 56)
1755#define FF_API_DESTRUCT_PACKET (LIBAVCODEC_VERSION_MAJOR < 56)
1756#define FF_API_GET_BUFFER (LIBAVCODEC_VERSION_MAJOR < 56)
1757#define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 56)
1758#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 56)
1759#define FF_API_CAP_VDPAU (LIBAVCODEC_VERSION_MAJOR < 56)
1760#define FF_API_BUFS_VDPAU (LIBAVCODEC_VERSION_MAJOR < 56)
1761#define FF_API_VOXWARE (LIBAVCODEC_VERSION_MAJOR < 56)
1762#define FF_API_SET_DIMENSIONS (LIBAVCODEC_VERSION_MAJOR < 56)
1763#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 56)
1764#define FF_API_AC_VLC (LIBAVCODEC_VERSION_MAJOR < 56)
1765#define FF_API_OLD_MSMPEG4 (LIBAVCODEC_VERSION_MAJOR < 56)
1766#define FF_API_ASPECT_EXTENDED (LIBAVCODEC_VERSION_MAJOR < 56)
1767#define FF_API_THREAD_OPAQUE (LIBAVCODEC_VERSION_MAJOR < 56)
1768#define FF_API_CODEC_PKT (LIBAVCODEC_VERSION_MAJOR < 56)
1769#define FF_API_ARCH_ALPHA (LIBAVCODEC_VERSION_MAJOR < 56)
1770#define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 56)
1771#define FF_API_QSCALE_TYPE (LIBAVCODEC_VERSION_MAJOR < 56)
1772#define FF_API_MB_TYPE (LIBAVCODEC_VERSION_MAJOR < 56)
1773#define FF_API_MAX_BFRAMES (LIBAVCODEC_VERSION_MAJOR < 56)
1774#define FF_API_FAST_MALLOC (LIBAVCODEC_VERSION_MAJOR < 56)
1775#define FF_API_NEG_LINESIZES (LIBAVCODEC_VERSION_MAJOR < 56)
1776#define FF_API_EMU_EDGE (LIBAVCODEC_VERSION_MAJOR < 56)
1777#define FF_API_ARCH_SH4 (LIBAVCODEC_VERSION_MAJOR < 56)
1778#define FF_API_ARCH_SPARC (LIBAVCODEC_VERSION_MAJOR < 56)
1779#define FF_API_INPUT_PRESERVED (LIBAVCODEC_VERSION_MAJOR < 57)
1780#define FF_API_NORMALIZE_AQP (LIBAVCODEC_VERSION_MAJOR < 57)
1781#define FF_API_GMC (LIBAVCODEC_VERSION_MAJOR < 57)
1782#define FF_API_MV0 (LIBAVCODEC_VERSION_MAJOR < 57)
1783#define FF_API_CODEC_NAME (LIBAVCODEC_VERSION_MAJOR < 57)
1784
1787
1973
1975 AV_CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
1976 AV_CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
1977 AV_CODEC_ID_EXR = MKBETAG('0','E','X','R'),
1978 AV_CODEC_ID_AVRP = MKBETAG('A','V','R','P'),
1979
1980 AV_CODEC_ID_012V = MKBETAG('0','1','2','V'),
1981 AV_CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'),
1982 AV_CODEC_ID_AVUI = MKBETAG('A','V','U','I'),
1983 AV_CODEC_ID_AYUV = MKBETAG('A','Y','U','V'),
1985 AV_CODEC_ID_V308 = MKBETAG('V','3','0','8'),
1986 AV_CODEC_ID_V408 = MKBETAG('V','4','0','8'),
1987 AV_CODEC_ID_YUV4 = MKBETAG('Y','U','V','4'),
1988 AV_CODEC_ID_SANM = MKBETAG('S','A','N','M'),
1989 AV_CODEC_ID_PAF_VIDEO = MKBETAG('P','A','F','V'),
1990 AV_CODEC_ID_AVRN = MKBETAG('A','V','R','n'),
1991 AV_CODEC_ID_CPIA = MKBETAG('C','P','I','A'),
1992 AV_CODEC_ID_XFACE = MKBETAG('X','F','A','C'),
1993 AV_CODEC_ID_SGIRLE = MKBETAG('S','G','I','R'),
1994 AV_CODEC_ID_MVC1 = MKBETAG('M','V','C','1'),
1995 AV_CODEC_ID_MVC2 = MKBETAG('M','V','C','2'),
1996 AV_CODEC_ID_SNOW = MKBETAG('S','N','O','W'),
1997 AV_CODEC_ID_WEBP = MKBETAG('W','E','B','P'),
1998 AV_CODEC_ID_SMVJPEG = MKBETAG('S','M','V','J'),
1999 AV_CODEC_ID_HEVC = MKBETAG('H','2','6','5'),
2000#define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC
2001 AV_CODEC_ID_VP7 = MKBETAG('V','P','7','0'),
2002
2037
2070 AV_CODEC_ID_VIMA = MKBETAG('V','I','M','A'),
2071 AV_CODEC_ID_ADPCM_AFC = MKBETAG('A','F','C',' '),
2073 AV_CODEC_ID_ADPCM_DTK = MKBETAG('D','T','K',' '),
2076
2079
2082
2087
2156 AV_CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
2157 AV_CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'),
2158 AV_CODEC_ID_PAF_AUDIO = MKBETAG('P','A','F','A'),
2159 AV_CODEC_ID_OPUS = MKBETAG('O','P','U','S'),
2160 AV_CODEC_ID_TAK = MKBETAG('t','B','a','K'),
2161 AV_CODEC_ID_EVRC = MKBETAG('s','e','v','c'),
2162 AV_CODEC_ID_SMV = MKBETAG('s','s','m','v'),
2163 AV_CODEC_ID_DSD_LSBF = MKBETAG('D','S','D','L'),
2164 AV_CODEC_ID_DSD_MSBF = MKBETAG('D','S','D','M'),
2167
2178 AV_CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'),
2179 AV_CODEC_ID_EIA_608 = MKBETAG('c','6','0','8'),
2180 AV_CODEC_ID_JACOSUB = MKBETAG('J','S','U','B'),
2181 AV_CODEC_ID_SAMI = MKBETAG('S','A','M','I'),
2182 AV_CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'),
2184 AV_CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'),
2185 AV_CODEC_ID_SUBRIP = MKBETAG('S','R','i','p'),
2186 AV_CODEC_ID_WEBVTT = MKBETAG('W','V','T','T'),
2187 AV_CODEC_ID_MPL2 = MKBETAG('M','P','L','2'),
2188 AV_CODEC_ID_VPLAYER = MKBETAG('V','P','l','r'),
2189 AV_CODEC_ID_PJS = MKBETAG('P','h','J','S'),
2190 AV_CODEC_ID_ASS = MKBETAG('A','S','S',' '),
2191
2194 AV_CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'),
2195 AV_CODEC_ID_XBIN = MKBETAG('X','B','I','N'),
2196 AV_CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'),
2197 AV_CODEC_ID_OTF = MKBETAG( 0 ,'O','T','F'),
2198 AV_CODEC_ID_SMPTE_KLV = MKBETAG('K','L','V','A'),
2199 AV_CODEC_ID_DVD_NAV = MKBETAG('D','N','A','V'),
2200 AV_CODEC_ID_TIMED_ID3 = MKBETAG('T','I','D','3'),
2201 AV_CODEC_ID_BIN_DATA = MKBETAG('D','A','T','A'),
2202
2204
2206
2208
2210
2211#define AVCODEC_OLD_CODEC_IDS_H
2212
2214
2382 CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
2383 CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
2384 CODEC_ID_EXR = MKBETAG('0','E','X','R'),
2385 CODEC_ID_AVRP = MKBETAG('A','V','R','P'),
2386
2387 CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'),
2388 CODEC_ID_AVUI = MKBETAG('A','V','U','I'),
2389 CODEC_ID_AYUV = MKBETAG('A','Y','U','V'),
2390 CODEC_ID_V308 = MKBETAG('V','3','0','8'),
2391 CODEC_ID_V408 = MKBETAG('V','4','0','8'),
2392 CODEC_ID_YUV4 = MKBETAG('Y','U','V','4'),
2393 CODEC_ID_SANM = MKBETAG('S','A','N','M'),
2394 CODEC_ID_PAF_VIDEO = MKBETAG('P','A','F','V'),
2396
2426
2457 CODEC_ID_VIMA = MKBETAG('V','I','M','A'),
2458
2461
2464
2469
2470 CODEC_ID_MP2 = 0x15000,
2531 CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
2532 CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
2533 CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'),
2534 CODEC_ID_PAF_AUDIO = MKBETAG('P','A','F','A'),
2535 CODEC_ID_OPUS = MKBETAG('O','P','U','S'),
2536
2547 CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'),
2548 CODEC_ID_EIA_608 = MKBETAG('c','6','0','8'),
2549 CODEC_ID_JACOSUB = MKBETAG('J','S','U','B'),
2550 CODEC_ID_SAMI = MKBETAG('S','A','M','I'),
2551 CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'),
2552 CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'),
2553
2555 CODEC_ID_TTF = 0x18000,
2556 CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'),
2557 CODEC_ID_XBIN = MKBETAG('X','B','I','N'),
2558 CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'),
2559 CODEC_ID_OTF = MKBETAG( 0 ,'O','T','F'),
2560
2561 CODEC_ID_PROBE = 0x19000,
2562
2564
2566
2568
2569};
2570
2571typedef struct AVCodecDescriptor {
2574
2575 const char *name;
2576
2577 const char *long_name;
2578
2580
2581 const char *const *mime_types;
2583
2584#define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
2585
2586#define AV_CODEC_PROP_LOSSY (1 << 1)
2587
2588#define AV_CODEC_PROP_LOSSLESS (1 << 2)
2589
2590#define AV_CODEC_PROP_BITMAP_SUB (1 << 16)
2591
2592#define AV_CODEC_PROP_TEXT_SUB (1 << 17)
2593
2594#define FF_INPUT_BUFFER_PADDING_SIZE 32
2595
2596#define FF_MIN_BUFFER_SIZE 16384
2597
2609};
2610
2612
2620};
2621
2633};
2634
2635typedef struct RcOverride{
2641
2642#define FF_MAX_B_FRAMES 16
2643
2644#define CODEC_FLAG_UNALIGNED 0x0001
2645#define CODEC_FLAG_QSCALE 0x0002
2646#define CODEC_FLAG_4MV 0x0004
2647#define CODEC_FLAG_OUTPUT_CORRUPT 0x0008
2648#define CODEC_FLAG_QPEL 0x0010
2649
2650#define CODEC_FLAG_GMC 0x0020
2651
2652#define CODEC_FLAG_MV0 0x0040
2653
2654#define CODEC_FLAG_INPUT_PRESERVED 0x0100
2655#define CODEC_FLAG_PASS1 0x0200
2656#define CODEC_FLAG_PASS2 0x0400
2657#define CODEC_FLAG_GRAY 0x2000
2658
2659#define CODEC_FLAG_EMU_EDGE 0x4000
2660#define CODEC_FLAG_PSNR 0x8000
2661#define CODEC_FLAG_TRUNCATED 0x00010000
2662
2663#define CODEC_FLAG_NORMALIZE_AQP 0x00020000
2664#define CODEC_FLAG_INTERLACED_DCT 0x00040000
2665#define CODEC_FLAG_LOW_DELAY 0x00080000
2666#define CODEC_FLAG_GLOBAL_HEADER 0x00400000
2667#define CODEC_FLAG_BITEXACT 0x00800000
2668
2669#define CODEC_FLAG_AC_PRED 0x01000000
2670#define CODEC_FLAG_LOOP_FILTER 0x00000800
2671#define CODEC_FLAG_INTERLACED_ME 0x20000000
2672#define CODEC_FLAG_CLOSED_GOP 0x80000000
2673#define CODEC_FLAG2_FAST 0x00000001
2674#define CODEC_FLAG2_NO_OUTPUT 0x00000004
2675#define CODEC_FLAG2_LOCAL_HEADER 0x00000008
2676#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000
2677#define CODEC_FLAG2_IGNORE_CROP 0x00010000
2678
2679#define CODEC_FLAG2_CHUNKS 0x00008000
2680#define CODEC_FLAG2_SHOW_ALL 0x00400000
2681
2682#define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
2683
2684#define CODEC_CAP_DR1 0x0002
2685#define CODEC_CAP_TRUNCATED 0x0008
2686
2687#define CODEC_CAP_HWACCEL 0x0010
2688
2689#define CODEC_CAP_DELAY 0x0020
2690
2691#define CODEC_CAP_SMALL_LAST_FRAME 0x0040
2692
2693#define CODEC_CAP_HWACCEL_VDPAU 0x0080
2694
2695#define CODEC_CAP_SUBFRAMES 0x0100
2696
2697#define CODEC_CAP_EXPERIMENTAL 0x0200
2698
2699#define CODEC_CAP_CHANNEL_CONF 0x0400
2700
2701#define CODEC_CAP_NEG_LINESIZES 0x0800
2702
2703#define CODEC_CAP_FRAME_THREADS 0x1000
2704
2705#define CODEC_CAP_SLICE_THREADS 0x2000
2706
2707#define CODEC_CAP_PARAM_CHANGE 0x4000
2708
2709#define CODEC_CAP_AUTO_THREADS 0x8000
2710
2711#define CODEC_CAP_VARIABLE_FRAME_SIZE 0x10000
2712
2713#define CODEC_CAP_INTRA_ONLY 0x40000000
2714
2715#define CODEC_CAP_LOSSLESS 0x80000000
2716
2717#define MB_TYPE_INTRA4x4 0x0001
2718#define MB_TYPE_INTRA16x16 0x0002
2719#define MB_TYPE_INTRA_PCM 0x0004
2720#define MB_TYPE_16x16 0x0008
2721#define MB_TYPE_16x8 0x0010
2722#define MB_TYPE_8x16 0x0020
2723#define MB_TYPE_8x8 0x0040
2724#define MB_TYPE_INTERLACED 0x0080
2725#define MB_TYPE_DIRECT2 0x0100
2726#define MB_TYPE_ACPRED 0x0200
2727#define MB_TYPE_GMC 0x0400
2728#define MB_TYPE_SKIP 0x0800
2729#define MB_TYPE_P0L0 0x1000
2730#define MB_TYPE_P1L0 0x2000
2731#define MB_TYPE_P0L1 0x4000
2732#define MB_TYPE_P1L1 0x8000
2733#define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
2734#define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
2735#define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
2736#define MB_TYPE_QUANT 0x00010000
2737#define MB_TYPE_CBP 0x00020000
2738
2739typedef struct AVPanScan{
2740
2741 int id;
2742
2745
2746 int16_t position[3][2];
2748
2749#define FF_QSCALE_TYPE_MPEG1 0
2750#define FF_QSCALE_TYPE_MPEG2 1
2751#define FF_QSCALE_TYPE_H264 2
2752#define FF_QSCALE_TYPE_VP56 3
2753
2754#define FF_BUFFER_TYPE_INTERNAL 1
2755#define FF_BUFFER_TYPE_USER 2
2756#define FF_BUFFER_TYPE_SHARED 4
2757#define FF_BUFFER_TYPE_COPY 8
2758
2759#define FF_BUFFER_HINTS_VALID 0x01
2760#define FF_BUFFER_HINTS_READABLE 0x02
2761#define FF_BUFFER_HINTS_PRESERVE 0x04
2762#define FF_BUFFER_HINTS_REUSABLE 0x08
2763
2764#define AV_GET_BUFFER_FLAG_REF (1 << 0)
2765
2769
2771
2773
2775
2777
2779
2781
2783
2785
2787
2789
2791
2793};
2794
2795typedef struct AVPacketSideData {
2796 uint8_t *data;
2797 int size;
2800
2801typedef struct AVPacket {
2802
2804
2805 int64_t pts;
2806
2807 int64_t dts;
2808 uint8_t *data;
2809 int size;
2811
2813
2816
2819 void (*destruct)(struct AVPacket *);
2821 void *priv;
2822 int64_t pos;
2823
2826#define AV_PKT_FLAG_KEY 0x0001
2827#define AV_PKT_FLAG_CORRUPT 0x0002
2828
2834};
2835
2836struct AVCodecInternal;
2837
2845};
2846
2847typedef struct AVCodecContext {
2848
2851
2853 const struct AVCodec *codec;
2854
2856 char codec_name[32];
2858
2859 unsigned int codec_tag;
2860
2861 unsigned int stream_codec_tag;
2862
2864
2865 struct AVCodecInternal *internal;
2866
2867 void *opaque;
2868
2870
2872
2874
2876#define FF_COMPRESSION_DEFAULT -1
2877
2879
2881
2882 uint8_t *extradata;
2884
2886
2888
2890
2892
2894
2895#define FF_ASPECT_EXTENDED 15
2896
2898
2900
2902
2904 const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
2905 int y, int type, int height);
2906
2907 enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
2908
2910
2912
2914#define FF_RC_STRATEGY_XVID 1
2915
2917
2919
2921
2923
2925
2927
2929
2931
2933
2935
2937
2939
2941#define FF_PRED_LEFT 0
2942#define FF_PRED_PLANE 1
2943#define FF_PRED_MEDIAN 2
2944
2946
2948
2950
2952
2954
2956#define FF_CMP_SAD 0
2957#define FF_CMP_SSE 1
2958#define FF_CMP_SATD 2
2959#define FF_CMP_DCT 3
2960#define FF_CMP_PSNR 4
2961#define FF_CMP_BIT 5
2962#define FF_CMP_RD 6
2963#define FF_CMP_ZERO 7
2964#define FF_CMP_VSAD 8
2965#define FF_CMP_VSSE 9
2966#define FF_CMP_NSSE 10
2967#define FF_CMP_W53 11
2968#define FF_CMP_W97 12
2969#define FF_CMP_DCTMAX 13
2970#define FF_CMP_DCT264 14
2971#define FF_CMP_CHROMA 256
2972
2974
2976
2978
2980
2982
2984
2986#define FF_DTG_AFD_SAME 8
2987#define FF_DTG_AFD_4_3 9
2988#define FF_DTG_AFD_16_9 10
2989#define FF_DTG_AFD_14_9 11
2990#define FF_DTG_AFD_4_3_SP_14_9 13
2991#define FF_DTG_AFD_16_9_SP_14_9 14
2992#define FF_DTG_AFD_SP_4_3 15
2993
2995
2997#define FF_DEFAULT_QUANT_BIAS 999999
2998
3000
3002#define SLICE_FLAG_CODED_ORDER 0x0001
3003#define SLICE_FLAG_ALLOW_FIELD 0x0002
3004#define SLICE_FLAG_ALLOW_PLANE 0x0004
3005
3007
3009#define FF_MB_DECISION_SIMPLE 0
3010#define FF_MB_DECISION_BITS 1
3011#define FF_MB_DECISION_RD 2
3012
3013 uint16_t *intra_matrix;
3014
3015 uint16_t *inter_matrix;
3016
3018
3020
3022
3024
3026
3028
3030
3032
3034
3036
3038
3040
3042
3044
3045 int refs;
3046
3048
3050
3052
3054
3056
3058
3060
3062
3064
3066
3068
3071
3073
3075
3077
3079
3081
3083
3085
3087
3089
3091
3093 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
3094
3096 void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
3097
3099 int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
3100
3101 int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
3102
3104
3106 float qblur;
3107
3108 int qmin;
3109
3110 int qmax;
3111
3113
3115
3118
3120
3123
3124 const char *rc_eq;
3125
3127
3129
3131
3133
3135
3137
3139
3140#define FF_CODER_TYPE_VLC 0
3141#define FF_CODER_TYPE_AC 1
3142#define FF_CODER_TYPE_RAW 2
3143#define FF_CODER_TYPE_RLE 3
3144#define FF_CODER_TYPE_DEFLATE 4
3145
3147
3149
3150 int lmin;
3151
3152 int lmax;
3153
3155
3157
3159
3161
3163
3165
3167
3169
3170 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
3171
3173
3182
3184
3186
3188
3190#define FF_BUG_AUTODETECT 1
3191#define FF_BUG_OLD_MSMPEG4 2
3192#define FF_BUG_XVID_ILACE 4
3193#define FF_BUG_UMP4 8
3194#define FF_BUG_NO_PADDING 16
3195#define FF_BUG_AMV 32
3196#define FF_BUG_AC_VLC 0
3197#define FF_BUG_QPEL_CHROMA 64
3198#define FF_BUG_STD_QPEL 128
3199#define FF_BUG_QPEL_CHROMA2 256
3200#define FF_BUG_DIRECT_BLOCKSIZE 512
3201#define FF_BUG_EDGE 1024
3202#define FF_BUG_HPEL_CHROMA 2048
3203#define FF_BUG_DC_CLIP 4096
3204#define FF_BUG_MS 8192
3205#define FF_BUG_TRUNCATED 16384
3206
3208#define FF_COMPLIANCE_VERY_STRICT 2
3209#define FF_COMPLIANCE_STRICT 1
3210#define FF_COMPLIANCE_NORMAL 0
3211#define FF_COMPLIANCE_UNOFFICIAL -1
3212#define FF_COMPLIANCE_EXPERIMENTAL -2
3213
3215#define FF_EC_GUESS_MVS 1
3216#define FF_EC_DEBLOCK 2
3217#define FF_EC_FAVOR_INTER 256
3218
3220#define FF_DEBUG_PICT_INFO 1
3221#define FF_DEBUG_RC 2
3222#define FF_DEBUG_BITSTREAM 4
3223#define FF_DEBUG_MB_TYPE 8
3224#define FF_DEBUG_QP 16
3225
3226#define FF_DEBUG_MV 32
3227#define FF_DEBUG_DCT_COEFF 0x00000040
3228#define FF_DEBUG_SKIP 0x00000080
3229#define FF_DEBUG_STARTCODE 0x00000100
3230#define FF_DEBUG_PTS 0x00000200
3231#define FF_DEBUG_ER 0x00000400
3232#define FF_DEBUG_MMCO 0x00000800
3233#define FF_DEBUG_BUGS 0x00001000
3234#define FF_DEBUG_VIS_QP 0x00002000
3235#define FF_DEBUG_VIS_MB_TYPE 0x00004000
3236#define FF_DEBUG_BUFFERS 0x00008000
3237#define FF_DEBUG_THREADS 0x00010000
3238#define FF_DEBUG_NOMC 0x01000000
3239
3241#define FF_DEBUG_VIS_MV_P_FOR 0x00000001
3242#define FF_DEBUG_VIS_MV_B_FOR 0x00000002
3243#define FF_DEBUG_VIS_MV_B_BACK 0x00000004
3244
3246
3247#define AV_EF_CRCCHECK (1<<0)
3248#define AV_EF_BITSTREAM (1<<1)
3249#define AV_EF_BUFFER (1<<2)
3250#define AV_EF_EXPLODE (1<<3)
3251
3252#define AV_EF_IGNORE_ERR (1<<15)
3253#define AV_EF_CAREFUL (1<<16)
3254#define AV_EF_COMPLIANT (1<<17)
3255#define AV_EF_AGGRESSIVE (1<<18)
3256
3258
3260
3262
3264
3266#define FF_DCT_AUTO 0
3267#define FF_DCT_FASTINT 1
3268#define FF_DCT_INT 2
3269#define FF_DCT_MMX 3
3270#define FF_DCT_ALTIVEC 5
3271#define FF_DCT_FAAN 6
3272
3274#define FF_IDCT_AUTO 0
3275#define FF_IDCT_INT 1
3276#define FF_IDCT_SIMPLE 2
3277#define FF_IDCT_SIMPLEMMX 3
3278#define FF_IDCT_ARM 7
3279#define FF_IDCT_ALTIVEC 8
3280#define FF_IDCT_SH4 9
3281#define FF_IDCT_SIMPLEARM 10
3282#define FF_IDCT_IPP 13
3283#define FF_IDCT_XVIDMMX 14
3284#define FF_IDCT_SIMPLEARMV5TE 16
3285#define FF_IDCT_SIMPLEARMV6 17
3286#define FF_IDCT_SIMPLEVIS 18
3287#define FF_IDCT_FAAN 20
3288#define FF_IDCT_SIMPLENEON 22
3289#define FF_IDCT_SIMPLEALPHA 23
3290#define FF_IDCT_SIMPLEAUTO 128
3291
3293
3295
3297
3299
3301
3303#define FF_THREAD_FRAME 1
3304#define FF_THREAD_SLICE 2
3305
3307
3309
3310 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
3311
3312 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
3313
3316
3318
3320#define FF_PROFILE_UNKNOWN -99
3321#define FF_PROFILE_RESERVED -100
3322
3323#define FF_PROFILE_AAC_MAIN 0
3324#define FF_PROFILE_AAC_LOW 1
3325#define FF_PROFILE_AAC_SSR 2
3326#define FF_PROFILE_AAC_LTP 3
3327#define FF_PROFILE_AAC_HE 4
3328#define FF_PROFILE_AAC_HE_V2 28
3329#define FF_PROFILE_AAC_LD 22
3330#define FF_PROFILE_AAC_ELD 38
3331#define FF_PROFILE_MPEG2_AAC_LOW 128
3332#define FF_PROFILE_MPEG2_AAC_HE 131
3333
3334#define FF_PROFILE_DTS 20
3335#define FF_PROFILE_DTS_ES 30
3336#define FF_PROFILE_DTS_96_24 40
3337#define FF_PROFILE_DTS_HD_HRA 50
3338#define FF_PROFILE_DTS_HD_MA 60
3339
3340#define FF_PROFILE_MPEG2_422 0
3341#define FF_PROFILE_MPEG2_HIGH 1
3342#define FF_PROFILE_MPEG2_SS 2
3343#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
3344#define FF_PROFILE_MPEG2_MAIN 4
3345#define FF_PROFILE_MPEG2_SIMPLE 5
3346
3347#define FF_PROFILE_H264_CONSTRAINED (1<<9)
3348#define FF_PROFILE_H264_INTRA (1<<11)
3349
3350#define FF_PROFILE_H264_BASELINE 66
3351#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
3352#define FF_PROFILE_H264_MAIN 77
3353#define FF_PROFILE_H264_EXTENDED 88
3354#define FF_PROFILE_H264_HIGH 100
3355#define FF_PROFILE_H264_HIGH_10 110
3356#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
3357#define FF_PROFILE_H264_HIGH_422 122
3358#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
3359#define FF_PROFILE_H264_HIGH_444 144
3360#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
3361#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
3362#define FF_PROFILE_H264_CAVLC_444 44
3363
3364#define FF_PROFILE_VC1_SIMPLE 0
3365#define FF_PROFILE_VC1_MAIN 1
3366#define FF_PROFILE_VC1_COMPLEX 2
3367#define FF_PROFILE_VC1_ADVANCED 3
3368
3369#define FF_PROFILE_MPEG4_SIMPLE 0
3370#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
3371#define FF_PROFILE_MPEG4_CORE 2
3372#define FF_PROFILE_MPEG4_MAIN 3
3373#define FF_PROFILE_MPEG4_N_BIT 4
3374#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
3375#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
3376#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
3377#define FF_PROFILE_MPEG4_HYBRID 8
3378#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
3379#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
3380#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
3381#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
3382#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
3383#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
3384#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
3385
3386#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 0
3387#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 1
3388#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 2
3389#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
3390#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
3391
3392#define FF_PROFILE_HEVC_MAIN 1
3393#define FF_PROFILE_HEVC_MAIN_10 2
3394#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
3395#define FF_PROFILE_HEVC_REXT 4
3396
3398#define FF_LEVEL_UNKNOWN -99
3399
3401
3403
3405
3408
3411
3414
3415 uint64_t vbv_delay;
3416
3418
3420
3422
3427
3429
3431#define FF_SUB_CHARENC_MODE_DO_NOTHING -1
3432#define FF_SUB_CHARENC_MODE_AUTOMATIC 0
3433#define FF_SUB_CHARENC_MODE_PRE_DECODER 1
3434
3436
3438
3441
3444
3447
3450
3453
3456
3457typedef struct AVProfile {
3459 const char *name;
3461
3463
3464struct AVSubtitle;
3465
3466typedef struct AVCodec {
3467
3468 const char *name;
3469
3470 const char *long_name;
3473
3479 const uint64_t *channel_layouts;
3480 uint8_t max_lowres;
3483
3485 struct AVCodec *next;
3486
3488
3490
3492
3493 void (*init_static_data)(struct AVCodec *codec);
3494