Audacity 3.2.0
ffmpeg-6.0.0-single-header.h
Go to the documentation of this file.
1// This header was generated from the FFMPEG headers
2#pragma once
3
4#include <string.h>
5#include <math.h>
6#include <time.h>
7#include <stddef.h>
8#include <limits.h>
9#include <errno.h>
10#include <stdlib.h>
11#include <inttypes.h>
12#include <stdint.h>
13#include <stdio.h>
14#include <stdarg.h>
15
16#define AVCODEC_AVCODEC_H
17
18#define AVUTIL_SAMPLEFMT_H
19
27
35
37};
38
39const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);
40
42
43enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar);
44
46
48
49char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
50
52
54
55int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
56 enum AVSampleFormat sample_fmt, int align);
57
58int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
59 const uint8_t *buf,
60 int nb_channels, int nb_samples,
61 enum AVSampleFormat sample_fmt, int align);
62
63int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
64 int nb_samples, enum AVSampleFormat sample_fmt, int align);
65
66int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,
67 int nb_samples, enum AVSampleFormat sample_fmt, int align);
68
69int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset,
70 int src_offset, int nb_samples, int nb_channels,
71 enum AVSampleFormat sample_fmt);
72
73int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples,
74 int nb_channels, enum AVSampleFormat sample_fmt);
75
76#define AVUTIL_ATTRIBUTES_H
77
78# define AV_GCC_VERSION_AT_LEAST(x,y) 0
79# define AV_GCC_VERSION_AT_MOST(x,y) 0
80
81# define AV_HAS_BUILTIN(x) 0
82
83# define av_always_inline inline
84
85# define av_extern_inline inline
86
87# define av_warn_unused_result
88
89# define av_noinline
90
91# define av_pure
92
93# define av_const
94
95# define av_cold
96
97# define av_flatten
98
99# define attribute_deprecated
100
101# define AV_NOWARN_DEPRECATED(code) code
102
103# define av_unused
104
105# define av_used
106
107# define av_alias
108
109# define av_uninit(x) x
110
111# define av_builtin_constant_p(x) 0
112# define av_printf_format(fmtpos, attrpos)
113
114# define av_noreturn
115
116#define AVUTIL_AVUTIL_H
117
118unsigned avutil_version(void);
119
120const char *av_version_info(void);
121
122const char *avutil_configuration(void);
123
124const char *avutil_license(void);
125
135
136const char *av_get_media_type_string(enum AVMediaType media_type);
137
138#define FF_LAMBDA_SHIFT 7
139#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
140#define FF_QP2LAMBDA 118
141#define FF_LAMBDA_MAX (256*128-1)
142
143#define FF_QUALITY_SCALE FF_LAMBDA_SCALE
144
145#define AV_NOPTS_VALUE ((int64_t)UINT64_C(0x8000000000000000))
146
147#define AV_TIME_BASE 1000000
148
149#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
150
160};
161
163
164#define AVUTIL_COMMON_H
165
166#define AVUTIL_MACROS_H
167
168# define AV_NE(be, le) (le)
169
170#define FFDIFFSIGN(x,y) (((x)>(y)) - ((x)<(y)))
171
172#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
173#define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c)
174#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
175#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
176
177#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
178#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
179
180#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
181#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
182
183#define AV_STRINGIFY(s) AV_TOSTRING(s)
184#define AV_TOSTRING(s) #s
185
186#define AV_GLUE(a, b) a ## b
187#define AV_JOIN(a, b) AV_GLUE(a, b)
188
189#define AV_PRAGMA(s) _Pragma(#s)
190
191#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1))
192
193#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
194
195#define ROUNDED_DIV(a,b) (((a)>=0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
196
197#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
198 : ((a) + (1<<(b)) - 1) >> (b))
199
200#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT
201
202#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
203#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))
204
205#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
206#define FFSIGN(a) ((a) > 0 ? 1 : -1)
207
208#define FFNABS(a) ((a) <= 0 ? (a) : (-(a)))
209
210#define FFABSU(a) ((a) <= 0 ? -(unsigned)(a) : (unsigned)(a))
211#define FFABS64U(a) ((a) <= 0 ? -(uint64_t)(a) : (uint64_t)(a))
212
213# define av_ceil_log2 av_ceil_log2_c
214# define av_clip av_clip_c
215# define av_clip64 av_clip64_c
216# define av_clip_uint8 av_clip_uint8_c
217# define av_clip_int8 av_clip_int8_c
218# define av_clip_uint16 av_clip_uint16_c
219# define av_clip_int16 av_clip_int16_c
220# define av_clipl_int32 av_clipl_int32_c
221# define av_clip_intp2 av_clip_intp2_c
222# define av_clip_uintp2 av_clip_uintp2_c
223# define av_mod_uintp2 av_mod_uintp2_c
224# define av_sat_add32 av_sat_add32_c
225# define av_sat_dadd32 av_sat_dadd32_c
226# define av_sat_sub32 av_sat_sub32_c
227# define av_sat_dsub32 av_sat_dsub32_c
228# define av_sat_add64 av_sat_add64_c
229# define av_sat_sub64 av_sat_sub64_c
230# define av_clipf av_clipf_c
231# define av_clipd av_clipd_c
232# define av_popcount av_popcount_c
233# define av_popcount64 av_popcount64_c
234# define av_parity av_parity_c
235
236av_const int av_log2(unsigned v);
237
238av_const int av_log2_16bit(unsigned v);
239
240static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
241{
242 if (a < amin) return amin;
243 else if (a > amax) return amax;
244 else return a;
245}
246
247static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax)
248{
249 if (a < amin) return amin;
250 else if (a > amax) return amax;
251 else return a;
252}
253
255{
256 if (a&(~0xFF)) return (~a)>>31;
257 else return a;
258}
259
261{
262 if ((a+0x80U) & ~0xFF) return (a>>31) ^ 0x7F;
263 else return a;
264}
265
267{
268 if (a&(~0xFFFF)) return (~a)>>31;
269 else return a;
270}
271
273{
274 if ((a+0x8000U) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
275 else return a;
276}
277
279{
280 if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF);
281 else return (int32_t)a;
282}
283
285{
286 if (((unsigned)a + (1 << p)) & ~((2 << p) - 1))
287 return (a >> 31) ^ ((1 << p) - 1);
288 else
289 return a;
290}
291
292static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
293{
294 if (a & ~((1<<p) - 1)) return (~a) >> 31 & ((1<<p) - 1);
295 else return a;
296}
297
298static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p)
299{
300 return a & ((1U << p) - 1);
301}
302
303static av_always_inline int av_sat_add32_c(int a, int b)
304{
305 return av_clipl_int32((int64_t)a + b);
306}
307
308static av_always_inline int av_sat_dadd32_c(int a, int b)
309{
310 return av_sat_add32(a, av_sat_add32(b, b));
311}
312
313static av_always_inline int av_sat_sub32_c(int a, int b)
314{
315 return av_clipl_int32((int64_t)a - b);
316}
317
318static av_always_inline int av_sat_dsub32_c(int a, int b)
319{
320 return av_sat_sub32(a, av_sat_add32(b, b));
321}
322
323static av_always_inline int64_t av_sat_add64_c(int64_t a, int64_t b) {
324 int64_t s = a+(uint64_t)b;
325 if ((int64_t)(a^b | ~s^b) >= 0)
326 return INT64_MAX ^ (b >> 63);
327 return s;
328}
329
330static av_always_inline int64_t av_sat_sub64_c(int64_t a, int64_t b) {
331 if (b <= 0 && a >= INT64_MAX + b)
332 return INT64_MAX;
333 if (b >= 0 && a <= INT64_MIN + b)
334 return INT64_MIN;
335 return a - b;
336}
337
338static av_always_inline av_const float av_clipf_c(float a, float amin, float amax)
339{
340 return FFMIN(FFMAX(a, amin), amax);
341}
342
343static av_always_inline av_const double av_clipd_c(double a, double amin, double amax)
344{
345 return FFMIN(FFMAX(a, amin), amax);
346}
347
349{
350 return av_log2((x - 1U) << 1);
351}
352
354{
355 x -= (x >> 1) & 0x55555555;
356 x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
357 x = (x + (x >> 4)) & 0x0F0F0F0F;
358 x += x >> 8;
359 return (x + (x >> 16)) & 0x3F;
360}
361
363{
364 return av_popcount((uint32_t)x) + av_popcount((uint32_t)(x >> 32));
365}
366
368{
369 return av_popcount(v) & 1;
370}
371
372#define GET_UTF8(val, GET_BYTE, ERROR)\
373 val= (GET_BYTE);\
374 {\
375 uint32_t top = (val & 128) >> 1;\
376 if ((val & 0xc0) == 0x80 || val >= 0xFE)\
377 {ERROR}\
378 while (val & top) {\
379 unsigned int tmp = (GET_BYTE) - 128;\
380 if(tmp>>6)\
381 {ERROR}\
382 val= (val<<6) + tmp;\
383 top <<= 5;\
384 }\
385 val &= (top << 1) - 1;\
386 }
387
388#define GET_UTF16(val, GET_16BIT, ERROR)\
389 val = (GET_16BIT);\
390 {\
391 unsigned int hi = val - 0xD800;\
392 if (hi < 0x800) {\
393 val = (GET_16BIT) - 0xDC00;\
394 if (val > 0x3FFU || hi > 0x3FFU)\
395 {ERROR}\
396 val += (hi<<10) + 0x10000;\
397 }\
398 }\
399
400#define PUT_UTF8(val, tmp, PUT_BYTE)\
401 {\
402 int bytes, shift;\
403 uint32_t in = val;\
404 if (in < 0x80) {\
405 tmp = in;\
406 PUT_BYTE\
407 } else {\
408 bytes = (av_log2(in) + 4) / 5;\
409 shift = (bytes - 1) * 6;\
410 tmp = (256 - (256 >> bytes)) | (in >> shift);\
411 PUT_BYTE\
412 while (shift >= 6) {\
413 shift -= 6;\
414 tmp = 0x80 | ((in >> shift) & 0x3f);\
415 PUT_BYTE\
416 }\
417 }\
418 }
419
420#define PUT_UTF16(val, tmp, PUT_16BIT)\
421 {\
422 uint32_t in = val;\
423 if (in < 0x10000) {\
424 tmp = in;\
425 PUT_16BIT\
426 } else {\
427 tmp = 0xD800 | ((in - 0x10000) >> 10);\
428 PUT_16BIT\
429 tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
430 PUT_16BIT\
431 }\
432 }\
433
434#define AVUTIL_MEM_H
435
436#define AVUTIL_VERSION_H
437
438#define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
439#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
440#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
441
442#define AV_VERSION_MAJOR(a) ((a) >> 16)
443#define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8)
444#define AV_VERSION_MICRO(a) ((a) & 0xFF)
445
446#define LIBAVUTIL_VERSION_MAJOR 58
447#define LIBAVUTIL_VERSION_MINOR 2
448#define LIBAVUTIL_VERSION_MICRO 100
449
450#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
451 LIBAVUTIL_VERSION_MINOR, \
452 LIBAVUTIL_VERSION_MICRO)
453#define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \
454 LIBAVUTIL_VERSION_MINOR, \
455 LIBAVUTIL_VERSION_MICRO)
456#define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT
457
458#define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
459
460#define FF_API_FIFO_PEEK2 (LIBAVUTIL_VERSION_MAJOR < 59)
461#define FF_API_FIFO_OLD_API (LIBAVUTIL_VERSION_MAJOR < 59)
462#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 59)
463#define FF_API_OLD_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_MAJOR < 59)
464#define FF_API_AV_FOPEN_UTF8 (LIBAVUTIL_VERSION_MAJOR < 59)
465#define FF_API_PKT_DURATION (LIBAVUTIL_VERSION_MAJOR < 59)
466#define FF_API_REORDERED_OPAQUE (LIBAVUTIL_VERSION_MAJOR < 59)
467#define FF_API_FRAME_PICTURE_NUMBER (LIBAVUTIL_VERSION_MAJOR < 59)
468
469 #define av_malloc_attrib
470
471 #define av_alloc_size(...)
472
474
476
477av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size);
478
480
481void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
482
484int av_reallocp(void *ptr, size_t size);
485
486void *av_realloc_f(void *ptr, size_t nelem, size_t elsize);
487
488av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size);
489
490int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
491
492void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
493
494void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
495
496void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size);
497
498void av_free(void *ptr);
499
500void av_freep(void *ptr);
501
502char *av_strdup(const char *s) av_malloc_attrib;
503
504char *av_strndup(const char *s, size_t len) av_malloc_attrib;
505
506void *av_memdup(const void *p, size_t size);
507
508void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
509
510void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);
511
513int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem);
514
515void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
516 const uint8_t *elem_data);
517
518int av_size_mult(size_t a, size_t b, size_t *r);
519
520void av_max_alloc(size_t max);
521
522#define AVUTIL_ERROR_H
523
524#define AVERROR(e) (e)
525#define AVUNERROR(e) (e)
526
527#define FFERRTAG(a, b, c, d) (-(int)MKTAG(a, b, c, d))
528
529#define AVERROR_BSF_NOT_FOUND FFERRTAG(0xF8,'B','S','F')
530#define AVERROR_BUG FFERRTAG( 'B','U','G','!')
531#define AVERROR_BUFFER_TOO_SMALL FFERRTAG( 'B','U','F','S')
532#define AVERROR_DECODER_NOT_FOUND FFERRTAG(0xF8,'D','E','C')
533#define AVERROR_DEMUXER_NOT_FOUND FFERRTAG(0xF8,'D','E','M')
534#define AVERROR_ENCODER_NOT_FOUND FFERRTAG(0xF8,'E','N','C')
535#define AVERROR_EOF FFERRTAG( 'E','O','F',' ')
536#define AVERROR_EXIT FFERRTAG( 'E','X','I','T')
537#define AVERROR_EXTERNAL FFERRTAG( 'E','X','T',' ')
538#define AVERROR_FILTER_NOT_FOUND FFERRTAG(0xF8,'F','I','L')
539#define AVERROR_INVALIDDATA FFERRTAG( 'I','N','D','A')
540#define AVERROR_MUXER_NOT_FOUND FFERRTAG(0xF8,'M','U','X')
541#define AVERROR_OPTION_NOT_FOUND FFERRTAG(0xF8,'O','P','T')
542#define AVERROR_PATCHWELCOME FFERRTAG( 'P','A','W','E')
543#define AVERROR_PROTOCOL_NOT_FOUND FFERRTAG(0xF8,'P','R','O')
544
545#define AVERROR_STREAM_NOT_FOUND FFERRTAG(0xF8,'S','T','R')
546
547#define AVERROR_BUG2 FFERRTAG( 'B','U','G',' ')
548#define AVERROR_UNKNOWN FFERRTAG( 'U','N','K','N')
549#define AVERROR_EXPERIMENTAL (-0x2bb2afa8)
550#define AVERROR_INPUT_CHANGED (-0x636e6701)
551#define AVERROR_OUTPUT_CHANGED (-0x636e6702)
552
553#define AVERROR_HTTP_BAD_REQUEST FFERRTAG(0xF8,'4','0','0')
554#define AVERROR_HTTP_UNAUTHORIZED FFERRTAG(0xF8,'4','0','1')
555#define AVERROR_HTTP_FORBIDDEN FFERRTAG(0xF8,'4','0','3')
556#define AVERROR_HTTP_NOT_FOUND FFERRTAG(0xF8,'4','0','4')
557#define AVERROR_HTTP_OTHER_4XX FFERRTAG(0xF8,'4','X','X')
558#define AVERROR_HTTP_SERVER_ERROR FFERRTAG(0xF8,'5','X','X')
559
560#define AV_ERROR_MAX_STRING_SIZE 64
561
562int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
563
564static inline char *av_make_error_string(char *errbuf, size_t errbuf_size, int errnum)
565{
566 av_strerror(errnum, errbuf, errbuf_size);
567 return errbuf;
568}
569
570#define av_err2str(errnum) \
571 av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum)
572
573#define AVUTIL_RATIONAL_H
574
575typedef struct AVRational{
576 int num;
577 int den;
579
580static inline AVRational av_make_q(int num, int den)
581{
582 AVRational r = { num, den };
583 return r;
584}
585
586static inline int av_cmp_q(AVRational a, AVRational b){
587 const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den;
588
589 if(tmp) return (int)((tmp ^ a.den ^ b.den)>>63)|1;
590 else if(b.den && a.den) return 0;
591 else if(a.num && b.num) return (a.num>>31) - (b.num>>31);
592 else return INT_MIN;
593}
594
595static inline double av_q2d(AVRational a){
596 return a.num / (double) a.den;
597}
598
599int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max);
600
602
604
606
608
610{
611 AVRational r = { q.den, q.num };
612 return r;
613}
614
615AVRational av_d2q(double d, int max) av_const;
616
618
620
622
624
625#define AVUTIL_MATHEMATICS_H
626
627#define AVUTIL_INTFLOAT_H
628
629union av_intfloat32 {
630 uint32_t i;
631 float f;
632};
633
634union av_intfloat64 {
635 uint64_t i;
636 double f;
637};
638
639static av_always_inline float av_int2float(uint32_t i)
640{
641 union av_intfloat32 v;
642 v.i = i;
643 return v.f;
644}
645
646static av_always_inline uint32_t av_float2int(float f)
647{
648 union av_intfloat32 v;
649 v.f = f;
650 return v.i;
651}
652
653static av_always_inline double av_int2double(uint64_t i)
654{
655 union av_intfloat64 v;
656 v.i = i;
657 return v.f;
658}
659
660static av_always_inline uint64_t av_double2int(double f)
661{
662 union av_intfloat64 v;
663 v.f = f;
664 return v.i;
665}
666
667#define M_E 2.7182818284590452354
668#define M_LN2 0.69314718055994530942
669#define M_LN10 2.30258509299404568402
670#define M_LOG2_10 3.32192809488736234787
671#define M_PHI 1.61803398874989484820
672#define M_PI 3.14159265358979323846
673#define M_PI_2 1.57079632679489661923
674#define M_SQRT1_2 0.70710678118654752440
675#define M_SQRT2 1.41421356237309504880
676#define NAN av_int2float(0x7fc00000)
677#define INFINITY av_int2float(0x7f800000)
678
685
687};
688
689int64_t av_const av_gcd(int64_t a, int64_t b);
690
691int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const;
692
693int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd) av_const;
694
695int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const;
696
697int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq,
698 enum AVRounding rnd) av_const;
699
700int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
701
702int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);
703
704int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb);
705
706int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc);
707
708#define AVUTIL_LOG_H
709
710typedef enum {
730
731#define AV_IS_INPUT_DEVICE(category) \
732 (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \
733 ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \
734 ((category) == AV_CLASS_CATEGORY_DEVICE_INPUT))
735
736#define AV_IS_OUTPUT_DEVICE(category) \
737 (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT) || \
738 ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT) || \
739 ((category) == AV_CLASS_CATEGORY_DEVICE_OUTPUT))
740
741struct AVOptionRanges;
742
743typedef struct AVClass {
744
745 const char* class_name;
746
747 const char* (*item_name)(void* ctx);
748
749 const struct AVOption *option;
750
751 int version;
752
754
756
758
759 AVClassCategory (*get_category)(void* ctx);
760
761 int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
762
763 void* (*child_next)(void *obj, void *prev);
764
765 const struct AVClass* (*child_class_iterate)(void **iter);
767
768#define AV_LOG_QUIET -8
769
770#define AV_LOG_PANIC 0
771
772#define AV_LOG_FATAL 8
773
774#define AV_LOG_ERROR 16
775
776#define AV_LOG_WARNING 24
777
778#define AV_LOG_INFO 32
779
780#define AV_LOG_VERBOSE 40
781
782#define AV_LOG_DEBUG 48
783
784#define AV_LOG_TRACE 56
785
786#define AV_LOG_MAX_OFFSET (AV_LOG_TRACE - AV_LOG_QUIET)
787
788#define AV_LOG_C(x) ((x) << 8)
789
790void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
791
792void av_log_once(void* avcl, int initial_level, int subsequent_level, int *state, const char *fmt, ...) av_printf_format(5, 6);
793
794void av_vlog(void *avcl, int level, const char *fmt, va_list vl);
795
797
798void av_log_set_level(int level);
799
800void av_log_set_callback(void (*callback)(void*, int, const char*, va_list));
801
802void av_log_default_callback(void *avcl, int level, const char *fmt,
803 va_list vl);
804
805const char* av_default_item_name(void* ctx);
807
808void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
809 char *line, int line_size, int *print_prefix);
810
811int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
812 char *line, int line_size, int *print_prefix);
813
814#define AV_LOG_SKIP_REPEATED 1
815
816#define AV_LOG_PRINT_LEVEL 2
817
818void av_log_set_flags(int arg);
820
821#define AVUTIL_PIXFMT_H
822
823#define AVPALETTE_SIZE 1024
824#define AVPALETTE_COUNT 256
825
853
858
866
871
876
878
886
892
895
898
939
941
947
952
954
957
961
963
965
967
969
974
992
1005
1007
1014
1016
1019
1022
1025
1027
1032
1035
1037
1040
1045
1047
1049
1052
1055
1060
1063
1065
1068
1073
1076
1079
1082
1085
1087
1090
1092
1095
1098
1101
1104
1107
1110
1113
1114# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##le
1115
1116#define AV_PIX_FMT_RGB32 AV_PIX_FMT_NE(ARGB, BGRA)
1117#define AV_PIX_FMT_RGB32_1 AV_PIX_FMT_NE(RGBA, ABGR)
1118#define AV_PIX_FMT_BGR32 AV_PIX_FMT_NE(ABGR, RGBA)
1119#define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB)
1120#define AV_PIX_FMT_0RGB32 AV_PIX_FMT_NE(0RGB, BGR0)
1121#define AV_PIX_FMT_0BGR32 AV_PIX_FMT_NE(0BGR, RGB0)
1122
1123#define AV_PIX_FMT_GRAY9 AV_PIX_FMT_NE(GRAY9BE, GRAY9LE)
1124#define AV_PIX_FMT_GRAY10 AV_PIX_FMT_NE(GRAY10BE, GRAY10LE)
1125#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
1126#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
1127#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
1128#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
1129#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
1130#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
1131#define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE)
1132#define AV_PIX_FMT_RGB444 AV_PIX_FMT_NE(RGB444BE, RGB444LE)
1133#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE)
1134#define AV_PIX_FMT_BGR48 AV_PIX_FMT_NE(BGR48BE, BGR48LE)
1135#define AV_PIX_FMT_BGR565 AV_PIX_FMT_NE(BGR565BE, BGR565LE)
1136#define AV_PIX_FMT_BGR555 AV_PIX_FMT_NE(BGR555BE, BGR555LE)
1137#define AV_PIX_FMT_BGR444 AV_PIX_FMT_NE(BGR444BE, BGR444LE)
1138#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE)
1139
1140#define AV_PIX_FMT_YUV420P9 AV_PIX_FMT_NE(YUV420P9BE , YUV420P9LE)
1141#define AV_PIX_FMT_YUV422P9 AV_PIX_FMT_NE(YUV422P9BE , YUV422P9LE)
1142#define AV_PIX_FMT_YUV444P9 AV_PIX_FMT_NE(YUV444P9BE , YUV444P9LE)
1143#define AV_PIX_FMT_YUV420P10 AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE)
1144#define AV_PIX_FMT_YUV422P10 AV_PIX_FMT_NE(YUV422P10BE, YUV422P10LE)
1145#define AV_PIX_FMT_YUV440P10 AV_PIX_FMT_NE(YUV440P10BE, YUV440P10LE)
1146#define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE)
1147#define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE)
1148#define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE)
1149#define AV_PIX_FMT_YUV440P12 AV_PIX_FMT_NE(YUV440P12BE, YUV440P12LE)
1150#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE)
1151#define AV_PIX_FMT_YUV420P14 AV_PIX_FMT_NE(YUV420P14BE, YUV420P14LE)
1152#define AV_PIX_FMT_YUV422P14 AV_PIX_FMT_NE(YUV422P14BE, YUV422P14LE)
1153#define AV_PIX_FMT_YUV444P14 AV_PIX_FMT_NE(YUV444P14BE, YUV444P14LE)
1154#define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE)
1155#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
1156#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
1157
1158#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE)
1159#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
1160#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE)
1161#define AV_PIX_FMT_GBRP14 AV_PIX_FMT_NE(GBRP14BE, GBRP14LE)
1162#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
1163#define AV_PIX_FMT_GBRAP10 AV_PIX_FMT_NE(GBRAP10BE, GBRAP10LE)
1164#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE)
1165#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
1166
1167#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE)
1168#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE)
1169#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE)
1170#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE)
1171
1172#define AV_PIX_FMT_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE)
1173#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE)
1174
1175#define AV_PIX_FMT_GRAYF32 AV_PIX_FMT_NE(GRAYF32BE, GRAYF32LE)
1176
1177#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
1178#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
1179#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
1180#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE)
1181#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE)
1182#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE)
1183#define AV_PIX_FMT_YUVA422P12 AV_PIX_FMT_NE(YUVA422P12BE, YUVA422P12LE)
1184#define AV_PIX_FMT_YUVA444P12 AV_PIX_FMT_NE(YUVA444P12BE, YUVA444P12LE)
1185#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE)
1186#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE)
1187#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)
1188
1189#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE)
1190#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE)
1191#define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE)
1192#define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE)
1193#define AV_PIX_FMT_P012 AV_PIX_FMT_NE(P012BE, P012LE)
1194#define AV_PIX_FMT_P016 AV_PIX_FMT_NE(P016BE, P016LE)
1195
1196#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
1197#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
1198#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
1199#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
1200#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
1201#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
1202
1203#define AV_PIX_FMT_P210 AV_PIX_FMT_NE(P210BE, P210LE)
1204#define AV_PIX_FMT_P410 AV_PIX_FMT_NE(P410BE, P410LE)
1205#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
1206#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
1207
1208#define AV_PIX_FMT_RGBAF16 AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE)
1209
1210#define AV_PIX_FMT_RGBF32 AV_PIX_FMT_NE(RGBF32BE, RGBF32LE)
1211#define AV_PIX_FMT_RGBAF32 AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE)
1212
1219
1233
1258
1278
1281
1283
1287
1298
1299static inline void *av_x_if_null(const void *p, const void *x)
1300{
1301 return (void *)(intptr_t)(p ? p : x);
1302}
1303
1304unsigned av_int_list_length_for_size(unsigned elsize,
1305 const void *list, uint64_t term) av_pure;
1306
1307#define av_int_list_length(list, term) \
1308 av_int_list_length_for_size(sizeof(*(list)), list, term)
1309
1311FILE *av_fopen_utf8(const char *path, const char *mode);
1312
1314
1315#define AV_FOURCC_MAX_STRING_SIZE 32
1316
1317#define av_fourcc2str(fourcc) av_fourcc_make_string((char[AV_FOURCC_MAX_STRING_SIZE]){0}, fourcc)
1318
1319char *av_fourcc_make_string(char *buf, uint32_t fourcc);
1320
1321#define AVUTIL_BUFFER_H
1322
1323typedef struct AVBuffer AVBuffer;
1324
1325typedef struct AVBufferRef {
1327
1328 uint8_t *data;
1329
1330 size_t size;
1332
1334
1336
1337#define AV_BUFFER_FLAG_READONLY (1 << 0)
1338
1339AVBufferRef *av_buffer_create(uint8_t *data, size_t size,
1340 void (*free)(void *opaque, uint8_t *data),
1341 void *opaque, int flags);
1342
1343void av_buffer_default_free(void *opaque, uint8_t *data);
1344
1346
1348
1350
1352
1354
1356
1358
1360
1362
1364
1366 AVBufferRef* (*alloc)(void *opaque, size_t size),
1367 void (*pool_free)(void *opaque));
1368
1370
1372
1374
1375#define AVUTIL_DICT_H
1376
1377#define AV_DICT_MATCH_CASE 1
1378#define AV_DICT_IGNORE_SUFFIX 2
1379
1380#define AV_DICT_DONT_STRDUP_KEY 4
1381
1382#define AV_DICT_DONT_STRDUP_VAL 8
1383
1384#define AV_DICT_DONT_OVERWRITE 16
1385#define AV_DICT_APPEND 32
1386
1387#define AV_DICT_MULTIKEY 64
1388
1389typedef struct AVDictionaryEntry {
1390 char *key;
1391 char *value;
1393
1395
1397 const AVDictionaryEntry *prev, int flags);
1398
1400 const AVDictionaryEntry *prev);
1401
1403
1404int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
1405
1406int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags);
1407
1409 const char *key_val_sep, const char *pairs_sep,
1410 int flags);
1411
1412int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);
1413
1415
1416int av_dict_get_string(const AVDictionary *m, char **buffer,
1417 const char key_val_sep, const char pairs_sep);
1418
1419#define AVUTIL_FRAME_H
1420
1421#define AVUTIL_CHANNEL_LAYOUT_H
1422
1424
1444
1446
1458
1460
1462
1464
1466};
1467
1469
1471
1473
1475
1477};
1478
1479#define AV_CH_FRONT_LEFT (1ULL << AV_CHAN_FRONT_LEFT )
1480#define AV_CH_FRONT_RIGHT (1ULL << AV_CHAN_FRONT_RIGHT )
1481#define AV_CH_FRONT_CENTER (1ULL << AV_CHAN_FRONT_CENTER )
1482#define AV_CH_LOW_FREQUENCY (1ULL << AV_CHAN_LOW_FREQUENCY )
1483#define AV_CH_BACK_LEFT (1ULL << AV_CHAN_BACK_LEFT )
1484#define AV_CH_BACK_RIGHT (1ULL << AV_CHAN_BACK_RIGHT )
1485#define AV_CH_FRONT_LEFT_OF_CENTER (1ULL << AV_CHAN_FRONT_LEFT_OF_CENTER )
1486#define AV_CH_FRONT_RIGHT_OF_CENTER (1ULL << AV_CHAN_FRONT_RIGHT_OF_CENTER)
1487#define AV_CH_BACK_CENTER (1ULL << AV_CHAN_BACK_CENTER )
1488#define AV_CH_SIDE_LEFT (1ULL << AV_CHAN_SIDE_LEFT )
1489#define AV_CH_SIDE_RIGHT (1ULL << AV_CHAN_SIDE_RIGHT )
1490#define AV_CH_TOP_CENTER (1ULL << AV_CHAN_TOP_CENTER )
1491#define AV_CH_TOP_FRONT_LEFT (1ULL << AV_CHAN_TOP_FRONT_LEFT )
1492#define AV_CH_TOP_FRONT_CENTER (1ULL << AV_CHAN_TOP_FRONT_CENTER )
1493#define AV_CH_TOP_FRONT_RIGHT (1ULL << AV_CHAN_TOP_FRONT_RIGHT )
1494#define AV_CH_TOP_BACK_LEFT (1ULL << AV_CHAN_TOP_BACK_LEFT )
1495#define AV_CH_TOP_BACK_CENTER (1ULL << AV_CHAN_TOP_BACK_CENTER )
1496#define AV_CH_TOP_BACK_RIGHT (1ULL << AV_CHAN_TOP_BACK_RIGHT )
1497#define AV_CH_STEREO_LEFT (1ULL << AV_CHAN_STEREO_LEFT )
1498#define AV_CH_STEREO_RIGHT (1ULL << AV_CHAN_STEREO_RIGHT )
1499#define AV_CH_WIDE_LEFT (1ULL << AV_CHAN_WIDE_LEFT )
1500#define AV_CH_WIDE_RIGHT (1ULL << AV_CHAN_WIDE_RIGHT )
1501#define AV_CH_SURROUND_DIRECT_LEFT (1ULL << AV_CHAN_SURROUND_DIRECT_LEFT )
1502#define AV_CH_SURROUND_DIRECT_RIGHT (1ULL << AV_CHAN_SURROUND_DIRECT_RIGHT)
1503#define AV_CH_LOW_FREQUENCY_2 (1ULL << AV_CHAN_LOW_FREQUENCY_2 )
1504#define AV_CH_TOP_SIDE_LEFT (1ULL << AV_CHAN_TOP_SIDE_LEFT )
1505#define AV_CH_TOP_SIDE_RIGHT (1ULL << AV_CHAN_TOP_SIDE_RIGHT )
1506#define AV_CH_BOTTOM_FRONT_CENTER (1ULL << AV_CHAN_BOTTOM_FRONT_CENTER )
1507#define AV_CH_BOTTOM_FRONT_LEFT (1ULL << AV_CHAN_BOTTOM_FRONT_LEFT )
1508#define AV_CH_BOTTOM_FRONT_RIGHT (1ULL << AV_CHAN_BOTTOM_FRONT_RIGHT )
1509
1510#define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL
1511
1512#define AV_CH_LAYOUT_MONO (AV_CH_FRONT_CENTER)
1513#define AV_CH_LAYOUT_STEREO (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
1514#define AV_CH_LAYOUT_2POINT1 (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY)
1515#define AV_CH_LAYOUT_2_1 (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER)
1516#define AV_CH_LAYOUT_SURROUND (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER)
1517#define AV_CH_LAYOUT_3POINT1 (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY)
1518#define AV_CH_LAYOUT_4POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER)
1519#define AV_CH_LAYOUT_4POINT1 (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY)
1520#define AV_CH_LAYOUT_2_2 (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
1521#define AV_CH_LAYOUT_QUAD (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1522#define AV_CH_LAYOUT_5POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
1523#define AV_CH_LAYOUT_5POINT1 (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY)
1524#define AV_CH_LAYOUT_5POINT0_BACK (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1525#define AV_CH_LAYOUT_5POINT1_BACK (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY)
1526#define AV_CH_LAYOUT_6POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)
1527#define AV_CH_LAYOUT_6POINT0_FRONT (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1528#define AV_CH_LAYOUT_HEXAGONAL (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)
1529#define AV_CH_LAYOUT_6POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)
1530#define AV_CH_LAYOUT_6POINT1_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)
1531#define AV_CH_LAYOUT_6POINT1_FRONT (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)
1532#define AV_CH_LAYOUT_7POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1533#define AV_CH_LAYOUT_7POINT0_FRONT (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1534#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
1535#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1536#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
1537#define AV_CH_LAYOUT_7POINT1_TOP_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
1538#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
1539#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
1540#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
1541#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
1542#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
1543
1554
1555typedef struct AVChannelCustom {
1557 char name[16];
1558 void *opaque;
1560
1561typedef struct AVChannelLayout {
1562
1564
1566
1567 union {
1568
1569 uint64_t mask;
1570
1572 } u;
1573
1574 void *opaque;
1576
1577#define AV_CHANNEL_LAYOUT_MASK(nb, m) \
1578 { .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = (nb), .u = { .mask = (m) }}
1579
1580#define AV_CHANNEL_LAYOUT_MONO AV_CHANNEL_LAYOUT_MASK(1, AV_CH_LAYOUT_MONO)
1581#define AV_CHANNEL_LAYOUT_STEREO AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO)
1582#define AV_CHANNEL_LAYOUT_2POINT1 AV_CHANNEL_LAYOUT_MASK(3, AV_CH_LAYOUT_2POINT1)
1583#define AV_CHANNEL_LAYOUT_2_1 AV_CHANNEL_LAYOUT_MASK(3, AV_CH_LAYOUT_2_1)
1584#define AV_CHANNEL_LAYOUT_SURROUND AV_CHANNEL_LAYOUT_MASK(3, AV_CH_LAYOUT_SURROUND)
1585#define AV_CHANNEL_LAYOUT_3POINT1 AV_CHANNEL_LAYOUT_MASK(4, AV_CH_LAYOUT_3POINT1)
1586#define AV_CHANNEL_LAYOUT_4POINT0 AV_CHANNEL_LAYOUT_MASK(4, AV_CH_LAYOUT_4POINT0)
1587#define AV_CHANNEL_LAYOUT_4POINT1 AV_CHANNEL_LAYOUT_MASK(5, AV_CH_LAYOUT_4POINT1)
1588#define AV_CHANNEL_LAYOUT_2_2 AV_CHANNEL_LAYOUT_MASK(4, AV_CH_LAYOUT_2_2)
1589#define AV_CHANNEL_LAYOUT_QUAD AV_CHANNEL_LAYOUT_MASK(4, AV_CH_LAYOUT_QUAD)
1590#define AV_CHANNEL_LAYOUT_5POINT0 AV_CHANNEL_LAYOUT_MASK(5, AV_CH_LAYOUT_5POINT0)
1591#define AV_CHANNEL_LAYOUT_5POINT1 AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_5POINT1)
1592#define AV_CHANNEL_LAYOUT_5POINT0_BACK AV_CHANNEL_LAYOUT_MASK(5, AV_CH_LAYOUT_5POINT0_BACK)
1593#define AV_CHANNEL_LAYOUT_5POINT1_BACK AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_5POINT1_BACK)
1594#define AV_CHANNEL_LAYOUT_6POINT0 AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_6POINT0)
1595#define AV_CHANNEL_LAYOUT_6POINT0_FRONT AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_6POINT0_FRONT)
1596#define AV_CHANNEL_LAYOUT_HEXAGONAL AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_HEXAGONAL)
1597#define AV_CHANNEL_LAYOUT_6POINT1 AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_6POINT1)
1598#define AV_CHANNEL_LAYOUT_6POINT1_BACK AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_6POINT1_BACK)
1599#define AV_CHANNEL_LAYOUT_6POINT1_FRONT AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_6POINT1_FRONT)
1600#define AV_CHANNEL_LAYOUT_7POINT0 AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_7POINT0)
1601#define AV_CHANNEL_LAYOUT_7POINT0_FRONT AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_7POINT0_FRONT)
1602#define AV_CHANNEL_LAYOUT_7POINT1 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1)
1603#define AV_CHANNEL_LAYOUT_7POINT1_WIDE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE)
1604#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK)
1605#define AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_TOP_BACK)
1606#define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL)
1607#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE)
1608#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
1609#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
1610#define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2)
1611#define AV_CHANNEL_LAYOUT_AMBISONIC_FIRST_ORDER \
1612 { .order = AV_CHANNEL_ORDER_AMBISONIC, .nb_channels = 4, .u = { .mask = 0 }}
1613
1614struct AVBPrint;
1615
1617uint64_t av_get_channel_layout(const char *name);
1618
1620int av_get_extended_channel_layout(const char *name, uint64_t* channel_layout, int* nb_channels);
1621
1623void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
1624
1626void av_bprint_channel_layout(struct AVBPrint *bp, int nb_channels, uint64_t channel_layout);
1627
1629int av_get_channel_layout_nb_channels(uint64_t channel_layout);
1630
1632int64_t av_get_default_channel_layout(int nb_channels);
1633
1635int av_get_channel_layout_channel_index(uint64_t channel_layout,
1636 uint64_t channel);
1637
1639uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index);
1640
1642const char *av_get_channel_name(uint64_t channel);
1643
1645const char *av_get_channel_description(uint64_t channel);
1646
1648int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
1649 const char **name);
1650
1651int av_channel_name(char *buf, size_t buf_size, enum AVChannel channel);
1652
1653void av_channel_name_bprint(struct AVBPrint *bp, enum AVChannel channel_id);
1654
1655int av_channel_description(char *buf, size_t buf_size, enum AVChannel channel);
1656
1657void av_channel_description_bprint(struct AVBPrint *bp, enum AVChannel channel_id);
1658
1660
1661int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask);
1662
1664 const char *str);
1665
1666void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels);
1667
1669
1671
1673
1675 char *buf, size_t buf_size);
1676
1678 struct AVBPrint *bp);
1679
1680enum AVChannel
1681av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout, unsigned int idx);
1682
1684 enum AVChannel channel);
1685
1687 const char *name);
1688
1689enum AVChannel
1691 const char *name);
1692
1693uint64_t av_channel_layout_subset(const AVChannelLayout *channel_layout,
1694 uint64_t mask);
1695
1696int av_channel_layout_check(const AVChannelLayout *channel_layout);
1697
1699
1701
1703
1705
1707
1709
1711
1713
1715
1717
1719
1721
1723
1725
1727
1729
1731
1733
1735
1737
1739
1741
1743
1745
1747
1749
1751
1753
1755};
1756
1765};
1766
1767typedef struct AVFrameSideData {
1769 uint8_t *data;
1770 size_t size;
1774
1775typedef struct AVRegionOfInterest {
1776
1777 uint32_t self_size;
1778
1779 int top;
1780 int bottom;
1781 int left;
1782 int right;
1783
1786
1787typedef struct AVFrame {
1788#define AV_NUM_DATA_POINTERS 8
1789
1790 uint8_t *data[AV_NUM_DATA_POINTERS];
1791
1793
1794 uint8_t **extended_data;
1795
1796 int width, height;
1797
1798 int nb_samples;
1799
1800 int format;
1801
1802 int key_frame;
1803
1805
1807
1808 int64_t pts;
1809
1810 int64_t pkt_dts;
1811
1813
1816
1819
1820 int quality;
1821
1822 void *opaque;
1823
1824 int repeat_pict;
1825
1826 int interlaced_frame;
1827
1828 int top_field_first;
1829
1831
1834
1835 int sample_rate;
1836
1839
1841
1843
1844 int nb_extended_buf;
1845
1847 int nb_side_data;
1848
1849#define AV_FRAME_FLAG_CORRUPT (1 << 0)
1850
1851#define AV_FRAME_FLAG_DISCARD (1 << 2)
1852
1853 int flags;
1854
1856
1858
1860
1862
1864
1865 int64_t best_effort_timestamp;
1866
1867 int64_t pkt_pos;
1868
1871
1873
1875#define FF_DECODE_ERROR_INVALID_BITSTREAM 1
1876#define FF_DECODE_ERROR_MISSING_REFERENCE 2
1877#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
1878#define FF_DECODE_ERROR_DECODE_SLICES 8
1879
1882
1883 int pkt_size;
1884
1886
1888
1889 size_t crop_top;
1890 size_t crop_bottom;
1891 size_t crop_left;
1892 size_t crop_right;
1893
1895
1897
1898 int64_t duration;
1900
1902
1904
1905int av_frame_ref(AVFrame *dst, const AVFrame *src);
1906
1908
1910
1912
1913int av_frame_get_buffer(AVFrame *frame, int align);
1914
1916
1918
1919int av_frame_copy(AVFrame *dst, const AVFrame *src);
1920
1922
1924
1926 enum AVFrameSideDataType type,
1927 size_t size);
1928
1930 enum AVFrameSideDataType type,
1931 AVBufferRef *buf);
1932
1934 enum AVFrameSideDataType type);
1935
1937
1938enum {
1939
1941};
1942
1943int av_frame_apply_cropping(AVFrame *frame, int flags);
1944
1946
1947#define AVCODEC_CODEC_H
1948
1949#define AVUTIL_HWCONTEXT_H
1950
1964};
1965
1967
1968typedef struct AVHWDeviceContext {
1969
1970 const AVClass *av_class;
1971
1973
1974 enum AVHWDeviceType type;
1975
1976 void *hwctx;
1977
1978 void (*free)(struct AVHWDeviceContext *ctx);
1979
1980 void *user_opaque;
1982
1984
1985typedef struct AVHWFramesContext {
1986
1987 const AVClass *av_class;
1988
1990
1992
1994
1995 void *hwctx;
1996
1997 void (*free)(struct AVHWFramesContext *ctx);
1998
1999 void *user_opaque;
2000
2002
2004
2005 enum AVPixelFormat format;
2006
2008
2009 int width, height;
2011
2013
2015
2017
2019
2021
2023 const char *device, AVDictionary *opts, int flags);
2024
2026 enum AVHWDeviceType type,
2027 AVBufferRef *src_ctx, int flags);
2028
2030 enum AVHWDeviceType type,
2031 AVBufferRef *src_ctx,
2032 AVDictionary *options, int flags);
2033
2035
2037
2038int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags);
2039
2040int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags);
2041
2043
2045
2047};
2048
2051 enum AVPixelFormat **formats, int flags);
2052
2053typedef struct AVHWFramesConstraints {
2054
2056
2058
2059 int min_width;
2060 int min_height;
2061
2062 int max_width;
2063 int max_height;
2065
2067
2069 const void *hwconfig);
2070
2072
2073enum {
2074
2076
2078
2080
2082};
2083
2084int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags);
2085
2087 enum AVPixelFormat format,
2088 AVBufferRef *derived_device_ctx,
2089 AVBufferRef *source_frame_ctx,
2090 int flags);
2091
2092#define AVCODEC_CODEC_ID_H
2093
2094#define AVCODEC_VERSION_MAJOR_H
2095
2096#define LIBAVCODEC_VERSION_MAJOR 60
2097
2098#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 61)
2099#define FF_API_IDCT_NONE (LIBAVCODEC_VERSION_MAJOR < 61)
2100#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 61)
2101#define FF_API_AYUV_CODECID (LIBAVCODEC_VERSION_MAJOR < 61)
2102#define FF_API_VT_OUTPUT_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 61)
2103#define FF_API_AVCODEC_CHROMA_POS (LIBAVCODEC_VERSION_MAJOR < 61)
2104#define FF_API_VT_HWACCEL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 61)
2105#define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61)
2106
2107#define FF_CODEC_CRYSTAL_HD (LIBAVCODEC_VERSION_MAJOR < 61)
2108
2111
2248#define AV_CODEC_ID_IFF_BYTERUN1 AV_CODEC_ID_IFF_ILBM
2286#define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC
2310#define AV_CODEC_ID_H266 AV_CODEC_ID_VVC
2380
2419
2472
2475
2478
2488
2592
2620
2623
2634
2636
2638
2640
2643
2645
2647};
2648
2650
2651const char *avcodec_get_name(enum AVCodecID id);
2652
2654
2656
2657const char *avcodec_profile_name(enum AVCodecID codec_id, int profile);
2658
2660
2661#define AV_CODEC_CAP_DRAW_HORIZ_BAND (1 << 0)
2662
2663#define AV_CODEC_CAP_DR1 (1 << 1)
2664
2665#define AV_CODEC_CAP_DELAY (1 << 5)
2666
2667#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
2668
2669#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
2670
2671#define AV_CODEC_CAP_EXPERIMENTAL (1 << 9)
2672
2673#define AV_CODEC_CAP_CHANNEL_CONF (1 << 10)
2674
2675#define AV_CODEC_CAP_FRAME_THREADS (1 << 12)
2676
2677#define AV_CODEC_CAP_SLICE_THREADS (1 << 13)
2678
2679#define AV_CODEC_CAP_PARAM_CHANGE (1 << 14)
2680
2681#define AV_CODEC_CAP_OTHER_THREADS (1 << 15)
2682
2683#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
2684
2685#define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
2686
2687#define AV_CODEC_CAP_HARDWARE (1 << 18)
2688
2689#define AV_CODEC_CAP_HYBRID (1 << 19)
2690
2691#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20)
2692
2693#define AV_CODEC_CAP_ENCODER_FLUSH (1 << 21)
2694
2695#define AV_CODEC_CAP_ENCODER_RECON_FRAME (1 << 22)
2696
2697typedef struct AVProfile {
2698 int profile;
2699 const char *name;
2701
2702typedef struct AVCodec {
2703
2704 const char *name;
2705
2706 const char *long_name;
2707 enum AVMediaType type;
2708 enum AVCodecID id;
2709
2710 int capabilities;
2711 uint8_t max_lowres;
2713 const enum AVPixelFormat *pix_fmts;
2714 const int *supported_samplerates;
2715 const enum AVSampleFormat *sample_fmts;
2716
2718 const uint64_t *channel_layouts;
2719 const AVClass *priv_class;
2720 const AVProfile *profiles;
2721
2722 const char *wrapper_name;
2723
2726
2727const AVCodec *av_codec_iterate(void **opaque);
2728
2730
2732
2734
2736
2738
2740
2741const char *av_get_profile_name(const AVCodec *codec, int profile);
2742
2743enum {
2744
2746
2748
2750
2752};
2753
2754typedef struct AVCodecHWConfig {
2755
2757
2758 int methods;
2759
2762
2763const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index);
2764
2765#define AVCODEC_CODEC_DESC_H
2766
2767typedef struct AVCodecDescriptor {
2768 enum AVCodecID id;
2769 enum AVMediaType type;
2770
2771 const char *name;
2772
2773 const char *long_name;
2774
2775 int props;
2776
2777 const char *const *mime_types;
2778
2779 const struct AVProfile *profiles;
2781
2782#define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
2783
2784#define AV_CODEC_PROP_LOSSY (1 << 1)
2785
2786#define AV_CODEC_PROP_LOSSLESS (1 << 2)
2787
2788#define AV_CODEC_PROP_REORDER (1 << 3)
2789
2790#define AV_CODEC_PROP_BITMAP_SUB (1 << 16)
2791
2792#define AV_CODEC_PROP_TEXT_SUB (1 << 17)
2793
2795
2797
2799
2800#define AVCODEC_CODEC_PAR_H
2801
2809};
2810
2811typedef struct AVCodecParameters {
2812
2814
2815 enum AVCodecID codec_id;
2816
2817 uint32_t codec_tag;
2818
2819 uint8_t *extradata;
2820
2821 int extradata_size;
2822
2823 int format;
2824
2825 int64_t bit_rate;
2826
2828
2830
2831 int profile;
2832 int level;
2833
2834 int width;
2835 int height;
2836
2838
2840
2846
2847 int video_delay;
2848
2851
2854
2855 int sample_rate;
2856
2857 int block_align;
2858
2859 int frame_size;
2860
2861 int initial_padding;
2862
2863 int trailing_padding;
2864
2865 int seek_preroll;
2866
2869
2871
2873
2875
2877
2878#define AVCODEC_DEFS_H
2879
2880#define AV_INPUT_BUFFER_PADDING_SIZE 64
2881
2882#define AV_EF_CRCCHECK (1<<0)
2883#define AV_EF_BITSTREAM (1<<1)
2884#define AV_EF_BUFFER (1<<2)
2885#define AV_EF_EXPLODE (1<<3)
2886
2887#define AV_EF_IGNORE_ERR (1<<15)
2888#define AV_EF_CAREFUL (1<<16)
2889#define AV_EF_COMPLIANT (1<<17)
2890#define AV_EF_AGGRESSIVE (1<<18)
2891
2892#define FF_COMPLIANCE_VERY_STRICT 2
2893#define FF_COMPLIANCE_STRICT 1
2894#define FF_COMPLIANCE_NORMAL 0
2895#define FF_COMPLIANCE_UNOFFICIAL -1
2896#define FF_COMPLIANCE_EXPERIMENTAL -2
2897
2899
2907};
2908
2920};
2921
2922typedef struct AVPanScan {
2923
2924 int id;
2925
2926 int width;
2927 int height;
2928
2929 int16_t position[3][2];
2931
2932typedef struct AVCPBProperties {
2933
2934 int64_t max_bitrate;
2935
2936 int64_t min_bitrate;
2937
2938 int64_t avg_bitrate;
2939
2940 int64_t buffer_size;
2941
2942 uint64_t vbv_delay;
2944
2946
2947typedef struct AVProducerReferenceTime {
2948
2949 int64_t wallclock;
2950 int flags;
2952
2953unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
2954
2955#define AVCODEC_PACKET_H
2956
2958
2960
2962
2964
2966
2968
2970
2972
2974
2976
2978
2980
2982
2984
2986
2988
2990
2992
2994
2996
2998
3000
3002
3004
3006
3008
3010
3012
3014
3016
3018
3020
3022
3025
3026#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS
3027
3028typedef struct AVPacketSideData {
3029 uint8_t *data;
3030 size_t size;
3033
3034typedef struct AVPacket {
3035
3037
3038 int64_t pts;
3039
3040 int64_t dts;
3041 uint8_t *data;
3042 int size;
3043 int stream_index;
3044
3045 int flags;
3046
3048 int side_data_elems;
3049
3050 int64_t duration;
3051
3052 int64_t pos;
3053
3054 void *opaque;
3055
3057
3060
3062typedef struct AVPacketList {
3063 AVPacket pkt;
3064 struct AVPacketList *next;
3066
3067#define AV_PKT_FLAG_KEY 0x0001
3068#define AV_PKT_FLAG_CORRUPT 0x0002
3069
3070#define AV_PKT_FLAG_DISCARD 0x0004
3071
3072#define AV_PKT_FLAG_TRUSTED 0x0008
3073
3074#define AV_PKT_FLAG_DISPOSABLE 0x0010
3075
3077
3082};
3083
3085
3087
3089
3092
3094
3096
3097int av_grow_packet(AVPacket *pkt, int grow_by);
3098
3099int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);
3100
3102 size_t size);
3103
3105 uint8_t *data, size_t size);
3106
3108 size_t size);
3109
3111 size_t *size);
3112
3114
3116
3117int av_packet_unpack_dictionary(const uint8_t *data, size_t size,
3118 AVDictionary **dict);
3119
3121
3122int av_packet_ref(AVPacket *dst, const AVPacket *src);
3123
3125
3127
3129
3131
3133
3135
3136#define AVCODEC_VERSION_H
3137
3138#define LIBAVCODEC_VERSION_MINOR 3
3139#define LIBAVCODEC_VERSION_MICRO 100
3140
3141#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
3142 LIBAVCODEC_VERSION_MINOR, \
3143 LIBAVCODEC_VERSION_MICRO)
3144#define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
3145 LIBAVCODEC_VERSION_MINOR, \
3146 LIBAVCODEC_VERSION_MICRO)
3147#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
3148
3149#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
3150
3151#define AV_INPUT_BUFFER_MIN_SIZE 16384
3152
3153typedef struct RcOverride{
3154 int start_frame;
3155 int end_frame;
3156 int qscale;
3157 float quality_factor;
3159
3160#define AV_CODEC_FLAG_UNALIGNED (1 << 0)
3161
3162#define AV_CODEC_FLAG_QSCALE (1 << 1)
3163
3164#define AV_CODEC_FLAG_4MV (1 << 2)
3165
3166#define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3)
3167
3168#define AV_CODEC_FLAG_QPEL (1 << 4)
3169
3170#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
3171
3172#define AV_CODEC_FLAG_RECON_FRAME (1 << 6)
3173
3174#define AV_CODEC_FLAG_COPY_OPAQUE (1 << 7)
3175
3176#define AV_CODEC_FLAG_FRAME_DURATION (1 << 8)
3177
3178#define AV_CODEC_FLAG_PASS1 (1 << 9)
3179
3180#define AV_CODEC_FLAG_PASS2 (1 << 10)
3181
3182#define AV_CODEC_FLAG_LOOP_FILTER (1 << 11)
3183
3184#define AV_CODEC_FLAG_GRAY (1 << 13)
3185
3186#define AV_CODEC_FLAG_PSNR (1 << 15)
3187
3188#define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18)
3189
3190#define AV_CODEC_FLAG_LOW_DELAY (1 << 19)
3191
3192#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
3193
3194#define AV_CODEC_FLAG_BITEXACT (1 << 23)
3195
3196#define AV_CODEC_FLAG_AC_PRED (1 << 24)
3197
3198#define AV_CODEC_FLAG_INTERLACED_ME (1 << 29)
3199#define AV_CODEC_FLAG_CLOSED_GOP (1U << 31)
3200
3201#define AV_CODEC_FLAG2_FAST (1 << 0)
3202
3203#define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2)
3204
3205#define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
3206
3207#define AV_CODEC_FLAG2_CHUNKS (1 << 15)
3208
3209#define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
3210
3211#define AV_CODEC_FLAG2_SHOW_ALL (1 << 22)
3212
3213#define AV_CODEC_FLAG2_EXPORT_MVS (1 << 28)
3214
3215#define AV_CODEC_FLAG2_SKIP_MANUAL (1 << 29)
3216
3217#define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30)
3218
3219#define AV_CODEC_FLAG2_ICC_PROFILES (1U << 31)
3220
3221#define AV_CODEC_EXPORT_DATA_MVS (1 << 0)
3222
3223#define AV_CODEC_EXPORT_DATA_PRFT (1 << 1)
3224
3225#define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2)
3226
3227#define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3)
3228
3229#define AV_GET_BUFFER_FLAG_REF (1 << 0)
3230
3231#define AV_GET_ENCODE_BUFFER_FLAG_REF (1 << 0)
3232
3233struct AVCodecInternal;
3234
3235typedef struct AVCodecContext {
3236
3237 const AVClass *av_class;
3238 int log_level_offset;
3239
3240 enum AVMediaType codec_type;
3241 const struct AVCodec *codec;
3242 enum AVCodecID codec_id;
3243
3244 unsigned int codec_tag;
3245
3246 void *priv_data;
3247
3248 struct AVCodecInternal *internal;
3249
3250 void *opaque;
3251
3252 int64_t bit_rate;
3253
3255
3256 int global_quality;
3257
3259#define FF_COMPRESSION_DEFAULT -1
3260
3261 int flags;
3262
3263 int flags2;
3264
3265 uint8_t *extradata;
3266 int extradata_size;
3267
3269
3270 int ticks_per_frame;
3271
3272 int delay;
3273
3274 int width, height;
3275
3277
3278 int gop_size;
3279
3281
3282 void (*draw_horiz_band)(struct AVCodecContext *s,
3283 const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
3284 int y, int type, int height);
3285
3286 enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
3287
3288 int max_b_frames;
3289
3290 float b_quant_factor;
3291
3292 float b_quant_offset;
3293
3294 int has_b_frames;
3295
3296 float i_quant_factor;
3297
3298 float i_quant_offset;
3299
3300 float lumi_masking;
3301
3303
3305
3306 float p_masking;
3307
3308 float dark_masking;
3309
3310 int slice_count;
3311
3312 int *slice_offset;
3313
3315
3316 int me_cmp;
3317
3318 int me_sub_cmp;
3319
3320 int mb_cmp;
3321
3322 int ildct_cmp;
3323#define FF_CMP_SAD 0
3324#define FF_CMP_SSE 1
3325#define FF_CMP_SATD 2
3326#define FF_CMP_DCT 3
3327#define FF_CMP_PSNR 4
3328#define FF_CMP_BIT 5
3329#define FF_CMP_RD 6
3330#define FF_CMP_ZERO 7
3331#define FF_CMP_VSAD 8
3332#define FF_CMP_VSSE 9
3333#define FF_CMP_NSSE 10
3334#define FF_CMP_W53 11
3335#define FF_CMP_W97 12
3336#define FF_CMP_DCTMAX 13
3337#define FF_CMP_DCT264 14
3338#define FF_CMP_MEDIAN_SAD 15
3339#define FF_CMP_CHROMA 256
3340
3341 int dia_size;
3342
3344
3345 int me_pre_cmp;
3346
3347 int pre_dia_size;
3348
3350
3351 int me_range;
3352
3353 int slice_flags;
3354#define SLICE_FLAG_CODED_ORDER 0x0001
3355#define SLICE_FLAG_ALLOW_FIELD 0x0002
3356#define SLICE_FLAG_ALLOW_PLANE 0x0004
3357
3358 int mb_decision;
3359#define FF_MB_DECISION_SIMPLE 0
3360#define FF_MB_DECISION_BITS 1
3361#define FF_MB_DECISION_RD 2
3362
3363 uint16_t *intra_matrix;
3364
3365 uint16_t *inter_matrix;
3366
3368
3369 int skip_top;
3370
3371 int skip_bottom;
3372
3373 int mb_lmin;
3374
3375 int mb_lmax;
3376
3377 int bidir_refine;
3378
3379 int keyint_min;
3380
3381 int refs;
3382
3383 int mv0_threshold;
3384
3386
3388
3390
3392
3394
3395 int slices;
3396
3398
3399 int sample_rate;
3400
3403
3405
3406 int frame_size;
3407
3410
3411 int block_align;
3412
3413 int cutoff;
3414
3417
3420
3422
3424
3425 int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
3426
3427 float qcompress;
3428 float qblur;
3429
3430 int qmin;
3431
3432 int qmax;
3433
3434 int max_qdiff;
3435
3436 int rc_buffer_size;
3437
3440
3441 int64_t rc_max_rate;
3442
3443 int64_t rc_min_rate;
3444
3446
3448
3450
3451 int trellis;
3452
3453 char *stats_out;
3454
3455 char *stats_in;
3456
3457 int workaround_bugs;
3458#define FF_BUG_AUTODETECT 1
3459#define FF_BUG_XVID_ILACE 4
3460#define FF_BUG_UMP4 8
3461#define FF_BUG_NO_PADDING 16
3462#define FF_BUG_AMV 32
3463#define FF_BUG_QPEL_CHROMA 64
3464#define FF_BUG_STD_QPEL 128
3465#define FF_BUG_QPEL_CHROMA2 256
3466#define FF_BUG_DIRECT_BLOCKSIZE 512
3467#define FF_BUG_EDGE 1024
3468#define FF_BUG_HPEL_CHROMA 2048
3469#define FF_BUG_DC_CLIP 4096
3470#define FF_BUG_MS 8192
3471#define FF_BUG_TRUNCATED 16384
3472#define FF_BUG_IEDGE 32768
3473
3475
3477#define FF_EC_GUESS_MVS 1
3478#define FF_EC_DEBLOCK 2
3479#define FF_EC_FAVOR_INTER 256
3480
3481 int debug;
3482#define FF_DEBUG_PICT_INFO 1
3483#define FF_DEBUG_RC 2
3484#define FF_DEBUG_BITSTREAM 4
3485#define FF_DEBUG_MB_TYPE 8
3486#define FF_DEBUG_QP 16
3487#define FF_DEBUG_DCT_COEFF 0x00000040
3488#define FF_DEBUG_SKIP 0x00000080
3489#define FF_DEBUG_STARTCODE 0x00000100
3490#define FF_DEBUG_ER 0x00000400
3491#define FF_DEBUG_MMCO 0x00000800
3492#define FF_DEBUG_BUGS 0x00001000
3493#define FF_DEBUG_BUFFERS 0x00008000
3494#define FF_DEBUG_THREADS 0x00010000
3495#define FF_DEBUG_GREEN_MD 0x00800000
3496#define FF_DEBUG_NOMC 0x01000000
3497
3498 int err_recognition;
3499
3502
3503 const struct AVHWAccel *hwaccel;
3504
3505 void *hwaccel_context;
3506
3507 uint64_t error[AV_NUM_DATA_POINTERS];
3508
3509 int dct_algo;
3510#define FF_DCT_AUTO 0
3511#define FF_DCT_FASTINT 1
3512#define FF_DCT_INT 2
3513#define FF_DCT_MMX 3
3514#define FF_DCT_ALTIVEC 5
3515#define FF_DCT_FAAN 6
3516
3517 int idct_algo;
3518#define FF_IDCT_AUTO 0
3519#define FF_IDCT_INT 1
3520#define FF_IDCT_SIMPLE 2
3521#define FF_IDCT_SIMPLEMMX 3
3522#define FF_IDCT_ARM 7
3523#define FF_IDCT_ALTIVEC 8
3524#define FF_IDCT_SIMPLEARM 10
3525#define FF_IDCT_XVID 14
3526#define FF_IDCT_SIMPLEARMV5TE 16
3527#define FF_IDCT_SIMPLEARMV6 17
3528#define FF_IDCT_FAAN 20
3529#define FF_IDCT_SIMPLENEON 22
3530
3531#define FF_IDCT_NONE 24
3532#define FF_IDCT_SIMPLEAUTO 128
3533
3535
3537
3538 int lowres;
3539
3540 int thread_count;
3541
3542 int thread_type;
3543#define FF_THREAD_FRAME 1
3544#define FF_THREAD_SLICE 2
3545
3547
3548 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
3549
3550 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
3551
3552 int nsse_weight;
3553
3554 int profile;
3555#define FF_PROFILE_UNKNOWN -99
3556#define FF_PROFILE_RESERVED -100
3557
3558#define FF_PROFILE_AAC_MAIN 0
3559#define FF_PROFILE_AAC_LOW 1
3560#define FF_PROFILE_AAC_SSR 2
3561#define FF_PROFILE_AAC_LTP 3
3562#define FF_PROFILE_AAC_HE 4
3563#define FF_PROFILE_AAC_HE_V2 28
3564#define FF_PROFILE_AAC_LD 22
3565#define FF_PROFILE_AAC_ELD 38
3566#define FF_PROFILE_MPEG2_AAC_LOW 128
3567#define FF_PROFILE_MPEG2_AAC_HE 131
3568
3569#define FF_PROFILE_DNXHD 0
3570#define FF_PROFILE_DNXHR_LB 1
3571#define FF_PROFILE_DNXHR_SQ 2
3572#define FF_PROFILE_DNXHR_HQ 3
3573#define FF_PROFILE_DNXHR_HQX 4
3574#define FF_PROFILE_DNXHR_444 5
3575
3576#define FF_PROFILE_DTS 20
3577#define FF_PROFILE_DTS_ES 30
3578#define FF_PROFILE_DTS_96_24 40
3579#define FF_PROFILE_DTS_HD_HRA 50
3580#define FF_PROFILE_DTS_HD_MA 60
3581#define FF_PROFILE_DTS_EXPRESS 70
3582
3583#define FF_PROFILE_MPEG2_422 0
3584#define FF_PROFILE_MPEG2_HIGH 1
3585#define FF_PROFILE_MPEG2_SS 2
3586#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
3587#define FF_PROFILE_MPEG2_MAIN 4
3588#define FF_PROFILE_MPEG2_SIMPLE 5
3589
3590#define FF_PROFILE_H264_CONSTRAINED (1<<9)
3591#define FF_PROFILE_H264_INTRA (1<<11)
3592
3593#define FF_PROFILE_H264_BASELINE 66
3594#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
3595#define FF_PROFILE_H264_MAIN 77
3596#define FF_PROFILE_H264_EXTENDED 88
3597#define FF_PROFILE_H264_HIGH 100
3598#define FF_PROFILE_H264_HIGH_10 110
3599#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
3600#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
3601#define FF_PROFILE_H264_HIGH_422 122
3602#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
3603#define FF_PROFILE_H264_STEREO_HIGH 128
3604#define FF_PROFILE_H264_HIGH_444 144
3605#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
3606#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
3607#define FF_PROFILE_H264_CAVLC_444 44
3608
3609#define FF_PROFILE_VC1_SIMPLE 0
3610#define FF_PROFILE_VC1_MAIN 1
3611#define FF_PROFILE_VC1_COMPLEX 2
3612#define FF_PROFILE_VC1_ADVANCED 3
3613
3614#define FF_PROFILE_MPEG4_SIMPLE 0
3615#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
3616#define FF_PROFILE_MPEG4_CORE 2
3617#define FF_PROFILE_MPEG4_MAIN 3
3618#define FF_PROFILE_MPEG4_N_BIT 4
3619#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
3620#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
3621#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
3622#define FF_PROFILE_MPEG4_HYBRID 8
3623#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
3624#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
3625#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
3626#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
3627#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
3628#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
3629#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
3630
3631#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
3632#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
3633#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
3634#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
3635#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
3636
3637#define FF_PROFILE_VP9_0 0
3638#define FF_PROFILE_VP9_1 1
3639#define FF_PROFILE_VP9_2 2
3640#define FF_PROFILE_VP9_3 3
3641
3642#define FF_PROFILE_HEVC_MAIN 1
3643#define FF_PROFILE_HEVC_MAIN_10 2
3644#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
3645#define FF_PROFILE_HEVC_REXT 4
3646
3647#define FF_PROFILE_VVC_MAIN_10 1
3648#define FF_PROFILE_VVC_MAIN_10_444 33
3649
3650#define FF_PROFILE_AV1_MAIN 0
3651#define FF_PROFILE_AV1_HIGH 1
3652#define FF_PROFILE_AV1_PROFESSIONAL 2
3653
3654#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
3655#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
3656#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
3657#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
3658#define FF_PROFILE_MJPEG_JPEG_LS 0xf7
3659
3660#define FF_PROFILE_SBC_MSBC 1
3661
3662#define FF_PROFILE_PRORES_PROXY 0
3663#define FF_PROFILE_PRORES_LT 1
3664#define FF_PROFILE_PRORES_STANDARD 2
3665#define FF_PROFILE_PRORES_HQ 3
3666#define FF_PROFILE_PRORES_4444 4
3667#define FF_PROFILE_PRORES_XQ 5
3668
3669#define FF_PROFILE_ARIB_PROFILE_A 0
3670#define FF_PROFILE_ARIB_PROFILE_C 1
3671
3672#define FF_PROFILE_KLVA_SYNC 0
3673#define FF_PROFILE_KLVA_ASYNC 1
3674
3675 int level;
3676#define FF_LEVEL_UNKNOWN -99
3677
3679
3680 enum AVDiscard skip_idct;
3681
3682 enum AVDiscard skip_frame;
3683
3684 uint8_t *subtitle_header;
3686
3687 int initial_padding;
3688
3690
3692
3694
3696
3699 int64_t pts_correction_last_pts;
3700 int64_t pts_correction_last_dts;
3701
3702 char *sub_charenc;
3703
3704 int sub_charenc_mode;
3705#define FF_SUB_CHARENC_MODE_DO_NOTHING -1
3706#define FF_SUB_CHARENC_MODE_AUTOMATIC 0
3707#define FF_SUB_CHARENC_MODE_PRE_DECODER 1
3708#define FF_SUB_CHARENC_MODE_IGNORE 2
3709
3710 int skip_alpha;
3711
3712 int seek_preroll;
3713
3714 uint16_t *chroma_intra_matrix;
3715
3716 uint8_t *dump_separator;
3717
3718 char *codec_whitelist;
3719
3720 unsigned properties;
3721#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
3722#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
3723#define FF_CODEC_PROPERTY_FILM_GRAIN 0x00000004
3724
3727
3729
3730 int trailing_padding;
3731
3732 int64_t max_pixels;
3733
3735
3736 int hwaccel_flags;
3737
3738 int apply_cropping;
3739
3740 int extra_hw_frames;
3741
3743
3744 int64_t max_samples;
3745
3746 int export_side_data;
3747
3748 int (*get_encode_buffer)(struct AVCodecContext *s, AVPacket *pkt, int flags);
3749
3751
3752 int64_t frame_num;
3754
3755typedef struct AVHWAccel {
3756
3757 const char *name;
3758
3759 enum AVMediaType type;
3760
3761 enum AVCodecID id;
3762
3764
3765 int capabilities;
3766
3767 int (*alloc_frame)(AVCodecContext *avctx, AVFrame *frame);
3768
3769 int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3770
3771 int (*decode_params)(AVCodecContext *avctx, int type, const uint8_t *buf, uint32_t buf_size);
3772
3773 int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3774
3775 int (*end_frame)(AVCodecContext *avctx);
3776
3778
3779 int (*init)(AVCodecContext *avctx);
3780
3781 int (*uninit)(AVCodecContext *avctx);
3782
3783 int priv_data_size;
3784
3785 int caps_internal;
3786
3787 int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx);
3789
3790#define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL 0x0200
3791
3792#define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0)
3793
3794#define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1)
3795
3796#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2)
3797
3798#define AV_HWACCEL_FLAG_UNSAFE_OUTPUT (1 << 3)
3799
3802
3804
3806
3808};
3809
3810#define AV_SUBTITLE_FLAG_FORCED 0x00000001
3811
3812typedef struct AVSubtitleRect {
3813 int x;
3814 int y;
3815 int w;
3816 int h;
3817 int nb_colors;
3818
3819 uint8_t *data[4];
3820 int linesize[4];
3821
3822 enum AVSubtitleType type;
3823
3824 char *text;
3825
3826 char *ass;
3827
3828 int flags;
3830
3831typedef struct AVSubtitle {
3832 uint16_t format;
3833 uint32_t start_display_time;
3834 uint32_t end_display_time;
3835 unsigned num_rects;
3837 int64_t pts;
3839
3840unsigned avcodec_version(void);
3841
3842const char *avcodec_configuration(void);
3843
3844const char *avcodec_license(void);
3845
3847
3849
3851
3853
3855 const AVCodecContext *codec);
3856
3858 const AVCodecParameters *par);
3859
3860int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
3861
3863
3865
3867
3869
3870void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
3871
3872void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
3873 int linesize_align[AV_NUM_DATA_POINTERS]);
3874
3876int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
3877
3880
3882 int *got_sub_ptr, const AVPacket *avpkt);
3883
3885
3887
3889
3891
3893 AVBufferRef *device_ref,
3894 enum AVPixelFormat hw_pix_fmt,
3895 AVBufferRef **out_frames_ref);
3896
3902};
3903
3904typedef struct AVCodecParserContext {
3905 void *priv_data;
3906 const struct AVCodecParser *parser;
3907 int64_t frame_offset;
3908 int64_t cur_offset;
3909
3910 int64_t next_frame_offset;
3911
3912 int pict_type;
3913
3914 int repeat_pict;
3915 int64_t pts;
3916 int64_t dts;
3917
3918 int64_t last_pts;
3919 int64_t last_dts;
3920 int fetch_timestamp;
3921
3922#define AV_PARSER_PTS_NB 4
3927
3928 int flags;
3929#define PARSER_FLAG_COMPLETE_FRAMES 0x0001
3930#define PARSER_FLAG_ONCE 0x0002
3931
3932#define PARSER_FLAG_FETCHED_OFFSET 0x0004
3933#define PARSER_FLAG_USE_CODEC_TS 0x1000
3934
3935 int64_t offset;
3937
3938 int key_frame;
3939
3940 int dts_sync_point;
3941
3943
3944 int pts_dts_delta;
3945
3947
3948 int64_t pos;
3949
3950 int64_t last_pos;
3951
3952 int duration;
3953
3955
3957
3959
3960 int width;
3961 int height;
3962
3963 int coded_width;
3964 int coded_height;
3965
3966 int format;
3968
3969typedef struct AVCodecParser {
3970 int codec_ids[7];
3971 int priv_data_size;
3973
3975 AVCodecContext *avctx,
3976 const uint8_t **poutbuf, int *poutbuf_size,
3977 const uint8_t *buf, int buf_size);
3979 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
3981
3982const AVCodecParser *av_parser_iterate(void **opaque);
3983
3985
3987 AVCodecContext *avctx,
3988 uint8_t **poutbuf, int *poutbuf_size,
3989 const uint8_t *buf, int buf_size,
3990 int64_t pts, int64_t dts,
3991 int64_t pos);
3992
3994
3995int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
3996 const AVSubtitle *sub);
3997
3999
4001 enum AVPixelFormat src_pix_fmt,
4002 int has_alpha, int *loss_ptr);
4003
4005
4006void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
4007
4008int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
4009int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
4010
4011int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
4012 enum AVSampleFormat sample_fmt, const uint8_t *buf,
4013 int buf_size, int align);
4014
4016
4017int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);
4018
4019void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
4020
4021void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
4022
4024
4025#define AVFORMAT_AVFORMAT_H
4026
4027#define AVFORMAT_AVIO_H
4028
4029#define AVFORMAT_VERSION_MAJOR_H
4030
4031#define LIBAVFORMAT_VERSION_MAJOR 60
4032
4033#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 61)
4034#define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 61)
4035#define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 61)
4036#define FF_API_AVFORMAT_IO_CLOSE (LIBAVFORMAT_VERSION_MAJOR < 61)
4037
4038#define FF_API_R_FRAME_RATE 1
4039
4040#define AVIO_SEEKABLE_NORMAL (1 << 0)
4041
4042#define AVIO_SEEKABLE_TIME (1 << 1)
4043
4044typedef struct AVIOInterruptCB {
4045 int (*callback)(void*);
4046 void *opaque;
4048
4061};
4062
4063typedef struct AVIODirEntry {
4064 char *name;
4065 int type;
4066 int utf8;
4067
4068 int64_t size;
4069 int64_t modification_timestamp;
4070
4071 int64_t access_timestamp;
4072
4073 int64_t status_change_timestamp;
4074
4075 int64_t user_id;
4076 int64_t group_id;
4077 int64_t filemode;
4079
4080typedef struct AVIODirContext {
4081 struct URLContext *url_context;
4083
4085
4087
4089
4091
4093
4095
4097};
4098
4099typedef struct AVIOContext {
4100
4101 const AVClass *av_class;
4102
4103 unsigned char *buffer;
4104 int buffer_size;
4105 unsigned char *buf_ptr;
4106 unsigned char *buf_end;
4107
4108 void *opaque;
4109
4110 int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);
4111 int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
4112 int64_t (*seek)(void *opaque, int64_t offset, int whence);
4113 int64_t pos;
4114 int eof_reached;
4115 int error;
4116 int write_flag;
4117 int max_packet_size;
4118 int min_packet_size;
4119
4120 unsigned long checksum;
4121 unsigned char *checksum_ptr;
4122 unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
4123
4124 int (*read_pause)(void *opaque, int pause);
4125
4126 int64_t (*read_seek)(void *opaque, int stream_index,
4127 int64_t timestamp, int flags);
4128
4129 int seekable;
4130
4131 int direct;
4132
4133 const char *protocol_whitelist;
4134
4135 const char *protocol_blacklist;
4136
4137 int (*write_data_type)(void *opaque, uint8_t *buf, int buf_size,
4138 enum AVIODataMarkerType type, int64_t time);
4139
4141
4142 unsigned char *buf_ptr_max;
4143
4144 int64_t bytes_read;
4145
4146 int64_t bytes_written;
4148
4149const char *avio_find_protocol_name(const char *url);
4150
4151int avio_check(const char *url, int flags);
4152
4153int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options);
4154
4156
4158
4160
4162 unsigned char *buffer,
4163 int buffer_size,
4164 int write_flag,
4165 void *opaque,
4166 int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
4167 int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
4168 int64_t (*seek)(void *opaque, int64_t offset, int whence));
4169
4171
4172void avio_w8(AVIOContext *s, int b);
4173void avio_write(AVIOContext *s, const unsigned char *buf, int size);
4174void avio_wl64(AVIOContext *s, uint64_t val);
4175void avio_wb64(AVIOContext *s, uint64_t val);
4176void avio_wl32(AVIOContext *s, unsigned int val);
4177void avio_wb32(AVIOContext *s, unsigned int val);
4178void avio_wl24(AVIOContext *s, unsigned int val);
4179void avio_wb24(AVIOContext *s, unsigned int val);
4180void avio_wl16(AVIOContext *s, unsigned int val);
4181void avio_wb16(AVIOContext *s, unsigned int val);
4182
4183int avio_put_str(AVIOContext *s, const char *str);
4184
4185int avio_put_str16le(AVIOContext *s, const char *str);
4186
4187int avio_put_str16be(AVIOContext *s, const char *str);
4188
4189void avio_write_marker(AVIOContext *s, int64_t time, enum AVIODataMarkerType type);
4190
4191#define AVSEEK_SIZE 0x10000
4192
4193#define AVSEEK_FORCE 0x20000
4194
4195int64_t avio_seek(AVIOContext *s, int64_t offset, int whence);
4196
4197int64_t avio_skip(AVIOContext *s, int64_t offset);
4198
4200{
4201 return avio_seek(s, 0, SEEK_CUR);
4202}
4203
4205
4207
4208int avio_vprintf(AVIOContext *s, const char *fmt, va_list ap);
4209
4210int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
4211
4212void avio_print_string_array(AVIOContext *s, const char *strings[]);
4213
4214#define avio_print(s, ...) \
4215 avio_print_string_array(s, (const char*[]){__VA_ARGS__, NULL})
4216
4218
4219int avio_read(AVIOContext *s, unsigned char *buf, int size);
4220
4221int avio_read_partial(AVIOContext *s, unsigned char *buf, int size);
4222
4224unsigned int avio_rl16(AVIOContext *s);
4225unsigned int avio_rl24(AVIOContext *s);
4226unsigned int avio_rl32(AVIOContext *s);
4228unsigned int avio_rb16(AVIOContext *s);
4229unsigned int avio_rb24(AVIOContext *s);
4230unsigned int avio_rb32(AVIOContext *s);
4232
4233int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen);
4234
4235int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen);
4236int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen);
4237
4238#define AVIO_FLAG_READ 1
4239#define AVIO_FLAG_WRITE 2
4240#define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE)
4241
4242#define AVIO_FLAG_NONBLOCK 8
4243
4244#define AVIO_FLAG_DIRECT 0x8000
4245
4246int avio_open(AVIOContext **s, const char *url, int flags);
4247
4248int avio_open2(AVIOContext **s, const char *url, int flags,
4249 const AVIOInterruptCB *int_cb, AVDictionary **options);
4250
4252
4254
4256
4257int avio_get_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
4258
4259int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
4260
4261const char *avio_enum_protocols(void **opaque, int output);
4262
4264
4265int avio_pause(AVIOContext *h, int pause);
4266
4267int64_t avio_seek_time(AVIOContext *h, int stream_index,
4268 int64_t timestamp, int flags);
4269
4270struct AVBPrint;
4271
4272int avio_read_to_bprint(AVIOContext *h, struct AVBPrint *pb, size_t max_size);
4273
4275
4277
4278#define AVFORMAT_VERSION_H
4279
4280#define LIBAVFORMAT_VERSION_MINOR 3
4281#define LIBAVFORMAT_VERSION_MICRO 100
4282
4283#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
4284 LIBAVFORMAT_VERSION_MINOR, \
4285 LIBAVFORMAT_VERSION_MICRO)
4286#define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \
4287 LIBAVFORMAT_VERSION_MINOR, \
4288 LIBAVFORMAT_VERSION_MICRO)
4289#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
4290
4291#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
4292
4293struct AVFormatContext;
4294
4295struct AVDeviceInfoList;
4296
4298
4300
4301struct AVCodecTag;
4302
4303typedef struct AVProbeData {
4304 const char *filename;
4305 unsigned char *buf;
4306 int buf_size;
4307 const char *mime_type;
4309
4310#define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4)
4311#define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1)
4312
4313#define AVPROBE_SCORE_EXTENSION 50
4314#define AVPROBE_SCORE_MIME 75
4315#define AVPROBE_SCORE_MAX 100
4316
4317#define AVPROBE_PADDING_SIZE 32
4318
4319#define AVFMT_NOFILE 0x0001
4320#define AVFMT_NEEDNUMBER 0x0002
4321
4322#define AVFMT_EXPERIMENTAL 0x0004
4323#define AVFMT_SHOW_IDS 0x0008
4324#define AVFMT_GLOBALHEADER 0x0040
4325#define AVFMT_NOTIMESTAMPS 0x0080
4326#define AVFMT_GENERIC_INDEX 0x0100
4327#define AVFMT_TS_DISCONT 0x0200
4328#define AVFMT_VARIABLE_FPS 0x0400
4329#define AVFMT_NODIMENSIONS 0x0800
4330#define AVFMT_NOSTREAMS 0x1000
4331#define AVFMT_NOBINSEARCH 0x2000
4332#define AVFMT_NOGENSEARCH 0x4000
4333#define AVFMT_NO_BYTE_SEEK 0x8000
4334#define AVFMT_ALLOW_FLUSH 0x10000
4335#define AVFMT_TS_NONSTRICT 0x20000
4336
4337#define AVFMT_TS_NEGATIVE 0x40000
4338
4339#define AVFMT_SEEK_TO_PTS 0x4000000
4340
4341typedef struct AVOutputFormat {
4342 const char *name;
4343
4344 const char *long_name;
4345 const char *mime_type;
4346 const char *extensions;
4347
4348 enum AVCodecID audio_codec;
4349 enum AVCodecID video_codec;
4351
4352 int flags;
4353
4354 const struct AVCodecTag * const *codec_tag;
4355
4356 const AVClass *priv_class;
4358
4359typedef struct AVInputFormat {
4360
4361 const char *name;
4362
4363 const char *long_name;
4364
4365 int flags;
4366
4367 const char *extensions;
4368
4369 const struct AVCodecTag * const *codec_tag;
4370
4371 const AVClass *priv_class;
4372
4373 const char *mime_type;
4374
4375 int raw_codec_id;
4376
4377 int priv_data_size;
4378
4379 int flags_internal;
4380
4381 int (*read_probe)(const AVProbeData *);
4382
4383 int (*read_header)(struct AVFormatContext *);
4384
4385 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
4386
4387 int (*read_close)(struct AVFormatContext *);
4388
4389 int (*read_seek)(struct AVFormatContext *,
4390 int stream_index, int64_t timestamp, int flags);
4391
4392 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
4393 int64_t *pos, int64_t pos_limit);
4394
4395 int (*read_play)(struct AVFormatContext *);
4396
4397 int (*read_pause)(struct AVFormatContext *);
4398
4399 int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
4400
4401 int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
4402
4404
4412
4413};
4414
4415typedef struct AVIndexEntry {
4416 int64_t pos;
4417 int64_t timestamp;
4418
4419#define AVINDEX_KEYFRAME 0x0001
4420#define AVINDEX_DISCARD_FRAME 0x0002
4421
4422 int flags:2;
4423 int size:30;
4424 int min_distance;
4426
4427#define AV_DISPOSITION_DEFAULT (1 << 0)
4428
4429#define AV_DISPOSITION_DUB (1 << 1)
4430
4431#define AV_DISPOSITION_ORIGINAL (1 << 2)
4432
4433#define AV_DISPOSITION_COMMENT (1 << 3)
4434
4435#define AV_DISPOSITION_LYRICS (1 << 4)
4436
4437#define AV_DISPOSITION_KARAOKE (1 << 5)
4438
4439#define AV_DISPOSITION_FORCED (1 << 6)
4440
4441#define AV_DISPOSITION_HEARING_IMPAIRED (1 << 7)
4442
4443#define AV_DISPOSITION_VISUAL_IMPAIRED (1 << 8)
4444
4445#define AV_DISPOSITION_CLEAN_EFFECTS (1 << 9)
4446
4447#define AV_DISPOSITION_ATTACHED_PIC (1 << 10)
4448
4449#define AV_DISPOSITION_TIMED_THUMBNAILS (1 << 11)
4450
4451#define AV_DISPOSITION_NON_DIEGETIC (1 << 12)
4452
4453#define AV_DISPOSITION_CAPTIONS (1 << 16)
4454
4455#define AV_DISPOSITION_DESCRIPTIONS (1 << 17)
4456
4457#define AV_DISPOSITION_METADATA (1 << 18)
4458
4459#define AV_DISPOSITION_DEPENDENT (1 << 19)
4460
4461#define AV_DISPOSITION_STILL_IMAGE (1 << 20)
4462
4463int av_disposition_from_string(const char *disp);
4464
4465const char *av_disposition_to_string(int disposition);
4466
4467#define AV_PTS_WRAP_IGNORE 0
4468#define AV_PTS_WRAP_ADD_OFFSET 1
4469#define AV_PTS_WRAP_SUB_OFFSET -1
4470
4471typedef struct AVStream {
4472
4474
4475 int index;
4476
4477 int id;
4478
4480
4481 void *priv_data;
4482
4484
4485 int64_t start_time;
4486
4487 int64_t duration;
4488
4489 int64_t nb_frames;
4490
4491 int disposition;
4492
4493 enum AVDiscard discard;
4494
4496
4498
4500
4502
4504
4505 int nb_side_data;
4506
4507 int event_flags;
4508
4509#define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001
4510
4511#define AVSTREAM_EVENT_FLAG_NEW_PACKETS (1 << 1)
4512
4514
4515 int pts_wrap_bits;
4517
4519
4522
4523#define AV_PROGRAM_RUNNING 1
4524
4525typedef struct AVProgram {
4526 int id;
4527 int flags;
4528 enum AVDiscard discard;
4529 unsigned int *stream_index;
4530 unsigned int nb_stream_indexes;
4532
4533 int program_num;
4534 int pmt_pid;
4535 int pcr_pid;
4536 int pmt_version;
4537
4538 int64_t start_time;
4539 int64_t end_time;
4540
4541 int64_t pts_wrap_reference;
4542 int pts_wrap_behavior;
4544
4545#define AVFMTCTX_NOHEADER 0x0001
4546
4547#define AVFMTCTX_UNSEEKABLE 0x0002
4548
4549typedef struct AVChapter {
4550 int64_t id;
4552 int64_t start, end;
4555
4556typedef int (*av_format_control_message)(struct AVFormatContext *s, int type,
4557 void *data, size_t data_size);
4558
4559typedef int (*AVOpenCallback)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags,
4560 const AVIOInterruptCB *int_cb, AVDictionary **options);
4561
4567
4568typedef struct AVFormatContext {
4569
4570 const AVClass *av_class;
4571
4572 const struct AVInputFormat *iformat;
4573
4574 const struct AVOutputFormat *oformat;
4575
4576 void *priv_data;
4577
4578 AVIOContext *pb;
4579
4580 int ctx_flags;
4581
4582 unsigned int nb_streams;
4583
4584 AVStream **streams;
4585
4586 char *url;
4587
4588 int64_t start_time;
4589
4590 int64_t duration;
4591
4592 int64_t bit_rate;
4593
4594 unsigned int packet_size;
4595 int max_delay;
4596
4597 int flags;
4598#define AVFMT_FLAG_GENPTS 0x0001
4599#define AVFMT_FLAG_IGNIDX 0x0002
4600#define AVFMT_FLAG_NONBLOCK 0x0004
4601#define AVFMT_FLAG_IGNDTS 0x0008
4602#define AVFMT_FLAG_NOFILLIN 0x0010
4603#define AVFMT_FLAG_NOPARSE 0x0020
4604#define AVFMT_FLAG_NOBUFFER 0x0040
4605#define AVFMT_FLAG_CUSTOM_IO 0x0080
4606#define AVFMT_FLAG_DISCARD_CORRUPT 0x0100
4607#define AVFMT_FLAG_FLUSH_PACKETS 0x0200
4608
4609#define AVFMT_FLAG_BITEXACT 0x0400
4610#define AVFMT_FLAG_SORT_DTS 0x10000
4611#define AVFMT_FLAG_FAST_SEEK 0x80000
4612#define AVFMT_FLAG_SHORTEST 0x100000
4613#define AVFMT_FLAG_AUTO_BSF 0x200000
4614
4615 int64_t probesize;
4616
4617 int64_t max_analyze_duration;
4618
4619 const uint8_t *key;
4620 int keylen;
4621
4622 unsigned int nb_programs;
4624
4626
4628
4630
4631 unsigned int max_index_size;
4632
4633 unsigned int max_picture_buffer;
4634
4635 unsigned int nb_chapters;
4637
4639
4640 int64_t start_time_realtime;
4641
4642 int fps_probe_size;
4643
4645
4647
4648 int debug;
4649#define FF_FDEBUG_TS 0x0001
4650
4651 int64_t max_interleave_delta;
4652
4654
4655 int event_flags;
4656
4657#define AVFMT_EVENT_FLAG_METADATA_UPDATED 0x0001
4658
4659 int max_ts_probe;
4660
4662#define AVFMT_AVOID_NEG_TS_AUTO -1
4663#define AVFMT_AVOID_NEG_TS_DISABLED 0
4664#define AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE 1
4665#define AVFMT_AVOID_NEG_TS_MAKE_ZERO 2
4666
4667 int ts_id;
4668
4669 int audio_preload;
4670
4672
4673 int max_chunk_size;
4674
4676
4677 int avio_flags;
4678
4680
4681 int64_t skip_initial_bytes;
4682
4683 unsigned int correct_ts_overflow;
4684
4685 int seek2any;
4686
4687 int flush_packets;
4688
4689 int probe_score;
4690
4691 int format_probesize;
4692
4693 char *codec_whitelist;
4694
4695 char *format_whitelist;
4696
4697 int io_repositioned;
4698
4699 const AVCodec *video_codec;
4700
4701 const AVCodec *audio_codec;
4702
4703 const AVCodec *subtitle_codec;
4704
4705 const AVCodec *data_codec;
4706
4708
4709 void *opaque;
4710
4712
4713 int64_t output_ts_offset;
4714
4715 uint8_t *dump_separator;
4716
4718
4719 char *protocol_whitelist;
4720
4721 int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url,
4722 int flags, AVDictionary **options);
4723
4726
4727 char *protocol_blacklist;
4728
4729 int max_streams;
4730
4732
4734
4735 int (*io_close2)(struct AVFormatContext *s, AVIOContext *pb);
4737
4739
4741
4742unsigned avformat_version(void);
4743
4744const char *avformat_configuration(void);
4745
4746const char *avformat_license(void);
4747
4749
4751
4753
4755
4757
4759
4761
4763
4765
4767 uint8_t *data, size_t size);
4768
4770 enum AVPacketSideDataType type, size_t size);
4771
4772uint8_t *av_stream_get_side_data(const AVStream *stream,
4773 enum AVPacketSideDataType type, size_t *size);
4774
4776
4778 const char *format_name, const char *filename);
4779
4780const AVInputFormat *av_find_input_format(const char *short_name);
4781
4782const AVInputFormat *av_probe_input_format(const AVProbeData *pd, int is_opened);
4783
4785 int is_opened, int *score_max);
4786
4788 int is_opened, int *score_ret);
4789
4791 const char *url, void *logctx,
4792 unsigned int offset, unsigned int max_probe_size);
4793
4795 const char *url, void *logctx,
4796 unsigned int offset, unsigned int max_probe_size);
4797
4799 const AVInputFormat *fmt, AVDictionary **options);
4800
4802
4804
4805void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx);
4806
4808 enum AVMediaType type,
4809 int wanted_stream_nb,
4810 int related_stream,
4811 const AVCodec **decoder_ret,
4812 int flags);
4813
4815
4816int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
4817 int flags);
4818
4819int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
4820
4822
4824
4826
4828
4829#define AVSEEK_FLAG_BACKWARD 1
4830#define AVSEEK_FLAG_BYTE 2
4831#define AVSEEK_FLAG_ANY 4
4832#define AVSEEK_FLAG_FRAME 8
4833
4834#define AVSTREAM_INIT_IN_WRITE_HEADER 0
4835#define AVSTREAM_INIT_IN_INIT_OUTPUT 1
4836
4839
4842
4844
4846
4848 AVFrame *frame);
4849
4851 AVFrame *frame);
4852
4854
4856
4857const AVOutputFormat *av_guess_format(const char *short_name,
4858 const char *filename,
4859 const char *mime_type);
4860
4861enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name,
4862 const char *filename, const char *mime_type,
4863 enum AVMediaType type);
4864
4866 int64_t *dts, int64_t *wall);
4867
4868void av_hex_dump(FILE *f, const uint8_t *buf, int size);
4869
4870void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size);
4871
4872void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st);
4873
4874void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload,
4875 const AVStream *st);
4876
4877enum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
4878
4879unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum AVCodecID id);
4880
4881int av_codec_get_tag2(const struct AVCodecTag * const *tags, enum AVCodecID id,
4882 unsigned int *tag);
4883
4885
4886int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);
4887
4889
4891
4893 int64_t wanted_timestamp,
4894 int flags);
4895
4896int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp,
4897 int size, int distance, int flags);
4898
4899void av_url_split(char *proto, int proto_size,
4900 char *authorization, int authorization_size,
4901 char *hostname, int hostname_size,
4902 int *port_ptr,
4903 char *path, int path_size,
4904 const char *url);
4905
4907 int index,
4908 const char *url,
4909 int is_output);
4910
4911#define AV_FRAME_FILENAME_FLAGS_MULTIPLE 1
4912
4913int av_get_frame_filename2(char *buf, int buf_size,
4914 const char *path, int number, int flags);
4915
4916int av_get_frame_filename(char *buf, int buf_size,
4917 const char *path, int number);
4918
4920
4921int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size);
4922
4923int av_match_ext(const char *filename, const char *extensions);
4924
4925int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
4926 int std_compliance);
4927
4928const struct AVCodecTag *avformat_get_riff_video_tags(void);
4929
4930const struct AVCodecTag *avformat_get_riff_audio_tags(void);
4931
4932const struct AVCodecTag *avformat_get_mov_video_tags(void);
4933
4934const struct AVCodecTag *avformat_get_mov_audio_tags(void);
4935
4937
4939
4941 const char *spec);
4942
4944
4950};
4951
4953 AVStream *ost, const AVStream *ist,
4954 enum AVTimebaseSource copy_tb);
4955
4957
4958#define AVUTIL_FIFO_H
4959
4960typedef struct AVFifo AVFifo;
4961
4962typedef int AVFifoCB(void *opaque, void *buf, size_t *nb_elems);
4963
4964#define AV_FIFO_FLAG_AUTO_GROW (1 << 0)
4965
4966AVFifo *av_fifo_alloc2(size_t elems, size_t elem_size,
4967 unsigned int flags);
4968
4969size_t av_fifo_elem_size(const AVFifo *f);
4970
4971void av_fifo_auto_grow_limit(AVFifo *f, size_t max_elems);
4972
4973size_t av_fifo_can_read(const AVFifo *f);
4974
4975size_t av_fifo_can_write(const AVFifo *f);
4976
4977int av_fifo_grow2(AVFifo *f, size_t inc);
4978
4979int av_fifo_write(AVFifo *f, const void *buf, size_t nb_elems);
4980
4982 void *opaque, size_t *nb_elems);
4983
4984int av_fifo_read(AVFifo *f, void *buf, size_t nb_elems);
4985
4987 void *opaque, size_t *nb_elems);
4988
4989int av_fifo_peek(AVFifo *f, void *buf, size_t nb_elems, size_t offset);
4990
4991int av_fifo_peek_to_cb(AVFifo *f, AVFifoCB write_cb, void *opaque,
4992 size_t *nb_elems, size_t offset);
4993
4994void av_fifo_drain2(AVFifo *f, size_t size);
4995
4997
4999
5000typedef struct AVFifoBuffer {
5001 uint8_t *buffer;
5002 uint8_t *rptr, *wptr, *end;
5003 uint32_t rndx, wndx;
5005
5008
5011
5014
5017
5020
5023
5026
5028int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void (*func)(void*, void*, int));
5029
5031int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));
5032
5034int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));
5035
5037int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));
5038
5040int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size);
5041
5043int av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space);
5044
5047
5049static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs)
5050{
5051 uint8_t *ptr = f->rptr + offs;
5052 if (ptr >= f->end)
5053 ptr = f->buffer + (ptr - f->end);
5054 else if (ptr < f->buffer)
5055 ptr = f->end - (f->buffer - ptr);
5056 return ptr;
5057}
5058
#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
struct AVBufferPool AVBufferPool
struct AVHWFramesInternal AVHWFramesInternal
struct AVHWDeviceInternal AVHWDeviceInternal
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels)
int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen)
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)
attribute_deprecated int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void(*func)(void *, void *, int))
enum AVChannel av_channel_layout_channel_from_string(const AVChannelLayout *channel_layout, const char *name)
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)
attribute_deprecated void av_fifo_freep(AVFifoBuffer **f)
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)
attribute_deprecated int av_get_extended_channel_layout(const char *name, uint64_t *channel_layout, int *nb_channels)
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 av_log_set_callback(void(*callback)(void *, int, const char *, va_list))
unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
int av_fifo_peek_to_cb(AVFifo *f, AVFifoCB write_cb, void *opaque, size_t *nb_elems, size_t offset)
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)
int av_channel_layout_from_string(AVChannelLayout *channel_layout, const char *str)
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)
int av_channel_layout_index_from_channel(const AVChannelLayout *channel_layout, enum AVChannel channel)
const char * avutil_license(void)
int avio_pause(AVIOContext *h, int pause)
AVFifo * av_fifo_alloc2(size_t elems, size_t elem_size, unsigned int flags)
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)
attribute_deprecated int av_get_standard_channel_layout(unsigned index, uint64_t *layout, const char **name)
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)
void av_fifo_freep2(AVFifo **f)
int avio_vprintf(AVIOContext *s, const char *fmt, va_list ap)
const AVClass * avcodec_get_class(void)
static char * av_make_error_string(char *errbuf, size_t errbuf_size, int errnum)
attribute_deprecated int av_fifo_space(const AVFifoBuffer *f)
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)
@ AV_CHANNEL_ORDER_AMBISONIC
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 av_channel_layout_index_from_string(const AVChannelLayout *channel_layout, const char *name)
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)
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)
attribute_deprecated void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout)
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)
int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout, struct AVBPrint *bp)
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS])
attribute_deprecated const char * av_get_channel_description(uint64_t channel)
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
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
static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
attribute_deprecated int av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space)
struct AVRegionOfInterest AVRegionOfInterest
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)
void av_fifo_reset2(AVFifo *f)
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
void av_channel_description_bprint(struct AVBPrint *bp, enum AVChannel channel_id)
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)
void void * av_realloc(void *ptr, size_t size) av_alloc_size(2)
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)
@ AV_HWFRAME_MAP_OVERWRITE
struct AVChannelLayout AVChannelLayout
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_fifo_peek(AVFifo *f, void *buf, size_t nb_elems, size_t offset)
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)
attribute_deprecated int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
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 avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
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)
int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1)
AVCodecParameters * avcodec_parameters_alloc(void)
av_warn_unused_result int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem)
@ 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
void void void av_vlog(void *avcl, int level, const char *fmt, va_list vl)
size_t av_fifo_can_write(const AVFifo *f)
const char * avutil_configuration(void)
int av_write_uncoded_frame_query(AVFormatContext *s, int stream_index)
attribute_deprecated int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
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)
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)
size_t av_fifo_can_read(const AVFifo *f)
int av_channel_name(char *buf, size_t buf_size, enum AVChannel channel)
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)
int av_channel_description(char *buf, size_t buf_size, enum AVChannel channel)
attribute_deprecated enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos)
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
attribute_deprecated AVFifoBuffer * av_fifo_alloc_array(size_t nmemb, size_t size)
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)
attribute_deprecated int av_get_channel_layout_channel_index(uint64_t channel_layout, uint64_t channel)
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)
attribute_deprecated void av_fifo_reset(AVFifoBuffer *f)
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
attribute_deprecated int av_fifo_size(const AVFifoBuffer *f)
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_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))
attribute_deprecated int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
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)
enum AVChannel av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout, unsigned int idx)
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)
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
int av_fifo_read_to_cb(AVFifo *f, AVFifoCB write_cb, void *opaque, size_t *nb_elems)
void avcodec_parameters_free(AVCodecParameters **par)
int64_t av_const av_gcd(int64_t a, int64_t b)
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
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)
attribute_deprecated uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index)
#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
void avio_wb64(AVIOContext *s, uint64_t val)
@ AV_PIX_FMT_BAYER_GBRG8
@ AV_PIX_FMT_YUV444P16BE
@ AV_PIX_FMT_YUV420P16BE
@ AV_PIX_FMT_YUVA420P9BE
@ AV_PIX_FMT_YUV420P14LE
@ 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_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_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_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 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)
@ AV_CHAN_FRONT_RIGHT_OF_CENTER
@ AV_CHAN_FRONT_LEFT_OF_CENTER
@ AV_CHAN_SURROUND_DIRECT_RIGHT
@ AV_CHAN_BOTTOM_FRONT_CENTER
@ AV_CHAN_BOTTOM_FRONT_RIGHT
@ AV_CHAN_BOTTOM_FRONT_LEFT
@ AV_CHAN_SURROUND_DIRECT_LEFT
@ AV_CHAN_TOP_FRONT_CENTER
static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax)
static attribute_deprecated uint8_t * av_fifo_peek2(const AVFifoBuffer *f, int offs)
void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx)
size_t av_fifo_elem_size(const AVFifo *f)
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)
attribute_deprecated int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size)
int av_fifo_write_from_cb(AVFifo *f, AVFifoCB read_cb, void *opaque, size_t *nb_elems)
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance)
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_RADIANCE_HDR
@ 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)
int av_fifo_grow2(AVFifo *f, size_t inc)
static void * av_x_if_null(const void *p, const void *x)
attribute_deprecated const char * av_get_channel_name(uint64_t channel)
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
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
struct AVFifo AVFifo
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
@ AV_MATRIX_ENCODING_DPLIIX
@ AV_MATRIX_ENCODING_DOLBY
@ AV_MATRIX_ENCODING_DPLII
@ AV_MATRIX_ENCODING_DPLIIZ
@ AV_MATRIX_ENCODING_DOLBYEX
@ AV_MATRIX_ENCODING_DOLBYHEADPHONE
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)
attribute_deprecated int av_get_channel_layout_nb_channels(uint64_t channel_layout)
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)
attribute_deprecated int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
int av_filename_number_test(const char *filename)
void avformat_free_context(AVFormatContext *s)
unsigned int avio_rl24(AVIOContext *s)
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
attribute_deprecated int64_t av_stream_get_end_pts(const AVStream *st)
void av_channel_name_bprint(struct AVBPrint *bp, enum AVChannel channel_id)
AVRational av_sub_q(AVRational b, AVRational c) av_const
enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext *ctx)
int AVFifoCB(void *opaque, void *buf, size_t *nb_elems)
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)
attribute_deprecated void av_bprint_channel_layout(struct AVBPrint *bp, int nb_channels, uint64_t channel_layout)
int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask)
attribute_deprecated int64_t av_get_default_channel_layout(int nb_channels)
struct AVCodecContext AVCodecContext
int av_dict_parse_string(AVDictionary **pm, const char *str, const char *key_val_sep, const char *pairs_sep, int flags)
attribute_deprecated FILE * av_fopen_utf8(const char *path, const char *mode)
char av_get_picture_type_char(enum AVPictureType pict_type)
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int av_channel_layout_describe(const AVChannelLayout *channel_layout, char *buf, size_t buf_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)
int av_channel_layout_check(const AVChannelLayout *channel_layout)
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 av_fifo_write(AVFifo *f, const void *buf, size_t nb_elems)
int av_channel_layout_copy(AVChannelLayout *dst, const AVChannelLayout *src)
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)
struct AVChannelCustom AVChannelCustom
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)
attribute_deprecated uint64_t av_get_channel_layout(const char *name)
int av_new_packet(AVPacket *pkt, int size)
void av_fifo_auto_grow_limit(AVFifo *f, size_t max_elems)
AVBufferRef * av_buffer_alloc(size_t size)
@ AV_FRAME_DATA_GOP_TIMECODE
@ AV_FRAME_DATA_DOVI_METADATA
@ AV_FRAME_DATA_DYNAMIC_HDR_VIVID
@ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
@ AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT
@ 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)
uint64_t av_channel_layout_subset(const AVChannelLayout *channel_layout, uint64_t mask)
void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst)
unsigned int avio_rb24(AVIOContext *s)
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)
attribute_deprecated void av_fifo_drain(AVFifoBuffer *f, int size)
AVBufferRef * av_buffer_create(uint8_t *data, size_t size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
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 AVChannelLayout * av_channel_layout_standard(void **opaque)
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)
void av_fifo_drain2(AVFifo *f, size_t size)
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)
attribute_deprecated AVFifoBuffer * av_fifo_alloc(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)
enum AVChannel av_channel_from_string(const char *name)
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
attribute_deprecated void av_fifo_free(AVFifoBuffer *f)
uint32_t av_q2intfloat(AVRational q)
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
int av_fifo_read(AVFifo *f, void *buf, size_t nb_elems)
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
enum AVChannelOrder order
union AVChannelLayout::@162 u
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)
attribute_deprecated int frame_number
uint64_t error[AV_NUM_DATA_POINTERS]
enum AVSampleFormat sample_fmt
enum AVPixelFormat sw_pix_fmt
const AVCodecDescriptor * codec_descriptor
attribute_deprecated uint64_t request_channel_layout
enum AVColorRange color_range
enum AVAudioServiceType audio_service_type
enum AVColorPrimaries color_primaries
attribute_deprecated uint64_t channel_layout
enum AVFieldOrder field_order
attribute_deprecated AVPacket * pkt
attribute_deprecated int64_t reordered_opaque
attribute_deprecated int channels
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
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
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
attribute_deprecated const uint64_t * channel_layouts
const char * long_name
const AVChannelLayout * ch_layouts
const int * supported_samplerates
const AVRational * supported_framerates
const char * wrapper_name
enum AVMediaType type
const AVClass * priv_class
const AVProfile * profiles
enum AVPixelFormat * pix_fmts
enum AVSampleFormat * sample_fmts
enum AVColorPrimaries color_primaries
enum AVColorTransferCharacteristic color_trc
enum AVChromaLocation chroma_location
attribute_deprecated uint64_t channel_layout
attribute_deprecated int channels
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]
int64_t cur_frame_pos[AV_PARSER_PTS_NB]
enum AVPictureStructure picture_structure
int64_t cur_frame_pts[AV_PARSER_PTS_NB]
struct AVCodecParser * parser
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)
attribute_deprecated int max_analyze_duration
struct AVOutputFormat * oformat
AVIOInterruptCB interrupt_callback
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)
attribute_deprecated int64_t reordered_opaque
AVBufferRef * private_ref
enum AVChromaLocation chroma_location
AVBufferRef ** extended_buf
attribute_deprecated int channels
enum AVColorPrimaries color_primaries
AVRational sample_aspect_ratio
AVBufferRef * opaque_ref
attribute_deprecated uint64_t channel_layout
AVDictionary * metadata
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
enum AVColorRange color_range
AVFrameSideData ** side_data
attribute_deprecated int64_t pkt_duration
enum AVColorSpace colorspace
attribute_deprecated int coded_picture_number
enum AVColorTransferCharacteristic color_trc
int linesize[AV_NUM_DATA_POINTERS]
AVBufferRef * hw_frames_ctx
AVChannelLayout ch_layout
uint8_t * data[AV_NUM_DATA_POINTERS]
attribute_deprecated int display_picture_number
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)
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
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
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
const AVClass * av_class
AVSubtitleRect ** rects
enum AVSubtitleType type