Audacity 3.2.0
ffmpeg-7.0.0-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 <inttypes.h>
5#include <stdint.h>
6#include <stdlib.h>
7#include <math.h>
8#include <string.h>
9#include <stdarg.h>
10#include <stddef.h>
11#include <stdio.h>
12#include <limits.h>
13#include <errno.h>
14
15#define AVCODEC_AVCODEC_H
16
17#define AVUTIL_SAMPLEFMT_H
18
26
34
36};
37
38const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);
39
41
42enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar);
43
45
47
48char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
49
51
53
54int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
55 enum AVSampleFormat sample_fmt, int align);
56
57int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
58 const uint8_t *buf,
59 int nb_channels, int nb_samples,
60 enum AVSampleFormat sample_fmt, int align);
61
62int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
63 int nb_samples, enum AVSampleFormat sample_fmt, int align);
64
65int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,
66 int nb_samples, enum AVSampleFormat sample_fmt, int align);
67
68int av_samples_copy(uint8_t * const *dst, uint8_t * const *src, int dst_offset,
69 int src_offset, int nb_samples, int nb_channels,
70 enum AVSampleFormat sample_fmt);
71
72int av_samples_set_silence(uint8_t * const *audio_data, int offset, int nb_samples,
73 int nb_channels, enum AVSampleFormat sample_fmt);
74
75#define AVUTIL_ATTRIBUTES_H
76
77# define AV_GCC_VERSION_AT_LEAST(x,y) 0
78# define AV_GCC_VERSION_AT_MOST(x,y) 0
79
80# define AV_HAS_BUILTIN(x) 0
81
82# define av_always_inline inline
83
84# define av_extern_inline inline
85
86# define av_warn_unused_result
87
88# define av_noinline
89
90# define av_pure
91
92# define av_const
93
94# define av_cold
95
96# define av_flatten
97
98# define attribute_deprecated
99
100# define AV_NOWARN_DEPRECATED(code) code
101
102# define av_unused
103
104# define av_used
105
106# define av_alias
107
108# define av_uninit(x) x
109
110# define av_builtin_constant_p(x) 0
111# define av_printf_format(fmtpos, attrpos)
112
113# define av_noreturn
114
115#define AVUTIL_AVUTIL_H
116
117unsigned avutil_version(void);
118
119const char *av_version_info(void);
120
121const char *avutil_configuration(void);
122
123const char *avutil_license(void);
124
134
135const char *av_get_media_type_string(enum AVMediaType media_type);
136
137#define FF_LAMBDA_SHIFT 7
138#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
139#define FF_QP2LAMBDA 118
140#define FF_LAMBDA_MAX (256*128-1)
141
142#define FF_QUALITY_SCALE FF_LAMBDA_SCALE
143
144#define AV_NOPTS_VALUE ((int64_t)UINT64_C(0x8000000000000000))
145
146#define AV_TIME_BASE 1000000
147
148#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
149
159};
160
162
163#define AVUTIL_COMMON_H
164
165#define AVUTIL_ERROR_H
166
167#define AVUTIL_MACROS_H
168
169# define AV_NE(be, le) (le)
170
171#define FFDIFFSIGN(x,y) (((x)>(y)) - ((x)<(y)))
172
173#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
174#define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c)
175#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
176#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
177
178#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
179#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
180
181#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
182#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
183
184#define AV_STRINGIFY(s) AV_TOSTRING(s)
185#define AV_TOSTRING(s) #s
186
187#define AV_GLUE(a, b) a ## b
188#define AV_JOIN(a, b) AV_GLUE(a, b)
189
190#define AV_PRAGMA(s) _Pragma(#s)
191
192#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1))
193
194#define AVERROR(e) (e)
195#define AVUNERROR(e) (e)
196
197#define FFERRTAG(a, b, c, d) (-(int)MKTAG(a, b, c, d))
198
199#define AVERROR_BSF_NOT_FOUND FFERRTAG(0xF8,'B','S','F')
200#define AVERROR_BUG FFERRTAG( 'B','U','G','!')
201#define AVERROR_BUFFER_TOO_SMALL FFERRTAG( 'B','U','F','S')
202#define AVERROR_DECODER_NOT_FOUND FFERRTAG(0xF8,'D','E','C')
203#define AVERROR_DEMUXER_NOT_FOUND FFERRTAG(0xF8,'D','E','M')
204#define AVERROR_ENCODER_NOT_FOUND FFERRTAG(0xF8,'E','N','C')
205#define AVERROR_EOF FFERRTAG( 'E','O','F',' ')
206#define AVERROR_EXIT FFERRTAG( 'E','X','I','T')
207#define AVERROR_EXTERNAL FFERRTAG( 'E','X','T',' ')
208#define AVERROR_FILTER_NOT_FOUND FFERRTAG(0xF8,'F','I','L')
209#define AVERROR_INVALIDDATA FFERRTAG( 'I','N','D','A')
210#define AVERROR_MUXER_NOT_FOUND FFERRTAG(0xF8,'M','U','X')
211#define AVERROR_OPTION_NOT_FOUND FFERRTAG(0xF8,'O','P','T')
212#define AVERROR_PATCHWELCOME FFERRTAG( 'P','A','W','E')
213#define AVERROR_PROTOCOL_NOT_FOUND FFERRTAG(0xF8,'P','R','O')
214
215#define AVERROR_STREAM_NOT_FOUND FFERRTAG(0xF8,'S','T','R')
216
217#define AVERROR_BUG2 FFERRTAG( 'B','U','G',' ')
218#define AVERROR_UNKNOWN FFERRTAG( 'U','N','K','N')
219#define AVERROR_EXPERIMENTAL (-0x2bb2afa8)
220#define AVERROR_INPUT_CHANGED (-0x636e6701)
221#define AVERROR_OUTPUT_CHANGED (-0x636e6702)
222
223#define AVERROR_HTTP_BAD_REQUEST FFERRTAG(0xF8,'4','0','0')
224#define AVERROR_HTTP_UNAUTHORIZED FFERRTAG(0xF8,'4','0','1')
225#define AVERROR_HTTP_FORBIDDEN FFERRTAG(0xF8,'4','0','3')
226#define AVERROR_HTTP_NOT_FOUND FFERRTAG(0xF8,'4','0','4')
227#define AVERROR_HTTP_OTHER_4XX FFERRTAG(0xF8,'4','X','X')
228#define AVERROR_HTTP_SERVER_ERROR FFERRTAG(0xF8,'5','X','X')
229
230#define AV_ERROR_MAX_STRING_SIZE 64
231
232int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
233
234static inline char *av_make_error_string(char *errbuf, size_t errbuf_size, int errnum)
235{
236 av_strerror(errnum, errbuf, errbuf_size);
237 return errbuf;
238}
239
240#define av_err2str(errnum) \
241 av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum)
242
243#define AVUTIL_MEM_H
244
245 #define av_malloc_attrib
246
247 #define av_alloc_size(...)
248
250
252
253av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size);
254
256
257void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
258
260int av_reallocp(void *ptr, size_t size);
261
262void *av_realloc_f(void *ptr, size_t nelem, size_t elsize);
263
264av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size);
265
266int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
267
268void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
269
270void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
271
272void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size);
273
274void av_free(void *ptr);
275
276void av_freep(void *ptr);
277
278char *av_strdup(const char *s) av_malloc_attrib;
279
280char *av_strndup(const char *s, size_t len) av_malloc_attrib;
281
282void *av_memdup(const void *p, size_t size);
283
284void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
285
286void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);
287
289int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem);
290
291void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
292 const uint8_t *elem_data);
293
294int av_size_mult(size_t a, size_t b, size_t *r);
295
296void av_max_alloc(size_t max);
297
298#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
299
300#define ROUNDED_DIV(a,b) (((a)>=0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
301
302#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
303 : ((a) + (1<<(b)) - 1) >> (b))
304
305#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT
306
307#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
308#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))
309
310#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
311#define FFSIGN(a) ((a) > 0 ? 1 : -1)
312
313#define FFNABS(a) ((a) <= 0 ? (a) : (-(a)))
314
315#define FFABSU(a) ((a) <= 0 ? -(unsigned)(a) : (unsigned)(a))
316#define FFABS64U(a) ((a) <= 0 ? -(uint64_t)(a) : (uint64_t)(a))
317
318# define av_ceil_log2 av_ceil_log2_c
319# define av_clip av_clip_c
320# define av_clip64 av_clip64_c
321# define av_clip_uint8 av_clip_uint8_c
322# define av_clip_int8 av_clip_int8_c
323# define av_clip_uint16 av_clip_uint16_c
324# define av_clip_int16 av_clip_int16_c
325# define av_clipl_int32 av_clipl_int32_c
326# define av_clip_intp2 av_clip_intp2_c
327# define av_clip_uintp2 av_clip_uintp2_c
328# define av_mod_uintp2 av_mod_uintp2_c
329# define av_sat_add32 av_sat_add32_c
330# define av_sat_dadd32 av_sat_dadd32_c
331# define av_sat_sub32 av_sat_sub32_c
332# define av_sat_dsub32 av_sat_dsub32_c
333# define av_sat_add64 av_sat_add64_c
334# define av_sat_sub64 av_sat_sub64_c
335# define av_clipf av_clipf_c
336# define av_clipd av_clipd_c
337# define av_popcount av_popcount_c
338# define av_popcount64 av_popcount64_c
339# define av_parity av_parity_c
340
341av_const int av_log2(unsigned v);
342
343av_const int av_log2_16bit(unsigned v);
344
345static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
346{
347 if (a < amin) return amin;
348 else if (a > amax) return amax;
349 else return a;
350}
351
352static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax)
353{
354 if (a < amin) return amin;
355 else if (a > amax) return amax;
356 else return a;
357}
358
360{
361 if (a&(~0xFF)) return (~a)>>31;
362 else return a;
363}
364
366{
367 if ((a+0x80U) & ~0xFF) return (a>>31) ^ 0x7F;
368 else return a;
369}
370
372{
373 if (a&(~0xFFFF)) return (~a)>>31;
374 else return a;
375}
376
378{
379 if ((a+0x8000U) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
380 else return a;
381}
382
384{
385 if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF);
386 else return (int32_t)a;
387}
388
390{
391 if (((unsigned)a + (1 << p)) & ~((2 << p) - 1))
392 return (a >> 31) ^ ((1 << p) - 1);
393 else
394 return a;
395}
396
397static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
398{
399 if (a & ~((1<<p) - 1)) return (~a) >> 31 & ((1<<p) - 1);
400 else return a;
401}
402
403static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p)
404{
405 return a & ((1U << p) - 1);
406}
407
408static av_always_inline int av_sat_add32_c(int a, int b)
409{
410 return av_clipl_int32((int64_t)a + b);
411}
412
413static av_always_inline int av_sat_dadd32_c(int a, int b)
414{
415 return av_sat_add32(a, av_sat_add32(b, b));
416}
417
418static av_always_inline int av_sat_sub32_c(int a, int b)
419{
420 return av_clipl_int32((int64_t)a - b);
421}
422
423static av_always_inline int av_sat_dsub32_c(int a, int b)
424{
425 return av_sat_sub32(a, av_sat_add32(b, b));
426}
427
428static av_always_inline int64_t av_sat_add64_c(int64_t a, int64_t b) {
429 int64_t s = a+(uint64_t)b;
430 if ((int64_t)(a^b | ~s^b) >= 0)
431 return INT64_MAX ^ (b >> 63);
432 return s;
433}
434
435static av_always_inline int64_t av_sat_sub64_c(int64_t a, int64_t b) {
436 if (b <= 0 && a >= INT64_MAX + b)
437 return INT64_MAX;
438 if (b >= 0 && a <= INT64_MIN + b)
439 return INT64_MIN;
440 return a - b;
441}
442
443static av_always_inline av_const float av_clipf_c(float a, float amin, float amax)
444{
445 return FFMIN(FFMAX(a, amin), amax);
446}
447
448static av_always_inline av_const double av_clipd_c(double a, double amin, double amax)
449{
450 return FFMIN(FFMAX(a, amin), amax);
451}
452
454{
455 return av_log2((x - 1U) << 1);
456}
457
459{
460 x -= (x >> 1) & 0x55555555;
461 x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
462 x = (x + (x >> 4)) & 0x0F0F0F0F;
463 x += x >> 8;
464 return (x + (x >> 16)) & 0x3F;
465}
466
468{
469 return av_popcount((uint32_t)x) + av_popcount((uint32_t)(x >> 32));
470}
471
473{
474 return av_popcount(v) & 1;
475}
476
477#define GET_UTF8(val, GET_BYTE, ERROR)\
478 val= (GET_BYTE);\
479 {\
480 uint32_t top = (val & 128) >> 1;\
481 if ((val & 0xc0) == 0x80 || val >= 0xFE)\
482 {ERROR}\
483 while (val & top) {\
484 unsigned int tmp = (GET_BYTE) - 128;\
485 if(tmp>>6)\
486 {ERROR}\
487 val= (val<<6) + tmp;\
488 top <<= 5;\
489 }\
490 val &= (top << 1) - 1;\
491 }
492
493#define GET_UTF16(val, GET_16BIT, ERROR)\
494 val = (GET_16BIT);\
495 {\
496 unsigned int hi = val - 0xD800;\
497 if (hi < 0x800) {\
498 val = (GET_16BIT) - 0xDC00;\
499 if (val > 0x3FFU || hi > 0x3FFU)\
500 {ERROR}\
501 val += (hi<<10) + 0x10000;\
502 }\
503 }\
504
505#define PUT_UTF8(val, tmp, PUT_BYTE)\
506 {\
507 int bytes, shift;\
508 uint32_t in = val;\
509 if (in < 0x80) {\
510 tmp = in;\
511 PUT_BYTE\
512 } else {\
513 bytes = (av_log2(in) + 4) / 5;\
514 shift = (bytes - 1) * 6;\
515 tmp = (256 - (256 >> bytes)) | (in >> shift);\
516 PUT_BYTE\
517 while (shift >= 6) {\
518 shift -= 6;\
519 tmp = 0x80 | ((in >> shift) & 0x3f);\
520 PUT_BYTE\
521 }\
522 }\
523 }
524
525#define PUT_UTF16(val, tmp, PUT_16BIT)\
526 {\
527 uint32_t in = val;\
528 if (in < 0x10000) {\
529 tmp = in;\
530 PUT_16BIT\
531 } else {\
532 tmp = 0xD800 | ((in - 0x10000) >> 10);\
533 PUT_16BIT\
534 tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
535 PUT_16BIT\
536 }\
537 }\
538
539#define AVUTIL_RATIONAL_H
540
541typedef struct AVRational{
542 int num;
543 int den;
545
546static inline AVRational av_make_q(int num, int den)
547{
548 AVRational r = { num, den };
549 return r;
550}
551
552static inline int av_cmp_q(AVRational a, AVRational b){
553 const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den;
554
555 if(tmp) return (int)((tmp ^ a.den ^ b.den)>>63)|1;
556 else if(b.den && a.den) return 0;
557 else if(a.num && b.num) return (a.num>>31) - (b.num>>31);
558 else return INT_MIN;
559}
560
561static inline double av_q2d(AVRational a){
562 return a.num / (double) a.den;
563}
564
565int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max);
566
568
570
572
574
576{
577 AVRational r = { q.den, q.num };
578 return r;
579}
580
581AVRational av_d2q(double d, int max) av_const;
582
584
586
588
590
591#define AVUTIL_VERSION_H
592
593#define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
594#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
595#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
596
597#define AV_VERSION_MAJOR(a) ((a) >> 16)
598#define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8)
599#define AV_VERSION_MICRO(a) ((a) & 0xFF)
600
601#define LIBAVUTIL_VERSION_MAJOR 59
602#define LIBAVUTIL_VERSION_MINOR 8
603#define LIBAVUTIL_VERSION_MICRO 100
604
605#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
606 LIBAVUTIL_VERSION_MINOR, \
607 LIBAVUTIL_VERSION_MICRO)
608#define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \
609 LIBAVUTIL_VERSION_MINOR, \
610 LIBAVUTIL_VERSION_MICRO)
611#define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT
612
613#define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
614
615#define FF_API_HDR_VIVID_THREE_SPLINE (LIBAVUTIL_VERSION_MAJOR < 60)
616#define FF_API_FRAME_PKT (LIBAVUTIL_VERSION_MAJOR < 60)
617#define FF_API_INTERLACED_FRAME (LIBAVUTIL_VERSION_MAJOR < 60)
618#define FF_API_FRAME_KEY (LIBAVUTIL_VERSION_MAJOR < 60)
619#define FF_API_PALETTE_HAS_CHANGED (LIBAVUTIL_VERSION_MAJOR < 60)
620#define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
621#define FF_API_H274_FILM_GRAIN_VCS (LIBAVUTIL_VERSION_MAJOR < 60)
622
623#define AVUTIL_MATHEMATICS_H
624
625#define AVUTIL_INTFLOAT_H
626
627union av_intfloat32 {
628 uint32_t i;
629 float f;
630};
631
632union av_intfloat64 {
633 uint64_t i;
634 double f;
635};
636
637static av_always_inline float av_int2float(uint32_t i)
638{
639 union av_intfloat32 v;
640 v.i = i;
641 return v.f;
642}
643
644static av_always_inline uint32_t av_float2int(float f)
645{
646 union av_intfloat32 v;
647 v.f = f;
648 return v.i;
649}
650
651static av_always_inline double av_int2double(uint64_t i)
652{
653 union av_intfloat64 v;
654 v.i = i;
655 return v.f;
656}
657
658static av_always_inline uint64_t av_double2int(double f)
659{
660 union av_intfloat64 v;
661 v.f = f;
662 return v.i;
663}
664
665#define M_E 2.7182818284590452354
666#define M_Ef 2.7182818284590452354f
667#define M_LN2 0.69314718055994530942
668#define M_LN2f 0.69314718055994530942f
669#define M_LN10 2.30258509299404568402
670#define M_LN10f 2.30258509299404568402f
671#define M_LOG2_10 3.32192809488736234787
672#define M_LOG2_10f 3.32192809488736234787f
673#define M_PHI 1.61803398874989484820
674#define M_PHIf 1.61803398874989484820f
675#define M_PI 3.14159265358979323846
676#define M_PIf 3.14159265358979323846f
677#define M_PI_2 1.57079632679489661923
678#define M_PI_2f 1.57079632679489661923f
679#define M_PI_4 0.78539816339744830962
680#define M_PI_4f 0.78539816339744830962f
681#define M_1_PI 0.31830988618379067154
682#define M_1_PIf 0.31830988618379067154f
683#define M_2_PI 0.63661977236758134308
684#define M_2_PIf 0.63661977236758134308f
685#define M_2_SQRTPI 1.12837916709551257390
686#define M_2_SQRTPIf 1.12837916709551257390f
687#define M_SQRT1_2 0.70710678118654752440
688#define M_SQRT1_2f 0.70710678118654752440f
689#define M_SQRT2 1.41421356237309504880
690#define M_SQRT2f 1.41421356237309504880f
691#define NAN av_int2float(0x7fc00000)
692#define INFINITY av_int2float(0x7f800000)
693
700
702};
703
704int64_t av_const av_gcd(int64_t a, int64_t b);
705
706int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const;
707
708int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd) av_const;
709
710int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const;
711
712int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq,
713 enum AVRounding rnd) av_const;
714
715int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
716
717int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);
718
719int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb);
720
721int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc);
722
723double av_bessel_i0(double x);
724
725#define AVUTIL_LOG_H
726
727typedef enum {
747
748#define AV_IS_INPUT_DEVICE(category) \
749 (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \
750 ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \
751 ((category) == AV_CLASS_CATEGORY_DEVICE_INPUT))
752
753#define AV_IS_OUTPUT_DEVICE(category) \
754 (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT) || \
755 ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT) || \
756 ((category) == AV_CLASS_CATEGORY_DEVICE_OUTPUT))
757
758struct AVOptionRanges;
759
760typedef struct AVClass {
761
762 const char* class_name;
763
764 const char* (*item_name)(void* ctx);
765
766 const struct AVOption *option;
767
768 int version;
769
771
773
775
776 AVClassCategory (*get_category)(void* ctx);
777
778 int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
779
780 void* (*child_next)(void *obj, void *prev);
781
782 const struct AVClass* (*child_class_iterate)(void **iter);
784
785#define AV_LOG_QUIET -8
786
787#define AV_LOG_PANIC 0
788
789#define AV_LOG_FATAL 8
790
791#define AV_LOG_ERROR 16
792
793#define AV_LOG_WARNING 24
794
795#define AV_LOG_INFO 32
796
797#define AV_LOG_VERBOSE 40
798
799#define AV_LOG_DEBUG 48
800
801#define AV_LOG_TRACE 56
802
803#define AV_LOG_MAX_OFFSET (AV_LOG_TRACE - AV_LOG_QUIET)
804
805#define AV_LOG_C(x) ((x) << 8)
806
807void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
808
809void av_log_once(void* avcl, int initial_level, int subsequent_level, int *state, const char *fmt, ...) av_printf_format(5, 6);
810
811void av_vlog(void *avcl, int level, const char *fmt, va_list vl);
812
814
815void av_log_set_level(int level);
816
817void av_log_set_callback(void (*callback)(void*, int, const char*, va_list));
818
819void av_log_default_callback(void *avcl, int level, const char *fmt,
820 va_list vl);
821
822const char* av_default_item_name(void* ctx);
824
825void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
826 char *line, int line_size, int *print_prefix);
827
828int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
829 char *line, int line_size, int *print_prefix);
830
831#define AV_LOG_SKIP_REPEATED 1
832
833#define AV_LOG_PRINT_LEVEL 2
834
835void av_log_set_flags(int arg);
837
838#define AVUTIL_PIXFMT_H
839
840#define AVPALETTE_SIZE 1024
841#define AVPALETTE_COUNT 256
842
843#define AV_VIDEO_MAX_PLANES 4
844
872
877
885
890
895
897
905
911
914
917
958
960
966
971
973
976
980
982
984
986
988
993
1011
1024
1031
1033
1036
1039
1042
1044
1049
1052
1054
1057
1062
1064
1066
1069
1072
1077
1080
1082
1085
1090
1093
1096
1099
1102
1104
1107
1109
1112
1115
1118
1121
1124
1127
1130
1133
1136
1138
1141
1142# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##le
1143
1144#define AV_PIX_FMT_RGB32 AV_PIX_FMT_NE(ARGB, BGRA)
1145#define AV_PIX_FMT_RGB32_1 AV_PIX_FMT_NE(RGBA, ABGR)
1146#define AV_PIX_FMT_BGR32 AV_PIX_FMT_NE(ABGR, RGBA)
1147#define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB)
1148#define AV_PIX_FMT_0RGB32 AV_PIX_FMT_NE(0RGB, BGR0)
1149#define AV_PIX_FMT_0BGR32 AV_PIX_FMT_NE(0BGR, RGB0)
1150
1151#define AV_PIX_FMT_GRAY9 AV_PIX_FMT_NE(GRAY9BE, GRAY9LE)
1152#define AV_PIX_FMT_GRAY10 AV_PIX_FMT_NE(GRAY10BE, GRAY10LE)
1153#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
1154#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
1155#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
1156#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
1157#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
1158#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
1159#define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE)
1160#define AV_PIX_FMT_RGB444 AV_PIX_FMT_NE(RGB444BE, RGB444LE)
1161#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE)
1162#define AV_PIX_FMT_BGR48 AV_PIX_FMT_NE(BGR48BE, BGR48LE)
1163#define AV_PIX_FMT_BGR565 AV_PIX_FMT_NE(BGR565BE, BGR565LE)
1164#define AV_PIX_FMT_BGR555 AV_PIX_FMT_NE(BGR555BE, BGR555LE)
1165#define AV_PIX_FMT_BGR444 AV_PIX_FMT_NE(BGR444BE, BGR444LE)
1166#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE)
1167
1168#define AV_PIX_FMT_YUV420P9 AV_PIX_FMT_NE(YUV420P9BE , YUV420P9LE)
1169#define AV_PIX_FMT_YUV422P9 AV_PIX_FMT_NE(YUV422P9BE , YUV422P9LE)
1170#define AV_PIX_FMT_YUV444P9 AV_PIX_FMT_NE(YUV444P9BE , YUV444P9LE)
1171#define AV_PIX_FMT_YUV420P10 AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE)
1172#define AV_PIX_FMT_YUV422P10 AV_PIX_FMT_NE(YUV422P10BE, YUV422P10LE)
1173#define AV_PIX_FMT_YUV440P10 AV_PIX_FMT_NE(YUV440P10BE, YUV440P10LE)
1174#define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE)
1175#define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE)
1176#define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE)
1177#define AV_PIX_FMT_YUV440P12 AV_PIX_FMT_NE(YUV440P12BE, YUV440P12LE)
1178#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE)
1179#define AV_PIX_FMT_YUV420P14 AV_PIX_FMT_NE(YUV420P14BE, YUV420P14LE)
1180#define AV_PIX_FMT_YUV422P14 AV_PIX_FMT_NE(YUV422P14BE, YUV422P14LE)
1181#define AV_PIX_FMT_YUV444P14 AV_PIX_FMT_NE(YUV444P14BE, YUV444P14LE)
1182#define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE)
1183#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
1184#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
1185
1186#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE)
1187#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
1188#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE)
1189#define AV_PIX_FMT_GBRP14 AV_PIX_FMT_NE(GBRP14BE, GBRP14LE)
1190#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
1191#define AV_PIX_FMT_GBRAP10 AV_PIX_FMT_NE(GBRAP10BE, GBRAP10LE)
1192#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE)
1193#define AV_PIX_FMT_GBRAP14 AV_PIX_FMT_NE(GBRAP14BE, GBRAP14LE)
1194#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
1195
1196#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE)
1197#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE)
1198#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE)
1199#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE)
1200
1201#define AV_PIX_FMT_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE)
1202#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE)
1203
1204#define AV_PIX_FMT_GRAYF32 AV_PIX_FMT_NE(GRAYF32BE, GRAYF32LE)
1205
1206#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
1207#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
1208#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
1209#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE)
1210#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE)
1211#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE)
1212#define AV_PIX_FMT_YUVA422P12 AV_PIX_FMT_NE(YUVA422P12BE, YUVA422P12LE)
1213#define AV_PIX_FMT_YUVA444P12 AV_PIX_FMT_NE(YUVA444P12BE, YUVA444P12LE)
1214#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE)
1215#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE)
1216#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)
1217
1218#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE)
1219#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE)
1220#define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE)
1221#define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE)
1222#define AV_PIX_FMT_P012 AV_PIX_FMT_NE(P012BE, P012LE)
1223#define AV_PIX_FMT_P016 AV_PIX_FMT_NE(P016BE, P016LE)
1224
1225#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
1226#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
1227#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
1228#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
1229#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
1230#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
1231
1232#define AV_PIX_FMT_P210 AV_PIX_FMT_NE(P210BE, P210LE)
1233#define AV_PIX_FMT_P410 AV_PIX_FMT_NE(P410BE, P410LE)
1234#define AV_PIX_FMT_P212 AV_PIX_FMT_NE(P212BE, P212LE)
1235#define AV_PIX_FMT_P412 AV_PIX_FMT_NE(P412BE, P412LE)
1236#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
1237#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
1238
1239#define AV_PIX_FMT_RGBAF16 AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE)
1240
1241#define AV_PIX_FMT_RGBF32 AV_PIX_FMT_NE(RGBF32BE, RGBF32LE)
1242#define AV_PIX_FMT_RGBAF32 AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE)
1243
1250
1264
1289
1309
1312
1314
1318
1329
1330static inline void *av_x_if_null(const void *p, const void *x)
1331{
1332 return (void *)(intptr_t)(p ? p : x);
1333}
1334
1335unsigned av_int_list_length_for_size(unsigned elsize,
1336 const void *list, uint64_t term) av_pure;
1337
1338#define av_int_list_length(list, term) \
1339 av_int_list_length_for_size(sizeof(*(list)), list, term)
1340
1342
1343#define AV_FOURCC_MAX_STRING_SIZE 32
1344
1345#define av_fourcc2str(fourcc) av_fourcc_make_string((char[AV_FOURCC_MAX_STRING_SIZE]){0}, fourcc)
1346
1347char *av_fourcc_make_string(char *buf, uint32_t fourcc);
1348
1349#define AVUTIL_BUFFER_H
1350
1351typedef struct AVBuffer AVBuffer;
1352
1353typedef struct AVBufferRef {
1355
1356 uint8_t *data;
1357
1358 size_t size;
1360
1362
1364
1365#define AV_BUFFER_FLAG_READONLY (1 << 0)
1366
1367AVBufferRef *av_buffer_create(uint8_t *data, size_t size,
1368 void (*free)(void *opaque, uint8_t *data),
1369 void *opaque, int flags);
1370
1371void av_buffer_default_free(void *opaque, uint8_t *data);
1372
1374
1376
1378
1380
1382
1384
1386
1388
1390
1392
1394 AVBufferRef* (*alloc)(void *opaque, size_t size),
1395 void (*pool_free)(void *opaque));
1396
1398
1400
1402
1403#define AVUTIL_CHANNEL_LAYOUT_H
1404
1406
1426
1428
1440
1442
1444
1446
1448};
1449
1451
1453
1455
1457
1459
1462
1463#define AV_CH_FRONT_LEFT (1ULL << AV_CHAN_FRONT_LEFT )
1464#define AV_CH_FRONT_RIGHT (1ULL << AV_CHAN_FRONT_RIGHT )
1465#define AV_CH_FRONT_CENTER (1ULL << AV_CHAN_FRONT_CENTER )
1466#define AV_CH_LOW_FREQUENCY (1ULL << AV_CHAN_LOW_FREQUENCY )
1467#define AV_CH_BACK_LEFT (1ULL << AV_CHAN_BACK_LEFT )
1468#define AV_CH_BACK_RIGHT (1ULL << AV_CHAN_BACK_RIGHT )
1469#define AV_CH_FRONT_LEFT_OF_CENTER (1ULL << AV_CHAN_FRONT_LEFT_OF_CENTER )
1470#define AV_CH_FRONT_RIGHT_OF_CENTER (1ULL << AV_CHAN_FRONT_RIGHT_OF_CENTER)
1471#define AV_CH_BACK_CENTER (1ULL << AV_CHAN_BACK_CENTER )
1472#define AV_CH_SIDE_LEFT (1ULL << AV_CHAN_SIDE_LEFT )
1473#define AV_CH_SIDE_RIGHT (1ULL << AV_CHAN_SIDE_RIGHT )
1474#define AV_CH_TOP_CENTER (1ULL << AV_CHAN_TOP_CENTER )
1475#define AV_CH_TOP_FRONT_LEFT (1ULL << AV_CHAN_TOP_FRONT_LEFT )
1476#define AV_CH_TOP_FRONT_CENTER (1ULL << AV_CHAN_TOP_FRONT_CENTER )
1477#define AV_CH_TOP_FRONT_RIGHT (1ULL << AV_CHAN_TOP_FRONT_RIGHT )
1478#define AV_CH_TOP_BACK_LEFT (1ULL << AV_CHAN_TOP_BACK_LEFT )
1479#define AV_CH_TOP_BACK_CENTER (1ULL << AV_CHAN_TOP_BACK_CENTER )
1480#define AV_CH_TOP_BACK_RIGHT (1ULL << AV_CHAN_TOP_BACK_RIGHT )
1481#define AV_CH_STEREO_LEFT (1ULL << AV_CHAN_STEREO_LEFT )
1482#define AV_CH_STEREO_RIGHT (1ULL << AV_CHAN_STEREO_RIGHT )
1483#define AV_CH_WIDE_LEFT (1ULL << AV_CHAN_WIDE_LEFT )
1484#define AV_CH_WIDE_RIGHT (1ULL << AV_CHAN_WIDE_RIGHT )
1485#define AV_CH_SURROUND_DIRECT_LEFT (1ULL << AV_CHAN_SURROUND_DIRECT_LEFT )
1486#define AV_CH_SURROUND_DIRECT_RIGHT (1ULL << AV_CHAN_SURROUND_DIRECT_RIGHT)
1487#define AV_CH_LOW_FREQUENCY_2 (1ULL << AV_CHAN_LOW_FREQUENCY_2 )
1488#define AV_CH_TOP_SIDE_LEFT (1ULL << AV_CHAN_TOP_SIDE_LEFT )
1489#define AV_CH_TOP_SIDE_RIGHT (1ULL << AV_CHAN_TOP_SIDE_RIGHT )
1490#define AV_CH_BOTTOM_FRONT_CENTER (1ULL << AV_CHAN_BOTTOM_FRONT_CENTER )
1491#define AV_CH_BOTTOM_FRONT_LEFT (1ULL << AV_CHAN_BOTTOM_FRONT_LEFT )
1492#define AV_CH_BOTTOM_FRONT_RIGHT (1ULL << AV_CHAN_BOTTOM_FRONT_RIGHT )
1493
1494#define AV_CH_LAYOUT_MONO (AV_CH_FRONT_CENTER)
1495#define AV_CH_LAYOUT_STEREO (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
1496#define AV_CH_LAYOUT_2POINT1 (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY)
1497#define AV_CH_LAYOUT_2_1 (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER)
1498#define AV_CH_LAYOUT_SURROUND (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER)
1499#define AV_CH_LAYOUT_3POINT1 (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY)
1500#define AV_CH_LAYOUT_4POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER)
1501#define AV_CH_LAYOUT_4POINT1 (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY)
1502#define AV_CH_LAYOUT_2_2 (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
1503#define AV_CH_LAYOUT_QUAD (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1504#define AV_CH_LAYOUT_5POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
1505#define AV_CH_LAYOUT_5POINT1 (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY)
1506#define AV_CH_LAYOUT_5POINT0_BACK (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1507#define AV_CH_LAYOUT_5POINT1_BACK (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY)
1508#define AV_CH_LAYOUT_6POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)
1509#define AV_CH_LAYOUT_6POINT0_FRONT (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1510#define AV_CH_LAYOUT_HEXAGONAL (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)
1511#define AV_CH_LAYOUT_3POINT1POINT2 (AV_CH_LAYOUT_3POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
1512#define AV_CH_LAYOUT_6POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)
1513#define AV_CH_LAYOUT_6POINT1_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)
1514#define AV_CH_LAYOUT_6POINT1_FRONT (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)
1515#define AV_CH_LAYOUT_7POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1516#define AV_CH_LAYOUT_7POINT0_FRONT (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1517#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1518#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1519#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1520#define AV_CH_LAYOUT_5POINT1POINT2_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
1521#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
1522#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
1523#define AV_CH_LAYOUT_5POINT1POINT4_BACK (AV_CH_LAYOUT_5POINT1POINT2_BACK|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
1524#define AV_CH_LAYOUT_7POINT1POINT2 (AV_CH_LAYOUT_7POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
1525#define AV_CH_LAYOUT_7POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
1526#define AV_CH_LAYOUT_7POINT2POINT3 (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_CENTER|AV_CH_LOW_FREQUENCY_2)
1527#define AV_CH_LAYOUT_9POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1528#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
1529#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
1530#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
1531
1532#define AV_CH_LAYOUT_7POINT1_TOP_BACK AV_CH_LAYOUT_5POINT1POINT2_BACK
1533
1544
1545typedef struct AVChannelCustom {
1546 enum AVChannel id;
1547 char name[16];
1548 void *opaque;
1550
1551typedef struct AVChannelLayout {
1552
1553 enum AVChannelOrder order;
1554
1555 int nb_channels;
1556
1557 union {
1558
1559 uint64_t mask;
1560
1562 } u;
1563
1564 void *opaque;
1566
1567#define AV_CHANNEL_LAYOUT_MASK(nb, m) \
1568 { AV_CHANNEL_ORDER_NATIVE, \
1569 (nb), \
1570 { m }, \
1571 NULL }
1572
1573#define AV_CHANNEL_LAYOUT_MONO AV_CHANNEL_LAYOUT_MASK(1, AV_CH_LAYOUT_MONO)
1574#define AV_CHANNEL_LAYOUT_STEREO AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO)
1575#define AV_CHANNEL_LAYOUT_2POINT1 AV_CHANNEL_LAYOUT_MASK(3, AV_CH_LAYOUT_2POINT1)
1576#define AV_CHANNEL_LAYOUT_2_1 AV_CHANNEL_LAYOUT_MASK(3, AV_CH_LAYOUT_2_1)
1577#define AV_CHANNEL_LAYOUT_SURROUND AV_CHANNEL_LAYOUT_MASK(3, AV_CH_LAYOUT_SURROUND)
1578#define AV_CHANNEL_LAYOUT_3POINT1 AV_CHANNEL_LAYOUT_MASK(4, AV_CH_LAYOUT_3POINT1)
1579#define AV_CHANNEL_LAYOUT_4POINT0 AV_CHANNEL_LAYOUT_MASK(4, AV_CH_LAYOUT_4POINT0)
1580#define AV_CHANNEL_LAYOUT_4POINT1 AV_CHANNEL_LAYOUT_MASK(5, AV_CH_LAYOUT_4POINT1)
1581#define AV_CHANNEL_LAYOUT_2_2 AV_CHANNEL_LAYOUT_MASK(4, AV_CH_LAYOUT_2_2)
1582#define AV_CHANNEL_LAYOUT_QUAD AV_CHANNEL_LAYOUT_MASK(4, AV_CH_LAYOUT_QUAD)
1583#define AV_CHANNEL_LAYOUT_5POINT0 AV_CHANNEL_LAYOUT_MASK(5, AV_CH_LAYOUT_5POINT0)
1584#define AV_CHANNEL_LAYOUT_5POINT1 AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_5POINT1)
1585#define AV_CHANNEL_LAYOUT_5POINT0_BACK AV_CHANNEL_LAYOUT_MASK(5, AV_CH_LAYOUT_5POINT0_BACK)
1586#define AV_CHANNEL_LAYOUT_5POINT1_BACK AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_5POINT1_BACK)
1587#define AV_CHANNEL_LAYOUT_6POINT0 AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_6POINT0)
1588#define AV_CHANNEL_LAYOUT_6POINT0_FRONT AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_6POINT0_FRONT)
1589#define AV_CHANNEL_LAYOUT_3POINT1POINT2 AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_3POINT1POINT2)
1590#define AV_CHANNEL_LAYOUT_HEXAGONAL AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_HEXAGONAL)
1591#define AV_CHANNEL_LAYOUT_6POINT1 AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_6POINT1)
1592#define AV_CHANNEL_LAYOUT_6POINT1_BACK AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_6POINT1_BACK)
1593#define AV_CHANNEL_LAYOUT_6POINT1_FRONT AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_6POINT1_FRONT)
1594#define AV_CHANNEL_LAYOUT_7POINT0 AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_7POINT0)
1595#define AV_CHANNEL_LAYOUT_7POINT0_FRONT AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_7POINT0_FRONT)
1596#define AV_CHANNEL_LAYOUT_7POINT1 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1)
1597#define AV_CHANNEL_LAYOUT_7POINT1_WIDE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE)
1598#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK)
1599#define AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_5POINT1POINT2_BACK)
1600#define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL)
1601#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE)
1602#define AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(10, AV_CH_LAYOUT_5POINT1POINT4_BACK)
1603#define AV_CHANNEL_LAYOUT_7POINT1POINT2 AV_CHANNEL_LAYOUT_MASK(10, AV_CH_LAYOUT_7POINT1POINT2)
1604#define AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT1POINT4_BACK)
1605#define AV_CHANNEL_LAYOUT_7POINT2POINT3 AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT2POINT3)
1606#define AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(14, AV_CH_LAYOUT_9POINT1POINT4_BACK)
1607#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
1608#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
1609#define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2)
1610
1611#define AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK
1612
1613#define AV_CHANNEL_LAYOUT_AMBISONIC_FIRST_ORDER \
1614 { AV_CHANNEL_ORDER_AMBISONIC, \
1615 4, \
1616 { 0 }, \
1617 NULL }
1618
1619struct AVBPrint;
1620
1621int av_channel_name(char *buf, size_t buf_size, enum AVChannel channel);
1622
1623void av_channel_name_bprint(struct AVBPrint *bp, enum AVChannel channel_id);
1624
1625int av_channel_description(char *buf, size_t buf_size, enum AVChannel channel);
1626
1627void av_channel_description_bprint(struct AVBPrint *bp, enum AVChannel channel_id);
1628
1630
1631int av_channel_layout_custom_init(AVChannelLayout *channel_layout, int nb_channels);
1632
1633int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask);
1634
1636 const char *str);
1637
1638void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels);
1639
1641
1643
1645
1647 char *buf, size_t buf_size);
1648
1650 struct AVBPrint *bp);
1651
1652enum AVChannel
1653av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout, unsigned int idx);
1654
1656 enum AVChannel channel);
1657
1659 const char *name);
1660
1661enum AVChannel
1663 const char *name);
1664
1665uint64_t av_channel_layout_subset(const AVChannelLayout *channel_layout,
1666 uint64_t mask);
1667
1668int av_channel_layout_check(const AVChannelLayout *channel_layout);
1669
1671
1672#define AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS (1 << 0)
1673
1674#define AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL (1 << 1)
1675
1676int av_channel_layout_retype(AVChannelLayout *channel_layout, enum AVChannelOrder order, int flags);
1677
1678#define AVUTIL_DICT_H
1679
1680#define AV_DICT_MATCH_CASE 1
1681#define AV_DICT_IGNORE_SUFFIX 2
1682
1683#define AV_DICT_DONT_STRDUP_KEY 4
1684
1685#define AV_DICT_DONT_STRDUP_VAL 8
1686
1687#define AV_DICT_DONT_OVERWRITE 16
1688#define AV_DICT_APPEND 32
1689
1690#define AV_DICT_MULTIKEY 64
1691
1692typedef struct AVDictionaryEntry {
1693 char *key;
1694 char *value;
1696
1698
1700 const AVDictionaryEntry *prev, int flags);
1701
1703 const AVDictionaryEntry *prev);
1704
1706
1707int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
1708
1709int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags);
1710
1712 const char *key_val_sep, const char *pairs_sep,
1713 int flags);
1714
1715int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);
1716
1718
1719int av_dict_get_string(const AVDictionary *m, char **buffer,
1720 const char key_val_sep, const char pairs_sep);
1721
1722#define AVUTIL_FRAME_H
1723
1725
1727
1729
1731
1733
1735
1737
1739
1741
1743
1745
1747
1749
1751
1753
1755
1757
1759
1761
1763
1765
1767
1769
1771
1773
1775
1777
1779
1781};
1782
1791};
1792
1793typedef struct AVFrameSideData {
1795 uint8_t *data;
1796 size_t size;
1800
1801typedef struct AVRegionOfInterest {
1802
1803 uint32_t self_size;
1804
1805 int top;
1806 int bottom;
1807 int left;
1808 int right;
1809
1812
1813typedef struct AVFrame {
1814#define AV_NUM_DATA_POINTERS 8
1815
1816 uint8_t *data[AV_NUM_DATA_POINTERS];
1817
1819
1820 uint8_t **extended_data;
1821
1822 int width, height;
1823
1824 int nb_samples;
1825
1826 int format;
1827
1830
1832
1834
1835 int64_t pts;
1836
1837 int64_t pkt_dts;
1838
1840
1841 int quality;
1842
1843 void *opaque;
1844
1845 int repeat_pict;
1846
1849
1852
1855
1856 int sample_rate;
1857
1859
1861
1862 int nb_extended_buf;
1863
1865 int nb_side_data;
1866
1867#define AV_FRAME_FLAG_CORRUPT (1 << 0)
1868
1869#define AV_FRAME_FLAG_KEY (1 << 1)
1870
1871#define AV_FRAME_FLAG_DISCARD (1 << 2)
1872
1873#define AV_FRAME_FLAG_INTERLACED (1 << 3)
1874
1875#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4)
1876
1877 int flags;
1878
1880
1882
1884
1886
1888
1889 int64_t best_effort_timestamp;
1890
1892 int64_t pkt_pos;
1893
1895
1897#define FF_DECODE_ERROR_INVALID_BITSTREAM 1
1898#define FF_DECODE_ERROR_MISSING_REFERENCE 2
1899#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
1900#define FF_DECODE_ERROR_DECODE_SLICES 8
1901
1904
1906
1908
1909 size_t crop_top;
1910 size_t crop_bottom;
1911 size_t crop_left;
1912 size_t crop_right;
1913
1915
1917
1918 int64_t duration;
1920
1922
1924
1925int av_frame_ref(AVFrame *dst, const AVFrame *src);
1926
1927int av_frame_replace(AVFrame *dst, const AVFrame *src);
1928
1930
1932
1934
1935int av_frame_get_buffer(AVFrame *frame, int align);
1936
1938
1940
1941int av_frame_copy(AVFrame *dst, const AVFrame *src);
1942
1944
1946
1948 enum AVFrameSideDataType type,
1949 size_t size);
1950
1952 enum AVFrameSideDataType type,
1953 AVBufferRef *buf);
1954
1956 enum AVFrameSideDataType type);
1957
1959
1960enum {
1961
1963};
1964
1965int av_frame_apply_cropping(AVFrame *frame, int flags);
1966
1968
1970
1971#define AV_FRAME_SIDE_DATA_FLAG_UNIQUE (1 << 0)
1972
1974 enum AVFrameSideDataType type,
1975 size_t size, unsigned int flags);
1976
1978 const AVFrameSideData *src, unsigned int flags);
1979
1981 const int nb_sd,
1982 enum AVFrameSideDataType type);
1983
1984static inline
1986 const int nb_sd,
1987 enum AVFrameSideDataType type)
1988{
1989 return av_frame_side_data_get_c((const AVFrameSideData * const *)sd,
1990 nb_sd, type);
1991}
1992
1993#define AVCODEC_CODEC_H
1994
1995#define AVUTIL_HWCONTEXT_H
1996
2011};
2012
2013typedef struct AVHWDeviceContext {
2014
2015 const AVClass *av_class;
2016
2017 enum AVHWDeviceType type;
2018
2019 void *hwctx;
2020
2021 void (*free)(struct AVHWDeviceContext *ctx);
2022
2023 void *user_opaque;
2025
2026typedef struct AVHWFramesContext {
2027
2028 const AVClass *av_class;
2029
2031
2033
2034 void *hwctx;
2035
2036 void (*free)(struct AVHWFramesContext *ctx);
2037
2038 void *user_opaque;
2039
2041
2043
2044 enum AVPixelFormat format;
2045
2047
2048 int width, height;
2050
2052
2054
2056
2058
2060
2062 const char *device, AVDictionary *opts, int flags);
2063
2065 enum AVHWDeviceType type,
2066 AVBufferRef *src_ctx, int flags);
2067
2069 enum AVHWDeviceType type,
2070 AVBufferRef *src_ctx,
2071 AVDictionary *options, int flags);
2072
2074
2076
2077int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags);
2078
2079int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags);
2080
2082
2084
2086};
2087
2090 enum AVPixelFormat **formats, int flags);
2091
2092typedef struct AVHWFramesConstraints {
2093
2095
2097
2098 int min_width;
2099 int min_height;
2100
2101 int max_width;
2102 int max_height;
2104
2106
2108 const void *hwconfig);
2109
2111
2112enum {
2113
2115
2117
2119
2121};
2122
2123int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags);
2124
2126 enum AVPixelFormat format,
2127 AVBufferRef *derived_device_ctx,
2128 AVBufferRef *source_frame_ctx,
2129 int flags);
2130
2131#define AVCODEC_CODEC_ID_H
2132
2133#define AVCODEC_VERSION_MAJOR_H
2134
2135#define LIBAVCODEC_VERSION_MAJOR 61
2136
2137#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 62)
2138#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 62)
2139#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 62)
2140#define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 62)
2141
2142#define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62)
2143#define FF_API_FF_PROFILE_LEVEL (LIBAVCODEC_VERSION_MAJOR < 62)
2144#define FF_API_AVCODEC_CLOSE (LIBAVCODEC_VERSION_MAJOR < 62)
2145#define FF_API_BUFFER_MIN_SIZE (LIBAVCODEC_VERSION_MAJOR < 62)
2146#define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
2147
2150
2287#define AV_CODEC_ID_IFF_BYTERUN1 AV_CODEC_ID_IFF_ILBM
2325#define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC
2349#define AV_CODEC_ID_H266 AV_CODEC_ID_VVC
2423
2462
2515
2518
2521
2531
2638
2666
2669
2681
2683
2685
2687
2690
2692
2694};
2695
2697
2698const char *avcodec_get_name(enum AVCodecID id);
2699
2701
2703
2704const char *avcodec_profile_name(enum AVCodecID codec_id, int profile);
2705
2707
2708#define AV_CODEC_CAP_DRAW_HORIZ_BAND (1 << 0)
2709
2710#define AV_CODEC_CAP_DR1 (1 << 1)
2711
2712#define AV_CODEC_CAP_DELAY (1 << 5)
2713
2714#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
2715
2716#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
2717
2718#define AV_CODEC_CAP_EXPERIMENTAL (1 << 9)
2719
2720#define AV_CODEC_CAP_CHANNEL_CONF (1 << 10)
2721
2722#define AV_CODEC_CAP_FRAME_THREADS (1 << 12)
2723
2724#define AV_CODEC_CAP_SLICE_THREADS (1 << 13)
2725
2726#define AV_CODEC_CAP_PARAM_CHANGE (1 << 14)
2727
2728#define AV_CODEC_CAP_OTHER_THREADS (1 << 15)
2729
2730#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
2731
2732#define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
2733
2734#define AV_CODEC_CAP_HARDWARE (1 << 18)
2735
2736#define AV_CODEC_CAP_HYBRID (1 << 19)
2737
2738#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20)
2739
2740#define AV_CODEC_CAP_ENCODER_FLUSH (1 << 21)
2741
2742#define AV_CODEC_CAP_ENCODER_RECON_FRAME (1 << 22)
2743
2744typedef struct AVProfile {
2745 int profile;
2746 const char *name;
2748
2749typedef struct AVCodec {
2750
2751 const char *name;
2752
2753 const char *long_name;
2754 enum AVMediaType type;
2755 enum AVCodecID id;
2756
2757 int capabilities;
2758 uint8_t max_lowres;
2760 const enum AVPixelFormat *pix_fmts;
2761 const int *supported_samplerates;
2762 const enum AVSampleFormat *sample_fmts;
2763 const AVClass *priv_class;
2764 const AVProfile *profiles;
2765
2766 const char *wrapper_name;
2767
2770
2771const AVCodec *av_codec_iterate(void **opaque);
2772
2774
2776
2778
2780
2782
2784
2785const char *av_get_profile_name(const AVCodec *codec, int profile);
2786
2787enum {
2788
2790
2792
2794
2796};
2797
2798typedef struct AVCodecHWConfig {
2799
2801
2802 int methods;
2803
2806
2807const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index);
2808
2809#define AVCODEC_DEFS_H
2810
2811#define AV_INPUT_BUFFER_PADDING_SIZE 64
2812
2813#define AV_EF_CRCCHECK (1<<0)
2814#define AV_EF_BITSTREAM (1<<1)
2815#define AV_EF_BUFFER (1<<2)
2816#define AV_EF_EXPLODE (1<<3)
2817
2818#define AV_EF_IGNORE_ERR (1<<15)
2819#define AV_EF_CAREFUL (1<<16)
2820#define AV_EF_COMPLIANT (1<<17)
2821#define AV_EF_AGGRESSIVE (1<<18)
2822
2823#define FF_COMPLIANCE_VERY_STRICT 2
2824#define FF_COMPLIANCE_STRICT 1
2825#define FF_COMPLIANCE_NORMAL 0
2826#define FF_COMPLIANCE_UNOFFICIAL -1
2827#define FF_COMPLIANCE_EXPERIMENTAL -2
2828
2829#define AV_PROFILE_UNKNOWN -99
2830#define AV_PROFILE_RESERVED -100
2831
2832#define AV_PROFILE_AAC_MAIN 0
2833#define AV_PROFILE_AAC_LOW 1
2834#define AV_PROFILE_AAC_SSR 2
2835#define AV_PROFILE_AAC_LTP 3
2836#define AV_PROFILE_AAC_HE 4
2837#define AV_PROFILE_AAC_HE_V2 28
2838#define AV_PROFILE_AAC_LD 22
2839#define AV_PROFILE_AAC_ELD 38
2840#define AV_PROFILE_MPEG2_AAC_LOW 128
2841#define AV_PROFILE_MPEG2_AAC_HE 131
2842
2843#define AV_PROFILE_DNXHD 0
2844#define AV_PROFILE_DNXHR_LB 1
2845#define AV_PROFILE_DNXHR_SQ 2
2846#define AV_PROFILE_DNXHR_HQ 3
2847#define AV_PROFILE_DNXHR_HQX 4
2848#define AV_PROFILE_DNXHR_444 5
2849
2850#define AV_PROFILE_DTS 20
2851#define AV_PROFILE_DTS_ES 30
2852#define AV_PROFILE_DTS_96_24 40
2853#define AV_PROFILE_DTS_HD_HRA 50
2854#define AV_PROFILE_DTS_HD_MA 60
2855#define AV_PROFILE_DTS_EXPRESS 70
2856#define AV_PROFILE_DTS_HD_MA_X 61
2857#define AV_PROFILE_DTS_HD_MA_X_IMAX 62
2858
2859#define AV_PROFILE_EAC3_DDP_ATMOS 30
2860
2861#define AV_PROFILE_TRUEHD_ATMOS 30
2862
2863#define AV_PROFILE_MPEG2_422 0
2864#define AV_PROFILE_MPEG2_HIGH 1
2865#define AV_PROFILE_MPEG2_SS 2
2866#define AV_PROFILE_MPEG2_SNR_SCALABLE 3
2867#define AV_PROFILE_MPEG2_MAIN 4
2868#define AV_PROFILE_MPEG2_SIMPLE 5
2869
2870#define AV_PROFILE_H264_CONSTRAINED (1<<9)
2871#define AV_PROFILE_H264_INTRA (1<<11)
2872
2873#define AV_PROFILE_H264_BASELINE 66
2874#define AV_PROFILE_H264_CONSTRAINED_BASELINE (66|AV_PROFILE_H264_CONSTRAINED)
2875#define AV_PROFILE_H264_MAIN 77
2876#define AV_PROFILE_H264_EXTENDED 88
2877#define AV_PROFILE_H264_HIGH 100
2878#define AV_PROFILE_H264_HIGH_10 110
2879#define AV_PROFILE_H264_HIGH_10_INTRA (110|AV_PROFILE_H264_INTRA)
2880#define AV_PROFILE_H264_MULTIVIEW_HIGH 118
2881#define AV_PROFILE_H264_HIGH_422 122
2882#define AV_PROFILE_H264_HIGH_422_INTRA (122|AV_PROFILE_H264_INTRA)
2883#define AV_PROFILE_H264_STEREO_HIGH 128
2884#define AV_PROFILE_H264_HIGH_444 144
2885#define AV_PROFILE_H264_HIGH_444_PREDICTIVE 244
2886#define AV_PROFILE_H264_HIGH_444_INTRA (244|AV_PROFILE_H264_INTRA)
2887#define AV_PROFILE_H264_CAVLC_444 44
2888
2889#define AV_PROFILE_VC1_SIMPLE 0
2890#define AV_PROFILE_VC1_MAIN 1
2891#define AV_PROFILE_VC1_COMPLEX 2
2892#define AV_PROFILE_VC1_ADVANCED 3
2893
2894#define AV_PROFILE_MPEG4_SIMPLE 0
2895#define AV_PROFILE_MPEG4_SIMPLE_SCALABLE 1
2896#define AV_PROFILE_MPEG4_CORE 2
2897#define AV_PROFILE_MPEG4_MAIN 3
2898#define AV_PROFILE_MPEG4_N_BIT 4
2899#define AV_PROFILE_MPEG4_SCALABLE_TEXTURE 5
2900#define AV_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
2901#define AV_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
2902#define AV_PROFILE_MPEG4_HYBRID 8
2903#define AV_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
2904#define AV_PROFILE_MPEG4_CORE_SCALABLE 10
2905#define AV_PROFILE_MPEG4_ADVANCED_CODING 11
2906#define AV_PROFILE_MPEG4_ADVANCED_CORE 12
2907#define AV_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
2908#define AV_PROFILE_MPEG4_SIMPLE_STUDIO 14
2909#define AV_PROFILE_MPEG4_ADVANCED_SIMPLE 15
2910
2911#define AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
2912#define AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
2913#define AV_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
2914#define AV_PROFILE_JPEG2000_DCINEMA_2K 3
2915#define AV_PROFILE_JPEG2000_DCINEMA_4K 4
2916
2917#define AV_PROFILE_VP9_0 0
2918#define AV_PROFILE_VP9_1 1
2919#define AV_PROFILE_VP9_2 2
2920#define AV_PROFILE_VP9_3 3
2921
2922#define AV_PROFILE_HEVC_MAIN 1
2923#define AV_PROFILE_HEVC_MAIN_10 2
2924#define AV_PROFILE_HEVC_MAIN_STILL_PICTURE 3
2925#define AV_PROFILE_HEVC_REXT 4
2926#define AV_PROFILE_HEVC_SCC 9
2927
2928#define AV_PROFILE_VVC_MAIN_10 1
2929#define AV_PROFILE_VVC_MAIN_10_444 33
2930
2931#define AV_PROFILE_AV1_MAIN 0
2932#define AV_PROFILE_AV1_HIGH 1
2933#define AV_PROFILE_AV1_PROFESSIONAL 2
2934
2935#define AV_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
2936#define AV_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
2937#define AV_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
2938#define AV_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
2939#define AV_PROFILE_MJPEG_JPEG_LS 0xf7
2940
2941#define AV_PROFILE_SBC_MSBC 1
2942
2943#define AV_PROFILE_PRORES_PROXY 0
2944#define AV_PROFILE_PRORES_LT 1
2945#define AV_PROFILE_PRORES_STANDARD 2
2946#define AV_PROFILE_PRORES_HQ 3
2947#define AV_PROFILE_PRORES_4444 4
2948#define AV_PROFILE_PRORES_XQ 5
2949
2950#define AV_PROFILE_ARIB_PROFILE_A 0
2951#define AV_PROFILE_ARIB_PROFILE_C 1
2952
2953#define AV_PROFILE_KLVA_SYNC 0
2954#define AV_PROFILE_KLVA_ASYNC 1
2955
2956#define AV_PROFILE_EVC_BASELINE 0
2957#define AV_PROFILE_EVC_MAIN 1
2958
2959#define AV_LEVEL_UNKNOWN -99
2960
2968};
2969
2971
2979};
2980
2992};
2993
2994typedef struct AVPanScan {
2995
2996 int id;
2997
2998 int width;
2999 int height;
3000
3001 int16_t position[3][2];
3003
3004typedef struct AVCPBProperties {
3005
3006 int64_t max_bitrate;
3007
3008 int64_t min_bitrate;
3009
3010 int64_t avg_bitrate;
3011
3012 int64_t buffer_size;
3013
3014 uint64_t vbv_delay;
3016
3018
3019typedef struct AVProducerReferenceTime {
3020
3021 int64_t wallclock;
3022 int flags;
3024
3025unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
3026
3027#define AVCODEC_PACKET_H
3028
3030
3032
3034
3036
3038
3040
3042
3044
3046
3048
3050
3052
3054
3056
3058
3060
3062
3064
3066
3068
3070
3072
3074
3076
3078
3080
3082
3084
3086
3088
3090
3092
3094
3096
3098
3100
3102
3105
3106#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS
3107
3108typedef struct AVPacketSideData {
3109 uint8_t *data;
3110 size_t size;
3113
3115 enum AVPacketSideDataType type,
3116 size_t size, int flags);
3117
3119 enum AVPacketSideDataType type,
3120 void *data, size_t size, int flags);
3121
3123 int nb_sd,
3124 enum AVPacketSideDataType type);
3125
3127 enum AVPacketSideDataType type);
3128
3130
3132
3133typedef struct AVPacket {
3134
3136
3137 int64_t pts;
3138
3139 int64_t dts;
3140 uint8_t *data;
3141 int size;
3142 int stream_index;
3143
3144 int flags;
3145
3147 int side_data_elems;
3148
3149 int64_t duration;
3150
3151 int64_t pos;
3152
3153 void *opaque;
3154
3156
3159
3161typedef struct AVPacketList {
3162 AVPacket pkt;
3163 struct AVPacketList *next;
3165
3166#define AV_PKT_FLAG_KEY 0x0001
3167#define AV_PKT_FLAG_CORRUPT 0x0002
3168
3169#define AV_PKT_FLAG_DISCARD 0x0004
3170
3171#define AV_PKT_FLAG_TRUSTED 0x0008
3172
3173#define AV_PKT_FLAG_DISPOSABLE 0x0010
3174
3178};
3179
3181
3183
3185
3188
3190
3192
3193int av_grow_packet(AVPacket *pkt, int grow_by);
3194
3195int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);
3196
3198 size_t size);
3199
3201 uint8_t *data, size_t size);
3202
3204 size_t size);
3205
3207 size_t *size);
3208
3210
3211int av_packet_unpack_dictionary(const uint8_t *data, size_t size,
3212 AVDictionary **dict);
3213
3215
3216int av_packet_ref(AVPacket *dst, const AVPacket *src);
3217
3219
3221
3223
3225
3227
3229
3230#define AVCODEC_VERSION_H
3231
3232#define LIBAVCODEC_VERSION_MINOR 3
3233#define LIBAVCODEC_VERSION_MICRO 100
3234
3235#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
3236 LIBAVCODEC_VERSION_MINOR, \
3237 LIBAVCODEC_VERSION_MICRO)
3238#define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
3239 LIBAVCODEC_VERSION_MINOR, \
3240 LIBAVCODEC_VERSION_MICRO)
3241#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
3242
3243#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
3244
3245#define AVCODEC_CODEC_DESC_H
3246
3247typedef struct AVCodecDescriptor {
3248 enum AVCodecID id;
3249 enum AVMediaType type;
3250
3251 const char *name;
3252
3253 const char *long_name;
3254
3255 int props;
3256
3257 const char *const *mime_types;
3258
3259 const struct AVProfile *profiles;
3261
3262#define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
3263
3264#define AV_CODEC_PROP_LOSSY (1 << 1)
3265
3266#define AV_CODEC_PROP_LOSSLESS (1 << 2)
3267
3268#define AV_CODEC_PROP_REORDER (1 << 3)
3269
3270#define AV_CODEC_PROP_FIELDS (1 << 4)
3271
3272#define AV_CODEC_PROP_BITMAP_SUB (1 << 16)
3273
3274#define AV_CODEC_PROP_TEXT_SUB (1 << 17)
3275
3277
3279
3281
3282#define AVCODEC_CODEC_PAR_H
3283
3284typedef struct AVCodecParameters {
3285
3287
3288 enum AVCodecID codec_id;
3289
3290 uint32_t codec_tag;
3291
3292 uint8_t *extradata;
3293
3294 int extradata_size;
3295
3297
3299
3300 int format;
3301
3302 int64_t bit_rate;
3303
3305
3307
3308 int profile;
3309 int level;
3310
3311 int width;
3312 int height;
3313
3315
3317
3319
3325
3326 int video_delay;
3327
3329
3330 int sample_rate;
3331
3332 int block_align;
3333
3334 int frame_size;
3335
3336 int initial_padding;
3337
3338 int trailing_padding;
3339
3340 int seek_preroll;
3342
3344
3346
3348
3350
3351struct AVCodecParameters;
3352
3353#define AV_INPUT_BUFFER_MIN_SIZE 16384
3354
3355typedef struct RcOverride{
3356 int start_frame;
3357 int end_frame;
3358 int qscale;
3359 float quality_factor;
3361
3362#define AV_CODEC_FLAG_UNALIGNED (1 << 0)
3363
3364#define AV_CODEC_FLAG_QSCALE (1 << 1)
3365
3366#define AV_CODEC_FLAG_4MV (1 << 2)
3367
3368#define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3)
3369
3370#define AV_CODEC_FLAG_QPEL (1 << 4)
3371
3372#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
3373
3374#define AV_CODEC_FLAG_RECON_FRAME (1 << 6)
3375
3376#define AV_CODEC_FLAG_COPY_OPAQUE (1 << 7)
3377
3378#define AV_CODEC_FLAG_FRAME_DURATION (1 << 8)
3379
3380#define AV_CODEC_FLAG_PASS1 (1 << 9)
3381
3382#define AV_CODEC_FLAG_PASS2 (1 << 10)
3383
3384#define AV_CODEC_FLAG_LOOP_FILTER (1 << 11)
3385
3386#define AV_CODEC_FLAG_GRAY (1 << 13)
3387
3388#define AV_CODEC_FLAG_PSNR (1 << 15)
3389
3390#define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18)
3391
3392#define AV_CODEC_FLAG_LOW_DELAY (1 << 19)
3393
3394#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
3395
3396#define AV_CODEC_FLAG_BITEXACT (1 << 23)
3397
3398#define AV_CODEC_FLAG_AC_PRED (1 << 24)
3399
3400#define AV_CODEC_FLAG_INTERLACED_ME (1 << 29)
3401#define AV_CODEC_FLAG_CLOSED_GOP (1U << 31)
3402
3403#define AV_CODEC_FLAG2_FAST (1 << 0)
3404
3405#define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2)
3406
3407#define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
3408
3409#define AV_CODEC_FLAG2_CHUNKS (1 << 15)
3410
3411#define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
3412
3413#define AV_CODEC_FLAG2_SHOW_ALL (1 << 22)
3414
3415#define AV_CODEC_FLAG2_EXPORT_MVS (1 << 28)
3416
3417#define AV_CODEC_FLAG2_SKIP_MANUAL (1 << 29)
3418
3419#define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30)
3420
3421#define AV_CODEC_FLAG2_ICC_PROFILES (1U << 31)
3422
3423#define AV_CODEC_EXPORT_DATA_MVS (1 << 0)
3424
3425#define AV_CODEC_EXPORT_DATA_PRFT (1 << 1)
3426
3427#define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2)
3428
3429#define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3)
3430
3431#define AV_GET_BUFFER_FLAG_REF (1 << 0)
3432
3433#define AV_GET_ENCODE_BUFFER_FLAG_REF (1 << 0)
3434
3435typedef struct AVCodecContext {
3436
3437 const AVClass *av_class;
3438 int log_level_offset;
3439
3440 enum AVMediaType codec_type;
3441 const struct AVCodec *codec;
3442 enum AVCodecID codec_id;
3443
3444 unsigned int codec_tag;
3445
3446 void *priv_data;
3447
3448 struct AVCodecInternal *internal;
3449
3450 void *opaque;
3451
3452 int64_t bit_rate;
3453
3454 int flags;
3455
3456 int flags2;
3457
3458 uint8_t *extradata;
3459 int extradata_size;
3460
3462
3464
3466
3469
3470 int delay;
3471
3472 int width, height;
3473
3475
3477
3479
3481
3483
3485
3487
3489
3491
3493
3494 int refs;
3495
3496 int has_b_frames;
3497
3498 int slice_flags;
3499#define SLICE_FLAG_CODED_ORDER 0x0001
3500#define SLICE_FLAG_ALLOW_FIELD 0x0002
3501#define SLICE_FLAG_ALLOW_PLANE 0x0004
3502
3503 void (*draw_horiz_band)(struct AVCodecContext *s,
3504 const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
3505 int y, int type, int height);
3506
3507 enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
3508
3509 int max_b_frames;
3510
3511 float b_quant_factor;
3512
3513 float b_quant_offset;
3514
3515 float i_quant_factor;
3516
3517 float i_quant_offset;
3518
3519 float lumi_masking;
3520
3522
3524
3525 float p_masking;
3526
3527 float dark_masking;
3528
3529 int nsse_weight;
3530
3531 int me_cmp;
3532
3533 int me_sub_cmp;
3534
3535 int mb_cmp;
3536
3537 int ildct_cmp;
3538#define FF_CMP_SAD 0
3539#define FF_CMP_SSE 1
3540#define FF_CMP_SATD 2
3541#define FF_CMP_DCT 3
3542#define FF_CMP_PSNR 4
3543#define FF_CMP_BIT 5
3544#define FF_CMP_RD 6
3545#define FF_CMP_ZERO 7
3546#define FF_CMP_VSAD 8
3547#define FF_CMP_VSSE 9
3548#define FF_CMP_NSSE 10
3549#define FF_CMP_W53 11
3550#define FF_CMP_W97 12
3551#define FF_CMP_DCTMAX 13
3552#define FF_CMP_DCT264 14
3553#define FF_CMP_MEDIAN_SAD 15
3554#define FF_CMP_CHROMA 256
3555
3556 int dia_size;
3557
3559
3560 int me_pre_cmp;
3561
3562 int pre_dia_size;
3563
3565
3566 int me_range;
3567
3568 int mb_decision;
3569#define FF_MB_DECISION_SIMPLE 0
3570#define FF_MB_DECISION_BITS 1
3571#define FF_MB_DECISION_RD 2
3572
3573 uint16_t *intra_matrix;
3574
3575 uint16_t *inter_matrix;
3576
3577 uint16_t *chroma_intra_matrix;
3578
3580
3581 int mb_lmin;
3582
3583 int mb_lmax;
3584
3585 int bidir_refine;
3586
3587 int keyint_min;
3588
3589 int gop_size;
3590
3591 int mv0_threshold;
3592
3593 int slices;
3594
3595 int sample_rate;
3596
3598
3600
3601 int frame_size;
3602
3603 int block_align;
3604
3605 int cutoff;
3606
3608
3610
3611 int initial_padding;
3612
3613 int trailing_padding;
3614
3615 int seek_preroll;
3616
3617 int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
3618
3620
3621 int global_quality;
3622
3624#define FF_COMPRESSION_DEFAULT -1
3625
3626 float qcompress;
3627 float qblur;
3628
3629 int qmin;
3630
3631 int qmax;
3632
3633 int max_qdiff;
3634
3635 int rc_buffer_size;
3636
3639
3640 int64_t rc_max_rate;
3641
3642 int64_t rc_min_rate;
3643
3645
3647
3649
3650 int trellis;
3651
3652 char *stats_out;
3653
3654 char *stats_in;
3655
3656 int workaround_bugs;
3657#define FF_BUG_AUTODETECT 1
3658#define FF_BUG_XVID_ILACE 4
3659#define FF_BUG_UMP4 8
3660#define FF_BUG_NO_PADDING 16
3661#define FF_BUG_AMV 32
3662#define FF_BUG_QPEL_CHROMA 64
3663#define FF_BUG_STD_QPEL 128
3664#define FF_BUG_QPEL_CHROMA2 256
3665#define FF_BUG_DIRECT_BLOCKSIZE 512
3666#define FF_BUG_EDGE 1024
3667#define FF_BUG_HPEL_CHROMA 2048
3668#define FF_BUG_DC_CLIP 4096
3669#define FF_BUG_MS 8192
3670#define FF_BUG_TRUNCATED 16384
3671#define FF_BUG_IEDGE 32768
3672
3674
3676#define FF_EC_GUESS_MVS 1
3677#define FF_EC_DEBLOCK 2
3678#define FF_EC_FAVOR_INTER 256
3679
3680 int debug;
3681#define FF_DEBUG_PICT_INFO 1
3682#define FF_DEBUG_RC 2
3683#define FF_DEBUG_BITSTREAM 4
3684#define FF_DEBUG_MB_TYPE 8
3685#define FF_DEBUG_QP 16
3686#define FF_DEBUG_DCT_COEFF 0x00000040
3687#define FF_DEBUG_SKIP 0x00000080
3688#define FF_DEBUG_STARTCODE 0x00000100
3689#define FF_DEBUG_ER 0x00000400
3690#define FF_DEBUG_MMCO 0x00000800
3691#define FF_DEBUG_BUGS 0x00001000
3692#define FF_DEBUG_BUFFERS 0x00008000
3693#define FF_DEBUG_THREADS 0x00010000
3694#define FF_DEBUG_GREEN_MD 0x00800000
3695#define FF_DEBUG_NOMC 0x01000000
3696
3697 int err_recognition;
3698
3699 const struct AVHWAccel *hwaccel;
3700
3701 void *hwaccel_context;
3702
3704
3706
3707 int hwaccel_flags;
3708
3709 int extra_hw_frames;
3710
3711 uint64_t error[AV_NUM_DATA_POINTERS];
3712
3713 int dct_algo;
3714#define FF_DCT_AUTO 0
3715#define FF_DCT_FASTINT 1
3716#define FF_DCT_INT 2
3717#define FF_DCT_MMX 3
3718#define FF_DCT_ALTIVEC 5
3719#define FF_DCT_FAAN 6
3720
3721 int idct_algo;
3722#define FF_IDCT_AUTO 0
3723#define FF_IDCT_INT 1
3724#define FF_IDCT_SIMPLE 2
3725#define FF_IDCT_SIMPLEMMX 3
3726#define FF_IDCT_ARM 7
3727#define FF_IDCT_ALTIVEC 8
3728#define FF_IDCT_SIMPLEARM 10
3729#define FF_IDCT_XVID 14
3730#define FF_IDCT_SIMPLEARMV5TE 16
3731#define FF_IDCT_SIMPLEARMV6 17
3732#define FF_IDCT_FAAN 20
3733#define FF_IDCT_SIMPLENEON 22
3734#define FF_IDCT_SIMPLEAUTO 128
3735
3737
3739
3740 int thread_count;
3741
3742 int thread_type;
3743#define FF_THREAD_FRAME 1
3744#define FF_THREAD_SLICE 2
3745
3747
3748 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
3749
3750 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
3751
3752 int profile;
3753
3754#define FF_PROFILE_UNKNOWN -99
3755#define FF_PROFILE_RESERVED -100
3756
3757#define FF_PROFILE_AAC_MAIN 0
3758#define FF_PROFILE_AAC_LOW 1
3759#define FF_PROFILE_AAC_SSR 2
3760#define FF_PROFILE_AAC_LTP 3
3761#define FF_PROFILE_AAC_HE 4
3762#define FF_PROFILE_AAC_HE_V2 28
3763#define FF_PROFILE_AAC_LD 22
3764#define FF_PROFILE_AAC_ELD 38
3765#define FF_PROFILE_MPEG2_AAC_LOW 128
3766#define FF_PROFILE_MPEG2_AAC_HE 131
3767
3768#define FF_PROFILE_DNXHD 0
3769#define FF_PROFILE_DNXHR_LB 1
3770#define FF_PROFILE_DNXHR_SQ 2
3771#define FF_PROFILE_DNXHR_HQ 3
3772#define FF_PROFILE_DNXHR_HQX 4
3773#define FF_PROFILE_DNXHR_444 5
3774
3775#define FF_PROFILE_DTS 20
3776#define FF_PROFILE_DTS_ES 30
3777#define FF_PROFILE_DTS_96_24 40
3778#define FF_PROFILE_DTS_HD_HRA 50
3779#define FF_PROFILE_DTS_HD_MA 60
3780#define FF_PROFILE_DTS_EXPRESS 70
3781#define FF_PROFILE_DTS_HD_MA_X 61
3782#define FF_PROFILE_DTS_HD_MA_X_IMAX 62
3783
3784#define FF_PROFILE_EAC3_DDP_ATMOS 30
3785
3786#define FF_PROFILE_TRUEHD_ATMOS 30
3787
3788#define FF_PROFILE_MPEG2_422 0
3789#define FF_PROFILE_MPEG2_HIGH 1
3790#define FF_PROFILE_MPEG2_SS 2
3791#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
3792#define FF_PROFILE_MPEG2_MAIN 4
3793#define FF_PROFILE_MPEG2_SIMPLE 5
3794
3795#define FF_PROFILE_H264_CONSTRAINED (1<<9)
3796#define FF_PROFILE_H264_INTRA (1<<11)
3797
3798#define FF_PROFILE_H264_BASELINE 66
3799#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
3800#define FF_PROFILE_H264_MAIN 77
3801#define FF_PROFILE_H264_EXTENDED 88
3802#define FF_PROFILE_H264_HIGH 100
3803#define FF_PROFILE_H264_HIGH_10 110
3804#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
3805#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
3806#define FF_PROFILE_H264_HIGH_422 122
3807#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
3808#define FF_PROFILE_H264_STEREO_HIGH 128
3809#define FF_PROFILE_H264_HIGH_444 144
3810#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
3811#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
3812#define FF_PROFILE_H264_CAVLC_444 44
3813
3814#define FF_PROFILE_VC1_SIMPLE 0
3815#define FF_PROFILE_VC1_MAIN 1
3816#define FF_PROFILE_VC1_COMPLEX 2
3817#define FF_PROFILE_VC1_ADVANCED 3
3818
3819#define FF_PROFILE_MPEG4_SIMPLE 0
3820#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
3821#define FF_PROFILE_MPEG4_CORE 2
3822#define FF_PROFILE_MPEG4_MAIN 3
3823#define FF_PROFILE_MPEG4_N_BIT 4
3824#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
3825#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
3826#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
3827#define FF_PROFILE_MPEG4_HYBRID 8
3828#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
3829#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
3830#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
3831#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
3832#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
3833#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
3834#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
3835
3836#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
3837#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
3838#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
3839#define FF_PROFILE_JPEG2000_DCINEMA_2K 3