Audacity 3.2.0
ffmpeg-5.0.1-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 <stdlib.h>
5#include <stdarg.h>
6#include <limits.h>
7#include <stdint.h>
8#include <inttypes.h>
9#include <time.h>
10#include <stddef.h>
11#include <math.h>
12#include <string.h>
13#include <errno.h>
14#include <stdio.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 *av_version_info(void);
25
26const char *avutil_configuration(void);
27
28const char *avutil_license(void);
29
38};
39
40const char *av_get_media_type_string(enum AVMediaType media_type);
41
42#define FF_LAMBDA_SHIFT 7
43#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
44#define FF_QP2LAMBDA 118
45#define FF_LAMBDA_MAX (256*128-1)
46
47#define FF_QUALITY_SCALE FF_LAMBDA_SCALE
48
49#define AV_NOPTS_VALUE ((int64_t)UINT64_C(0x8000000000000000))
50
51#define AV_TIME_BASE 1000000
52
53#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
54
64};
65
67
68#define AVUTIL_COMMON_H
69
70#define AVUTIL_ATTRIBUTES_H
71
72# define AV_GCC_VERSION_AT_LEAST(x,y) 0
73# define AV_GCC_VERSION_AT_MOST(x,y) 0
74
75# define AV_HAS_BUILTIN(x) 0
76
77# define av_always_inline inline
78
79# define av_extern_inline inline
80
81# define av_warn_unused_result
82
83# define av_noinline
84
85# define av_pure
86
87# define av_const
88
89# define av_cold
90
91# define av_flatten
92
93# define attribute_deprecated
94
95# define AV_NOWARN_DEPRECATED(code) code
96
97# define av_unused
98
99# define av_used
100
101# define av_alias
102
103# define av_uninit(x) x
104
105# define av_builtin_constant_p(x) 0
106# define av_printf_format(fmtpos, attrpos)
107
108# define av_noreturn
109
110#define AVUTIL_MACROS_H
111
112# define AV_NE(be, le) (le)
113
114#define FFDIFFSIGN(x,y) (((x)>(y)) - ((x)<(y)))
115
116#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
117#define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c)
118#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
119#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
120
121#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
122#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
123
124#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
125#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
126
127#define AV_STRINGIFY(s) AV_TOSTRING(s)
128#define AV_TOSTRING(s) #s
129
130#define AV_GLUE(a, b) a ## b
131#define AV_JOIN(a, b) AV_GLUE(a, b)
132
133#define AV_PRAGMA(s) _Pragma(#s)
134
135#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1))
136
137#define AVUTIL_VERSION_H
138
139#define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
140#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
141#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
142
143#define AV_VERSION_MAJOR(a) ((a) >> 16)
144#define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8)
145#define AV_VERSION_MICRO(a) ((a) & 0xFF)
146
147#define LIBAVUTIL_VERSION_MAJOR 57
148#define LIBAVUTIL_VERSION_MINOR 17
149#define LIBAVUTIL_VERSION_MICRO 100
150
151#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
152 LIBAVUTIL_VERSION_MINOR, \
153 LIBAVUTIL_VERSION_MICRO)
154#define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \
155 LIBAVUTIL_VERSION_MINOR, \
156 LIBAVUTIL_VERSION_MICRO)
157#define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT
158
159#define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
160
161#define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58)
162#define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58)
163#define FF_API_COLORSPACE_NAME (LIBAVUTIL_VERSION_MAJOR < 58)
164#define FF_API_AV_MALLOCZ_ARRAY (LIBAVUTIL_VERSION_MAJOR < 58)
165
166#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
167
168#define ROUNDED_DIV(a,b) (((a)>=0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
169
170#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
171 : ((a) + (1<<(b)) - 1) >> (b))
172
173#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT
174
175#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
176#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))
177
178#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
179#define FFSIGN(a) ((a) > 0 ? 1 : -1)
180
181#define FFNABS(a) ((a) <= 0 ? (a) : (-(a)))
182
183#define FFABSU(a) ((a) <= 0 ? -(unsigned)(a) : (unsigned)(a))
184#define FFABS64U(a) ((a) <= 0 ? -(uint64_t)(a) : (uint64_t)(a))
185
186# define av_ceil_log2 av_ceil_log2_c
187# define av_clip av_clip_c
188# define av_clip64 av_clip64_c
189# define av_clip_uint8 av_clip_uint8_c
190# define av_clip_int8 av_clip_int8_c
191# define av_clip_uint16 av_clip_uint16_c
192# define av_clip_int16 av_clip_int16_c
193# define av_clipl_int32 av_clipl_int32_c
194# define av_clip_intp2 av_clip_intp2_c
195# define av_clip_uintp2 av_clip_uintp2_c
196# define av_mod_uintp2 av_mod_uintp2_c
197# define av_sat_add32 av_sat_add32_c
198# define av_sat_dadd32 av_sat_dadd32_c
199# define av_sat_sub32 av_sat_sub32_c
200# define av_sat_dsub32 av_sat_dsub32_c
201# define av_sat_add64 av_sat_add64_c
202# define av_sat_sub64 av_sat_sub64_c
203# define av_clipf av_clipf_c
204# define av_clipd av_clipd_c
205# define av_popcount av_popcount_c
206# define av_popcount64 av_popcount64_c
207# define av_parity av_parity_c
208
209av_const int av_log2(unsigned v);
210
211av_const int av_log2_16bit(unsigned v);
212
213static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
214{
215 if (a < amin) return amin;
216 else if (a > amax) return amax;
217 else return a;
218}
219
220static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax)
221{
222 if (a < amin) return amin;
223 else if (a > amax) return amax;
224 else return a;
225}
226
228{
229 if (a&(~0xFF)) return (~a)>>31;
230 else return a;
231}
232
234{
235 if ((a+0x80U) & ~0xFF) return (a>>31) ^ 0x7F;
236 else return a;
237}
238
240{
241 if (a&(~0xFFFF)) return (~a)>>31;
242 else return a;
243}
244
246{
247 if ((a+0x8000U) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
248 else return a;
249}
250
252{
253 if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF);
254 else return (int32_t)a;
255}
256
258{
259 if (((unsigned)a + (1 << p)) & ~((2 << p) - 1))
260 return (a >> 31) ^ ((1 << p) - 1);
261 else
262 return a;
263}
264
265static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
266{
267 if (a & ~((1<<p) - 1)) return (~a) >> 31 & ((1<<p) - 1);
268 else return a;
269}
270
271static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p)
272{
273 return a & ((1U << p) - 1);
274}
275
276static av_always_inline int av_sat_add32_c(int a, int b)
277{
278 return av_clipl_int32((int64_t)a + b);
279}
280
281static av_always_inline int av_sat_dadd32_c(int a, int b)
282{
283 return av_sat_add32(a, av_sat_add32(b, b));
284}
285
286static av_always_inline int av_sat_sub32_c(int a, int b)
287{
288 return av_clipl_int32((int64_t)a - b);
289}
290
291static av_always_inline int av_sat_dsub32_c(int a, int b)
292{
293 return av_sat_sub32(a, av_sat_add32(b, b));
294}
295
296static av_always_inline int64_t av_sat_add64_c(int64_t a, int64_t b) {
297 int64_t s = a+(uint64_t)b;
298 if ((int64_t)(a^b | ~s^b) >= 0)
299 return INT64_MAX ^ (b >> 63);
300 return s;
301}
302
303static av_always_inline int64_t av_sat_sub64_c(int64_t a, int64_t b) {
304 if (b <= 0 && a >= INT64_MAX + b)
305 return INT64_MAX;
306 if (b >= 0 && a <= INT64_MIN + b)
307 return INT64_MIN;
308 return a - b;
309}
310
311static av_always_inline av_const float av_clipf_c(float a, float amin, float amax)
312{
313 return FFMIN(FFMAX(a, amin), amax);
314}
315
316static av_always_inline av_const double av_clipd_c(double a, double amin, double amax)
317{
318 return FFMIN(FFMAX(a, amin), amax);
319}
320
322{
323 return av_log2((x - 1U) << 1);
324}
325
327{
328 x -= (x >> 1) & 0x55555555;
329 x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
330 x = (x + (x >> 4)) & 0x0F0F0F0F;
331 x += x >> 8;
332 return (x + (x >> 16)) & 0x3F;
333}
334
336{
337 return av_popcount((uint32_t)x) + av_popcount((uint32_t)(x >> 32));
338}
339
341{
342 return av_popcount(v) & 1;
343}
344
345#define GET_UTF8(val, GET_BYTE, ERROR)\
346 val= (GET_BYTE);\
347 {\
348 uint32_t top = (val & 128) >> 1;\
349 if ((val & 0xc0) == 0x80 || val >= 0xFE)\
350 {ERROR}\
351 while (val & top) {\
352 unsigned int tmp = (GET_BYTE) - 128;\
353 if(tmp>>6)\
354 {ERROR}\
355 val= (val<<6) + tmp;\
356 top <<= 5;\
357 }\
358 val &= (top << 1) - 1;\
359 }
360
361#define GET_UTF16(val, GET_16BIT, ERROR)\
362 val = (GET_16BIT);\
363 {\
364 unsigned int hi = val - 0xD800;\
365 if (hi < 0x800) {\
366 val = (GET_16BIT) - 0xDC00;\
367 if (val > 0x3FFU || hi > 0x3FFU)\
368 {ERROR}\
369 val += (hi<<10) + 0x10000;\
370 }\
371 }\
372
373#define PUT_UTF8(val, tmp, PUT_BYTE)\
374 {\
375 int bytes, shift;\
376 uint32_t in = val;\
377 if (in < 0x80) {\
378 tmp = in;\
379 PUT_BYTE\
380 } else {\
381 bytes = (av_log2(in) + 4) / 5;\
382 shift = (bytes - 1) * 6;\
383 tmp = (256 - (256 >> bytes)) | (in >> shift);\
384 PUT_BYTE\
385 while (shift >= 6) {\
386 shift -= 6;\
387 tmp = 0x80 | ((in >> shift) & 0x3f);\
388 PUT_BYTE\
389 }\
390 }\
391 }
392
393#define PUT_UTF16(val, tmp, PUT_16BIT)\
394 {\
395 uint32_t in = val;\
396 if (in < 0x10000) {\
397 tmp = in;\
398 PUT_16BIT\
399 } else {\
400 tmp = 0xD800 | ((in - 0x10000) >> 10);\
401 PUT_16BIT\
402 tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
403 PUT_16BIT\
404 }\
405 }\
406
407#define AVUTIL_MEM_H
408
409 #define DECLARE_ALIGNED(n,t,v) t v
410 #define DECLARE_ASM_ALIGNED(n,t,v) t v
411 #define DECLARE_ASM_CONST(n,t,v) static const t v
412
413 #define av_malloc_attrib
414
415 #define av_alloc_size(...)
416
418
420
421av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size);
422
424
427
428void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
429
431int av_reallocp(void *ptr, size_t size);
432
433void *av_realloc_f(void *ptr, size_t nelem, size_t elsize);
434
435av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size);
436
437int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
438
439void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
440
441void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
442
443void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size);
444
445void av_free(void *ptr);
446
447void av_freep(void *ptr);
448
449char *av_strdup(const char *s) av_malloc_attrib;
450
451char *av_strndup(const char *s, size_t len) av_malloc_attrib;
452
453void *av_memdup(const void *p, size_t size);
454
455void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
456
457void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);
458
460int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem);
461
462void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
463 const uint8_t *elem_data);
464
465int av_size_mult(size_t a, size_t b, size_t *r);
466
467void av_max_alloc(size_t max);
468
469#define AVUTIL_ERROR_H
470
471#define AVERROR(e) (e)
472#define AVUNERROR(e) (e)
473
474#define FFERRTAG(a, b, c, d) (-(int)MKTAG(a, b, c, d))
475
476#define AVERROR_BSF_NOT_FOUND FFERRTAG(0xF8,'B','S','F')
477#define AVERROR_BUG FFERRTAG( 'B','U','G','!')
478#define AVERROR_BUFFER_TOO_SMALL FFERRTAG( 'B','U','F','S')
479#define AVERROR_DECODER_NOT_FOUND FFERRTAG(0xF8,'D','E','C')
480#define AVERROR_DEMUXER_NOT_FOUND FFERRTAG(0xF8,'D','E','M')
481#define AVERROR_ENCODER_NOT_FOUND FFERRTAG(0xF8,'E','N','C')
482#define AVERROR_EOF FFERRTAG( 'E','O','F',' ')
483#define AVERROR_EXIT FFERRTAG( 'E','X','I','T')
484#define AVERROR_EXTERNAL FFERRTAG( 'E','X','T',' ')
485#define AVERROR_FILTER_NOT_FOUND FFERRTAG(0xF8,'F','I','L')
486#define AVERROR_INVALIDDATA FFERRTAG( 'I','N','D','A')
487#define AVERROR_MUXER_NOT_FOUND FFERRTAG(0xF8,'M','U','X')
488#define AVERROR_OPTION_NOT_FOUND FFERRTAG(0xF8,'O','P','T')
489#define AVERROR_PATCHWELCOME FFERRTAG( 'P','A','W','E')
490#define AVERROR_PROTOCOL_NOT_FOUND FFERRTAG(0xF8,'P','R','O')
491
492#define AVERROR_STREAM_NOT_FOUND FFERRTAG(0xF8,'S','T','R')
493
494#define AVERROR_BUG2 FFERRTAG( 'B','U','G',' ')
495#define AVERROR_UNKNOWN FFERRTAG( 'U','N','K','N')
496#define AVERROR_EXPERIMENTAL (-0x2bb2afa8)
497#define AVERROR_INPUT_CHANGED (-0x636e6701)
498#define AVERROR_OUTPUT_CHANGED (-0x636e6702)
499
500#define AVERROR_HTTP_BAD_REQUEST FFERRTAG(0xF8,'4','0','0')
501#define AVERROR_HTTP_UNAUTHORIZED FFERRTAG(0xF8,'4','0','1')
502#define AVERROR_HTTP_FORBIDDEN FFERRTAG(0xF8,'4','0','3')
503#define AVERROR_HTTP_NOT_FOUND FFERRTAG(0xF8,'4','0','4')
504#define AVERROR_HTTP_OTHER_4XX FFERRTAG(0xF8,'4','X','X')
505#define AVERROR_HTTP_SERVER_ERROR FFERRTAG(0xF8,'5','X','X')
506
507#define AV_ERROR_MAX_STRING_SIZE 64
508
509int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
510
511static inline char *av_make_error_string(char *errbuf, size_t errbuf_size, int errnum)
512{
513 av_strerror(errnum, errbuf, errbuf_size);
514 return errbuf;
515}
516
517#define av_err2str(errnum) \
518 av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum)
519
520#define AVUTIL_RATIONAL_H
521
522typedef struct AVRational{
523 int num;
524 int den;
526
527static inline AVRational av_make_q(int num, int den)
528{
529 AVRational r = { num, den };
530 return r;
531}
532
533static inline int av_cmp_q(AVRational a, AVRational b){
534 const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den;
535
536 if(tmp) return (int)((tmp ^ a.den ^ b.den)>>63)|1;
537 else if(b.den && a.den) return 0;
538 else if(a.num && b.num) return (a.num>>31) - (b.num>>31);
539 else return INT_MIN;
540}
541
542static inline double av_q2d(AVRational a){
543 return a.num / (double) a.den;
544}
545
546int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max);
547
549
551
553
555
557{
558 AVRational r = { q.den, q.num };
559 return r;
560}
561
562AVRational av_d2q(double d, int max) av_const;
563
565
567
569
571
572#define AVUTIL_MATHEMATICS_H
573
574#define AVUTIL_INTFLOAT_H
575
576union av_intfloat32 {
577 uint32_t i;
578 float f;
579};
580
581union av_intfloat64 {
582 uint64_t i;
583 double f;
584};
585
586static av_always_inline float av_int2float(uint32_t i)
587{
588 union av_intfloat32 v;
589 v.i = i;
590 return v.f;
591}
592
593static av_always_inline uint32_t av_float2int(float f)
594{
595 union av_intfloat32 v;
596 v.f = f;
597 return v.i;
598}
599
600static av_always_inline double av_int2double(uint64_t i)
601{
602 union av_intfloat64 v;
603 v.i = i;
604 return v.f;
605}
606
607static av_always_inline uint64_t av_double2int(double f)
608{
609 union av_intfloat64 v;
610 v.f = f;
611 return v.i;
612}
613
614#define M_E 2.7182818284590452354
615#define M_LN2 0.69314718055994530942
616#define M_LN10 2.30258509299404568402
617#define M_LOG2_10 3.32192809488736234787
618#define M_PHI 1.61803398874989484820
619#define M_PI 3.14159265358979323846
620#define M_PI_2 1.57079632679489661923
621#define M_SQRT1_2 0.70710678118654752440
622#define M_SQRT2 1.41421356237309504880
623#define NAN av_int2float(0x7fc00000)
624#define INFINITY av_int2float(0x7f800000)
625
632
634};
635
636int64_t av_const av_gcd(int64_t a, int64_t b);
637
638int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const;
639
640int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd) av_const;
641
642int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const;
643
644int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq,
645 enum AVRounding rnd) av_const;
646
647int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
648
649int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);
650
651int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb);
652
653int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc);
654
655#define AVUTIL_LOG_H
656
657typedef enum {
677
678#define AV_IS_INPUT_DEVICE(category) \
679 (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \
680 ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \
681 ((category) == AV_CLASS_CATEGORY_DEVICE_INPUT))
682
683#define AV_IS_OUTPUT_DEVICE(category) \
684 (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT) || \
685 ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT) || \
686 ((category) == AV_CLASS_CATEGORY_DEVICE_OUTPUT))
687
688struct AVOptionRanges;
689
690typedef struct AVClass {
691
692 const char* class_name;
693
694 const char* (*item_name)(void* ctx);
695
696 const struct AVOption *option;
697
698 int version;
699
701
703
705
706 AVClassCategory (*get_category)(void* ctx);
707
708 int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
709
710 void* (*child_next)(void *obj, void *prev);
711
712 const struct AVClass* (*child_class_iterate)(void **iter);
714
715#define AV_LOG_QUIET -8
716
717#define AV_LOG_PANIC 0
718
719#define AV_LOG_FATAL 8
720
721#define AV_LOG_ERROR 16
722
723#define AV_LOG_WARNING 24
724
725#define AV_LOG_INFO 32
726
727#define AV_LOG_VERBOSE 40
728
729#define AV_LOG_DEBUG 48
730
731#define AV_LOG_TRACE 56
732
733#define AV_LOG_MAX_OFFSET (AV_LOG_TRACE - AV_LOG_QUIET)
734
735#define AV_LOG_C(x) ((x) << 8)
736
737void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
738
739void av_log_once(void* avcl, int initial_level, int subsequent_level, int *state, const char *fmt, ...) av_printf_format(5, 6);
740
741void av_vlog(void *avcl, int level, const char *fmt, va_list vl);
742
744
745void av_log_set_level(int level);
746
747void av_log_set_callback(void (*callback)(void*, int, const char*, va_list));
748
749void av_log_default_callback(void *avcl, int level, const char *fmt,
750 va_list vl);
751
752const char* av_default_item_name(void* ctx);
754
755void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
756 char *line, int line_size, int *print_prefix);
757
758int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
759 char *line, int line_size, int *print_prefix);
760
761#define AV_LOG_SKIP_REPEATED 1
762
763#define AV_LOG_PRINT_LEVEL 2
764
765void av_log_set_flags(int arg);
767
768#define AVUTIL_PIXFMT_H
769
770#define AVPALETTE_SIZE 1024
771#define AVPALETTE_COUNT 256
772
800
805
813
818
823
825
833
839
842
845
886
888
894
899
901
904
908
910
912
914
916
921
939
952
954
961
963
966
969
972
974
979
982
984
987
992
994
996
999
1002
1007
1010
1012
1015
1020
1023
1026
1029
1032
1035
1036# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##le
1037
1038#define AV_PIX_FMT_RGB32 AV_PIX_FMT_NE(ARGB, BGRA)
1039#define AV_PIX_FMT_RGB32_1 AV_PIX_FMT_NE(RGBA, ABGR)
1040#define AV_PIX_FMT_BGR32 AV_PIX_FMT_NE(ABGR, RGBA)
1041#define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB)
1042#define AV_PIX_FMT_0RGB32 AV_PIX_FMT_NE(0RGB, BGR0)
1043#define AV_PIX_FMT_0BGR32 AV_PIX_FMT_NE(0BGR, RGB0)
1044
1045#define AV_PIX_FMT_GRAY9 AV_PIX_FMT_NE(GRAY9BE, GRAY9LE)
1046#define AV_PIX_FMT_GRAY10 AV_PIX_FMT_NE(GRAY10BE, GRAY10LE)
1047#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
1048#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
1049#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
1050#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
1051#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
1052#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
1053#define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE)
1054#define AV_PIX_FMT_RGB444 AV_PIX_FMT_NE(RGB444BE, RGB444LE)
1055#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE)
1056#define AV_PIX_FMT_BGR48 AV_PIX_FMT_NE(BGR48BE, BGR48LE)
1057#define AV_PIX_FMT_BGR565 AV_PIX_FMT_NE(BGR565BE, BGR565LE)
1058#define AV_PIX_FMT_BGR555 AV_PIX_FMT_NE(BGR555BE, BGR555LE)
1059#define AV_PIX_FMT_BGR444 AV_PIX_FMT_NE(BGR444BE, BGR444LE)
1060#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE)
1061
1062#define AV_PIX_FMT_YUV420P9 AV_PIX_FMT_NE(YUV420P9BE , YUV420P9LE)
1063#define AV_PIX_FMT_YUV422P9 AV_PIX_FMT_NE(YUV422P9BE , YUV422P9LE)
1064#define AV_PIX_FMT_YUV444P9 AV_PIX_FMT_NE(YUV444P9BE , YUV444P9LE)
1065#define AV_PIX_FMT_YUV420P10 AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE)
1066#define AV_PIX_FMT_YUV422P10 AV_PIX_FMT_NE(YUV422P10BE, YUV422P10LE)
1067#define AV_PIX_FMT_YUV440P10 AV_PIX_FMT_NE(YUV440P10BE, YUV440P10LE)
1068#define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE)
1069#define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE)
1070#define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE)
1071#define AV_PIX_FMT_YUV440P12 AV_PIX_FMT_NE(YUV440P12BE, YUV440P12LE)
1072#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE)
1073#define AV_PIX_FMT_YUV420P14 AV_PIX_FMT_NE(YUV420P14BE, YUV420P14LE)
1074#define AV_PIX_FMT_YUV422P14 AV_PIX_FMT_NE(YUV422P14BE, YUV422P14LE)
1075#define AV_PIX_FMT_YUV444P14 AV_PIX_FMT_NE(YUV444P14BE, YUV444P14LE)
1076#define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE)
1077#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
1078#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
1079
1080#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE)
1081#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
1082#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE)
1083#define AV_PIX_FMT_GBRP14 AV_PIX_FMT_NE(GBRP14BE, GBRP14LE)
1084#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
1085#define AV_PIX_FMT_GBRAP10 AV_PIX_FMT_NE(GBRAP10BE, GBRAP10LE)
1086#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE)
1087#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
1088
1089#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE)
1090#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE)
1091#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE)
1092#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE)
1093
1094#define AV_PIX_FMT_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE)
1095#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE)
1096
1097#define AV_PIX_FMT_GRAYF32 AV_PIX_FMT_NE(GRAYF32BE, GRAYF32LE)
1098
1099#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
1100#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
1101#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
1102#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE)
1103#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE)
1104#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE)
1105#define AV_PIX_FMT_YUVA422P12 AV_PIX_FMT_NE(YUVA422P12BE, YUVA422P12LE)
1106#define AV_PIX_FMT_YUVA444P12 AV_PIX_FMT_NE(YUVA444P12BE, YUVA444P12LE)
1107#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE)
1108#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE)
1109#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)
1110
1111#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE)
1112#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE)
1113#define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE)
1114#define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE)
1115#define AV_PIX_FMT_P016 AV_PIX_FMT_NE(P016BE, P016LE)
1116
1117#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
1118#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
1119#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
1120
1121#define AV_PIX_FMT_P210 AV_PIX_FMT_NE(P210BE, P210LE)
1122#define AV_PIX_FMT_P410 AV_PIX_FMT_NE(P410BE, P410LE)
1123#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
1124#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
1125
1132
1146
1171
1191
1194
1196
1200
1211
1212static inline void *av_x_if_null(const void *p, const void *x)
1213{
1214 return (void *)(intptr_t)(p ? p : x);
1215}
1216
1217unsigned av_int_list_length_for_size(unsigned elsize,
1218 const void *list, uint64_t term) av_pure;
1219
1220#define av_int_list_length(list, term) \
1221 av_int_list_length_for_size(sizeof(*(list)), list, term)
1222
1223FILE *av_fopen_utf8(const char *path, const char *mode);
1224
1226
1227#define AV_FOURCC_MAX_STRING_SIZE 32
1228
1229#define av_fourcc2str(fourcc) av_fourcc_make_string((char[AV_FOURCC_MAX_STRING_SIZE]){0}, fourcc)
1230
1231char *av_fourcc_make_string(char *buf, uint32_t fourcc);
1232
1240
1248
1251
1252const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);
1253
1255
1256enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar);
1257
1259
1261
1262char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
1263
1265
1267
1268int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
1269 enum AVSampleFormat sample_fmt, int align);
1270
1271int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
1272 const uint8_t *buf,
1273 int nb_channels, int nb_samples,
1274 enum AVSampleFormat sample_fmt, int align);
1275
1276int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
1277 int nb_samples, enum AVSampleFormat sample_fmt, int align);
1278
1279int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,
1280 int nb_samples, enum AVSampleFormat sample_fmt, int align);
1281
1282int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset,
1283 int src_offset, int nb_samples, int nb_channels,
1284 enum AVSampleFormat sample_fmt);
1285
1286int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples,
1287 int nb_channels, enum AVSampleFormat sample_fmt);
1288
1289#define AVUTIL_BUFFER_H
1290
1291typedef struct AVBuffer AVBuffer;
1292
1293typedef struct AVBufferRef {
1295
1296 uint8_t *data;
1297
1298 size_t size;
1300
1302
1304
1305#define AV_BUFFER_FLAG_READONLY (1 << 0)
1306
1307AVBufferRef *av_buffer_create(uint8_t *data, size_t size,
1308 void (*free)(void *opaque, uint8_t *data),
1309 void *opaque, int flags);
1310
1311void av_buffer_default_free(void *opaque, uint8_t *data);
1312
1314
1316
1318
1320
1322
1324
1326
1328
1330
1332
1334 AVBufferRef* (*alloc)(void *opaque, size_t size),
1335 void (*pool_free)(void *opaque));
1336
1338
1340
1342
1343#define AVUTIL_DICT_H
1344
1345#define AV_DICT_MATCH_CASE 1
1346#define AV_DICT_IGNORE_SUFFIX 2
1347
1348#define AV_DICT_DONT_STRDUP_KEY 4
1349
1350#define AV_DICT_DONT_STRDUP_VAL 8
1351
1352#define AV_DICT_DONT_OVERWRITE 16
1353#define AV_DICT_APPEND 32
1354
1355#define AV_DICT_MULTIKEY 64
1356
1357typedef struct AVDictionaryEntry {
1358 char *key;
1359 char *value;
1361
1363
1365 const AVDictionaryEntry *prev, int flags);
1366
1368
1369int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
1370
1371int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags);
1372
1374 const char *key_val_sep, const char *pairs_sep,
1375 int flags);
1376
1377int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);
1378
1380
1381int av_dict_get_string(const AVDictionary *m, char **buffer,
1382 const char key_val_sep, const char pairs_sep);
1383
1384#define AVUTIL_FRAME_H
1385
1387
1389
1391
1393
1395
1397
1399
1401
1403
1405
1407
1409
1411
1413
1415
1417
1419
1421
1423
1425
1427
1429
1431
1433
1435
1437};
1438
1447};
1448
1449typedef struct AVFrameSideData {
1451 uint8_t *data;
1452 size_t size;
1456
1457typedef struct AVRegionOfInterest {
1458
1459 uint32_t self_size;
1460
1461 int top;
1462 int bottom;
1463 int left;
1464 int right;
1465
1468
1469typedef struct AVFrame {
1470#define AV_NUM_DATA_POINTERS 8
1471
1472 uint8_t *data[AV_NUM_DATA_POINTERS];
1473
1475
1476 uint8_t **extended_data;
1477
1478 int width, height;
1479
1480 int nb_samples;
1481
1482 int format;
1483
1484 int key_frame;
1485
1487
1489
1490 int64_t pts;
1491
1492 int64_t pkt_dts;
1493
1495
1497
1499
1500 int quality;
1501
1502 void *opaque;
1503
1504 int repeat_pict;
1505
1506 int interlaced_frame;
1507
1508 int top_field_first;
1509
1511
1512 int64_t reordered_opaque;
1513
1514 int sample_rate;
1515
1516 uint64_t channel_layout;
1517
1519
1521
1522 int nb_extended_buf;
1523
1525 int nb_side_data;
1526
1527#define AV_FRAME_FLAG_CORRUPT (1 << 0)
1528
1529#define AV_FRAME_FLAG_DISCARD (1 << 2)
1530
1531 int flags;
1532
1534
1536
1538
1540
1542
1543 int64_t best_effort_timestamp;
1544
1545 int64_t pkt_pos;
1546
1547 int64_t pkt_duration;
1548
1550
1552#define FF_DECODE_ERROR_INVALID_BITSTREAM 1
1553#define FF_DECODE_ERROR_MISSING_REFERENCE 2
1554#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
1555#define FF_DECODE_ERROR_DECODE_SLICES 8
1556
1557 int channels;
1558
1559 int pkt_size;
1560
1562
1564
1565 size_t crop_top;
1566 size_t crop_bottom;
1567 size_t crop_left;
1568 size_t crop_right;
1569
1572
1575
1577
1579
1580int av_frame_ref(AVFrame *dst, const AVFrame *src);
1581
1583
1585
1587
1588int av_frame_get_buffer(AVFrame *frame, int align);
1589
1591
1593
1594int av_frame_copy(AVFrame *dst, const AVFrame *src);
1595
1597
1599
1601 enum AVFrameSideDataType type,
1602 size_t size);
1603
1605 enum AVFrameSideDataType type,
1606 AVBufferRef *buf);
1607
1609 enum AVFrameSideDataType type);
1610
1612
1613enum {
1614
1616};
1617
1618int av_frame_apply_cropping(AVFrame *frame, int flags);
1619
1621
1622#define AVCODEC_CODEC_H
1623
1624#define AVUTIL_HWCONTEXT_H
1625
1639};
1640
1642
1643typedef struct AVHWDeviceContext {
1644
1645 const AVClass *av_class;
1646
1648
1649 enum AVHWDeviceType type;
1650
1651 void *hwctx;
1652
1653 void (*free)(struct AVHWDeviceContext *ctx);
1654
1655 void *user_opaque;
1657
1659
1660typedef struct AVHWFramesContext {
1661
1662 const AVClass *av_class;
1663
1665
1667
1669
1670 void *hwctx;
1671
1672 void (*free)(struct AVHWFramesContext *ctx);
1673
1674 void *user_opaque;
1675
1677
1679
1680 enum AVPixelFormat format;
1681
1683
1684 int width, height;
1686
1688
1690
1692
1694
1696
1698 const char *device, AVDictionary *opts, int flags);
1699
1701 enum AVHWDeviceType type,
1702 AVBufferRef *src_ctx, int flags);
1703
1705 enum AVHWDeviceType type,
1706 AVBufferRef *src_ctx,
1707 AVDictionary *options, int flags);
1708
1710
1712
1713int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags);
1714
1715int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags);
1716
1718
1720
1722};
1723
1726 enum AVPixelFormat **formats, int flags);
1727
1728typedef struct AVHWFramesConstraints {
1729
1731
1733
1734 int min_width;
1735 int min_height;
1736
1737 int max_width;
1738 int max_height;
1740
1742
1744 const void *hwconfig);
1745
1747
1748enum {
1749
1751
1753
1755
1757};
1758
1759int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags);
1760
1762 enum AVPixelFormat format,
1763 AVBufferRef *derived_device_ctx,
1764 AVBufferRef *source_frame_ctx,
1765 int flags);
1766
1767#define AVCODEC_CODEC_ID_H
1768
1771
1908#define AV_CODEC_ID_IFF_BYTERUN1 AV_CODEC_ID_IFF_ILBM
1946#define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC
1970#define AV_CODEC_ID_H266 AV_CODEC_ID_VVC
2032
2071
2123
2126
2129
2137
2234
2262
2265
2276
2278
2280
2282
2285};
2286
2288
2289const char *avcodec_get_name(enum AVCodecID id);
2290
2292
2294
2295const char *avcodec_profile_name(enum AVCodecID codec_id, int profile);
2296
2298
2299#define AVCODEC_VERSION_H
2300
2301#define LIBAVCODEC_VERSION_MAJOR 59
2302#define LIBAVCODEC_VERSION_MINOR 18
2303#define LIBAVCODEC_VERSION_MICRO 100
2304
2305#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
2306 LIBAVCODEC_VERSION_MINOR, \
2307 LIBAVCODEC_VERSION_MICRO)
2308#define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
2309 LIBAVCODEC_VERSION_MINOR, \
2310 LIBAVCODEC_VERSION_MICRO)
2311#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
2312
2313#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
2314
2315#define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 60)
2316#define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 60)
2317#define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60)
2318#define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60)
2319#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60)
2320#define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60)
2321#define FF_API_AUTO_THREADS (LIBAVCODEC_VERSION_MAJOR < 60)
2322#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60)
2323#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 60)
2324#define FF_API_MPEGVIDEO_OPTS (LIBAVCODEC_VERSION_MAJOR < 60)
2325#define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60)
2326#define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60)
2327
2328#define AV_CODEC_CAP_DRAW_HORIZ_BAND (1 << 0)
2329
2330#define AV_CODEC_CAP_DR1 (1 << 1)
2331
2332#define AV_CODEC_CAP_TRUNCATED (1 << 3)
2333
2334#define AV_CODEC_CAP_DELAY (1 << 5)
2335
2336#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
2337
2338#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
2339
2340#define AV_CODEC_CAP_EXPERIMENTAL (1 << 9)
2341
2342#define AV_CODEC_CAP_CHANNEL_CONF (1 << 10)
2343
2344#define AV_CODEC_CAP_FRAME_THREADS (1 << 12)
2345
2346#define AV_CODEC_CAP_SLICE_THREADS (1 << 13)
2347
2348#define AV_CODEC_CAP_PARAM_CHANGE (1 << 14)
2349
2350#define AV_CODEC_CAP_OTHER_THREADS (1 << 15)
2351#define AV_CODEC_CAP_AUTO_THREADS AV_CODEC_CAP_OTHER_THREADS
2352
2353#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
2354
2355#define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
2356
2357#define AV_CODEC_CAP_INTRA_ONLY 0x40000000
2358
2359#define AV_CODEC_CAP_LOSSLESS 0x80000000
2360
2361#define AV_CODEC_CAP_HARDWARE (1 << 18)
2362
2363#define AV_CODEC_CAP_HYBRID (1 << 19)
2364
2365#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20)
2366
2367#define AV_CODEC_CAP_ENCODER_FLUSH (1 << 21)
2368
2369typedef struct AVProfile {
2370 int profile;
2371 const char *name;
2373
2375
2376struct AVCodecContext;
2377struct AVSubtitle;
2378struct AVPacket;
2379
2380typedef struct AVCodec {
2381
2382 const char *name;
2383
2384 const char *long_name;
2385 enum AVMediaType type;
2386 enum AVCodecID id;
2387
2388 int capabilities;
2389 uint8_t max_lowres;
2391 const enum AVPixelFormat *pix_fmts;
2392 const int *supported_samplerates;
2393 const enum AVSampleFormat *sample_fmts;
2394 const uint64_t *channel_layouts;
2395 const AVClass *priv_class;
2396 const AVProfile *profiles;
2397
2398 const char *wrapper_name;
2399
2400 int caps_internal;
2401
2402 int priv_data_size;
2403
2404 int (*update_thread_context)(struct AVCodecContext *dst, const struct AVCodecContext *src);
2405
2406 int (*update_thread_context_for_user)(struct AVCodecContext *dst, const struct AVCodecContext *src);
2407
2408 const AVCodecDefault *defaults;
2409
2410 void (*init_static_data)(struct AVCodec *codec);
2411
2412 int (*init)(struct AVCodecContext *);
2413 int (*encode_sub)(struct AVCodecContext *, uint8_t *buf, int buf_size,
2414 const struct AVSubtitle *sub);
2415
2416 int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt,
2417 const struct AVFrame *frame, int *got_packet_ptr);
2418
2419 int (*decode)(struct AVCodecContext *avctx, void *outdata,
2420 int *got_frame_ptr, struct AVPacket *avpkt);
2421 int (*close)(struct AVCodecContext *);
2422
2423 int (*receive_packet)(struct AVCodecContext *avctx, struct AVPacket *avpkt);
2424
2425 int (*receive_frame)(struct AVCodecContext *avctx, struct AVFrame *frame);
2426
2427 void (*flush)(struct AVCodecContext *);
2428
2429 const char *bsfs;
2430
2431 const struct AVCodecHWConfigInternal *const *hw_configs;
2432
2433 const uint32_t *codec_tags;
2435
2436const AVCodec *av_codec_iterate(void **opaque);
2437
2439
2441
2443
2445
2447
2449
2450const char *av_get_profile_name(const AVCodec *codec, int profile);
2451
2452enum {
2453
2455
2457
2459
2461};
2462
2463typedef struct AVCodecHWConfig {
2464
2466
2467 int methods;
2468
2471
2472const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index);
2473
2474#define AVCODEC_CODEC_DESC_H
2475
2476typedef struct AVCodecDescriptor {
2477 enum AVCodecID id;
2478 enum AVMediaType type;
2479
2480 const char *name;
2481
2482 const char *long_name;
2483
2484 int props;
2485
2486 const char *const *mime_types;
2487
2488 const struct AVProfile *profiles;
2490
2491#define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
2492
2493#define AV_CODEC_PROP_LOSSY (1 << 1)
2494
2495#define AV_CODEC_PROP_LOSSLESS (1 << 2)
2496
2497#define AV_CODEC_PROP_REORDER (1 << 3)
2498
2499#define AV_CODEC_PROP_BITMAP_SUB (1 << 16)
2500
2501#define AV_CODEC_PROP_TEXT_SUB (1 << 17)
2502
2504
2506
2508
2509#define AVCODEC_CODEC_PAR_H
2510
2518};
2519
2520typedef struct AVCodecParameters {
2521
2523
2524 enum AVCodecID codec_id;
2525
2526 uint32_t codec_tag;
2527
2528 uint8_t *extradata;
2529
2530 int extradata_size;
2531
2532 int format;
2533
2534 int64_t bit_rate;
2535
2537
2539
2540 int profile;
2541 int level;
2542
2543 int width;
2544 int height;
2545
2547
2549
2555
2556 int video_delay;
2557
2558 uint64_t channel_layout;
2559
2560 int channels;
2561
2562 int sample_rate;
2563
2564 int block_align;
2565
2566 int frame_size;
2567
2568 int initial_padding;
2569
2570 int trailing_padding;
2571
2572 int seek_preroll;
2574
2576
2578
2580
2582
2583#define AVCODEC_DEFS_H
2584
2585#define AV_INPUT_BUFFER_PADDING_SIZE 64
2586
2588
2596};
2597
2609};
2610
2611typedef struct AVPanScan {
2612
2613 int id;
2614
2615 int width;
2616 int height;
2617
2618 int16_t position[3][2];
2620
2621typedef struct AVCPBProperties {
2622
2624
2626
2628
2630
2631 uint64_t vbv_delay;
2633
2635
2637
2638 int64_t wallclock;
2641
2642unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
2643
2644#define AVCODEC_PACKET_H
2645
2647
2649
2651
2653
2655
2657
2659
2661
2663
2665
2667
2669
2671
2673
2675
2677
2679
2681
2683
2685
2687
2689
2691
2693
2695
2697
2699
2701
2703
2705
2707
2709
2711
2714
2715#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS
2716
2717typedef struct AVPacketSideData {
2718 uint8_t *data;
2719 size_t size;
2722
2723typedef struct AVPacket {
2724
2726
2727 int64_t pts;
2728
2729 int64_t dts;
2730 uint8_t *data;
2731 int size;
2732 int stream_index;
2733
2734 int flags;
2735
2737 int side_data_elems;
2738
2739 int64_t duration;
2740
2741 int64_t pos;
2742
2743 void *opaque;
2744
2746
2749
2751typedef struct AVPacketList {
2752 AVPacket pkt;
2753 struct AVPacketList *next;
2755
2756#define AV_PKT_FLAG_KEY 0x0001
2757#define AV_PKT_FLAG_CORRUPT 0x0002
2758
2759#define AV_PKT_FLAG_DISCARD 0x0004
2760
2761#define AV_PKT_FLAG_TRUSTED 0x0008
2762
2763#define AV_PKT_FLAG_DISPOSABLE 0x0010
2764
2770};
2771
2773
2775
2777
2780
2782
2784
2785int av_grow_packet(AVPacket *pkt, int grow_by);
2786
2787int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);
2788
2790 size_t size);
2791
2793 uint8_t *data, size_t size);
2794
2796 size_t size);
2797
2799 size_t *size);
2800
2802
2804
2805int av_packet_unpack_dictionary(const uint8_t *data, size_t size,
2806 AVDictionary **dict);
2807
2809
2810int av_packet_ref(AVPacket *dst, const AVPacket *src);
2811
2813
2815
2817
2819
2821
2823
2824#define AV_INPUT_BUFFER_MIN_SIZE 16384
2825
2826typedef struct RcOverride{
2827 int start_frame;
2828 int end_frame;
2829 int qscale;
2830 float quality_factor;
2832
2833#define AV_CODEC_FLAG_UNALIGNED (1 << 0)
2834
2835#define AV_CODEC_FLAG_QSCALE (1 << 1)
2836
2837#define AV_CODEC_FLAG_4MV (1 << 2)
2838
2839#define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3)
2840
2841#define AV_CODEC_FLAG_QPEL (1 << 4)
2842
2843#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
2844
2845#define AV_CODEC_FLAG_PASS1 (1 << 9)
2846
2847#define AV_CODEC_FLAG_PASS2 (1 << 10)
2848
2849#define AV_CODEC_FLAG_LOOP_FILTER (1 << 11)
2850
2851#define AV_CODEC_FLAG_GRAY (1 << 13)
2852
2853#define AV_CODEC_FLAG_PSNR (1 << 15)
2854
2855#define AV_CODEC_FLAG_TRUNCATED (1 << 16)
2856
2857#define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18)
2858
2859#define AV_CODEC_FLAG_LOW_DELAY (1 << 19)
2860
2861#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
2862
2863#define AV_CODEC_FLAG_BITEXACT (1 << 23)
2864
2865#define AV_CODEC_FLAG_AC_PRED (1 << 24)
2866
2867#define AV_CODEC_FLAG_INTERLACED_ME (1 << 29)
2868#define AV_CODEC_FLAG_CLOSED_GOP (1U << 31)
2869
2870#define AV_CODEC_FLAG2_FAST (1 << 0)
2871
2872#define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2)
2873
2874#define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
2875
2876#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)
2877
2878#define AV_CODEC_FLAG2_CHUNKS (1 << 15)
2879
2880#define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
2881
2882#define AV_CODEC_FLAG2_SHOW_ALL (1 << 22)
2883
2884#define AV_CODEC_FLAG2_EXPORT_MVS (1 << 28)
2885
2886#define AV_CODEC_FLAG2_SKIP_MANUAL (1 << 29)
2887
2888#define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30)
2889
2890#define AV_CODEC_EXPORT_DATA_MVS (1 << 0)
2891
2892#define AV_CODEC_EXPORT_DATA_PRFT (1 << 1)
2893
2894#define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2)
2895
2896#define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3)
2897
2898#define AV_GET_BUFFER_FLAG_REF (1 << 0)
2899
2900#define AV_GET_ENCODE_BUFFER_FLAG_REF (1 << 0)
2901
2902struct AVCodecInternal;
2903
2904typedef struct AVCodecContext {
2905
2906 const AVClass *av_class;
2907 int log_level_offset;
2908
2910 const struct AVCodec *codec;
2911 enum AVCodecID codec_id;
2912
2913 unsigned int codec_tag;
2914
2915 void *priv_data;
2916
2917 struct AVCodecInternal *internal;
2918
2919 void *opaque;
2920
2921 int64_t bit_rate;
2922
2924
2925 int global_quality;
2926
2928#define FF_COMPRESSION_DEFAULT -1
2929
2930 int flags;
2931
2932 int flags2;
2933
2934 uint8_t *extradata;
2935 int extradata_size;
2936
2938
2939 int ticks_per_frame;
2940
2941 int delay;
2942
2943 int width, height;
2944
2946
2947 int gop_size;
2948
2950
2951 void (*draw_horiz_band)(struct AVCodecContext *s,
2952 const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
2953 int y, int type, int height);
2954
2955 enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
2956
2957 int max_b_frames;
2958
2959 float b_quant_factor;
2960
2961 float b_quant_offset;
2962
2963 int has_b_frames;
2964
2965 float i_quant_factor;
2966
2967 float i_quant_offset;
2968
2969 float lumi_masking;
2970
2972
2974
2975 float p_masking;
2976
2977 float dark_masking;
2978
2979 int slice_count;
2980
2981 int *slice_offset;
2982
2984
2985 int me_cmp;
2986
2987 int me_sub_cmp;
2988
2989 int mb_cmp;
2990
2991 int ildct_cmp;
2992#define FF_CMP_SAD 0
2993#define FF_CMP_SSE 1
2994#define FF_CMP_SATD 2
2995#define FF_CMP_DCT 3
2996#define FF_CMP_PSNR 4
2997#define FF_CMP_BIT 5
2998#define FF_CMP_RD 6
2999#define FF_CMP_ZERO 7
3000#define FF_CMP_VSAD 8
3001#define FF_CMP_VSSE 9
3002#define FF_CMP_NSSE 10
3003#define FF_CMP_W53 11
3004#define FF_CMP_W97 12
3005#define FF_CMP_DCTMAX 13
3006#define FF_CMP_DCT264 14
3007#define FF_CMP_MEDIAN_SAD 15
3008#define FF_CMP_CHROMA 256
3009
3010 int dia_size;
3011
3013
3014 int me_pre_cmp;
3015
3016 int pre_dia_size;
3017
3019
3020 int me_range;
3021
3022 int slice_flags;
3023#define SLICE_FLAG_CODED_ORDER 0x0001
3024#define SLICE_FLAG_ALLOW_FIELD 0x0002
3025#define SLICE_FLAG_ALLOW_PLANE 0x0004
3026
3027 int mb_decision;
3028#define FF_MB_DECISION_SIMPLE 0
3029#define FF_MB_DECISION_BITS 1
3030#define FF_MB_DECISION_RD 2
3031
3032 uint16_t *intra_matrix;
3033
3034 uint16_t *inter_matrix;
3035
3037
3038 int skip_top;
3039
3040 int skip_bottom;
3041
3042 int mb_lmin;
3043
3044 int mb_lmax;
3045
3046 int bidir_refine;
3047
3048 int keyint_min;
3049
3050 int refs;
3051
3052 int mv0_threshold;
3053
3055
3057
3059
3061
3063
3064 int slices;
3065
3067
3068 int sample_rate;
3069 int channels;
3070
3072
3073 int frame_size;
3074
3075 int frame_number;
3076
3077 int block_align;
3078
3079 int cutoff;
3080
3081 uint64_t channel_layout;
3082
3083 uint64_t request_channel_layout;
3084
3086
3088
3089 int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
3090
3091 float qcompress;
3092 float qblur;
3093
3094 int qmin;
3095
3096 int qmax;
3097
3098 int max_qdiff;
3099
3100 int rc_buffer_size;
3101
3104
3105 int64_t rc_max_rate;
3106
3107 int64_t rc_min_rate;
3108
3110
3112
3114
3115 int trellis;
3116
3117 char *stats_out;
3118
3119 char *stats_in;
3120
3121 int workaround_bugs;
3122#define FF_BUG_AUTODETECT 1
3123#define FF_BUG_XVID_ILACE 4
3124#define FF_BUG_UMP4 8
3125#define FF_BUG_NO_PADDING 16
3126#define FF_BUG_AMV 32
3127#define FF_BUG_QPEL_CHROMA 64
3128#define FF_BUG_STD_QPEL 128
3129#define FF_BUG_QPEL_CHROMA2 256
3130#define FF_BUG_DIRECT_BLOCKSIZE 512
3131#define FF_BUG_EDGE 1024
3132#define FF_BUG_HPEL_CHROMA 2048
3133#define FF_BUG_DC_CLIP 4096
3134#define FF_BUG_MS 8192
3135#define FF_BUG_TRUNCATED 16384
3136#define FF_BUG_IEDGE 32768
3137
3139#define FF_COMPLIANCE_VERY_STRICT 2
3140#define FF_COMPLIANCE_STRICT 1
3141#define FF_COMPLIANCE_NORMAL 0
3142#define FF_COMPLIANCE_UNOFFICIAL -1
3143#define FF_COMPLIANCE_EXPERIMENTAL -2
3144
3146#define FF_EC_GUESS_MVS 1
3147#define FF_EC_DEBLOCK 2
3148#define FF_EC_FAVOR_INTER 256
3149
3150 int debug;
3151#define FF_DEBUG_PICT_INFO 1
3152#define FF_DEBUG_RC 2
3153#define FF_DEBUG_BITSTREAM 4
3154#define FF_DEBUG_MB_TYPE 8
3155#define FF_DEBUG_QP 16
3156#define FF_DEBUG_DCT_COEFF 0x00000040
3157#define FF_DEBUG_SKIP 0x00000080
3158#define FF_DEBUG_STARTCODE 0x00000100
3159#define FF_DEBUG_ER 0x00000400
3160#define FF_DEBUG_MMCO 0x00000800
3161#define FF_DEBUG_BUGS 0x00001000
3162#define FF_DEBUG_BUFFERS 0x00008000
3163#define FF_DEBUG_THREADS 0x00010000
3164#define FF_DEBUG_GREEN_MD 0x00800000
3165#define FF_DEBUG_NOMC 0x01000000
3166
3167 int err_recognition;
3168
3169#define AV_EF_CRCCHECK (1<<0)
3170#define AV_EF_BITSTREAM (1<<1)
3171#define AV_EF_BUFFER (1<<2)
3172#define AV_EF_EXPLODE (1<<3)
3173
3174#define AV_EF_IGNORE_ERR (1<<15)
3175#define AV_EF_CAREFUL (1<<16)
3176#define AV_EF_COMPLIANT (1<<17)
3177#define AV_EF_AGGRESSIVE (1<<18)
3178
3179 int64_t reordered_opaque;
3180
3181 const struct AVHWAccel *hwaccel;
3182
3183 void *hwaccel_context;
3184
3185 uint64_t error[AV_NUM_DATA_POINTERS];
3186
3187 int dct_algo;
3188#define FF_DCT_AUTO 0
3189#define FF_DCT_FASTINT 1
3190#define FF_DCT_INT 2
3191#define FF_DCT_MMX 3
3192#define FF_DCT_ALTIVEC 5
3193#define FF_DCT_FAAN 6
3194
3195 int idct_algo;
3196#define FF_IDCT_AUTO 0
3197#define FF_IDCT_INT 1
3198#define FF_IDCT_SIMPLE 2
3199#define FF_IDCT_SIMPLEMMX 3
3200#define FF_IDCT_ARM 7
3201#define FF_IDCT_ALTIVEC 8
3202#define FF_IDCT_SIMPLEARM 10
3203#define FF_IDCT_XVID 14
3204#define FF_IDCT_SIMPLEARMV5TE 16
3205#define FF_IDCT_SIMPLEARMV6 17
3206#define FF_IDCT_FAAN 20
3207#define FF_IDCT_SIMPLENEON 22
3208#define FF_IDCT_NONE 24
3209#define FF_IDCT_SIMPLEAUTO 128
3210
3212
3214
3215 int lowres;
3216
3217 int thread_count;
3218
3219 int thread_type;
3220#define FF_THREAD_FRAME 1
3221#define FF_THREAD_SLICE 2
3222
3224
3227
3228 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
3229
3230 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
3231
3232 int nsse_weight;
3233
3234 int profile;
3235#define FF_PROFILE_UNKNOWN -99
3236#define FF_PROFILE_RESERVED -100
3237
3238#define FF_PROFILE_AAC_MAIN 0
3239#define FF_PROFILE_AAC_LOW 1
3240#define FF_PROFILE_AAC_SSR 2
3241#define FF_PROFILE_AAC_LTP 3
3242#define FF_PROFILE_AAC_HE 4
3243#define FF_PROFILE_AAC_HE_V2 28
3244#define FF_PROFILE_AAC_LD 22
3245#define FF_PROFILE_AAC_ELD 38
3246#define FF_PROFILE_MPEG2_AAC_LOW 128
3247#define FF_PROFILE_MPEG2_AAC_HE 131
3248
3249#define FF_PROFILE_DNXHD 0
3250#define FF_PROFILE_DNXHR_LB 1
3251#define FF_PROFILE_DNXHR_SQ 2
3252#define FF_PROFILE_DNXHR_HQ 3
3253#define FF_PROFILE_DNXHR_HQX 4
3254#define FF_PROFILE_DNXHR_444 5
3255
3256#define FF_PROFILE_DTS 20
3257#define FF_PROFILE_DTS_ES 30
3258#define FF_PROFILE_DTS_96_24 40
3259#define FF_PROFILE_DTS_HD_HRA 50
3260#define FF_PROFILE_DTS_HD_MA 60
3261#define FF_PROFILE_DTS_EXPRESS 70
3262
3263#define FF_PROFILE_MPEG2_422 0
3264#define FF_PROFILE_MPEG2_HIGH 1
3265#define FF_PROFILE_MPEG2_SS 2
3266#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
3267#define FF_PROFILE_MPEG2_MAIN 4
3268#define FF_PROFILE_MPEG2_SIMPLE 5
3269
3270#define FF_PROFILE_H264_CONSTRAINED (1<<9)
3271#define FF_PROFILE_H264_INTRA (1<<11)
3272
3273#define FF_PROFILE_H264_BASELINE 66
3274#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
3275#define FF_PROFILE_H264_MAIN 77
3276#define FF_PROFILE_H264_EXTENDED 88
3277#define FF_PROFILE_H264_HIGH 100
3278#define FF_PROFILE_H264_HIGH_10 110
3279#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
3280#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
3281#define FF_PROFILE_H264_HIGH_422 122
3282#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
3283#define FF_PROFILE_H264_STEREO_HIGH 128
3284#define FF_PROFILE_H264_HIGH_444 144
3285#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
3286#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
3287#define FF_PROFILE_H264_CAVLC_444 44
3288
3289#define FF_PROFILE_VC1_SIMPLE 0
3290#define FF_PROFILE_VC1_MAIN 1
3291#define FF_PROFILE_VC1_COMPLEX 2
3292#define FF_PROFILE_VC1_ADVANCED 3
3293
3294#define FF_PROFILE_MPEG4_SIMPLE 0
3295#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
3296#define FF_PROFILE_MPEG4_CORE 2
3297#define FF_PROFILE_MPEG4_MAIN 3
3298#define FF_PROFILE_MPEG4_N_BIT 4
3299#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
3300#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
3301#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
3302#define FF_PROFILE_MPEG4_HYBRID 8
3303#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
3304#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
3305#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
3306#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
3307#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
3308#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
3309#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
3310
3311#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
3312#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
3313#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
3314#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
3315#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
3316
3317#define FF_PROFILE_VP9_0 0
3318#define FF_PROFILE_VP9_1 1
3319#define FF_PROFILE_VP9_2 2
3320#define FF_PROFILE_VP9_3 3
3321
3322#define FF_PROFILE_HEVC_MAIN 1
3323#define FF_PROFILE_HEVC_MAIN_10 2
3324#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
3325#define FF_PROFILE_HEVC_REXT 4
3326
3327#define FF_PROFILE_VVC_MAIN_10 1
3328#define FF_PROFILE_VVC_MAIN_10_444 33
3329
3330#define FF_PROFILE_AV1_MAIN 0
3331#define FF_PROFILE_AV1_HIGH 1
3332#define FF_PROFILE_AV1_PROFESSIONAL 2
3333
3334#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
3335#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
3336#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
3337#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
3338#define FF_PROFILE_MJPEG_JPEG_LS 0xf7
3339
3340#define FF_PROFILE_SBC_MSBC 1
3341
3342#define FF_PROFILE_PRORES_PROXY 0
3343#define FF_PROFILE_PRORES_LT 1
3344#define FF_PROFILE_PRORES_STANDARD 2
3345#define FF_PROFILE_PRORES_HQ 3
3346#define FF_PROFILE_PRORES_4444 4
3347#define FF_PROFILE_PRORES_XQ 5
3348
3349#define FF_PROFILE_ARIB_PROFILE_A 0
3350#define FF_PROFILE_ARIB_PROFILE_C 1
3351
3352#define FF_PROFILE_KLVA_SYNC 0
3353#define FF_PROFILE_KLVA_ASYNC 1
3354
3355 int level;
3356#define FF_LEVEL_UNKNOWN -99
3357
3359
3360 enum AVDiscard skip_idct;
3361
3362 enum AVDiscard skip_frame;
3363
3364 uint8_t *subtitle_header;
3366
3367 int initial_padding;
3368
3370
3372
3374
3376
3381
3382 char *sub_charenc;
3383
3384 int sub_charenc_mode;
3385#define FF_SUB_CHARENC_MODE_DO_NOTHING -1
3386#define FF_SUB_CHARENC_MODE_AUTOMATIC 0
3387#define FF_SUB_CHARENC_MODE_PRE_DECODER 1
3388#define FF_SUB_CHARENC_MODE_IGNORE 2
3389
3390 int skip_alpha;
3391
3392 int seek_preroll;
3393
3396#define FF_DEBUG_VIS_MV_P_FOR 0x00000001
3397#define FF_DEBUG_VIS_MV_B_FOR 0x00000002
3398#define FF_DEBUG_VIS_MV_B_BACK 0x00000004
3399
3400 uint16_t *chroma_intra_matrix;
3401
3402 uint8_t *dump_separator;
3403
3404 char *codec_whitelist;
3405
3406 unsigned properties;
3407#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
3408#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
3409#define FF_CODEC_PROPERTY_FILM_GRAIN 0x00000004
3410
3413
3415
3418#define FF_SUB_TEXT_FMT_ASS 0
3419
3420 int trailing_padding;
3421
3422 int64_t max_pixels;
3423
3425
3426 int hwaccel_flags;
3427
3428 int apply_cropping;
3429
3430 int extra_hw_frames;
3431
3433
3435
3437
3440
3441struct MpegEncContext;
3442
3443typedef struct AVHWAccel {
3444
3445 const char *name;
3446
3447 enum AVMediaType type;
3448
3449 enum AVCodecID id;
3450
3452
3453 int capabilities;
3454
3455 int (*alloc_frame)(AVCodecContext *avctx, AVFrame *frame);
3456
3457 int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3458
3459 int (*decode_params)(AVCodecContext *avctx, int type, const uint8_t *buf, uint32_t buf_size);
3460
3461 int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3462
3463 int (*end_frame)(AVCodecContext *avctx);
3464
3466
3467 void (*decode_mb)(struct MpegEncContext *s);
3468
3469 int (*init)(AVCodecContext *avctx);
3470
3471 int (*uninit)(AVCodecContext *avctx);
3472
3473 int priv_data_size;
3474
3475 int caps_internal;
3476
3477 int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx);
3479
3480#define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL 0x0200
3481
3482#define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0)
3483
3484#define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1)
3485
3486#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2)
3487
3490
3492
3494
3496};
3497
3498#define AV_SUBTITLE_FLAG_FORCED 0x00000001
3499
3500typedef struct AVSubtitleRect {
3501 int x;
3502 int y;
3503 int w;
3504 int h;
3505 int nb_colors;
3506
3507 uint8_t *data[4];
3508 int linesize[4];
3509
3510 enum AVSubtitleType type;
3511
3512 char *text;
3513
3514 char *ass;
3515
3516 int flags;
3518
3519typedef struct AVSubtitle {
3520 uint16_t format;
3521 uint32_t start_display_time;
3522 uint32_t end_display_time;
3523 unsigned num_rects;
3525 int64_t pts;
3527
3528unsigned avcodec_version(void);
3529
3530const char *avcodec_configuration(void);
3531
3532const char *avcodec_license(void);
3533
3535
3537
3539
3542
3544
3546 const AVCodecContext *codec);
3547
3549 const AVCodecParameters *par);
3550
3551int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
3552
3554
3556
3558
3560
3561void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
3562
3563void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
3564 int linesize_align[AV_NUM_DATA_POINTERS]);
3565
3566int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
3567
3569
3571 int *got_sub_ptr,
3572 AVPacket *avpkt);
3573
3575
3577
3579
3581
3583 AVBufferRef *device_ref,
3584 enum AVPixelFormat hw_pix_fmt,
3585 AVBufferRef **out_frames_ref);
3586
3592};
3593
3594typedef struct AVCodecParserContext {
3595 void *priv_data;
3596 const struct AVCodecParser *parser;
3597 int64_t frame_offset;
3598 int64_t cur_offset;
3599
3600 int64_t next_frame_offset;
3601
3602 int pict_type;
3603
3604 int repeat_pict;
3605 int64_t pts;
3606 int64_t dts;
3607
3608 int64_t last_pts;
3609 int64_t last_dts;
3610 int fetch_timestamp;
3611
3612#define AV_PARSER_PTS_NB 4
3617
3618 int flags;
3619#define PARSER_FLAG_COMPLETE_FRAMES 0x0001
3620#define PARSER_FLAG_ONCE 0x0002
3621
3622#define PARSER_FLAG_FETCHED_OFFSET 0x0004
3623#define PARSER_FLAG_USE_CODEC_TS 0x1000
3624
3625 int64_t offset;
3627
3628 int key_frame;
3629
3630 int dts_sync_point;
3631
3633
3634 int pts_dts_delta;
3635
3637
3638 int64_t pos;
3639
3640 int64_t last_pos;
3641
3642 int duration;
3643
3645
3647
3649
3650 int width;
3651 int height;
3652
3653 int coded_width;
3654 int coded_height;
3655
3656 int format;
3658
3659typedef struct AVCodecParser {
3660 int codec_ids[7];
3661 int priv_data_size;
3663
3665 AVCodecContext *avctx,
3666 const uint8_t **poutbuf, int *poutbuf_size,
3667 const uint8_t *buf, int buf_size);
3669 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
3671
3672const AVCodecParser *av_parser_iterate(void **opaque);
3673
3675
3677 AVCodecContext *avctx,
3678 uint8_t **poutbuf, int *poutbuf_size,
3679 const uint8_t *buf, int buf_size,
3680 int64_t pts, int64_t dts,
3681 int64_t pos);
3682
3684
3685int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
3686 const AVSubtitle *sub);
3687
3689
3691 enum AVPixelFormat src_pix_fmt,
3692 int has_alpha, int *loss_ptr);
3693
3695
3696void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
3697
3698int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
3699int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
3700
3701int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
3702 enum AVSampleFormat sample_fmt, const uint8_t *buf,
3703 int buf_size, int align);
3704
3706
3707int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);
3708
3709void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
3710
3711void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
3712
3714
3715#define AVFORMAT_AVFORMAT_H
3716
3717#define AVFORMAT_AVIO_H
3718
3719#define AVFORMAT_VERSION_H
3720
3721#define LIBAVFORMAT_VERSION_MAJOR 59
3722#define LIBAVFORMAT_VERSION_MINOR 16
3723#define LIBAVFORMAT_VERSION_MICRO 100
3724
3725#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
3726 LIBAVFORMAT_VERSION_MINOR, \
3727 LIBAVFORMAT_VERSION_MICRO)
3728#define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \
3729 LIBAVFORMAT_VERSION_MINOR, \
3730 LIBAVFORMAT_VERSION_MICRO)
3731#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
3732
3733#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
3734
3735#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60)
3736#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60)
3737#define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60)
3738#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60)
3739#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59)
3740#define FF_HTTP_CACHE_REDIRECT_DEFAULT (LIBAVFORMAT_VERSION_MAJOR < 60)
3741
3742#define FF_API_R_FRAME_RATE 1
3743
3744#define AVIO_SEEKABLE_NORMAL (1 << 0)
3745
3746#define AVIO_SEEKABLE_TIME (1 << 1)
3747
3748typedef struct AVIOInterruptCB {
3749 int (*callback)(void*);
3750 void *opaque;
3752
3765};
3766
3767typedef struct AVIODirEntry {
3768 char *name;
3769 int type;
3770 int utf8;
3771
3772 int64_t size;
3773 int64_t modification_timestamp;
3774
3775 int64_t access_timestamp;
3776
3778
3779 int64_t user_id;
3780 int64_t group_id;
3781 int64_t filemode;
3783
3784typedef struct AVIODirContext {
3785 struct URLContext *url_context;
3787
3789
3791
3793
3795
3797
3799
3801};
3802
3803typedef struct AVIOContext {
3804
3805 const AVClass *av_class;
3806
3807 unsigned char *buffer;
3808 int buffer_size;
3809 unsigned char *buf_ptr;
3810 unsigned char *buf_end;
3811
3812 void *opaque;
3813
3814 int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);
3815 int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
3816 int64_t (*seek)(void *opaque, int64_t offset, int whence);
3817 int64_t pos;
3818 int eof_reached;
3819 int error;
3820 int write_flag;
3821 int max_packet_size;
3822 int min_packet_size;
3823
3824 unsigned long checksum;
3825 unsigned char *checksum_ptr;
3826 unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
3827
3828 int (*read_pause)(void *opaque, int pause);
3829
3830 int64_t (*read_seek)(void *opaque, int stream_index,
3831 int64_t timestamp, int flags);
3832
3833 int seekable;
3834
3835 int direct;
3836
3837 const char *protocol_whitelist;
3838
3839 const char *protocol_blacklist;
3840
3841 int (*write_data_type)(void *opaque, uint8_t *buf, int buf_size,
3842 enum AVIODataMarkerType type, int64_t time);
3843
3845
3847 int64_t written;
3848
3849 unsigned char *buf_ptr_max;
3850
3851 int64_t bytes_read;
3852
3855
3856const char *avio_find_protocol_name(const char *url);
3857
3858int avio_check(const char *url, int flags);
3859
3860int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options);
3861
3863
3865
3867
3869 unsigned char *buffer,
3870 int buffer_size,
3871 int write_flag,
3872 void *opaque,
3873 int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
3874 int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
3875 int64_t (*seek)(void *opaque, int64_t offset, int whence));
3876
3878
3879void avio_w8(AVIOContext *s, int b);
3880void avio_write(AVIOContext *s, const unsigned char *buf, int size);
3881void avio_wl64(AVIOContext *s, uint64_t val);
3882void avio_wb64(AVIOContext *s, uint64_t val);
3883void avio_wl32(AVIOContext *s, unsigned int val);
3884void avio_wb32(AVIOContext *s, unsigned int val);
3885void avio_wl24(AVIOContext *s, unsigned int val);
3886void avio_wb24(AVIOContext *s, unsigned int val);
3887void avio_wl16(AVIOContext *s, unsigned int val);
3888void avio_wb16(AVIOContext *s, unsigned int val);
3889
3890int avio_put_str(AVIOContext *s, const char *str);
3891
3892int avio_put_str16le(AVIOContext *s, const char *str);
3893
3894int avio_put_str16be(AVIOContext *s, const char *str);
3895
3896void avio_write_marker(AVIOContext *s, int64_t time, enum AVIODataMarkerType type);
3897
3898#define AVSEEK_SIZE 0x10000
3899
3900#define AVSEEK_FORCE 0x20000
3901
3902int64_t avio_seek(AVIOContext *s, int64_t offset, int whence);
3903
3904int64_t avio_skip(AVIOContext *s, int64_t offset);
3905
3907{
3908 return avio_seek(s, 0, SEEK_CUR);
3909}
3910
3912
3914
3915int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
3916
3917void avio_print_string_array(AVIOContext *s, const char *strings[]);
3918
3919#define avio_print(s, ...) \
3920 avio_print_string_array(s, (const char*[]){__VA_ARGS__, NULL})
3921
3923
3924int avio_read(AVIOContext *s, unsigned char *buf, int size);
3925
3926int avio_read_partial(AVIOContext *s, unsigned char *buf, int size);
3927
3929unsigned int avio_rl16(AVIOContext *s);
3930unsigned int avio_rl24(AVIOContext *s);
3931unsigned int avio_rl32(AVIOContext *s);
3933unsigned int avio_rb16(AVIOContext *s);
3934unsigned int avio_rb24(AVIOContext *s);
3935unsigned int avio_rb32(AVIOContext *s);
3937
3938int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen);
3939
3940int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen);
3941int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen);
3942
3943#define AVIO_FLAG_READ 1
3944#define AVIO_FLAG_WRITE 2
3945#define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE)
3946
3947#define AVIO_FLAG_NONBLOCK 8
3948
3949#define AVIO_FLAG_DIRECT 0x8000
3950
3951int avio_open(AVIOContext **s, const char *url, int flags);
3952
3953int avio_open2(AVIOContext **s, const char *url, int flags,
3954 const AVIOInterruptCB *int_cb, AVDictionary **options);
3955
3957
3959
3961
3962int avio_get_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
3963
3964int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
3965
3966const char *avio_enum_protocols(void **opaque, int output);
3967
3969
3970int avio_pause(AVIOContext *h, int pause);
3971
3972int64_t avio_seek_time(AVIOContext *h, int stream_index,
3973 int64_t timestamp, int flags);
3974
3975struct AVBPrint;
3976
3977int avio_read_to_bprint(AVIOContext *h, struct AVBPrint *pb, size_t max_size);
3978
3980
3982
3983struct AVFormatContext;
3984struct AVStream;
3985
3986struct AVDeviceInfoList;
3987struct AVDeviceCapabilitiesQuery;
3988
3990
3992
3993struct AVCodecTag;
3994
3995typedef struct AVProbeData {
3996 const char *filename;
3997 unsigned char *buf;
3998 int buf_size;
3999 const char *mime_type;
4001
4002#define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4)
4003#define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1)
4004
4005#define AVPROBE_SCORE_EXTENSION 50
4006#define AVPROBE_SCORE_MIME 75
4007#define AVPROBE_SCORE_MAX 100
4008
4009#define AVPROBE_PADDING_SIZE 32
4010
4011#define AVFMT_NOFILE 0x0001
4012#define AVFMT_NEEDNUMBER 0x0002
4013
4014#define AVFMT_EXPERIMENTAL 0x0004
4015#define AVFMT_SHOW_IDS 0x0008
4016#define AVFMT_GLOBALHEADER 0x0040
4017#define AVFMT_NOTIMESTAMPS 0x0080
4018#define AVFMT_GENERIC_INDEX 0x0100
4019#define AVFMT_TS_DISCONT 0x0200
4020#define AVFMT_VARIABLE_FPS 0x0400
4021#define AVFMT_NODIMENSIONS 0x0800
4022#define AVFMT_NOSTREAMS 0x1000
4023#define AVFMT_NOBINSEARCH 0x2000
4024#define AVFMT_NOGENSEARCH 0x4000
4025#define AVFMT_NO_BYTE_SEEK 0x8000
4026#define AVFMT_ALLOW_FLUSH 0x10000
4027#define AVFMT_TS_NONSTRICT 0x20000
4028
4029#define AVFMT_TS_NEGATIVE 0x40000
4030
4031#define AVFMT_SEEK_TO_PTS 0x4000000
4032
4033typedef struct AVOutputFormat {
4034 const char *name;
4035
4036 const char *long_name;
4037 const char *mime_type;
4038 const char *extensions;
4039
4043
4044 int flags;
4045
4046 const struct AVCodecTag * const *codec_tag;
4047
4048 const AVClass *priv_class;
4049
4050 int priv_data_size;
4051
4053
4054 int (*write_header)(struct AVFormatContext *);
4055
4056 int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
4057 int (*write_trailer)(struct AVFormatContext *);
4058
4059 int (*interleave_packet)(struct AVFormatContext *s, AVPacket *pkt,
4060 int flush, int has_packet);
4061
4062 int (*query_codec)(enum AVCodecID id, int std_compliance);
4063
4064 void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
4065 int64_t *dts, int64_t *wall);
4066
4067 int (*control_message)(struct AVFormatContext *s, int type,
4068 void *data, size_t data_size);
4069
4070 int (*write_uncoded_frame)(struct AVFormatContext *, int stream_index,
4071 AVFrame **frame, unsigned flags);
4072
4073 int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
4074 enum AVCodecID data_codec;
4075
4076 int (*init)(struct AVFormatContext *);
4077
4078 void (*deinit)(struct AVFormatContext *);
4079
4080 int (*check_bitstream)(struct AVFormatContext *s, struct AVStream *st,
4081 const AVPacket *pkt);
4083
4084typedef struct AVInputFormat {
4085
4086 const char *name;
4087
4088 const char *long_name;
4089
4090 int flags;
4091
4092 const char *extensions;
4093
4094 const struct AVCodecTag * const *codec_tag;
4095
4096 const AVClass *priv_class;
4097
4098 const char *mime_type;
4099
4100 int raw_codec_id;
4101
4102 int priv_data_size;
4103
4105
4106 int (*read_probe)(const AVProbeData *);
4107
4108 int (*read_header)(struct AVFormatContext *);
4109
4110 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
4111
4112 int (*read_close)(struct AVFormatContext *);
4113
4114 int (*read_seek)(struct AVFormatContext *,
4115 int stream_index, int64_t timestamp, int flags);
4116
4117 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
4118 int64_t *pos, int64_t pos_limit);
4119
4120 int (*read_play)(struct AVFormatContext *);
4121
4122 int (*read_pause)(struct AVFormatContext *);
4123
4124 int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
4125
4126 int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
4127
4129
4137
4138};
4139
4140typedef struct AVIndexEntry {
4141 int64_t pos;
4142 int64_t timestamp;
4143
4144#define AVINDEX_KEYFRAME 0x0001
4145#define AVINDEX_DISCARD_FRAME 0x0002
4146
4147 int flags:2;
4148 int size:30;
4149 int min_distance;
4151
4152#define AV_DISPOSITION_DEFAULT (1 << 0)
4153
4154#define AV_DISPOSITION_DUB (1 << 1)
4155
4156#define AV_DISPOSITION_ORIGINAL (1 << 2)
4157
4158#define AV_DISPOSITION_COMMENT (1 << 3)
4159
4160#define AV_DISPOSITION_LYRICS (1 << 4)
4161
4162#define AV_DISPOSITION_KARAOKE (1 << 5)
4163
4164#define AV_DISPOSITION_FORCED (1 << 6)
4165
4166#define AV_DISPOSITION_HEARING_IMPAIRED (1 << 7)
4167
4168#define AV_DISPOSITION_VISUAL_IMPAIRED (1 << 8)
4169
4170#define AV_DISPOSITION_CLEAN_EFFECTS (1 << 9)
4171
4172#define AV_DISPOSITION_ATTACHED_PIC (1 << 10)
4173
4174#define AV_DISPOSITION_TIMED_THUMBNAILS (1 << 11)
4175
4176#define AV_DISPOSITION_CAPTIONS (1 << 16)
4177
4178#define AV_DISPOSITION_DESCRIPTIONS (1 << 17)
4179
4180#define AV_DISPOSITION_METADATA (1 << 18)
4181
4182#define AV_DISPOSITION_DEPENDENT (1 << 19)
4183
4184#define AV_DISPOSITION_STILL_IMAGE (1 << 20)
4185
4186int av_disposition_from_string(const char *disp);
4187
4188const char *av_disposition_to_string(int disposition);
4189
4190#define AV_PTS_WRAP_IGNORE 0
4191#define AV_PTS_WRAP_ADD_OFFSET 1
4192#define AV_PTS_WRAP_SUB_OFFSET -1
4193
4194typedef struct AVStream {
4195 int index;
4196
4197 int id;
4198
4199 void *priv_data;
4200
4202
4203 int64_t start_time;
4204
4205 int64_t duration;
4206
4207 int64_t nb_frames;
4208
4209 int disposition;
4210
4211 enum AVDiscard discard;
4212
4214
4216
4218
4220
4222
4223 int nb_side_data;
4224
4225 int event_flags;
4226
4227#define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001
4228
4229#define AVSTREAM_EVENT_FLAG_NEW_PACKETS (1 << 1)
4230
4232
4234
4235 int pts_wrap_bits;
4237
4239
4241
4242#define AV_PROGRAM_RUNNING 1
4243
4244typedef struct AVProgram {
4245 int id;
4246 int flags;
4247 enum AVDiscard discard;
4248 unsigned int *stream_index;
4249 unsigned int nb_stream_indexes;
4251
4252 int program_num;
4253 int pmt_pid;
4254 int pcr_pid;
4255 int pmt_version;
4256
4257 int64_t start_time;
4258 int64_t end_time;
4259
4260 int64_t pts_wrap_reference;
4263
4264#define AVFMTCTX_NOHEADER 0x0001
4265
4266#define AVFMTCTX_UNSEEKABLE 0x0002
4267
4268typedef struct AVChapter {
4269 int64_t id;
4271 int64_t start, end;
4274
4275typedef int (*av_format_control_message)(struct AVFormatContext *s, int type,
4276 void *data, size_t data_size);
4277
4278typedef int (*AVOpenCallback)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags,
4279 const AVIOInterruptCB *int_cb, AVDictionary **options);
4280
4286
4287typedef struct AVFormatContext {
4288
4289 const AVClass *av_class;
4290
4291 const struct AVInputFormat *iformat;
4292
4294
4295 void *priv_data;
4296
4297 AVIOContext *pb;
4298
4299 int ctx_flags;
4300
4301 unsigned int nb_streams;
4302
4303 AVStream **streams;
4304
4305 char *url;
4306
4307 int64_t start_time;
4308
4309 int64_t duration;
4310
4311 int64_t bit_rate;
4312
4313 unsigned int packet_size;
4314 int max_delay;
4315
4316 int flags;
4317#define AVFMT_FLAG_GENPTS 0x0001
4318#define AVFMT_FLAG_IGNIDX 0x0002
4319#define AVFMT_FLAG_NONBLOCK 0x0004
4320#define AVFMT_FLAG_IGNDTS 0x0008
4321#define AVFMT_FLAG_NOFILLIN 0x0010
4322#define AVFMT_FLAG_NOPARSE 0x0020
4323#define AVFMT_FLAG_NOBUFFER 0x0040
4324#define AVFMT_FLAG_CUSTOM_IO 0x0080
4325#define AVFMT_FLAG_DISCARD_CORRUPT 0x0100
4326#define AVFMT_FLAG_FLUSH_PACKETS 0x0200
4327
4328#define AVFMT_FLAG_BITEXACT 0x0400
4329#define AVFMT_FLAG_SORT_DTS 0x10000
4330#define AVFMT_FLAG_PRIV_OPT 0x20000
4331#define AVFMT_FLAG_FAST_SEEK 0x80000
4332#define AVFMT_FLAG_SHORTEST 0x100000
4333#define AVFMT_FLAG_AUTO_BSF 0x200000
4334
4335 int64_t probesize;
4336
4337 int64_t max_analyze_duration;
4338
4339 const uint8_t *key;
4340 int keylen;
4341
4342 unsigned int nb_programs;
4344
4346
4348
4350
4351 unsigned int max_index_size;
4352
4353 unsigned int max_picture_buffer;
4354
4355 unsigned int nb_chapters;
4357
4359
4360 int64_t start_time_realtime;
4361
4362 int fps_probe_size;
4363
4365
4367
4368 int debug;
4369#define FF_FDEBUG_TS 0x0001
4370
4371 int64_t max_interleave_delta;
4372
4374
4375 int event_flags;
4376
4377#define AVFMT_EVENT_FLAG_METADATA_UPDATED 0x0001
4378
4379 int max_ts_probe;
4380
4382#define AVFMT_AVOID_NEG_TS_AUTO -1
4383#define AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE 1
4384#define AVFMT_AVOID_NEG_TS_MAKE_ZERO 2
4385
4386 int ts_id;
4387
4388 int audio_preload;
4389
4391
4392 int max_chunk_size;
4393
4395
4396 int avio_flags;
4397
4399
4400 int64_t skip_initial_bytes;
4401
4402 unsigned int correct_ts_overflow;
4403
4404 int seek2any;
4405
4406 int flush_packets;
4407
4408 int probe_score;
4409
4410 int format_probesize;
4411
4412 char *codec_whitelist;
4413
4414 char *format_whitelist;
4415
4416 int io_repositioned;
4417
4419
4421
4423
4425
4427
4428 void *opaque;
4429
4431
4432 int64_t output_ts_offset;
4433
4434 uint8_t *dump_separator;
4435
4437
4438 char *protocol_whitelist;
4439
4440 int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url,
4441 int flags, AVDictionary **options);
4442
4443 void (*io_close)(struct AVFormatContext *s, AVIOContext *pb);
4444
4445 char *protocol_blacklist;
4446
4447 int max_streams;
4448
4450
4452
4455
4457
4459
4460unsigned avformat_version(void);
4461
4462const char *avformat_configuration(void);
4463
4464const char *avformat_license(void);
4465
4467
4469
4471
4473
4475
4477
4479
4481
4483
4485 uint8_t *data, size_t size);
4486
4488 enum AVPacketSideDataType type, size_t size);
4489
4490uint8_t *av_stream_get_side_data(const AVStream *stream,
4491 enum AVPacketSideDataType type, size_t *size);
4492
4494
4496 const char *format_name, const char *filename);
4497
4498const AVInputFormat *av_find_input_format(const char *short_name);
4499
4500const AVInputFormat *av_probe_input_format(const AVProbeData *pd, int is_opened);
4501
4503 int is_opened, int *score_max);
4504
4506 int is_opened, int *score_ret);
4507
4509 const char *url, void *logctx,
4510 unsigned int offset, unsigned int max_probe_size);
4511
4513 const char *url, void *logctx,
4514 unsigned int offset, unsigned int max_probe_size);
4515
4517 const AVInputFormat *fmt, AVDictionary **options);
4518
4520
4522
4523void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx);
4524
4526 enum AVMediaType type,
4527 int wanted_stream_nb,
4528 int related_stream,
4529 const AVCodec **decoder_ret,
4530 int flags);
4531
4533
4534int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
4535 int flags);
4536
4537int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
4538
4540
4542
4544
4546
4547#define AVSEEK_FLAG_BACKWARD 1
4548#define AVSEEK_FLAG_BYTE 2
4549#define AVSEEK_FLAG_ANY 4
4550#define AVSEEK_FLAG_FRAME 8
4551
4552#define AVSTREAM_INIT_IN_WRITE_HEADER 0
4553#define AVSTREAM_INIT_IN_INIT_OUTPUT 1
4554
4557
4560
4562
4564
4566 AVFrame *frame);
4567
4569 AVFrame *frame);
4570
4572
4574
4575const AVOutputFormat *av_guess_format(const char *short_name,
4576 const char *filename,
4577 const char *mime_type);
4578
4579enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name,
4580 const char *filename, const char *mime_type,
4581 enum AVMediaType type);
4582
4584 int64_t *dts, int64_t *wall);
4585
4586void av_hex_dump(FILE *f, const uint8_t *buf, int size);
4587
4588void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size);
4589
4590void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st);
4591
4592void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload,
4593 const AVStream *st);
4594
4595enum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
4596
4597unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum AVCodecID id);
4598
4599int av_codec_get_tag2(const struct AVCodecTag * const *tags, enum AVCodecID id,
4600 unsigned int *tag);
4601
4603
4604int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);
4605
4607
4609
4611 int64_t wanted_timestamp,
4612 int flags);
4613
4614int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp,
4615 int size, int distance, int flags);
4616
4617void av_url_split(char *proto, int proto_size,
4618 char *authorization, int authorization_size,
4619 char *hostname, int hostname_size,
4620 int *port_ptr,
4621 char *path, int path_size,
4622 const char *url);
4623
4625 int index,
4626 const char *url,
4627 int is_output);
4628
4629#define AV_FRAME_FILENAME_FLAGS_MULTIPLE 1
4630
4631int av_get_frame_filename2(char *buf, int buf_size,
4632 const char *path, int number, int flags);
4633
4634int av_get_frame_filename(char *buf, int buf_size,
4635 const char *path, int number);
4636
4638
4639int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size);
4640
4641int av_match_ext(const char *filename, const char *extensions);
4642
4643int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
4644 int std_compliance);
4645
4646const struct AVCodecTag *avformat_get_riff_video_tags(void);
4647
4648const struct AVCodecTag *avformat_get_riff_audio_tags(void);
4649
4650const struct AVCodecTag *avformat_get_mov_video_tags(void);
4651
4652const struct AVCodecTag *avformat_get_mov_audio_tags(void);
4653
4655
4657
4659 const char *spec);
4660
4662
4668};
4669
4671 AVStream *ost, const AVStream *ist,
4672 enum AVTimebaseSource copy_tb);
4673
4675
4676#define AVUTIL_FIFO_H
4677
4678typedef struct AVFifoBuffer {
4679 uint8_t *buffer;
4680 uint8_t *rptr, *wptr, *end;
4681 uint32_t rndx, wndx;
4683
4685
4687
4689
4691
4693
4695
4697
4698int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void (*func)(void*, void*, int));
4699
4700int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));
4701
4702int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));
4703
4704int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));
4705
4706int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size);
4707
4708int av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space);
4709
4711
4712static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs)
4713{
4714 uint8_t *ptr = f->rptr + offs;
4715 if (ptr >= f->end)
4716 ptr = f->buffer + (ptr - f->end);
4717 else if (ptr < f->buffer)
4718 ptr = f->end - (f->buffer - ptr);
4719 return ptr;
4720}
4721
#define str(a)
struct AVDictionary AVDictionary
Definition: FFmpegTypes.h:117
struct AVBuffer AVBuffer
Definition: FFmpegTypes.h:179
static ProjectFileIORegistry::AttributeWriterEntry entry
static const AudacityProject::AttachedObjects::RegisteredFactory key
wxString name
Definition: TagsEditor.cpp:166
int id
struct AVBufferPool AVBufferPool
struct AVCodecDefault AVCodecDefault
struct AVHWFramesInternal AVHWFramesInternal
struct AVHWDeviceInternal AVHWDeviceInternal
int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen)
void av_fifo_drain(AVFifoBuffer *f, int size)
struct AVCodecHWConfig AVCodecHWConfig
void avio_write_marker(AVIOContext *s, int64_t time, enum AVIODataMarkerType type)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags)
struct AVIOContext AVIOContext
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
int av_get_frame_filename2(char *buf, int buf_size, const char *path, int number, int flags)
int av_buffer_is_writable(const AVBufferRef *buf)
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
int av_get_bits_per_sample(enum AVCodecID codec_id)
enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type)
const AVInputFormat * av_find_input_format(const char *short_name)
void avio_wl64(AVIOContext *s, uint64_t val)
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags)
void av_frame_unref(AVFrame *frame)
static av_always_inline int64_t av_sat_sub64_c(int64_t a, int64_t b)
int avio_handshake(AVIOContext *c)
void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size)
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc)
int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl, char *line, int line_size, int *print_prefix)
int avcodec_parameters_from_context(AVCodecParameters *par, const AVCodecContext *codec)
void av_free(void *ptr)
void av_freep(void *ptr)
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
int av_append_packet(AVIOContext *s, AVPacket *pkt, int size)
AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, AVFrame *frame)
#define FFMIN(a, b)
enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev)
static av_always_inline av_const int av_popcount64_c(uint64_t x)
void av_packet_free(AVPacket **pkt)
av_const int av_log2(unsigned v)
int av_nearer_q(AVRational q, AVRational q1, AVRational q2)
const char * av_version_info(void)
int av_hwdevice_ctx_init(AVBufferRef *ref)
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
struct AVProgram AVProgram
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
static av_always_inline uint32_t av_float2int(float f)
unsigned int av_codec_get_tag(const struct AVCodecTag *const *tags, enum AVCodecID id)
AVProgram * av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s)
AVRational av_guess_frame_rate(AVFormatContext *ctx, AVStream *stream, AVFrame *frame)
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
void av_buffer_unref(AVBufferRef **buf)
void attribute_deprecated void void * av_realloc(void *ptr, size_t size) av_alloc_size(2)
void av_log_set_callback(void(*callback)(void *, int, const char *, va_list))
unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
uint64_t avio_rb64(AVIOContext *s)
int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b)
av_warn_unused_result int avformat_init_output(AVFormatContext *s, AVDictionary **options)
void avio_wl32(AVIOContext *s, unsigned int val)
uint8_t * av_stream_new_side_data(AVStream *stream, enum AVPacketSideDataType type, size_t size)
av_warn_unused_result int avformat_write_header(AVFormatContext *s, AVDictionary **options)
const char * avutil_license(void)
int avio_pause(AVIOContext *h, int pause)
struct AVFrameSideData AVFrameSideData
void avio_wl16(AVIOContext *s, unsigned int val)
void av_dict_free(AVDictionary **m)
int avio_put_str(AVIOContext *s, const char *str)
void avio_w8(AVIOContext *s, int b)
const char * av_default_item_name(void *ctx)
struct AVPacketSideData AVPacketSideData
const char * av_get_media_type_string(enum AVMediaType media_type)
void avio_wb32(AVIOContext *s, unsigned int val)
int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes)
@ AVCHROMA_LOC_UNSPECIFIED
void av_log_set_level(int level)
int av_buffer_realloc(AVBufferRef **buf, size_t size)
const AVClass * avcodec_get_class(void)
static char * av_make_error_string(char *errbuf, size_t errbuf_size, int errnum)
char * av_strndup(const char *s, size_t len) av_malloc_attrib
void avio_wb16(AVIOContext *s, unsigned int val)
void av_max_alloc(size_t max)
const AVInputFormat * av_probe_input_format3(const AVProbeData *pd, int is_opened, int *score_ret)
int avformat_network_deinit(void)
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
const char * avformat_configuration(void)
struct AVIODirEntry AVIODirEntry
struct AVIndexEntry AVIndexEntry
enum AVCodecID av_codec_get_id(const struct AVCodecTag *const *tags, unsigned int tag)
int av_read_pause(AVFormatContext *s)
void * av_buffer_pool_buffer_get_opaque(const AVBufferRef *ref)
struct AVProducerReferenceTime AVProducerReferenceTime
#define av_always_inline
int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb)
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
void av_hwframe_constraints_free(AVHWFramesConstraints **constraints)
struct AVPanScan AVPanScan
int av_codec_is_encoder(const AVCodec *codec)
struct AVStream AVStream
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
const char * av_hwdevice_get_type_name(enum AVHWDeviceType type)
static av_always_inline float av_int2float(uint32_t i)
void * av_calloc(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1
AVIOContext * avio_alloc_context(unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int(*read_packet)(void *opaque, uint8_t *buf, int buf_size), int(*write_packet)(void *opaque, uint8_t *buf, int buf_size), int64_t(*seek)(void *opaque, int64_t offset, int whence))
AVRational av_add_q(AVRational b, AVRational c) av_const
int avformat_index_get_entries_count(const AVStream *st)
void av_fifo_reset(AVFifoBuffer *f)
static av_always_inline int av_sat_add32_c(int a, int b)
struct AVSubtitle AVSubtitle
void * av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size, const uint8_t *elem_data)
static av_always_inline av_const int8_t av_clip_int8_c(int a)
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos)
struct AVFifoBuffer AVFifoBuffer
const AVClass * avcodec_get_subtitle_rect_class(void)
void av_parser_close(AVCodecParserContext *s)
int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
AVProgram * av_new_program(AVFormatContext *s, int id)
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS])
int avcodec_default_execute2(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2, int, int), void *arg, int *ret, int count)
const char * av_packet_side_data_name(enum AVPacketSideDataType type)
int avio_open(AVIOContext **s, const char *url, int flags)
int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
int64_t avio_size(AVIOContext *s)
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
void av_buffer_default_free(void *opaque, uint8_t *data)
unsigned int avio_rb16(AVIOContext *s)
void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem)
int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen)
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
int av_frame_is_writable(AVFrame *frame)
static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p)
int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, size_t size)
int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const
void * av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1)
void av_memcpy_backptr(uint8_t *dst, int back, int cnt)
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
AVRational av_mul_q(AVRational b, AVRational c) av_const
@ AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT
@ AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT
@ AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE
@ AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
FILE * av_fopen_utf8(const char *path, const char *mode)
int av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space)
attribute_deprecated const char * av_get_colorspace_name(enum AVColorSpace val)
static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
static uint8_t * av_fifo_peek2(const AVFifoBuffer *f, int offs)
void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
struct AVRegionOfInterest AVRegionOfInterest
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt)
int av_dict_get_string(const AVDictionary *m, char **buffer, const char key_val_sep, const char pairs_sep)
void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height)
#define av_printf_format(fmtpos, attrpos)
struct AVIODirContext AVIODirContext
struct RcOverride RcOverride
int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
int avio_feof(AVIOContext *s)
@ AVIO_DATA_MARKER_BOUNDARY_POINT
@ AVIO_DATA_MARKER_TRAILER
@ AVIO_DATA_MARKER_UNKNOWN
@ AVIO_DATA_MARKER_FLUSH_POINT
@ AVIO_DATA_MARKER_SYNC_POINT
AVBufferRef * av_hwframe_ctx_alloc(AVBufferRef *device_ctx)
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
int avio_put_str16le(AVIOContext *s, const char *str)
int avformat_queue_attached_pictures(AVFormatContext *s)
int av_hwframe_ctx_create_derived(AVBufferRef **derived_frame_ctx, enum AVPixelFormat format, AVBufferRef *derived_device_ctx, AVBufferRef *source_frame_ctx, int flags)
struct AVProbeData AVProbeData
#define av_popcount
int avio_read_partial(AVIOContext *s, unsigned char *buf, int size)
enum AVHWDeviceType av_hwdevice_find_type_by_name(const char *name)
const char * avcodec_profile_name(enum AVCodecID codec_id, int profile)
struct AVClass AVClass
void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
struct AVCodecParserContext AVCodecParserContext
int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
struct AVHWFramesContext AVHWFramesContext
const AVClass * av_stream_get_class(void)
static av_always_inline int av_sat_dsub32_c(int a, int b)
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
void * av_realloc_f(void *ptr, size_t nelem, size_t elsize)
int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
void av_log_default_callback(void *avcl, int level, const char *fmt, va_list vl)
AVBufferRef * av_buffer_allocz(size_t size)
int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, uint8_t *data, size_t size)
void av_packet_free_side_data(AVPacket *pkt)
AVCodecParameters * avcodec_parameters_alloc(void)
av_warn_unused_result int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem)
void void void av_vlog(void *avcl, int level, const char *fmt, va_list vl)
const char * avutil_configuration(void)
AVFifoBuffer * av_fifo_alloc(unsigned int size)
int av_write_uncoded_frame_query(AVFormatContext *s, int stream_index)
AVBufferRef * av_hwdevice_ctx_alloc(enum AVHWDeviceType type)
int av_samples_copy(uint8_t **dst, uint8_t *const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
void av_fifo_freep(AVFifoBuffer **f)
int avio_close_dir(AVIODirContext **s)
static av_always_inline int64_t avio_tell(AVIOContext *s)
void av_url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
void av_packet_unref(AVPacket *pkt)
int av_find_nearest_q_idx(AVRational q, const AVRational *q_list)
int av_hwdevice_ctx_create_derived_opts(AVBufferRef **dst_ctx, enum AVHWDeviceType type, AVBufferRef *src_ctx, AVDictionary *options, int flags)
AVRational av_stream_get_codec_timebase(const AVStream *st)
enum AVSampleFormat av_get_sample_fmt(const char *name)
int av_get_output_timestamp(struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall)
char * av_strdup(const char *s) av_malloc_attrib
int av_hwframe_ctx_init(AVBufferRef *ref)
int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align)
int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, const uint8_t *buf, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
const AVIndexEntry * avformat_index_get_entry(AVStream *st, int idx)
int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int64_t pts, int64_t dts, int64_t pos)
attribute_deprecated struct AVPacketList AVPacketList
AVRational av_gcd_q(AVRational a, AVRational b, int max_den, AVRational def)
const AVClass * avio_protocol_get_class(const char *name)
int av_hwdevice_ctx_create_derived(AVBufferRef **dst_ctx, enum AVHWDeviceType type, AVBufferRef *src_ctx, int flags)
int av_frame_get_buffer(AVFrame *frame, int align)
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, size_t size)
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
int av_codec_is_decoder(const AVCodec *codec)
struct AVRational AVRational
int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
int(* AVOpenCallback)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options)
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
static av_always_inline av_const uint16_t av_clip_uint16_c(int a)
AVCodecParserContext * av_parser_init(int codec_id)
unsigned int avio_rl16(AVIOContext *s)
static av_always_inline av_const int av_popcount_c(uint32_t x)
int av_read_play(AVFormatContext *s)
struct AVDictionaryEntry AVDictionaryEntry
int av_grow_packet(AVPacket *pkt, int grow_by)
static AVRational av_make_q(int num, int den)
enum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt)
unsigned av_int_list_length_for_size(unsigned elsize, const void *list, uint64_t term) av_pure
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
AVClassCategory av_default_get_category(void *ptr)
char * av_fourcc_make_string(char *buf, uint32_t fourcc)
struct AVBufferRef AVBufferRef
static av_always_inline int av_sat_sub32_c(int a, int b)
int av_buffer_get_ref_count(const AVBufferRef *buf)
void av_buffer_pool_uninit(AVBufferPool **pool)
int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options)
@ AVFMT_DURATION_FROM_BITRATE
@ AVFMT_DURATION_FROM_STREAM
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
static av_always_inline av_const float av_clipf_c(float a, float amin, float amax)
static av_always_inline int64_t av_sat_add64_c(int64_t a, int64_t b)
AVRational av_d2q(double d, int max) av_const
int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
int av_write_trailer(AVFormatContext *s)
int avcodec_get_hw_frames_parameters(AVCodecContext *avctx, AVBufferRef *device_ref, enum AVPixelFormat hw_pix_fmt, AVBufferRef **out_frames_ref)
int av_buffer_replace(AVBufferRef **dst, const AVBufferRef *src)
const AVOutputFormat * av_muxer_iterate(void **opaque)
int(* av_format_control_message)(struct AVFormatContext *s, int type, void *data, size_t data_size)
void avio_wb24(AVIOContext *s, unsigned int val)
int av_fifo_size(const AVFifoBuffer *f)
int av_match_ext(const char *filename, const char *extensions)
enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt)
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd) av_const
AVBufferPool * av_buffer_pool_init(size_t size, AVBufferRef *(*alloc)(size_t size))
AVPacket * av_packet_clone(const AVPacket *src)
int avformat_network_init(void)
#define av_clipl_int32
const char * avio_enum_protocols(void **opaque, int output)
static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
int av_log_get_flags(void)
#define av_sat_add32
struct AVCodec AVCodec
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
int av_frame_ref(AVFrame *dst, const AVFrame *src)
struct AVFormatContext AVFormatContext
attribute_deprecated void av_init_packet(AVPacket *pkt)
AVFifoBuffer * av_fifo_alloc_array(size_t nmemb, size_t size)
const AVCodec * avcodec_find_decoder(enum AVCodecID id)
av_const int av_log2_16bit(unsigned v)
const AVOutputFormat * av_guess_format(const char *short_name, const char *filename, const char *mime_type)
AVBufferRef * av_buffer_ref(const AVBufferRef *buf)
struct AVIOInterruptCB AVIOInterruptCB
int av_packet_make_refcounted(AVPacket *pkt)
int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, uint8_t *data, size_t size)
int avio_accept(AVIOContext *s, AVIOContext **c)
const struct AVCodecTag * avformat_get_mov_audio_tags(void)
const struct AVCodecTag * avformat_get_riff_audio_tags(void)
int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, const AVCodec **decoder_ret, int flags)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
static av_always_inline av_const uint8_t av_clip_uint8_c(int a)
enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar)
const AVCodec * avcodec_find_decoder_by_name(const char *name)
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
@ AV_HWFRAME_MAP_OVERWRITE
int avcodec_is_open(AVCodecContext *s)
int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
AVBufferRef * av_frame_get_plane_buffer(AVFrame *frame, int plane)
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
static double av_q2d(AVRational a)
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame)
#define av_warn_unused_result
void avcodec_parameters_free(AVCodecParameters **par)
int64_t av_const av_gcd(int64_t a, int64_t b)
struct AVPacket AVPacket
av_warn_unused_result int av_reallocp(void *ptr, size_t size)
enum AVMediaType avcodec_get_type(enum AVCodecID codec_id)
const char * av_disposition_to_string(int disposition)
const struct AVCodecTag * avformat_get_mov_video_tags(void)
void av_frame_free(AVFrame **frame)
void attribute_deprecated void * av_mallocz_array(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1
#define FFMAX(a, b)
struct AVCPBProperties AVCPBProperties
int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags)
static av_always_inline av_const double av_clipd_c(double a, double amin, double amax)
@ AV_PKT_DATA_STRINGS_METADATA
@ AV_PKT_DATA_S12M_TIMECODE
@ AV_PKT_DATA_SKIP_SAMPLES
@ AV_PKT_DATA_MPEGTS_STREAM_ID
@ AV_PKT_DATA_DYNAMIC_HDR10_PLUS
@ AV_PKT_DATA_H263_MB_INFO
@ AV_PKT_DATA_MASTERING_DISPLAY_METADATA
@ AV_PKT_DATA_AUDIO_SERVICE_TYPE
@ AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL
@ AV_PKT_DATA_QUALITY_STATS
@ AV_PKT_DATA_WEBVTT_SETTINGS
@ AV_PKT_DATA_METADATA_UPDATE
@ AV_PKT_DATA_SUBTITLE_POSITION
@ AV_PKT_DATA_ENCRYPTION_INFO
@ AV_PKT_DATA_DISPLAYMATRIX
@ AV_PKT_DATA_ENCRYPTION_INIT_INFO
@ AV_PKT_DATA_CPB_PROPERTIES
@ AV_PKT_DATA_NEW_EXTRADATA
@ AV_PKT_DATA_PARAM_CHANGE
@ AV_PKT_DATA_WEBVTT_IDENTIFIER
@ AV_PKT_DATA_CONTENT_LIGHT_LEVEL
@ AV_PKT_DATA_FALLBACK_TRACK
@ AVMEDIA_TYPE_ATTACHMENT
@ AVMEDIA_TYPE_SUBTITLE
@ AVMEDIA_TYPE_UNKNOWN
void avio_wb64(AVIOContext *s, uint64_t val)
@ AV_PIX_FMT_BAYER_GBRG8
@ AV_PIX_FMT_YUV444P16BE
@ AV_PIX_FMT_YUV420P16BE
@ AV_PIX_FMT_VIDEOTOOLBOX
@ AV_PIX_FMT_YUVA420P9BE
@ AV_PIX_FMT_YUV420P14LE
@ AV_PIX_FMT_YUV440P10BE
@ AV_PIX_FMT_YUVA444P9LE
@ AV_PIX_FMT_YUVA444P10LE
@ AV_PIX_FMT_YUV444P14BE
@ AV_PIX_FMT_YUVA420P10BE
@ AV_PIX_FMT_BAYER_GRBG16LE
@ AV_PIX_FMT_YUVA422P9LE
@ AV_PIX_FMT_YUVA420P10LE
@ AV_PIX_FMT_YUV422P10BE
@ AV_PIX_FMT_YUVA422P10LE
@ AV_PIX_FMT_YUV420P10LE
@ AV_PIX_FMT_YUV422P16LE
@ AV_PIX_FMT_YUV420P14BE
@ AV_PIX_FMT_YUV444P14LE
@ AV_PIX_FMT_BAYER_RGGB16LE
@ AV_PIX_FMT_YUVA444P9BE
@ AV_PIX_FMT_YUV422P12LE
@ AV_PIX_FMT_YUV444P10BE
@ AV_PIX_FMT_YUV440P12LE
@ AV_PIX_FMT_YUVA420P9LE
@ AV_PIX_FMT_BAYER_GRBG8
@ AV_PIX_FMT_YUVA444P16LE
@ AV_PIX_FMT_YUVA422P10BE
@ AV_PIX_FMT_YUVA422P16BE
@ AV_PIX_FMT_BAYER_BGGR16BE
@ AV_PIX_FMT_D3D11VA_VLD
@ AV_PIX_FMT_YUVA420P16LE
@ AV_PIX_FMT_YUVA420P16BE
@ AV_PIX_FMT_YUV420P12LE
@ AV_PIX_FMT_BAYER_RGGB16BE
@ AV_PIX_FMT_YUV422P10LE
@ AV_PIX_FMT_BAYER_GRBG16BE
@ AV_PIX_FMT_YUV420P12BE
@ AV_PIX_FMT_YUV440P12BE
@ AV_PIX_FMT_YUV422P16BE
@ AV_PIX_FMT_BAYER_GBRG16LE
@ AV_PIX_FMT_YUV422P14LE
@ AV_PIX_FMT_BAYER_BGGR16LE
@ AV_PIX_FMT_YUV420P10BE
@ AV_PIX_FMT_YUVA444P10BE
@ AV_PIX_FMT_YUV440P10LE
@ AV_PIX_FMT_YUV444P16LE
@ AV_PIX_FMT_YUV422P14BE
@ AV_PIX_FMT_BAYER_GBRG16BE
@ AV_PIX_FMT_YUV444P12BE
@ AV_PIX_FMT_YUVA444P16BE
@ AV_PIX_FMT_YUVA422P16LE
@ AV_PIX_FMT_BAYER_RGGB8
@ AV_PIX_FMT_YUVA422P9BE
@ AV_PIX_FMT_YUV444P10LE
@ AV_PIX_FMT_YUV422P12BE
@ AV_PIX_FMT_BAYER_BGGR8
@ AV_PIX_FMT_YUV420P16LE
@ AV_PIX_FMT_YUV444P12LE
unsigned avutil_version(void)
const char * avformat_license(void)
unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt)
int av_buffer_make_writable(AVBufferRef **buf)
const AVCodecParser * av_parser_iterate(void **opaque)
int avcodec_default_execute(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
int av_get_packet(AVIOContext *s, AVPacket *pkt, int size)
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, size_t size)
enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *pix_fmt_list, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
const AVCodec * avcodec_find_encoder(enum AVCodecID id)
#define av_const
int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
int avformat_flush(AVFormatContext *s)
void avio_free_directory_entry(AVIODirEntry **entry)
void avio_wl24(AVIOContext *s, unsigned int val)
int64_t avio_skip(AVIOContext *s, int64_t offset)
int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
struct AVCodecDescriptor AVCodecDescriptor
void avsubtitle_free(AVSubtitle *sub)
void av_format_inject_global_side_data(AVFormatContext *s)
void * av_memdup(const void *p, size_t size)
int avio_check(const char *url, int flags)
static int av_cmp_q(AVRational a, AVRational b)
static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax)
void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx)
void * av_buffer_get_opaque(const AVBufferRef *buf)
int av_disposition_from_string(const char *disp)
#define attribute_deprecated
int av_probe_input_buffer2(AVIOContext *pb, const AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance)
@ AV_CODEC_HW_CONFIG_METHOD_AD_HOC
@ AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX
@ AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX
@ AV_CODEC_HW_CONFIG_METHOD_INTERNAL
int av_packet_make_writable(AVPacket *pkt)
int av_write_uncoded_frame(AVFormatContext *s, int stream_index, AVFrame *frame)
void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st)
const char * avcodec_get_name(enum AVCodecID id)
struct AVInputFormat AVInputFormat
@ AV_PICTURE_STRUCTURE_FRAME
@ AV_PICTURE_STRUCTURE_BOTTOM_FIELD
@ AV_PICTURE_STRUCTURE_TOP_FIELD
@ AV_PICTURE_STRUCTURE_UNKNOWN
int av_find_default_stream_index(AVFormatContext *s)
@ AV_CODEC_ID_FIRST_SUBTITLE
@ AV_CODEC_ID_INTERPLAY_ACM
@ AV_CODEC_ID_TRUEMOTION2RT
@ AV_CODEC_ID_HDMV_PGS_SUBTITLE
@ AV_CODEC_ID_DVB_SUBTITLE
@ AV_CODEC_ID_ADPCM_IMA_WS
@ AV_CODEC_ID_PCM_S16BE_PLANAR
@ AV_CODEC_ID_ADPCM_IMA_OKI
@ AV_CODEC_ID_ADPCM_IMA_EA_EACS
@ AV_CODEC_ID_MOTIONPIXELS
@ AV_CODEC_ID_PCM_S32LE_PLANAR
@ AV_CODEC_ID_DVD_SUBTITLE
@ AV_CODEC_ID_ADPCM_SBPRO_2
@ AV_CODEC_ID_DSD_MSBF_PLANAR
@ AV_CODEC_ID_WRAPPED_AVFRAME
@ AV_CODEC_ID_ADPCM_IMA_EA_SEAD
@ AV_CODEC_ID_DSD_LSBF_PLANAR
@ AV_CODEC_ID_PCM_S24LE_PLANAR
@ AV_CODEC_ID_HDMV_TEXT_SUBTITLE
@ AV_CODEC_ID_INTERPLAY_DPCM
@ AV_CODEC_ID_ADPCM_YAMAHA
@ AV_CODEC_ID_FIRST_UNKNOWN
@ AV_CODEC_ID_ADPCM_SBPRO_3
@ AV_CODEC_ID_ADPCM_G726LE
@ AV_CODEC_ID_ADPCM_IMA_ISS
@ AV_CODEC_ID_WESTWOOD_SND1
@ AV_CODEC_ID_BINKAUDIO_DCT
@ AV_CODEC_ID_INTERPLAY_VIDEO
@ AV_CODEC_ID_ADPCM_SBPRO_4
@ AV_CODEC_ID_ADPCM_EA_MAXIS_XA
@ AV_CODEC_ID_MPEGH_3D_AUDIO
@ AV_CODEC_ID_ADPCM_IMA_APC
@ AV_CODEC_ID_COMFORT_NOISE
@ AV_CODEC_ID_ARIB_CAPTION
@ AV_CODEC_ID_TIERTEXSEQVIDEO
@ AV_CODEC_ID_ADPCM_IMA_AMV
@ AV_CODEC_ID_ADPCM_EA_XAS
@ AV_CODEC_ID_ADPCM_IMA_CUNNING
@ AV_CODEC_ID_ACELP_KELVIN
@ AV_CODEC_ID_ADPCM_IMA_DK4
@ AV_CODEC_ID_ADPCM_IMA_DK3
@ AV_CODEC_ID_ADPCM_IMA_DAT4
@ AV_CODEC_ID_ADPCM_IMA_QT
@ AV_CODEC_ID_ADPCM_IMA_SMJPEG
@ AV_CODEC_ID_SIMBIOSIS_IMX
@ AV_CODEC_ID_ADPCM_IMA_MTF
@ AV_CODEC_ID_SCREENPRESSO
@ AV_CODEC_ID_DVB_TELETEXT
@ AV_CODEC_ID_ADPCM_IMA_APM
@ AV_CODEC_ID_GREMLIN_DPCM
@ AV_CODEC_ID_ADPCM_IMA_ACORN
@ AV_CODEC_ID_ADPCM_IMA_WAV
@ AV_CODEC_ID_ADPCM_THP_LE
@ AV_CODEC_ID_BINKAUDIO_RDFT
@ AV_CODEC_ID_ADPCM_IMA_ALP
@ AV_CODEC_ID_PCM_S16LE_PLANAR
@ AV_CODEC_ID_MPEG4SYSTEMS
@ AV_CODEC_ID_ADPCM_IMA_RAD
@ AV_CODEC_ID_ADPCM_IMA_SSI
@ AV_CODEC_ID_PCM_S8_PLANAR
@ AV_CODEC_ID_ADPCM_IMA_MOFLEX
int av_packet_unpack_dictionary(const uint8_t *data, size_t size, AVDictionary **dict)
static av_always_inline av_const int16_t av_clip_int16_c(int a)
static void * av_x_if_null(const void *p, const void *x)
AVFormatContext * avformat_alloc_context(void)
#define AV_PARSER_PTS_NB
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
AVFrameSideData * av_frame_new_side_data_from_buf(AVFrame *frame, enum AVFrameSideDataType type, AVBufferRef *buf)
AVCPBProperties * av_cpb_properties_alloc(size_t *size)
const AVIndexEntry * avformat_index_get_entry_from_timestamp(AVStream *st, int64_t wanted_timestamp, int flags)
void av_hex_dump(FILE *f, const uint8_t *buf, int size)
static av_always_inline AVRational av_inv_q(AVRational q)
int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq, enum AVRounding rnd) av_const
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
AVRational av_get_time_base_q(void)
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
struct AVChapter AVChapter
const AVCodecHWConfig * avcodec_get_hw_config(const AVCodec *codec, int index)
void * av_malloc(size_t size) av_malloc_attrib av_alloc_size(1)
@ AV_HWFRAME_TRANSFER_DIRECTION_TO
@ AV_HWFRAME_TRANSFER_DIRECTION_FROM
uint8_t * av_packet_pack_dictionary(AVDictionary *dict, size_t *size)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
AVBufferRef * av_buffer_pool_get(AVBufferPool *pool)
const AVInputFormat * av_demuxer_iterate(void **opaque)
unsigned int avio_rl32(AVIOContext *s)
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
int av_codec_get_tag2(const struct AVCodecTag *const *tags, enum AVCodecID id, unsigned int *tag)
AVBufferPool * av_buffer_pool_init2(size_t size, void *opaque, AVBufferRef *(*alloc)(void *opaque, size_t size), void(*pool_free)(void *opaque))
int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen)
int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags)
const char * avcodec_license(void)
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
int av_hwdevice_ctx_create(AVBufferRef **device_ctx, enum AVHWDeviceType type, const char *device, AVDictionary *opts, int flags)
int av_fifo_space(const AVFifoBuffer *f)
int av_filename_number_test(const char *filename)
void avformat_free_context(AVFormatContext *s)
unsigned int avio_rl24(AVIOContext *s)
void av_fifo_free(AVFifoBuffer *f)
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
AVRational av_sub_q(AVRational b, AVRational c) av_const
enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext *ctx)
AVFrame * av_frame_alloc(void)
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
const AVInputFormat * av_probe_input_format(const AVProbeData *pd, int is_opened)
struct AVCodecContext AVCodecContext
int av_dict_parse_string(AVDictionary **pm, const char *str, const char *key_val_sep, const char *pairs_sep, int flags)
char av_get_picture_type_char(enum AVPictureType pict_type)
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
const AVInputFormat * av_probe_input_format2(const AVProbeData *pd, int is_opened, int *score_max)
const AVCodec * avcodec_find_encoder_by_name(const char *name)
void av_shrink_packet(AVPacket *pkt, int size)
const AVCodecDescriptor * avcodec_descriptor_next(const AVCodecDescriptor *prev)
@ AV_HWDEVICE_TYPE_D3D11VA
@ AV_HWDEVICE_TYPE_MEDIACODEC
@ AV_HWDEVICE_TYPE_VIDEOTOOLBOX
int avio_put_str16be(AVIOContext *s, const char *str)
char * av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt)
attribute_deprecated const AVClass * avcodec_get_frame_class(void)
void avio_context_free(AVIOContext **s)
int av_dict_count(const AVDictionary *m)
static av_always_inline av_const int av_clip_intp2_c(int a, int p)
AVHWFramesConstraints * av_hwdevice_get_hwframe_constraints(AVBufferRef *ref, const void *hwconfig)
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
#define av_malloc_attrib
struct AVCodecParser AVCodecParser
const AVCodecDescriptor * avcodec_descriptor_get_by_name(const char *name)
struct AVHWDeviceContext AVHWDeviceContext
int av_size_mult(size_t a, size_t b, size_t *r)
AVPacket * av_packet_alloc(void)
int avio_close(AVIOContext *s)
#define av_alloc_size(...)
void avio_flush(AVIOContext *s)
int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
int avcodec_default_get_encode_buffer(AVCodecContext *s, AVPacket *pkt, int flags)
static av_always_inline av_const int av_ceil_log2_c(int x)
int av_packet_ref(AVPacket *dst, const AVPacket *src)
int avio_open_dyn_buf(AVIOContext **s)
AVFrame * av_frame_clone(const AVFrame *src)
struct AVFrame AVFrame
int64_t avio_seek_time(AVIOContext *h, int stream_index, int64_t timestamp, int flags)
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
#define av_pure
struct AVProfile AVProfile
@ AV_AUDIO_SERVICE_TYPE_VOICE_OVER
@ AV_AUDIO_SERVICE_TYPE_EMERGENCY
@ AV_AUDIO_SERVICE_TYPE_EFFECTS
@ AV_AUDIO_SERVICE_TYPE_MAIN
@ AV_AUDIO_SERVICE_TYPE_DIALOGUE
@ AV_AUDIO_SERVICE_TYPE_KARAOKE
@ AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED
@ AV_AUDIO_SERVICE_TYPE_COMMENTARY
@ AV_AUDIO_SERVICE_TYPE_NB
@ AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED
struct AVHWAccel AVHWAccel
int av_frame_make_writable(AVFrame *frame)
#define AV_NUM_DATA_POINTERS
int avio_read_dir(AVIODirContext *s, AVIODirEntry **next)
void * av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx)
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
int avio_open2(AVIOContext **s, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options)
struct AVCodecParserContext * av_stream_get_parser(const AVStream *s)
unsigned avcodec_version(void)
int av_new_packet(AVPacket *pkt, int size)
AVBufferRef * av_buffer_alloc(size_t size)
@ AV_FRAME_DATA_GOP_TIMECODE
@ AV_FRAME_DATA_DOVI_METADATA
@ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
@ AV_FRAME_DATA_DISPLAYMATRIX
@ AV_FRAME_DATA_SEI_UNREGISTERED
@ AV_FRAME_DATA_AUDIO_SERVICE_TYPE
@ AV_FRAME_DATA_DYNAMIC_HDR_PLUS
@ AV_FRAME_DATA_REPLAYGAIN
@ AV_FRAME_DATA_SKIP_SAMPLES
@ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
@ AV_FRAME_DATA_DOWNMIX_INFO
@ AV_FRAME_DATA_FILM_GRAIN_PARAMS
@ AV_FRAME_DATA_VIDEO_ENC_PARAMS
@ AV_FRAME_DATA_DETECTION_BBOXES
@ AV_FRAME_DATA_ICC_PROFILE
@ AV_FRAME_DATA_S12M_TIMECODE
@ AV_FRAME_DATA_MATRIXENCODING
@ AV_FRAME_DATA_DOVI_RPU_BUFFER
@ AV_FRAME_DATA_MOTION_VECTORS
@ AV_FRAME_DATA_REGIONS_OF_INTEREST
int avio_closep(AVIOContext **s)
static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output)
int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, AVStream *ost, const AVStream *ist, enum AVTimebaseSource copy_tb)
static av_always_inline uint64_t av_double2int(double f)
int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void(*func)(void *, void *, int))
void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst)
unsigned int avio_rb24(AVIOContext *s)
@ AV_PICTURE_TYPE_NONE
int av_hwframe_transfer_get_formats(AVBufferRef *hwframe_ctx, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats, int flags)
void avformat_close_input(AVFormatContext **s)
@ AVIO_ENTRY_SYMBOLIC_LINK
@ AVIO_ENTRY_CHARACTER_DEVICE
int avio_read_to_bprint(AVIOContext *h, struct AVBPrint *pb, size_t max_size)
int av_log_get_level(void)
int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
AVBufferRef * av_buffer_create(uint8_t *data, size_t size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
int64_t av_stream_get_end_pts(const AVStream *st)
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size)
int av_frame_apply_cropping(AVFrame *frame, int flags)
uint8_t * av_stream_get_side_data(const AVStream *stream, enum AVPacketSideDataType type, size_t *size)
@ AV_CLASS_CATEGORY_INPUT
@ AV_CLASS_CATEGORY_MUXER
@ AV_CLASS_CATEGORY_SWSCALER
@ AV_CLASS_CATEGORY_BITSTREAM_FILTER
@ AV_CLASS_CATEGORY_DEVICE_OUTPUT
@ AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT
@ AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT
@ AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
@ AV_CLASS_CATEGORY_FILTER
@ AV_CLASS_CATEGORY_DEMUXER
@ AV_CLASS_CATEGORY_OUTPUT
@ AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT
@ AV_CLASS_CATEGORY_DEVICE_INPUT
@ AV_CLASS_CATEGORY_SWRESAMPLER
@ AV_CLASS_CATEGORY_ENCODER
@ AV_CLASS_CATEGORY_DECODER
struct AVSubtitleRect AVSubtitleRect
int av_frame_copy(AVFrame *dst, const AVFrame *src)
const AVCodec * av_codec_iterate(void **opaque)
static av_always_inline av_const int av_parity_c(uint32_t v)
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl, char *line, int line_size, int *print_prefix)
const AVClass * avformat_get_class(void)
int void avio_print_string_array(AVIOContext *s, const char *strings[])
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const
const char * avcodec_configuration(void)
unsigned int avio_rb32(AVIOContext *s)
int avio_r8(AVIOContext *s)
static av_always_inline int av_sat_dadd32_c(int a, int b)
int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod)
unsigned avformat_version(void)
int avio_get_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
void void av_log_once(void *avcl, int initial_level, int subsequent_level, int *state, const char *fmt,...) av_printf_format(5
struct AVOutputFormat AVOutputFormat
struct AVHWFramesConstraints AVHWFramesConstraints
static av_always_inline double av_int2double(uint64_t i)
int avcodec_close(AVCodecContext *avctx)
int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size)
const char * avio_find_protocol_name(const char *url)
int avformat_alloc_output_context2(AVFormatContext **ctx, const AVOutputFormat *oformat, const char *format_name, const char *filename)
void avcodec_flush_buffers(AVCodecContext *avctx)
uint64_t avio_rl64(AVIOContext *s)
void av_log_set_flags(int arg)
void avcodec_free_context(AVCodecContext **avctx)
const struct AVCodecTag * avformat_get_riff_video_tags(void)
const char * av_get_profile_name(const AVCodec *codec, int profile)
enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be)
@ AVSTREAM_PARSE_TIMESTAMPS
@ AVSTREAM_PARSE_FULL_ONCE
struct AVCodecParameters AVCodecParameters
uint32_t av_q2intfloat(AVRational q)
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
int av_interleaved_write_uncoded_frame(AVFormatContext *s, int stream_index, AVFrame *frame)
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
@ AVCOL_SPC_CHROMA_DERIVED_CL
@ AVCOL_SPC_CHROMA_DERIVED_NCL
AVRational av_div_q(AVRational b, AVRational c) av_const
#define av_sat_sub32
void free(void *ptr)
Definition: VectorOps.h:34
AVDictionary * metadata
const struct AVOption * option
int(* query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags)
AVClassCategory category
AVClassCategory(* get_category)(void *ctx)
const char * class_name
struct AVCodecInternal * internal
enum AVPixelFormat pix_fmt
AVPacketSideData * coded_side_data
int(* get_encode_buffer)(struct AVCodecContext *s, AVPacket *pkt, int flags)
int(* execute)(struct AVCodecContext *c, int(*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size)
uint64_t error[AV_NUM_DATA_POINTERS]
enum AVSampleFormat sample_fmt
enum AVPixelFormat sw_pix_fmt
const AVCodecDescriptor * codec_descriptor
enum AVColorRange color_range
enum AVAudioServiceType audio_service_type
enum AVColorPrimaries color_primaries
attribute_deprecated int debug_mv
enum AVFieldOrder field_order
attribute_deprecated AVPacket * pkt
int(* get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags)
enum AVColorSpace colorspace
struct AVHWAccel * hwaccel
const struct AVCodec * codec
enum AVSampleFormat request_sample_fmt
attribute_deprecated int thread_safe_callbacks
void(* draw_horiz_band)(struct AVCodecContext *s, const AVFrame *src, int offset[AV_NUM_DATA_POINTERS], int y, int type, int height)
enum AVColorTransferCharacteristic color_trc
enum AVChromaLocation chroma_sample_location
attribute_deprecated int sub_text_format
int(* execute2)(struct AVCodecContext *c, int(*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count)
enum AVPixelFormat(* get_format)(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
const struct AVProfile * profiles
const char *const * mime_types
enum AVHWDeviceType device_type
enum AVPixelFormat pix_fmt
int(* update_thread_context_for_user)(struct AVCodecContext *dst, const struct AVCodecContext *src)
int(* receive_frame)(AVCodecContext *avctx, AVFrame *frame)
const char * long_name
int(* init)(AVCodecContext *)
const struct AVCodecHWConfigInternal *const * hw_configs
const uint64_t * channel_layouts
const int * supported_samplerates
int(* receive_packet)(AVCodecContext *avctx, AVPacket *avpkt)
int(* encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
const AVRational * supported_framerates
void(* init_static_data)(struct AVCodec *codec)
int(* update_thread_context)(AVCodecContext *dst, const AVCodecContext *src)
int(* close)(AVCodecContext *)
const char * wrapper_name
const uint32_t * codec_tags
enum AVMediaType type
const AVClass * priv_class
int(* encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size, const struct AVSubtitle *sub)
const AVProfile * profiles
int(* decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt)
enum AVPixelFormat * pix_fmts
enum AVSampleFormat * sample_fmts
void(* flush)(AVCodecContext *)
const AVCodecDefault * defaults
enum AVColorPrimaries color_primaries
enum AVColorTransferCharacteristic color_trc
enum AVChromaLocation chroma_location
int64_t cur_frame_end[AV_PARSER_PTS_NB]
int64_t cur_frame_offset[AV_PARSER_PTS_NB]
int64_t cur_frame_dts[AV_PARSER_PTS_NB]
const struct AVCodecParser * parser
int64_t cur_frame_pos[AV_PARSER_PTS_NB]
enum AVPictureStructure picture_structure
int64_t cur_frame_pts[AV_PARSER_PTS_NB]
int(* parser_init)(AVCodecParserContext *s)
int(* parser_parse)(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
void(* parser_close)(AVCodecParserContext *s)
int(* split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
char * key
char * value
void(* io_close)(struct AVFormatContext *s, AVIOContext *pb)
const struct AVOutputFormat * oformat
attribute_deprecated int max_analyze_duration
struct AVOutputFormat * oformat
AVIOInterruptCB interrupt_callback
const struct AVInputFormat * iformat
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
enum AVDurationEstimationMethod duration_estimation_method
av_format_control_message control_message_cb
int(* io_close2)(struct AVFormatContext *s, AVIOContext *pb)
AVBufferRef * private_ref
enum AVChromaLocation chroma_location
AVBufferRef ** extended_buf
enum AVColorPrimaries color_primaries
AVRational sample_aspect_ratio
AVBufferRef * opaque_ref
AVDictionary * metadata
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
enum AVColorRange color_range
AVFrameSideData ** side_data
enum AVColorSpace colorspace
enum AVColorTransferCharacteristic color_trc
int linesize[AV_NUM_DATA_POINTERS]
AVBufferRef * hw_frames_ctx
uint8_t * data[AV_NUM_DATA_POINTERS]
enum AVPictureType pict_type
enum AVFrameSideDataType type
int(* uninit)(AVCodecContext *avctx)
int(* decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
int(* decode_params)(AVCodecContext *avctx, int type, const uint8_t *buf, uint32_t buf_size)
int(* alloc_frame)(AVCodecContext *avctx, AVFrame *frame)
enum AVPixelFormat pix_fmt
int(* start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
void(* decode_mb)(struct MpegEncContext *s)
int(* init)(AVCodecContext *avctx)
int(* end_frame)(AVCodecContext *avctx)
int(* frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
enum AVMediaType type
void(* free)(struct AVHWDeviceContext *ctx)
AVHWDeviceInternal * internal
enum AVPixelFormat * valid_hw_formats
enum AVPixelFormat * valid_sw_formats
AVHWDeviceContext * device_ctx
AVHWFramesInternal * internal
void(* free)(struct AVHWFramesContext *ctx)
int64_t(* seek)(void *opaque, int64_t offset, int whence)
unsigned long(* update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size)
unsigned char * buf_ptr_max
int(* write_packet)(void *opaque, uint8_t *buf, int buf_size)
const char * protocol_blacklist
attribute_deprecated int64_t written
const AVClass * av_class
unsigned char * checksum_ptr
int(* read_packet)(void *opaque, uint8_t *buf, int buf_size)
int64_t(* read_seek)(void *opaque, int stream_index, int64_t timestamp, int flags)
int(* write_data_type)(void *opaque, uint8_t *buf, int buf_size, enum AVIODataMarkerType type, int64_t time)
int(* read_pause)(void *opaque, int pause)
const char * protocol_whitelist
struct URLContext * url_context
int64_t user_id
int type
int64_t access_timestamp
char * name
int64_t status_change_timestamp
int64_t size
int64_t group_id
int utf8
int64_t modification_timestamp
int64_t filemode
int size
int flags
int64_t pos
int min_distance
int64_t timestamp
int(* read_probe)(AVProbeData *)
int64_t(* read_timestamp)(struct AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit)
const struct AVCodecTag *const * codec_tag
int(* get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list)
int(* read_packet)(struct AVFormatContext *, AVPacket *pkt)
int(* read_pause)(struct AVFormatContext *)
int(* read_header)(struct AVFormatContext *)
int(* read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
int(* read_seek)(struct AVFormatContext *, int stream_index, int64_t timestamp, int flags)
int(* read_close)(struct AVFormatContext *)
int(* read_play)(struct AVFormatContext *)
const struct AVCodecTag *const * codec_tag
int(* query_codec)(enum AVCodecID id, int std_compliance)
int(* get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list)
int(* write_packet)(struct AVFormatContext *, AVPacket *pkt)
void(* get_output_timestamp)(struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall)
void(* deinit)(struct AVFormatContext *)
int(* interleave_packet)(struct AVFormatContext *, AVPacket *out, AVPacket *in, int flush)
int(* write_uncoded_frame)(struct AVFormatContext *, int stream_index, AVFrame **frame, unsigned flags)
int(* control_message)(struct AVFormatContext *s, int type, void *data, size_t data_size)
int(* init)(struct AVFormatContext *)
int(* check_bitstream)(struct AVFormatContext *, const AVPacket *pkt)
int(* write_header)(struct AVFormatContext *)
int(* write_trailer)(struct AVFormatContext *)
AVBufferRef * opaque_ref
AVPacketSideData * side_data
struct AVPacketList * next
enum AVPacketSideDataType type
unsigned int nb_stream_indexes
unsigned int * stream_index
enum AVDiscard discard
AVDictionary * metadata
AVDictionary * metadata
AVRational sample_aspect_ratio
enum AVDiscard discard
AVPacketSideData * side_data
AVCodecParameters * codecpar
AVSubtitleRect ** rects
enum AVSubtitleType type