#pragma pack(push,_CRT_PACKING) typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; #pragma pack(pop) void __attribute__((__cdecl__)) __debugbreak(void); extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) void __attribute__((__cdecl__)) __debugbreak(void) { __asm__ __volatile__("int {$}3":); } const char *__mingw_get_crt_info (void); #pragma pack(push,_CRT_PACKING) __extension__ typedef unsigned long long size_t; __extension__ typedef long long ssize_t; typedef size_t rsize_t; __extension__ typedef long long intptr_t; __extension__ typedef unsigned long long uintptr_t; __extension__ typedef long long ptrdiff_t; typedef unsigned short wchar_t; typedef unsigned short wint_t; typedef unsigned short wctype_t; typedef int errno_t; typedef long __time32_t; __extension__ typedef long long __time64_t; typedef __time64_t time_t; struct threadlocaleinfostruct; struct threadmbcinfostruct; typedef struct threadlocaleinfostruct *pthreadlocinfo; typedef struct threadmbcinfostruct *pthreadmbcinfo; struct __lc_time_data; typedef struct localeinfo_struct { pthreadlocinfo locinfo; pthreadmbcinfo mbcinfo; } _locale_tstruct,*_locale_t; typedef struct tagLC_ID { unsigned short wLanguage; unsigned short wCountry; unsigned short wCodePage; } LC_ID,*LPLC_ID; typedef struct threadlocaleinfostruct { int refcount; unsigned int lc_codepage; unsigned int lc_collate_cp; unsigned long lc_handle[6]; LC_ID lc_id[6]; struct { char *locale; wchar_t *wlocale; int *refcount; int *wrefcount; } lc_category[6]; int lc_clike; int mb_cur_max; int *lconv_intl_refcount; int *lconv_num_refcount; int *lconv_mon_refcount; struct lconv *lconv; int *ctype1_refcount; unsigned short *ctype1; const unsigned short *pctype; const unsigned char *pclmap; const unsigned char *pcumap; struct __lc_time_data *lc_time_curr; } threadlocinfo; #pragma pack(pop) struct _exception; #pragma pack(push,_CRT_PACKING) typedef union __mingw_dbl_type_t { double x; unsigned long long val; __extension__ struct { unsigned int low, high; } lh; } __mingw_dbl_type_t; typedef union __mingw_flt_type_t { float x; unsigned int val; } __mingw_flt_type_t; typedef union __mingw_ldbl_type_t { long double x; __extension__ struct { unsigned int low, high; int sign_exponent : 16; int res1 : 16; int res0 : 32; } lh; } __mingw_ldbl_type_t; extern double * __imp__HUGE; struct _exception { int type; const char *name; double arg1; double arg2; double retval; }; void __mingw_raise_matherr (int typ, const char *name, double a1, double a2, double rslt); void __mingw_setusermatherr (int (__attribute__((__cdecl__)) *)(struct _exception *)); __attribute__ ((__dllimport__)) void __setusermatherr(int (__attribute__((__cdecl__)) *)(struct _exception *)); double __attribute__((__cdecl__)) sin(double _X); double __attribute__((__cdecl__)) cos(double _X); double __attribute__((__cdecl__)) tan(double _X); double __attribute__((__cdecl__)) sinh(double _X); double __attribute__((__cdecl__)) cosh(double _X); double __attribute__((__cdecl__)) tanh(double _X); double __attribute__((__cdecl__)) asin(double _X); double __attribute__((__cdecl__)) acos(double _X); double __attribute__((__cdecl__)) atan(double _X); double __attribute__((__cdecl__)) atan2(double _Y,double _X); double __attribute__((__cdecl__)) exp(double _X); double __attribute__((__cdecl__)) log(double _X); double __attribute__((__cdecl__)) log10(double _X); double __attribute__((__cdecl__)) pow(double _X,double _Y); double __attribute__((__cdecl__)) sqrt(double _X); double __attribute__((__cdecl__)) ceil(double _X); double __attribute__((__cdecl__)) floor(double _X); extern float __attribute__((__cdecl__)) fabsf (float x); extern long double __attribute__((__cdecl__)) fabsl (long double); extern double __attribute__((__cdecl__)) fabs (double _X); extern inline __attribute__((__gnu_inline__)) float __attribute__((__cdecl__)) fabsf (float x) { return __builtin_fabsf (x); } extern inline __attribute__((__gnu_inline__)) long double __attribute__((__cdecl__)) fabsl (long double x) { return __builtin_fabsl (x); } extern inline __attribute__((__gnu_inline__)) double __attribute__((__cdecl__)) fabs (double x) { return __builtin_fabs (x); } double __attribute__((__cdecl__)) ldexp(double _X,int _Y); double __attribute__((__cdecl__)) frexp(double _X,int *_Y); double __attribute__((__cdecl__)) modf(double _X,double *_Y); double __attribute__((__cdecl__)) fmod(double _X,double _Y); void __attribute__((__cdecl__)) sincos (double __x, double *p_sin, double *p_cos); void __attribute__((__cdecl__)) sincosl (long double __x, long double *p_sin, long double *p_cos); void __attribute__((__cdecl__)) sincosf (float __x, float *p_sin, float *p_cos); int __attribute__((__cdecl__)) abs(int _X); long __attribute__((__cdecl__)) labs(long _X); double __attribute__((__cdecl__)) atof(const char *_String); double __attribute__((__cdecl__)) _atof_l(const char *_String,_locale_t _Locale); struct _complex { double x; double y; }; double __attribute__((__cdecl__)) _cabs(struct _complex _ComplexA); double __attribute__((__cdecl__)) _hypot(double _X,double _Y); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _j0(double _X); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _j1(double _X); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _jn(int _X,double _Y); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _y0(double _X); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _y1(double _X); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _yn(int _X,double _Y); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _matherr (struct _exception *); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _chgsign (double _X); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _copysign (double _Number,double _Sign); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _logb (double); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _nextafter (double, double); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _scalb (double, long); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _finite (double); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fpclass (double); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isnan (double); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) j0 (double) ; __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) j1 (double) ; __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) jn (int, double) ; __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) y0 (double) ; __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) y1 (double) ; __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) yn (int, double) ; __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) chgsign (double); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) finite (double); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) fpclass (double); typedef float float_t; typedef double double_t; extern int __attribute__((__cdecl__)) __fpclassifyl (long double); extern int __attribute__((__cdecl__)) __fpclassifyf (float); extern int __attribute__((__cdecl__)) __fpclassify (double); extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) __fpclassifyl (long double x) { return __fpclassify(x); } extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) __fpclassify (double x) { __mingw_dbl_type_t hlp; unsigned int l, h; hlp.x = x; h = hlp.lh.high; l = hlp.lh.low | (h & 0xfffff); h &= 0x7ff00000; if ((h | l) == 0) return 0x4000; if (!h) return (0x0400 | 0x4000); if (h == 0x7ff00000) return (l ? 0x0100 : (0x0100 | 0x0400)); return 0x0400; } extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) __fpclassifyf (float x) { __mingw_flt_type_t hlp; hlp.x = x; hlp.val &= 0x7fffffff; if (hlp.val == 0) return 0x4000; if (hlp.val < 0x800000) return (0x0400 | 0x4000); if (hlp.val >= 0x7f800000) return (hlp.val > 0x7f800000 ? 0x0100 : (0x0100 | 0x0400)); return 0x0400; } extern int __attribute__((__cdecl__)) __isnan (double); extern int __attribute__((__cdecl__)) __isnanf (float); extern int __attribute__((__cdecl__)) __isnanl (long double); extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) __isnan (double _x) { __mingw_dbl_type_t hlp; int l, h; hlp.x = _x; l = hlp.lh.low; h = hlp.lh.high & 0x7fffffff; h |= (unsigned int) (l | -l) >> 31; h = 0x7ff00000 - h; return (int) ((unsigned int) h) >> 31; } extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) __isnanf (float _x) { __mingw_flt_type_t hlp; int i; hlp.x = _x; i = hlp.val & 0x7fffffff; i = 0x7f800000 - i; return (int) (((unsigned int) i) >> 31); } extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) __isnanl (long double _x) { return __isnan(_x); } extern int __attribute__((__cdecl__)) __signbit (double); extern int __attribute__((__cdecl__)) __signbitf (float); extern int __attribute__((__cdecl__)) __signbitl (long double); extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) __signbit (double x) { __mingw_dbl_type_t hlp; hlp.x = x; return ((hlp.lh.high & 0x80000000) != 0); } extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) __signbitf (float x) { __mingw_flt_type_t hlp; hlp.x = x; return ((hlp.val & 0x80000000) != 0); } extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) __signbitl (long double x) { return __signbit(x); } extern float __attribute__((__cdecl__)) sinf(float _X); extern long double __attribute__((__cdecl__)) sinl(long double); extern float __attribute__((__cdecl__)) cosf(float _X); extern long double __attribute__((__cdecl__)) cosl(long double); extern float __attribute__((__cdecl__)) tanf(float _X); extern long double __attribute__((__cdecl__)) tanl(long double); extern float __attribute__((__cdecl__)) asinf(float _X); extern long double __attribute__((__cdecl__)) asinl(long double); extern float __attribute__((__cdecl__)) acosf (float); extern long double __attribute__((__cdecl__)) acosl (long double); extern float __attribute__((__cdecl__)) atanf (float); extern long double __attribute__((__cdecl__)) atanl (long double); extern float __attribute__((__cdecl__)) atan2f (float, float); extern long double __attribute__((__cdecl__)) atan2l (long double, long double); extern float __attribute__((__cdecl__)) sinhf(float _X); extern inline __attribute__((__gnu_inline__)) float sinhf(float _X) { return ((float)sinh((double)_X)); } extern long double __attribute__((__cdecl__)) sinhl(long double); extern float __attribute__((__cdecl__)) coshf(float _X); extern inline __attribute__((__gnu_inline__)) float coshf(float _X) { return ((float)cosh((double)_X)); } extern long double __attribute__((__cdecl__)) coshl(long double); extern float __attribute__((__cdecl__)) tanhf(float _X); extern inline __attribute__((__gnu_inline__)) float tanhf(float _X) { return ((float)tanh((double)_X)); } extern long double __attribute__((__cdecl__)) tanhl(long double); extern double __attribute__((__cdecl__)) acosh (double); extern float __attribute__((__cdecl__)) acoshf (float); extern long double __attribute__((__cdecl__)) acoshl (long double); extern double __attribute__((__cdecl__)) asinh (double); extern float __attribute__((__cdecl__)) asinhf (float); extern long double __attribute__((__cdecl__)) asinhl (long double); extern double __attribute__((__cdecl__)) atanh (double); extern float __attribute__((__cdecl__)) atanhf (float); extern long double __attribute__((__cdecl__)) atanhl (long double); extern float __attribute__((__cdecl__)) expf(float _X); extern inline __attribute__((__gnu_inline__)) float expf(float _X) { return ((float)exp((double)_X)); } extern long double __attribute__((__cdecl__)) expl(long double); extern double __attribute__((__cdecl__)) exp2(double); extern float __attribute__((__cdecl__)) exp2f(float); extern long double __attribute__((__cdecl__)) exp2l(long double); extern double __attribute__((__cdecl__)) expm1(double); extern float __attribute__((__cdecl__)) expm1f(float); extern long double __attribute__((__cdecl__)) expm1l(long double); extern float frexpf(float _X,int *_Y); extern inline __attribute__((__gnu_inline__)) float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); } extern long double __attribute__((__cdecl__)) frexpl(long double,int *); extern int __attribute__((__cdecl__)) ilogb (double); extern int __attribute__((__cdecl__)) ilogbf (float); extern int __attribute__((__cdecl__)) ilogbl (long double); extern float __attribute__((__cdecl__)) ldexpf(float _X,int _Y); extern inline __attribute__((__gnu_inline__)) float __attribute__((__cdecl__)) ldexpf (float x, int expn) { return (float) ldexp ((double)x, expn); } extern long double __attribute__((__cdecl__)) ldexpl (long double, int); extern float __attribute__((__cdecl__)) logf (float); extern long double __attribute__((__cdecl__)) logl(long double); extern float __attribute__((__cdecl__)) log10f (float); extern long double __attribute__((__cdecl__)) log10l(long double); extern double __attribute__((__cdecl__)) log1p(double); extern float __attribute__((__cdecl__)) log1pf(float); extern long double __attribute__((__cdecl__)) log1pl(long double); extern double __attribute__((__cdecl__)) log2 (double); extern float __attribute__((__cdecl__)) log2f (float); extern long double __attribute__((__cdecl__)) log2l (long double); extern double __attribute__((__cdecl__)) logb (double); extern float __attribute__((__cdecl__)) logbf (float); extern long double __attribute__((__cdecl__)) logbl (long double); extern float __attribute__((__cdecl__)) modff (float, float*); extern long double __attribute__((__cdecl__)) modfl (long double, long double*); extern double __attribute__((__cdecl__)) scalbn (double, int); extern float __attribute__((__cdecl__)) scalbnf (float, int); extern long double __attribute__((__cdecl__)) scalbnl (long double, int); extern double __attribute__((__cdecl__)) scalbln (double, long); extern float __attribute__((__cdecl__)) scalblnf (float, long); extern long double __attribute__((__cdecl__)) scalblnl (long double, long); extern double __attribute__((__cdecl__)) cbrt (double); extern float __attribute__((__cdecl__)) cbrtf (float); extern long double __attribute__((__cdecl__)) cbrtl (long double); extern double __attribute__((__cdecl__)) hypot (double, double) ; extern float __attribute__((__cdecl__)) hypotf (float x, float y); extern inline __attribute__((__gnu_inline__)) float __attribute__((__cdecl__)) hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);} extern long double __attribute__((__cdecl__)) hypotl (long double, long double); extern float __attribute__((__cdecl__)) powf(float _X,float _Y); extern inline __attribute__((__gnu_inline__)) float powf(float _X,float _Y) { return ((float)pow((double)_X,(double)_Y)); } extern long double __attribute__((__cdecl__)) powl (long double, long double); extern float __attribute__((__cdecl__)) sqrtf (float); extern long double sqrtl(long double); extern double __attribute__((__cdecl__)) erf (double); extern float __attribute__((__cdecl__)) erff (float); extern long double __attribute__((__cdecl__)) erfl (long double); extern double __attribute__((__cdecl__)) erfc (double); extern float __attribute__((__cdecl__)) erfcf (float); extern long double __attribute__((__cdecl__)) erfcl (long double); extern double __attribute__((__cdecl__)) lgamma (double); extern float __attribute__((__cdecl__)) lgammaf (float); extern long double __attribute__((__cdecl__)) lgammal (long double); extern int signgam; extern double __attribute__((__cdecl__)) tgamma (double); extern float __attribute__((__cdecl__)) tgammaf (float); extern long double __attribute__((__cdecl__)) tgammal (long double); extern float __attribute__((__cdecl__)) ceilf (float); extern long double __attribute__((__cdecl__)) ceill (long double); extern float __attribute__((__cdecl__)) floorf (float); extern long double __attribute__((__cdecl__)) floorl (long double); extern double __attribute__((__cdecl__)) nearbyint ( double); extern float __attribute__((__cdecl__)) nearbyintf (float); extern long double __attribute__((__cdecl__)) nearbyintl (long double); extern double __attribute__((__cdecl__)) rint (double); extern float __attribute__((__cdecl__)) rintf (float); extern long double __attribute__((__cdecl__)) rintl (long double); extern long __attribute__((__cdecl__)) lrint (double); extern long __attribute__((__cdecl__)) lrintf (float); extern long __attribute__((__cdecl__)) lrintl (long double); __extension__ long long __attribute__((__cdecl__)) llrint (double); __extension__ long long __attribute__((__cdecl__)) llrintf (float); __extension__ long long __attribute__((__cdecl__)) llrintl (long double); extern double __attribute__((__cdecl__)) round (double); extern float __attribute__((__cdecl__)) roundf (float); extern long double __attribute__((__cdecl__)) roundl (long double); extern long __attribute__((__cdecl__)) lround (double); extern long __attribute__((__cdecl__)) lroundf (float); extern long __attribute__((__cdecl__)) lroundl (long double); __extension__ long long __attribute__((__cdecl__)) llround (double); __extension__ long long __attribute__((__cdecl__)) llroundf (float); __extension__ long long __attribute__((__cdecl__)) llroundl (long double); extern double __attribute__((__cdecl__)) trunc (double); extern float __attribute__((__cdecl__)) truncf (float); extern long double __attribute__((__cdecl__)) truncl (long double); extern float __attribute__((__cdecl__)) fmodf (float, float); extern long double __attribute__((__cdecl__)) fmodl (long double, long double); extern double __attribute__((__cdecl__)) remainder (double, double); extern float __attribute__((__cdecl__)) remainderf (float, float); extern long double __attribute__((__cdecl__)) remainderl (long double, long double); extern double __attribute__((__cdecl__)) remquo(double, double, int *); extern float __attribute__((__cdecl__)) remquof(float, float, int *); extern long double __attribute__((__cdecl__)) remquol(long double, long double, int *); extern double __attribute__((__cdecl__)) copysign (double, double); extern float __attribute__((__cdecl__)) copysignf (float, float); extern long double __attribute__((__cdecl__)) copysignl (long double, long double); extern inline __attribute__((__gnu_inline__)) double __attribute__((__cdecl__)) copysign (double x, double y) { __mingw_dbl_type_t hx, hy; hx.x = x; hy.x = y; hx.lh.high = (hx.lh.high & 0x7fffffff) | (hy.lh.high & 0x80000000); return hx.x; } extern inline __attribute__((__gnu_inline__)) float __attribute__((__cdecl__)) copysignf (float x, float y) { __mingw_flt_type_t hx, hy; hx.x = x; hy.x = y; hx.val = (hx.val & 0x7fffffff) | (hy.val & 0x80000000); return hx.x; } extern double __attribute__((__cdecl__)) nan(const char *tagp); extern float __attribute__((__cdecl__)) nanf(const char *tagp); extern long double __attribute__((__cdecl__)) nanl(const char *tagp); extern double __attribute__((__cdecl__)) nextafter (double, double); extern float __attribute__((__cdecl__)) nextafterf (float, float); extern long double __attribute__((__cdecl__)) nextafterl (long double, long double); extern double __attribute__((__cdecl__)) nexttoward (double, long double); extern float __attribute__((__cdecl__)) nexttowardf (float, long double); extern long double __attribute__((__cdecl__)) nexttowardl (long double, long double); extern double __attribute__((__cdecl__)) fdim (double x, double y); extern float __attribute__((__cdecl__)) fdimf (float x, float y); extern long double __attribute__((__cdecl__)) fdiml (long double x, long double y); extern double __attribute__((__cdecl__)) fmax (double, double); extern float __attribute__((__cdecl__)) fmaxf (float, float); extern long double __attribute__((__cdecl__)) fmaxl (long double, long double); extern double __attribute__((__cdecl__)) fmin (double, double); extern float __attribute__((__cdecl__)) fminf (float, float); extern long double __attribute__((__cdecl__)) fminl (long double, long double); extern double __attribute__((__cdecl__)) fma (double, double, double); extern float __attribute__((__cdecl__)) fmaf (float, float, float); extern long double __attribute__((__cdecl__)) fmal (long double, long double, long double); __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _copysignf (float _Number,float _Sign); __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _chgsignf (float _X); __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _logbf(float _X); __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _nextafterf(float _X,float _Y); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _finitef(float _X); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isnanf(float _X); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fpclassf(float _X); extern long double __attribute__((__cdecl__)) _chgsignl (long double); #pragma pack(pop) typedef unsigned short wchar_t; typedef signed char int8_t; typedef unsigned char uint8_t; typedef short int16_t; typedef unsigned short uint16_t; typedef int int32_t; typedef unsigned uint32_t; __extension__ typedef long long int64_t; __extension__ typedef unsigned long long uint64_t; typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int_least16_t; typedef unsigned short uint_least16_t; typedef int int_least32_t; typedef unsigned uint_least32_t; __extension__ typedef long long int_least64_t; __extension__ typedef unsigned long long uint_least64_t; typedef signed char int_fast8_t; typedef unsigned char uint_fast8_t; typedef short int_fast16_t; typedef unsigned short uint_fast16_t; typedef int int_fast32_t; typedef unsigned int uint_fast32_t; __extension__ typedef long long int_fast64_t; __extension__ typedef unsigned long long uint_fast64_t; __extension__ typedef long long intmax_t; __extension__ typedef unsigned long long uintmax_t; union av_intfloat32 { uint32_t i; float f; }; union av_intfloat64 { uint64_t i; double f; }; static __attribute__((always_inline)) inline float av_int2float(uint32_t i) { union av_intfloat32 v; v.i = i; return v.f; } static __attribute__((always_inline)) inline uint32_t av_float2int(float f) { union av_intfloat32 v; v.f = f; return v.i; } static __attribute__((always_inline)) inline double av_int2double(uint64_t i) { union av_intfloat64 v; v.i = i; return v.f; } static __attribute__((always_inline)) inline uint64_t av_double2int(double f) { union av_intfloat64 v; v.f = f; return v.i; } typedef struct AVRational{ int num; int den; } AVRational; static inline AVRational av_make_q(int num, int den) { AVRational r = { num, den }; return r; } static inline int av_cmp_q(AVRational a, AVRational b){ const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den; if(tmp) return (int)((tmp ^ a.den ^ b.den)>>63)|1; else if(b.den && a.den) return 0; else if(a.num && b.num) return (a.num>>31) - (b.num>>31); else return (-2147483647 -1); } static inline double av_q2d(AVRational a){ return a.num / (double) a.den; } int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max); AVRational av_mul_q(AVRational b, AVRational c) __attribute__((const)); AVRational av_div_q(AVRational b, AVRational c) __attribute__((const)); AVRational av_add_q(AVRational b, AVRational c) __attribute__((const)); AVRational av_sub_q(AVRational b, AVRational c) __attribute__((const)); static __attribute__((always_inline)) inline AVRational av_inv_q(AVRational q) { AVRational r = { q.den, q.num }; return r; } AVRational av_d2q(double d, int max) __attribute__((const)); int av_nearer_q(AVRational q, AVRational q1, AVRational q2); int av_find_nearest_q_idx(AVRational q, const AVRational* q_list); uint32_t av_q2intfloat(AVRational q); AVRational av_gcd_q(AVRational a, AVRational b, int max_den, AVRational def); enum AVRounding { AV_ROUND_ZERO = 0, AV_ROUND_INF = 1, AV_ROUND_DOWN = 2, AV_ROUND_UP = 3, AV_ROUND_NEAR_INF = 5, AV_ROUND_PASS_MINMAX = 8192, }; int64_t __attribute__((const)) av_gcd(int64_t a, int64_t b); int64_t av_rescale(int64_t a, int64_t b, int64_t c) __attribute__((const)); int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd) __attribute__((const)); int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) __attribute__((const)); int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq, enum AVRounding rnd) __attribute__((const)); int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b); int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod); int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb); int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc); typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; intmax_t __attribute__((__cdecl__)) imaxabs (intmax_t j); extern inline __attribute__((__gnu_inline__)) intmax_t __attribute__((__cdecl__)) imaxabs (intmax_t j) {return (j >= 0 ? j : -j);} imaxdiv_t __attribute__((__cdecl__)) imaxdiv (intmax_t numer, intmax_t denom); intmax_t __attribute__((__cdecl__)) strtoimax (const char* __restrict__ nptr, char** __restrict__ endptr, int base); uintmax_t __attribute__((__cdecl__)) strtoumax (const char* __restrict__ nptr, char** __restrict__ endptr, int base); intmax_t __attribute__((__cdecl__)) wcstoimax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr, int base); uintmax_t __attribute__((__cdecl__)) wcstoumax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr, int base); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _i64tow_s(long long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ui64tow_s(unsigned long long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wputenv_s(const wchar_t *_Name,const wchar_t *_Value); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords); #pragma pack(push,_CRT_PACKING) typedef int (__attribute__((__cdecl__)) *_onexit_t)(void); typedef struct _div_t { int quot; int rem; } div_t; typedef struct _ldiv_t { long quot; long rem; } ldiv_t; #pragma pack(4) typedef struct { unsigned char ld[10]; } _LDOUBLE; #pragma pack() typedef struct { double x; } _CRT_DOUBLE; typedef struct { float f; } _CRT_FLOAT; typedef struct { long double x; } _LONGDOUBLE; #pragma pack(4) typedef struct { unsigned char ld12[12]; } _LDBL12; #pragma pack() extern int * __imp___mb_cur_max; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) ___mb_cur_max_func(void); typedef void (__attribute__((__cdecl__)) *_purecall_handler)(void); __attribute__ ((__dllimport__)) _purecall_handler __attribute__((__cdecl__)) _set_purecall_handler(_purecall_handler _Handler); __attribute__ ((__dllimport__)) _purecall_handler __attribute__((__cdecl__)) _get_purecall_handler(void); typedef void (__attribute__((__cdecl__)) *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t); __attribute__ ((__dllimport__)) _invalid_parameter_handler __attribute__((__cdecl__)) _set_invalid_parameter_handler(_invalid_parameter_handler _Handler); __attribute__ ((__dllimport__)) _invalid_parameter_handler __attribute__((__cdecl__)) _get_invalid_parameter_handler(void); __attribute__ ((__dllimport__)) extern int *__attribute__((__cdecl__)) _errno(void); errno_t __attribute__((__cdecl__)) _set_errno(int _Value); errno_t __attribute__((__cdecl__)) _get_errno(int *_Value); __attribute__ ((__dllimport__)) unsigned long *__attribute__((__cdecl__)) __doserrno(void); errno_t __attribute__((__cdecl__)) _set_doserrno(unsigned long _Value); errno_t __attribute__((__cdecl__)) _get_doserrno(unsigned long *_Value); extern __attribute__((dllimport)) char *_sys_errlist[1]; extern __attribute__((dllimport)) int _sys_nerr; __attribute__ ((__dllimport__)) char ***__attribute__((__cdecl__)) __p___argv(void); __attribute__ ((__dllimport__)) int *__attribute__((__cdecl__)) __p__fmode(void); errno_t __attribute__((__cdecl__)) _get_pgmptr(char **_Value); errno_t __attribute__((__cdecl__)) _get_wpgmptr(wchar_t **_Value); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _set_fmode(int _Mode); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_fmode(int *_PMode); extern int * __imp___argc; extern char *** __imp___argv; extern wchar_t *** __imp___wargv; __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _get_environ(char ***); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _get_wenviron(wchar_t ***); static __inline char **__get_environ_ptr(void) { char **__ptr; _get_environ(&__ptr); return __ptr; } static __inline wchar_t **__get_wenviron_ptr(void) { wchar_t **__ptr; _get_wenviron(&__ptr); return __ptr; } extern char ** __imp__pgmptr; extern wchar_t ** __imp__wpgmptr; extern unsigned int * __imp__osplatform; extern unsigned int * __imp__osver; extern unsigned int * __imp__winver; extern unsigned int * __imp__winmajor; extern unsigned int * __imp__winminor; errno_t __attribute__((__cdecl__)) _get_osplatform(unsigned int *_Value); errno_t __attribute__((__cdecl__)) _get_osver(unsigned int *_Value); errno_t __attribute__((__cdecl__)) _get_winver(unsigned int *_Value); errno_t __attribute__((__cdecl__)) _get_winmajor(unsigned int *_Value); errno_t __attribute__((__cdecl__)) _get_winminor(unsigned int *_Value); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) exit(int _Code) __attribute__ ((__noreturn__)); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _exit(int _Code) __attribute__ ((__noreturn__)); void __attribute__((__cdecl__)) _Exit(int) __attribute__ ((__noreturn__)); extern inline __attribute__((__gnu_inline__)) __attribute__ ((__noreturn__)) void __attribute__((__cdecl__)) _Exit(int status) { _exit(status); } void __attribute__((__cdecl__)) __attribute__ ((__noreturn__)) abort(void); __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _set_abort_behavior(unsigned int _Flags,unsigned int _Mask); __extension__ long long __attribute__((__cdecl__)) _abs64(long long); extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) long long __attribute__((__cdecl__)) _abs64(long long x) { return __builtin_llabs(x); } int __attribute__((__cdecl__)) atexit(void (__attribute__((__cdecl__)) *)(void)); int __attribute__((__cdecl__)) atoi(const char *_Str); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoi_l(const char *_Str,_locale_t _Locale); long __attribute__((__cdecl__)) atol(const char *_Str); __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _atol_l(const char *_Str,_locale_t _Locale); void *__attribute__((__cdecl__)) bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__attribute__((__cdecl__)) *_PtFuncCompare)(const void *,const void *)); void __attribute__((__cdecl__)) qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__attribute__((__cdecl__)) *_PtFuncCompare)(const void *,const void *)); unsigned short __attribute__((__cdecl__)) _byteswap_ushort(unsigned short _Short); unsigned long __attribute__((__cdecl__)) _byteswap_ulong (unsigned long _Long); __extension__ unsigned long long __attribute__((__cdecl__)) _byteswap_uint64(unsigned long long _Int64); div_t __attribute__((__cdecl__)) div(int _Numerator,int _Denominator); char *__attribute__((__cdecl__)) getenv(const char *_VarName) ; __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _itoa(int _Value,char *_Dest,int _Radix); __extension__ __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _i64toa(long long _Val,char *_DstBuf,int _Radix) ; __extension__ __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ui64toa(unsigned long long _Val,char *_DstBuf,int _Radix) ; __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _atoi64(const char *_String); __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _atoi64_l(const char *_String,_locale_t _Locale); __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _strtoi64(const char *_String,char **_EndPtr,int _Radix); __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _strtoi64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale); __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _strtoui64(const char *_String,char **_EndPtr,int _Radix); __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _strtoui64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale); ldiv_t __attribute__((__cdecl__)) ldiv(long _Numerator,long _Denominator); __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ltoa(long _Value,char *_Dest,int _Radix) ; int __attribute__((__cdecl__)) mblen(const char *_Ch,size_t _MaxCount); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _mblen_l(const char *_Ch,size_t _MaxCount,_locale_t _Locale); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrlen(const char *_Str); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrlen_l(const char *_Str,_locale_t _Locale); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrnlen(const char *_Str,size_t _MaxCount); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale); int __attribute__((__cdecl__)) mbtowc(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SrcSizeInBytes); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _mbtowc_l(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SrcSizeInBytes,_locale_t _Locale); size_t __attribute__((__cdecl__)) mbstowcs(wchar_t * __restrict__ _Dest,const char * __restrict__ _Source,size_t _MaxCount); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstowcs_l(wchar_t * __restrict__ _Dest,const char * __restrict__ _Source,size_t _MaxCount,_locale_t _Locale); int __attribute__((__cdecl__)) mkstemp(char *template_name); int __attribute__((__cdecl__)) rand(void); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_error_mode(int _Mode); void __attribute__((__cdecl__)) srand(unsigned int _Seed); static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtod(const char * __restrict__ _Str,char ** __restrict__ _EndPtr) { double __attribute__((__cdecl__)) __mingw_strtod (const char * __restrict__, char ** __restrict__); return __mingw_strtod( _Str, _EndPtr); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) float __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtof(const char * __restrict__ _Str,char ** __restrict__ _EndPtr) { float __attribute__((__cdecl__)) __mingw_strtof (const char * __restrict__, char ** __restrict__); return __mingw_strtof( _Str, _EndPtr); } long double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtold(const char * __restrict__ , char ** __restrict__ ); extern double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __strtod (const char * __restrict__ , char ** __restrict__); float __attribute__((__cdecl__)) __mingw_strtof (const char * __restrict__, char ** __restrict__); double __attribute__((__cdecl__)) __mingw_strtod (const char * __restrict__, char ** __restrict__); long double __attribute__((__cdecl__)) __mingw_strtold(const char * __restrict__, char ** __restrict__); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _strtod_l(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,_locale_t _Locale); long __attribute__((__cdecl__)) strtol(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix); __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _strtol_l(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); unsigned long __attribute__((__cdecl__)) strtoul(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix); __attribute__ ((__dllimport__)) unsigned long __attribute__((__cdecl__)) _strtoul_l(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); int __attribute__((__cdecl__)) system(const char *_Command); __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ultoa(unsigned long _Value,char *_Dest,int _Radix) ; int __attribute__((__cdecl__)) wctomb(char *_MbCh,wchar_t _WCh) ; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wctomb_l(char *_MbCh,wchar_t _WCh,_locale_t _Locale) ; size_t __attribute__((__cdecl__)) wcstombs(char * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _MaxCount) ; __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _wcstombs_l(char * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _MaxCount,_locale_t _Locale) ; void *__attribute__((__cdecl__)) calloc(size_t _NumOfElements,size_t _SizeOfElements); void __attribute__((__cdecl__)) free(void *_Memory); void *__attribute__((__cdecl__)) malloc(size_t _Size); void *__attribute__((__cdecl__)) realloc(void *_Memory,size_t _NewSize); __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _recalloc(void *_Memory,size_t _Count,size_t _Size); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _aligned_free(void *_Memory); __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_malloc(size_t _Size,size_t _Alignment); __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset); __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment); __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment); __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset); __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _itow(int _Value,wchar_t *_Dest,int _Radix) ; __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ltow(long _Value,wchar_t *_Dest,int _Radix) ; __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix) ; double __attribute__((__cdecl__)) __mingw_wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr); float __attribute__((__cdecl__)) __mingw_wcstof(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr); long double __attribute__((__cdecl__)) __mingw_wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__); static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) double __attribute__((__cdecl__)) wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr){ return __mingw_wcstod(_Str,_EndPtr); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) float __attribute__((__cdecl__)) wcstof(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr){ return __mingw_wcstof(_Str,_EndPtr); } long double __attribute__((__cdecl__)) wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _wcstod_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,_locale_t _Locale); long __attribute__((__cdecl__)) wcstol(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix); __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _wcstol_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); unsigned long __attribute__((__cdecl__)) wcstoul(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix); __attribute__ ((__dllimport__)) unsigned long __attribute__((__cdecl__)) _wcstoul_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wgetenv(const wchar_t *_VarName) ; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wsystem(const wchar_t *_Command); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _wtof(const wchar_t *_Str); __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _wtof_l(const wchar_t *_Str,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wtoi(const wchar_t *_Str); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wtoi_l(const wchar_t *_Str,_locale_t _Locale); __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _wtol(const wchar_t *_Str); __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _wtol_l(const wchar_t *_Str,_locale_t _Locale); __extension__ __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _i64tow(long long _Val,wchar_t *_DstBuf,int _Radix) ; __extension__ __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ui64tow(unsigned long long _Val,wchar_t *_DstBuf,int _Radix) ; __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wtoi64(const wchar_t *_Str); __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wtoi64_l(const wchar_t *_Str,_locale_t _Locale); __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _wcstoui64_l(const wchar_t *_Str ,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putenv(const char *_EnvString); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wputenv(const wchar_t *_EnvString); __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes); __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign) ; __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign) ; __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _gcvt(double _Val,int _NumOfDigits,char *_DstBuf) ; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atodbl(_CRT_DOUBLE *_Result,char *_Str); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoldbl(_LDOUBLE *_Result,char *_Str); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoflt(_CRT_FLOAT *_Result,char *_Str); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atodbl_l(_CRT_DOUBLE *_Result,char *_Str,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoldbl_l(_LDOUBLE *_Result,char *_Str,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoflt_l(_CRT_FLOAT *_Result,char *_Str,_locale_t _Locale); unsigned long __attribute__((__cdecl__)) _lrotl(unsigned long,int); unsigned long __attribute__((__cdecl__)) _lrotr(unsigned long,int); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _makepath(char *_Path,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext); _onexit_t __attribute__((__cdecl__)) _onexit(_onexit_t _Func); void __attribute__((__cdecl__)) perror(const char *_ErrMsg); __extension__ unsigned long long __attribute__((__cdecl__)) _rotl64(unsigned long long _Val,int _Shift); __extension__ unsigned long long __attribute__((__cdecl__)) _rotr64(unsigned long long Value,int Shift); unsigned int __attribute__((__cdecl__)) _rotr(unsigned int _Val,int _Shift); unsigned int __attribute__((__cdecl__)) _rotl(unsigned int _Val,int _Shift); __extension__ unsigned long long __attribute__((__cdecl__)) _rotr64(unsigned long long _Val,int _Shift); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath) ; __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext) ; __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _swab(char *_Buf1,char *_Buf2,int _SizeInBytes); __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wperror(const wchar_t *_ErrMsg); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath) ; __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext) ; __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _beep(unsigned _Frequency,unsigned _Duration) __attribute__ ((__deprecated__)); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _seterrormode(int _Mode) __attribute__ ((__deprecated__)); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _sleep(unsigned long _Duration) __attribute__ ((__deprecated__)); char *__attribute__((__cdecl__)) ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign) ; char *__attribute__((__cdecl__)) fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign) ; char *__attribute__((__cdecl__)) gcvt(double _Val,int _NumOfDigits,char *_DstBuf) ; char *__attribute__((__cdecl__)) itoa(int _Val,char *_DstBuf,int _Radix) ; char *__attribute__((__cdecl__)) ltoa(long _Val,char *_DstBuf,int _Radix) ; int __attribute__((__cdecl__)) putenv(const char *_EnvString) ; void __attribute__((__cdecl__)) swab(char *_Buf1,char *_Buf2,int _SizeInBytes) ; char *__attribute__((__cdecl__)) ultoa(unsigned long _Val,char *_Dstbuf,int _Radix) ; _onexit_t __attribute__((__cdecl__)) onexit(_onexit_t _Func); typedef struct { __extension__ long long quot, rem; } lldiv_t; __extension__ lldiv_t __attribute__((__cdecl__)) lldiv(long long, long long); __extension__ long long __attribute__((__cdecl__)) llabs(long long); __extension__ extern inline __attribute__((__gnu_inline__)) long long __attribute__((__cdecl__)) llabs(long long _j) { return (_j >= 0 ? _j : -_j); } __extension__ long long __attribute__((__cdecl__)) strtoll(const char * __restrict__, char ** __restrict, int); __extension__ unsigned long long __attribute__((__cdecl__)) strtoull(const char * __restrict__, char ** __restrict__, int); __extension__ long long __attribute__((__cdecl__)) atoll (const char *); __extension__ long long __attribute__((__cdecl__)) wtoll (const wchar_t *); __extension__ char *__attribute__((__cdecl__)) lltoa (long long, char *, int); __extension__ char *__attribute__((__cdecl__)) ulltoa (unsigned long long , char *, int); __extension__ wchar_t *__attribute__((__cdecl__)) lltow (long long, wchar_t *, int); __extension__ wchar_t *__attribute__((__cdecl__)) ulltow (unsigned long long, wchar_t *, int); __extension__ extern inline __attribute__((__gnu_inline__)) long long __attribute__((__cdecl__)) atoll (const char * _c) { return _atoi64 (_c); } __extension__ extern inline __attribute__((__gnu_inline__)) char *__attribute__((__cdecl__)) lltoa (long long _n, char * _c, int _i) { return _i64toa (_n, _c, _i); } __extension__ extern inline __attribute__((__gnu_inline__)) char *__attribute__((__cdecl__)) ulltoa (unsigned long long _n, char * _c, int _i) { return _ui64toa (_n, _c, _i); } __extension__ extern inline __attribute__((__gnu_inline__)) long long __attribute__((__cdecl__)) wtoll (const wchar_t * _w) { return _wtoi64 (_w); } __extension__ extern inline __attribute__((__gnu_inline__)) wchar_t *__attribute__((__cdecl__)) lltow (long long _n, wchar_t * _w, int _i) { return _i64tow (_n, _w, _i); } __extension__ extern inline __attribute__((__gnu_inline__)) wchar_t *__attribute__((__cdecl__)) ulltow (unsigned long long _n, wchar_t * _w, int _i) { return _ui64tow (_n, _w, _i); } #pragma pack(pop) __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _i64toa_s(long long _Val,char *_DstBuf,size_t _Size,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ui64toa_s(unsigned long long _Val,char *_DstBuf,size_t _Size,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ltoa_s(long _Val,char *_DstBuf,size_t _Size,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) mbstowcs_s(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _mbstowcs_s_l(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ultoa_s(unsigned long _Val,char *_DstBuf,size_t _Size,int _Radix); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wctomb_s_l(int *_SizeConverted,char *_MbCh,size_t _SizeInBytes,wchar_t _WCh,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcstombs_s(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcstombs_s_l(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ecvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDights,int *_PtDec,int *_PtSign); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _fcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDec,int *_PtDec,int *_PtSign); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _gcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDigits); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _makepath_s(char *_PathResult,size_t _Size,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _putenv_s(const char *_Name,const char *_Value); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _searchenv_s(const char *_Filename,const char *_EnvVar,char *_ResultPath,size_t _SizeInBytes); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _splitpath_s(const char *_FullPath,char *_Drive,size_t _DriveSize,char *_Dir,size_t _DirSize,char *_Filename,size_t _FilenameSize,char *_Ext,size_t _ExtSize); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) qsort_s(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__attribute__((__cdecl__)) *_PtFuncCompare)(void *,const void *,const void *),void *_Context); #pragma pack(push,_CRT_PACKING) typedef struct _heapinfo { int *_pentry; size_t _size; int _useflag; } _HEAPINFO; extern unsigned int _amblksiz; void * __mingw_aligned_malloc (size_t _Size, size_t _Alignment); void __mingw_aligned_free (void *_Memory); void * __mingw_aligned_offset_realloc (void *_Memory, size_t _Size, size_t _Alignment, size_t _Offset); void * __mingw_aligned_realloc (void *_Memory, size_t _Size, size_t _Offset); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _resetstkoflw (void); __attribute__ ((__dllimport__)) unsigned long __attribute__((__cdecl__)) _set_malloc_crt_max_wait(unsigned long _NewValue); __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _expand(void *_Memory,size_t _NewSize); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _msize(void *_Memory); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _get_sbh_threshold(void); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_sbh_threshold(size_t _NewValue); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _set_amblksiz(size_t _Value); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_amblksiz(size_t *_Value); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapadd(void *_Memory,size_t _Size); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapchk(void); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapmin(void); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapset(unsigned int _Fill); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapwalk(_HEAPINFO *_EntryInfo); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _heapused(size_t *_Used,size_t *_Commit); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _get_heap_handle(void); static __inline void *_MarkAllocaS(void *_Ptr,unsigned int _Marker) { if(_Ptr) { *((unsigned int*)_Ptr) = _Marker; _Ptr = (char*)_Ptr + 16; } return _Ptr; } static __inline void __attribute__((__cdecl__)) _freea(void *_Memory) { unsigned int _Marker; if(_Memory) { _Memory = (char*)_Memory - 16; _Marker = *(unsigned int *)_Memory; if(_Marker==0xDDDD) { free(_Memory); } } } #pragma pack(pop) unsigned avutil_version(void); const char *av_version_info(void); const char *avutil_configuration(void); const char *avutil_license(void); enum AVMediaType { AVMEDIA_TYPE_UNKNOWN = -1, AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_DATA, AVMEDIA_TYPE_SUBTITLE, AVMEDIA_TYPE_ATTACHMENT, AVMEDIA_TYPE_NB }; const char *av_get_media_type_string(enum AVMediaType media_type); enum AVPictureType { AV_PICTURE_TYPE_NONE = 0, AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, AV_PICTURE_TYPE_S, AV_PICTURE_TYPE_SI, AV_PICTURE_TYPE_SP, AV_PICTURE_TYPE_BI, }; char av_get_picture_type_char(enum AVPictureType pict_type); #pragma pack(push,_CRT_PACKING) struct _iobuf { char *_ptr; int _cnt; char *_base; int _flag; int _file; int _charbuf; int _bufsiz; char *_tmpfname; }; typedef struct _iobuf FILE; typedef long _off_t; typedef long off32_t; __extension__ typedef long long _off64_t; __extension__ typedef long long off64_t; typedef off64_t off_t; __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __acrt_iob_func(unsigned index); __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __iob_func(void); __extension__ typedef long long fpos_t; extern __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); extern __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp); extern __attribute__((__format__ (gnu_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __mingw_scanf(const char * __restrict__ _Format,...); extern __attribute__((__format__ (gnu_scanf, 1, 0))) __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __mingw_vscanf(const char * __restrict__ Format, va_list argp); extern __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); extern __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_vfscanf (FILE * __restrict__ fp, const char * __restrict__ Format,va_list argp); extern __attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) int __attribute__((__cdecl__)) __mingw_vsnprintf(char * __restrict__ _DstBuf,size_t _MaxCount,const char * __restrict__ _Format, va_list _ArgList); extern __attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) int __attribute__((__cdecl__)) __mingw_snprintf(char * __restrict__ s, size_t n, const char * __restrict__ format, ...); extern __attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __mingw_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (gnu_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __mingw_vprintf (const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_sprintf (char * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__((nonnull (1,2))) int __attribute__((__cdecl__)) __mingw_asprintf(char ** __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__((nonnull (1,2))) int __attribute__((__cdecl__)) __mingw_vasprintf(char ** __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (ms_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); extern __attribute__((__format__ (ms_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __ms_scanf(const char * __restrict__ _Format,...); extern __attribute__((__format__ (ms_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); extern __attribute__((__format__ (ms_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __ms_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (ms_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __ms_vprintf (const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (ms_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (ms_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (ms_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_sprintf (char * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); extern __attribute__((__format__ (ms_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) int sscanf(const char *__source, const char *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vsscanf( __source, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) int scanf(const char *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vfscanf( (__acrt_iob_func(0)), __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) int fscanf(FILE *__stream, const char *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vfscanf( __stream, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) int vsscanf (const char *__source, const char *__format, __builtin_va_list __local_argv) { return __mingw_vsscanf( __source, __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_scanf, 1, 0))) __attribute__ ((__nonnull__ (1))) int vscanf(const char *__format, __builtin_va_list __local_argv) { return __mingw_vfscanf( (__acrt_iob_func(0)), __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) int vfscanf (FILE *__stream, const char *__format, __builtin_va_list __local_argv) { return __mingw_vfscanf( __stream, __format, __local_argv ); } #pragma GCC diagnostic pop static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) int fprintf (FILE *__stream, const char *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vfprintf( __stream, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) int printf (const char *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vfprintf( (__acrt_iob_func(1)), __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) int sprintf (char *__stream, const char *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vsprintf( __stream, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) int vfprintf (FILE *__stream, const char *__format, __builtin_va_list __local_argv) { return __mingw_vfprintf( __stream, __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) int vprintf (const char *__format, __builtin_va_list __local_argv) { return __mingw_vfprintf( (__acrt_iob_func(1)), __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) int vsprintf (char *__stream, const char *__format, __builtin_va_list __local_argv) { return __mingw_vsprintf( __stream, __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) int snprintf (char *__stream, size_t __n, const char *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vsnprintf( __stream, __n, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_list __local_argv) { return __mingw_vsnprintf( __stream, __n, __format, __local_argv ); } __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _filbuf(FILE *_File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _flsbuf(int _Ch,FILE *_File); __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fsopen(const char *_Filename,const char *_Mode,int _ShFlag); void __attribute__((__cdecl__)) clearerr(FILE *_File); int __attribute__((__cdecl__)) fclose(FILE *_File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fcloseall(void); __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fdopen(int _FileHandle,const char *_Mode); int __attribute__((__cdecl__)) feof(FILE *_File); int __attribute__((__cdecl__)) ferror(FILE *_File); int __attribute__((__cdecl__)) fflush(FILE *_File); int __attribute__((__cdecl__)) fgetc(FILE *_File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fgetchar(void); int __attribute__((__cdecl__)) fgetpos(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); int __attribute__((__cdecl__)) fgetpos64(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); char *__attribute__((__cdecl__)) fgets(char * __restrict__ _Buf,int _MaxCount,FILE * __restrict__ _File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fileno(FILE *_File); __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _tempnam(const char *_DirName,const char *_FilePrefix); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _flushall(void); FILE *__attribute__((__cdecl__)) fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) ; FILE *fopen64(const char * __restrict__ filename,const char * __restrict__ mode); int __attribute__((__cdecl__)) fputc(int _Ch,FILE *_File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fputchar(int _Ch); int __attribute__((__cdecl__)) fputs(const char * __restrict__ _Str,FILE * __restrict__ _File); size_t __attribute__((__cdecl__)) fread(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File); FILE *__attribute__((__cdecl__)) freopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode,FILE * __restrict__ _File) ; int __attribute__((__cdecl__)) fsetpos(FILE *_File,const fpos_t *_Pos); int __attribute__((__cdecl__)) fsetpos64(FILE *_File,const fpos_t *_Pos); int __attribute__((__cdecl__)) fseek(FILE *_File,long _Offset,int _Origin); long __attribute__((__cdecl__)) ftell(FILE *_File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fseeki64(FILE *_File,long long _Offset,int _Origin); __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _ftelli64(FILE *_File); int fseeko64(FILE* stream, _off64_t offset, int whence); int fseeko(FILE* stream, _off_t offset, int whence); _off_t ftello(FILE * stream); _off64_t ftello64(FILE * stream); size_t __attribute__((__cdecl__)) fwrite(const void * __restrict__ _Str,size_t _Size,size_t _Count,FILE * __restrict__ _File); int __attribute__((__cdecl__)) getc(FILE *_File); int __attribute__((__cdecl__)) getchar(void); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _getmaxstdio(void); char *__attribute__((__cdecl__)) gets(char *_Buffer) ; int __attribute__((__cdecl__)) _getw(FILE *_File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _pclose(FILE *_File); __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _popen(const char *_Command,const char *_Mode); int __attribute__((__cdecl__)) putc(int _Ch,FILE *_File); int __attribute__((__cdecl__)) putchar(int _Ch); int __attribute__((__cdecl__)) puts(const char *_Str); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putw(int _Word,FILE *_File); int __attribute__((__cdecl__)) remove(const char *_Filename); int __attribute__((__cdecl__)) rename(const char *_OldFilename,const char *_NewFilename); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _unlink(const char *_Filename); int __attribute__((__cdecl__)) unlink(const char *_Filename) ; void __attribute__((__cdecl__)) rewind(FILE *_File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _rmtmp(void); void __attribute__((__cdecl__)) setbuf(FILE * __restrict__ _File,char * __restrict__ _Buffer) ; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _setmaxstdio(int _Max); __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _set_output_format(unsigned int _Format); __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _get_output_format(void); int __attribute__((__cdecl__)) setvbuf(FILE * __restrict__ _File,char * __restrict__ _Buf,int _Mode,size_t _Size); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf(const char * __restrict__ _Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf(const char * __restrict__ _Src,size_t _MaxCount,const char * __restrict__ _Format,...) ; FILE *__attribute__((__cdecl__)) tmpfile(void) ; char *__attribute__((__cdecl__)) tmpnam(char *_Buffer); int __attribute__((__cdecl__)) ungetc(int _Ch,FILE *_File); __attribute__((__format__ (ms_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,...) ; __attribute__((__format__ (ms_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,va_list _Args) ; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf(const char * __restrict__ _Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_printf_count_output(int _Value); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _get_printf_count_output(void); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_vswscanf (const wchar_t * __restrict__ _Str,const wchar_t * __restrict__ Format,va_list argp); __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __mingw_wscanf(const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list argp); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * __restrict__ Format,va_list argp); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __mingw_wprintf(const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __mingw_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); __attribute__ ((__nonnull__ (3))) int __attribute__((__cdecl__)) __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); __attribute__ ((__nonnull__ (3))) int __attribute__((__cdecl__)) __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __mingw_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __ms_wscanf(const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __ms_wprintf(const wchar_t * __restrict__ _Format,...); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); __attribute__ ((__nonnull__ (1))) int __attribute__((__cdecl__)) __ms_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); __attribute__ ((__nonnull__ (2))) int __attribute__((__cdecl__)) __ms_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (2))) int swscanf(const wchar_t *__source, const wchar_t *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vswscanf( __source, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (1))) int wscanf(const wchar_t *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vfwscanf( (__acrt_iob_func(0)), __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (2))) int fwscanf(FILE *__stream, const wchar_t *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vfwscanf( __stream, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (2))) int vswscanf (const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, __builtin_va_list __local_argv) { return __mingw_vswscanf( __source, __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (1))) int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv) { return __mingw_vfwscanf( (__acrt_iob_func(0)), __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (2))) int vfwscanf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv) { return __mingw_vfwscanf( __stream, __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (2))) int fwprintf (FILE *__stream, const wchar_t *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vfwprintf( __stream, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (1))) int wprintf (const wchar_t *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vfwprintf( (__acrt_iob_func(1)), __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (2))) int vfwprintf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv) { return __mingw_vfwprintf( __stream, __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (1))) int vwprintf (const wchar_t *__format, __builtin_va_list __local_argv) { return __mingw_vfwprintf( (__acrt_iob_func(1)), __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (3))) int snwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (3))) int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) { return __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); } __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag); wint_t __attribute__((__cdecl__)) fgetwc(FILE *_File); __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fgetwchar(void); wint_t __attribute__((__cdecl__)) fputwc(wchar_t _Ch,FILE *_File); __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fputwchar(wchar_t _Ch); wint_t __attribute__((__cdecl__)) getwc(FILE *_File); wint_t __attribute__((__cdecl__)) getwchar(void); wint_t __attribute__((__cdecl__)) putwc(wchar_t _Ch,FILE *_File); wint_t __attribute__((__cdecl__)) putwchar(wchar_t _Ch); wint_t __attribute__((__cdecl__)) ungetwc(wint_t _Ch,FILE *_File); wchar_t *__attribute__((__cdecl__)) fgetws(wchar_t * __restrict__ _Dst,int _SizeInWords,FILE * __restrict__ _File); int __attribute__((__cdecl__)) fputws(const wchar_t * __restrict__ _Str,FILE * __restrict__ _File); __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _getws(wchar_t *_String) ; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putws(const wchar_t *_Str); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf(const wchar_t * __restrict__ _Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) ; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) ; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args); static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (3))) int vswprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, __builtin_va_list __local_argv) { return vsnwprintf( __stream, __count, __format, __local_argv ); } static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) __attribute__ ((__nonnull__ (3))) int swprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, ...) { int __retval; __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); __retval = vswprintf( __stream, __count, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; } __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...); __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfdopen(int _FileHandle ,const wchar_t *_Mode); __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t *__restrict__ _Mode) ; __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfreopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) ; __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wpopen(const wchar_t *_Command,const wchar_t *_Mode); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wremove(const wchar_t *_Filename); __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wtmpnam(wchar_t *_Buffer); __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fgetwc_nolock(FILE *_File); __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fputwc_nolock(wchar_t _Ch,FILE *_File); __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _ungetwc_nolock(wint_t _Ch,FILE *_File); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _lock_file(FILE *_File); __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _unlock_file(FILE *_File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fclose_nolock(FILE *_File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fflush_nolock(FILE *_File); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _fread_nolock(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fseek_nolock(FILE *_File,long _Offset,int _Origin); __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _ftell_nolock(FILE *_File); __extension__ __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fseeki64_nolock(FILE *_File,long long _Offset,int _Origin); __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _ftelli64_nolock(FILE *_File); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _fwrite_nolock(const void * __restrict__ _DstBuf,size_t _Size,size_t _Count,FILE * __restrict__ _File); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _ungetc_nolock(int _Ch,FILE *_File); char *__attribute__((__cdecl__)) tempnam(const char *_Directory,const char *_FilePrefix) ; int __attribute__((__cdecl__)) fcloseall(void) ; FILE *__attribute__((__cdecl__)) fdopen(int _FileHandle,const char *_Format) ; int __attribute__((__cdecl__)) fgetchar(void) ; int __attribute__((__cdecl__)) fileno(FILE *_File) ; int __attribute__((__cdecl__)) flushall(void) ; int __attribute__((__cdecl__)) fputchar(int _Ch) ; int __attribute__((__cdecl__)) getw(FILE *_File) ; int __attribute__((__cdecl__)) putw(int _Ch,FILE *_File) ; int __attribute__((__cdecl__)) rmtmp(void) ; int __attribute__((__cdecl__)) __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen); int __attribute__((__cdecl__)) __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen); void __attribute__((__cdecl__)) __mingw_str_free(void *ptr); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList); __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); #pragma pack(pop) __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) clearerr_s(FILE *_File); size_t __attribute__((__cdecl__)) fread_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); int __attribute__((__cdecl__)) fprintf_s(FILE *_File,const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fscanf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) fscanf_s(FILE *_File, const char *_Format, ...); int __attribute__((__cdecl__)) printf_s(const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scanf_l(const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scanf_s_l(const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) scanf_s(const char *_Format, ...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fscanf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sscanf_l(const char *_Src,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sscanf_s_l(const char *_Src,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) sscanf_s(const char *_Src,const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf_s(const char *_Src,size_t _MaxCount,const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf_s_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); int __attribute__((__cdecl__)) vfprintf_s(FILE *_File,const char *_Format,va_list _ArgList); int __attribute__((__cdecl__)) vprintf_s(const char *_Format,va_list _ArgList); int __attribute__((__cdecl__)) vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); __attribute__((dllimport)) int __attribute__((__cdecl__)) vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList); __attribute__((dllimport)) int __attribute__((__cdecl__)) sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_p(FILE *_File,const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_p(const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_p(FILE *_File,const char *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_p(const char *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf_p(const char *_Format,...); __attribute__((dllimport)) int __attribute__((__cdecl__)) _vscprintf_p(const char *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_l(const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_p_l(const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_l(char *_DstBuf,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_l(char *_DstBuf,const char *_Format,_locale_t,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf_l(const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf_p_l(const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_s_l(const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) fopen_s(FILE **_File,const char *_Filename,const char *_Mode); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) freopen_s(FILE** _File, const char *_Filename, const char *_Mode, FILE *_Stream); __attribute__ ((__dllimport__)) char* __attribute__((__cdecl__)) gets_s(char*,rsize_t); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) tmpnam_s(char*,rsize_t); __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _getws_s(wchar_t *_Str,size_t _SizeInWords); int __attribute__((__cdecl__)) fwprintf_s(FILE *_File,const wchar_t *_Format,...); int __attribute__((__cdecl__)) wprintf_s(const wchar_t *_Format,...); int __attribute__((__cdecl__)) vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList); int __attribute__((__cdecl__)) vwprintf_s(const wchar_t *_Format,va_list _ArgList); int __attribute__((__cdecl__)) vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); int __attribute__((__cdecl__)) swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) fwscanf_s(FILE *_File, const wchar_t *_Format, ...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) swscanf_s(const wchar_t *_Src,const wchar_t *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) wscanf_s(const wchar_t *_Format, ...); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_p(FILE *_File,const wchar_t *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_p(const wchar_t *_Format,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_p(const wchar_t *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...); __attribute__((dllimport)) int __attribute__((__cdecl__)) _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf_p(const wchar_t *_Format,...); __attribute__((dllimport)) int __attribute__((__cdecl__)) _vscwprintf_p(const wchar_t *_Format,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _fread_nolock_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount); void *__attribute__((__cdecl__)) memchr(const void *_Buf ,int _Val,size_t _MaxCount); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale); int __attribute__((__cdecl__)) memcmp(const void *_Buf1,const void *_Buf2,size_t _Size); void * __attribute__((__cdecl__)) memcpy(void * __restrict__ _Dst,const void * __restrict__ _Src,size_t _Size) ; __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) memcpy_s (void *_dest,size_t _numberOfElements,const void *_src,size_t _count); void * __attribute__((__cdecl__)) mempcpy (void *_Dst, const void *_Src, size_t _Size); void * __attribute__((__cdecl__)) memset(void *_Dst,int _Val,size_t _Size); void * __attribute__((__cdecl__)) memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size) ; int __attribute__((__cdecl__)) memicmp(const void *_Buf1,const void *_Buf2,size_t _Size) ; char * __attribute__((__cdecl__)) _strset(char *_Str,int _Val) ; char * __attribute__((__cdecl__)) _strset_l(char *_Str,int _Val,_locale_t _Locale) ; char * __attribute__((__cdecl__)) strcpy(char * __restrict__ _Dest,const char * __restrict__ _Source); char * __attribute__((__cdecl__)) strcat(char * __restrict__ _Dest,const char * __restrict__ _Source); int __attribute__((__cdecl__)) strcmp(const char *_Str1,const char *_Str2); size_t __attribute__((__cdecl__)) strlen(const char *_Str); size_t __attribute__((__cdecl__)) strnlen(const char *_Str,size_t _MaxCount); void *__attribute__((__cdecl__)) memmove(void *_Dst,const void *_Src,size_t _Size) ; __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strdup(const char *_Src); char *__attribute__((__cdecl__)) strchr(const char *_Str,int _Val); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _stricmp(const char *_Str1,const char *_Str2); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _strcmpi(const char *_Str1,const char *_Str2); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _stricmp_l(const char *_Str1,const char *_Str2,_locale_t _Locale); int __attribute__((__cdecl__)) strcoll(const char *_Str1,const char *_Str2); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _strcoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _stricoll(const char *_Str1,const char *_Str2); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _stricoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _strncoll (const char *_Str1,const char *_Str2,size_t _MaxCount); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _strncoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _strnicoll (const char *_Str1,const char *_Str2,size_t _MaxCount); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _strnicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); size_t __attribute__((__cdecl__)) strcspn(const char *_Str,const char *_Control); __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strerror(const char *_ErrMsg) ; char *__attribute__((__cdecl__)) strerror(int) ; __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strlwr(char *_String) ; char *strlwr_l(char *_String,_locale_t _Locale) ; char *__attribute__((__cdecl__)) strncat(char * __restrict__ _Dest,const char * __restrict__ _Source,size_t _Count) ; int __attribute__((__cdecl__)) strncmp(const char *_Str1,const char *_Str2,size_t _MaxCount); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _strnicmp(const char *_Str1,const char *_Str2,size_t _MaxCount); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _strnicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale); char *strncpy(char * __restrict__ _Dest,const char * __restrict__ _Source,size_t _Count) ; __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strnset(char *_Str,int _Val,size_t _MaxCount) ; __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strnset_l(char *str,int c,size_t count,_locale_t _Locale) ; char *__attribute__((__cdecl__)) strpbrk(const char *_Str,const char *_Control); char *__attribute__((__cdecl__)) strrchr(const char *_Str,int _Ch); __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strrev(char *_Str); size_t __attribute__((__cdecl__)) strspn(const char *_Str,const char *_Control); char *__attribute__((__cdecl__)) strstr(const char *_Str,const char *_SubStr); char *__attribute__((__cdecl__)) strtok(char * __restrict__ _Str,const char * __restrict__ _Delim) ; char *strtok_r(char * __restrict__ _Str, const char * __restrict__ _Delim, char ** __restrict__ __last); __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strupr(char *_String) ; __attribute__ ((__dllimport__)) char *_strupr_l(char *_String,_locale_t _Locale) ; size_t __attribute__((__cdecl__)) strxfrm(char * __restrict__ _Dst,const char * __restrict__ _Src,size_t _MaxCount); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _strxfrm_l(char * __restrict__ _Dst,const char * __restrict__ _Src,size_t _MaxCount,_locale_t _Locale); char *__attribute__((__cdecl__)) strdup(const char *_Src) ; int __attribute__((__cdecl__)) strcmpi(const char *_Str1,const char *_Str2) ; int __attribute__((__cdecl__)) stricmp(const char *_Str1,const char *_Str2) ; char *__attribute__((__cdecl__)) strlwr(char *_Str) ; int __attribute__((__cdecl__)) strnicmp(const char *_Str1,const char *_Str,size_t _MaxCount) ; int __attribute__((__cdecl__)) strncasecmp (const char *, const char *, size_t); int __attribute__((__cdecl__)) strcasecmp (const char *, const char *); extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) strncasecmp (const char *__sz1, const char *__sz2, size_t __sizeMaxCompare) { return _strnicmp (__sz1, __sz2, __sizeMaxCompare); } extern inline __attribute__((__gnu_inline__)) int __attribute__((__cdecl__)) strcasecmp (const char *__sz1, const char *__sz2) { return _stricmp (__sz1, __sz2); } char *__attribute__((__cdecl__)) strnset(char *_Str,int _Val,size_t _MaxCount) ; char *__attribute__((__cdecl__)) strrev(char *_Str) ; char *__attribute__((__cdecl__)) strset(char *_Str,int _Val) ; char *__attribute__((__cdecl__)) strupr(char *_Str) ; __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsdup(const wchar_t *_Str); wchar_t *__attribute__((__cdecl__)) wcscat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) ; wchar_t *__attribute__((__cdecl__)) wcschr(const wchar_t *_Str,wchar_t _Ch); int __attribute__((__cdecl__)) wcscmp(const wchar_t *_Str1,const wchar_t *_Str2); wchar_t *__attribute__((__cdecl__)) wcscpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) ; size_t __attribute__((__cdecl__)) wcscspn(const wchar_t *_Str,const wchar_t *_Control); size_t __attribute__((__cdecl__)) wcslen(const wchar_t *_Str); size_t __attribute__((__cdecl__)) wcsnlen(const wchar_t *_Src,size_t _MaxCount); wchar_t *wcsncat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) ; int __attribute__((__cdecl__)) wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); wchar_t *wcsncpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) ; wchar_t *__attribute__((__cdecl__)) _wcsncpy_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count,_locale_t _Locale) ; wchar_t *__attribute__((__cdecl__)) wcspbrk(const wchar_t *_Str,const wchar_t *_Control); wchar_t *__attribute__((__cdecl__)) wcsrchr(const wchar_t *_Str,wchar_t _Ch); size_t __attribute__((__cdecl__)) wcsspn(const wchar_t *_Str,const wchar_t *_Control); wchar_t *__attribute__((__cdecl__)) wcsstr(const wchar_t *_Str,const wchar_t *_SubStr); wchar_t *__attribute__((__cdecl__)) wcstok(wchar_t * __restrict__ _Str,const wchar_t * __restrict__ _Delim) ; __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcserror(int _ErrNum) ; __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) __wcserror(const wchar_t *_Str) ; __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) ; __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsrev(wchar_t *_Str); __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsset(wchar_t *_Str,wchar_t _Val) ; __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcslwr(wchar_t *_String) ; __attribute__ ((__dllimport__)) wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale) ; __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsupr(wchar_t *_String) ; __attribute__ ((__dllimport__)) wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale) ; size_t __attribute__((__cdecl__)) wcsxfrm(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount); __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _wcsxfrm_l(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount,_locale_t _Locale); int __attribute__((__cdecl__)) wcscoll(const wchar_t *_Str1,const wchar_t *_Str2); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); wchar_t *__attribute__((__cdecl__)) wcsdup(const wchar_t *_Str) ; int __attribute__((__cdecl__)) wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2) ; int __attribute__((__cdecl__)) wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount) ; wchar_t *__attribute__((__cdecl__)) wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) ; wchar_t *__attribute__((__cdecl__)) wcsrev(wchar_t *_Str) ; wchar_t *__attribute__((__cdecl__)) wcsset(wchar_t *_Str,wchar_t _Val) ; wchar_t *__attribute__((__cdecl__)) wcslwr(wchar_t *_Str) ; wchar_t *__attribute__((__cdecl__)) wcsupr(wchar_t *_Str) ; int __attribute__((__cdecl__)) wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2) ; __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _strset_s(char *_Dst,size_t _DstSize,int _Value); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _strerror_s(char *_Buf,size_t _SizeInBytes,const char *_ErrMsg); __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) strerror_s(char *_Buf,size_t _SizeInBytes,int _ErrNum); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _strlwr_s(char *_Str,size_t _Size); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _strlwr_s_l(char *_Str,size_t _Size,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _strnset_s(char *_Str,size_t _Size,int _Val,size_t _MaxCount); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _strupr_s(char *_Str,size_t _Size); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _strupr_s_l(char *_Str,size_t _Size,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) strncat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _strncat_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) strcpy_s(char *_Dst, rsize_t _SizeInBytes, const char *_Src); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) strncpy_s(char *_Dst, size_t _DstSizeInChars, const char *_Src, size_t _MaxCount); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _strncpy_s_l(char *_Dst, size_t _DstSizeInChars, const char *_Src, size_t _MaxCount, _locale_t _Locale); ; __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) strtok_s(char *_Str,const char *_Delim,char **_Context); __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strtok_s_l(char *_Str,const char *_Delim,char **_Context,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) strcat_s(char *_Dst, rsize_t _SizeInBytes, const char * _Src); __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) memmove_s(void *_dest,size_t _numberOfElements,const void *_src,size_t _count); __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcslwr_s(wchar_t *_Str,size_t _SizeInWords); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsupr_s(wchar_t *_Str,size_t _Size); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcscpy_s(wchar_t *_Dst, rsize_t _SizeInWords, const wchar_t *_Src); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcscat_s(wchar_t * _Dst, rsize_t _SizeInWords, const wchar_t *_Src); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsncat_s(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsncat_s_l(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsncpy_s(wchar_t *_Dst, size_t _DstSizeInChars, const wchar_t *_Src, size_t _MaxCount); ; __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsncpy_s_l(wchar_t *_Dst, size_t _DstSizeInChars, const wchar_t *_Src, size_t _MaxCount, _locale_t _Locale); ; __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcstok_s_l(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val,_locale_t _Locale); __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsnset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val, size_t _Count,_locale_t _Locale); extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) size_t __attribute__((__cdecl__)) wcsnlen_s(const wchar_t * _src, size_t _count) { return _src ? wcsnlen(_src, _count) : 0; } extern const uint8_t ff_log2_tab[256]; static __attribute__((always_inline)) inline __attribute__((const)) int av_clip_c(int a, int amin, int amax) { if (a < amin) return amin; else if (a > amax) return amax; else return a; } static __attribute__((always_inline)) inline __attribute__((const)) int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax) { if (a < amin) return amin; else if (a > amax) return amax; else return a; } static __attribute__((always_inline)) inline __attribute__((const)) uint8_t av_clip_uint8_c(int a) { if (a&(~0xFF)) return (~a)>>31; else return a; } static __attribute__((always_inline)) inline __attribute__((const)) int8_t av_clip_int8_c(int a) { if ((a+0x80U) & ~0xFF) return (a>>31) ^ 0x7F; else return a; } static __attribute__((always_inline)) inline __attribute__((const)) uint16_t av_clip_uint16_c(int a) { if (a&(~0xFFFF)) return (~a)>>31; else return a; } static __attribute__((always_inline)) inline __attribute__((const)) int16_t av_clip_int16_c(int a) { if ((a+0x8000U) & ~0xFFFF) return (a>>31) ^ 0x7FFF; else return a; } static __attribute__((always_inline)) inline __attribute__((const)) int32_t av_clipl_int32_c(int64_t a) { if ((a+0x80000000u) & ~0xFFFFFFFFULL) return (int32_t)((a>>63) ^ 0x7FFFFFFF); else return (int32_t)a; } static __attribute__((always_inline)) inline __attribute__((const)) int av_clip_intp2_c(int a, int p) { if (((unsigned)a + (1 << p)) & ~((2 << p) - 1)) return (a >> 31) ^ ((1 << p) - 1); else return a; } static __attribute__((always_inline)) inline __attribute__((const)) unsigned av_clip_uintp2_c(int a, int p) { if (a & ~((1<
> 31 & ((1<
amax) return amax;
else return a;
}
static __attribute__((always_inline)) inline __attribute__((const)) double av_clipd_c(double a, double amin, double amax)
{
if (a < amin) return amin;
else if (a > amax) return amax;
else return a;
}
static __attribute__((always_inline)) inline __attribute__((const)) int av_ceil_log2_c(int x)
{
return (31 - __builtin_clz(((x - 1U) << 1)|1));
}
static __attribute__((always_inline)) inline __attribute__((const)) int av_popcount_c(uint32_t x)
{
x -= (x >> 1) & 0x55555555;
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
x = (x + (x >> 4)) & 0x0F0F0F0F;
x += x >> 8;
return (x + (x >> 16)) & 0x3F;
}
static __attribute__((always_inline)) inline __attribute__((const)) int av_popcount64_c(uint64_t x)
{
return av_popcount_c((uint32_t)x) + av_popcount_c((uint32_t)(x >> 32));
}
static __attribute__((always_inline)) inline __attribute__((const)) int av_parity_c(uint32_t v)
{
return av_popcount_c(v) & 1;
}
typedef long long int ptrdiff_t;
typedef long long unsigned int size_t;
typedef struct {
long long __clang_max_align_nonce1
__attribute__((__aligned__(__alignof__(long long))));
long double __clang_max_align_nonce2
__attribute__((__aligned__(__alignof__(long double))));
} max_align_t;
int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
static inline char *av_make_error_string(char *errbuf, size_t errbuf_size, int errnum)
{
av_strerror(errnum, errbuf, errbuf_size);
return errbuf;
}
void *av_malloc(size_t size) __attribute__((__malloc__)) ;
void *av_mallocz(size_t size) __attribute__((__malloc__)) ;
void *av_malloc_array(size_t nmemb, size_t size);
void *av_mallocz_array(size_t nmemb, size_t size);
void *av_calloc(size_t nmemb, size_t size) __attribute__((__malloc__));
void *av_realloc(void *ptr, size_t size) ;
__attribute__((warn_unused_result))
int av_reallocp(void *ptr, size_t size);
void *av_realloc_f(void *ptr, size_t nelem, size_t elsize);
void *av_realloc_array(void *ptr, size_t nmemb, size_t size);
int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size);
void av_free(void *ptr);
void av_freep(void *ptr);
char *av_strdup(const char *s) __attribute__((__malloc__));
char *av_strndup(const char *s, size_t len) __attribute__((__malloc__));
void *av_memdup(const void *p, size_t size);
void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);
__attribute__((warn_unused_result))
int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem);
void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
const uint8_t *elem_data);
static inline int av_size_mult(size_t a, size_t b, size_t *r)
{
size_t t = a * b;
if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)
return (-(22));
*r = t;
return 0;
}
void av_max_alloc(size_t max);
__attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line);
__attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _assert (const char *_Message, const char *_File, unsigned _Line);
typedef __builtin_va_list va_list;
typedef enum {
AV_CLASS_CATEGORY_NA = 0,
AV_CLASS_CATEGORY_INPUT,
AV_CLASS_CATEGORY_OUTPUT,
AV_CLASS_CATEGORY_MUXER,
AV_CLASS_CATEGORY_DEMUXER,
AV_CLASS_CATEGORY_ENCODER,
AV_CLASS_CATEGORY_DECODER,
AV_CLASS_CATEGORY_FILTER,
AV_CLASS_CATEGORY_BITSTREAM_FILTER,
AV_CLASS_CATEGORY_SWSCALER,
AV_CLASS_CATEGORY_SWRESAMPLER,
AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 40,
AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
AV_CLASS_CATEGORY_DEVICE_OUTPUT,
AV_CLASS_CATEGORY_DEVICE_INPUT,
AV_CLASS_CATEGORY_NB
}AVClassCategory;
struct AVOptionRanges;
typedef struct AVClass {
const char* class_name;
const char* (*item_name)(void* ctx);
const struct AVOption *option;
int version;
int log_level_offset_offset;
int parent_log_context_offset;
void* (*child_next)(void *obj, void *prev);
__attribute__((deprecated))
const struct AVClass* (*child_class_next)(const struct AVClass *prev);
AVClassCategory category;
AVClassCategory (*get_category)(void* ctx);
int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
const struct AVClass* (*child_class_iterate)(void **iter);
} AVClass;
void av_log(void *avcl, int level, const char *fmt, ...) __attribute__((__format__(__printf__, 3, 4)));
void av_log_once(void* avcl, int initial_level, int subsequent_level, int *state, const char *fmt, ...) __attribute__((__format__(__printf__, 5, 6)));
void av_vlog(void *avcl, int level, const char *fmt, va_list vl);
int av_log_get_level(void);
void av_log_set_level(int level);
void av_log_set_callback(void (*callback)(void*, int, const char*, va_list));
void av_log_default_callback(void *avcl, int level, const char *fmt,
va_list vl);
const char* av_default_item_name(void* ctx);
AVClassCategory av_default_get_category(void *ptr);
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
char *line, int line_size, int *print_prefix);
int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
char *line, int line_size, int *print_prefix);
void av_log_set_flags(int arg);
int av_log_get_flags(void);
static inline uint64_t read_time(void)
{
uint64_t cycle_counter;
__asm__ volatile(
"isb \t\n"
"mrs %0, pmccntr_el0 "
: "=r"(cycle_counter) :: "memory" );
return cycle_counter;
}
int av_get_cpu_flags(void);
void av_force_cpu_flags(int flags);
__attribute__((deprecated)) void av_set_cpu_flags_mask(int mask);
__attribute__((deprecated))
int av_parse_cpu_flags(const char *s);
int av_parse_cpu_caps(unsigned *flags, const char *s);
int av_cpu_count(void);
size_t av_cpu_max_align(void);
typedef struct AVDictionaryEntry {
char *key;
char *value;
} AVDictionaryEntry;
typedef struct AVDictionary AVDictionary;
AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
const AVDictionaryEntry *prev, int flags);
int av_dict_count(const AVDictionary *m);
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags);
int av_dict_parse_string(AVDictionary **pm, const char *str,
const char *key_val_sep, const char *pairs_sep,
int flags);
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);
void av_dict_free(AVDictionary **m);
int av_dict_get_string(const AVDictionary *m, char **buffer,
const char key_val_sep, const char pairs_sep);
enum AVPixelFormat {
AV_PIX_FMT_NONE = -1,
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUYV422,
AV_PIX_FMT_RGB24,
AV_PIX_FMT_BGR24,
AV_PIX_FMT_YUV422P,
AV_PIX_FMT_YUV444P,
AV_PIX_FMT_YUV410P,
AV_PIX_FMT_YUV411P,
AV_PIX_FMT_GRAY8,
AV_PIX_FMT_MONOWHITE,
AV_PIX_FMT_MONOBLACK,
AV_PIX_FMT_PAL8,
AV_PIX_FMT_YUVJ420P,
AV_PIX_FMT_YUVJ422P,
AV_PIX_FMT_YUVJ444P,
AV_PIX_FMT_UYVY422,
AV_PIX_FMT_UYYVYY411,
AV_PIX_FMT_BGR8,
AV_PIX_FMT_BGR4,
AV_PIX_FMT_BGR4_BYTE,
AV_PIX_FMT_RGB8,
AV_PIX_FMT_RGB4,
AV_PIX_FMT_RGB4_BYTE,
AV_PIX_FMT_NV12,
AV_PIX_FMT_NV21,
AV_PIX_FMT_ARGB,
AV_PIX_FMT_RGBA,
AV_PIX_FMT_ABGR,
AV_PIX_FMT_BGRA,
AV_PIX_FMT_GRAY16BE,
AV_PIX_FMT_GRAY16LE,
AV_PIX_FMT_YUV440P,
AV_PIX_FMT_YUVJ440P,
AV_PIX_FMT_YUVA420P,
AV_PIX_FMT_RGB48BE,
AV_PIX_FMT_RGB48LE,
AV_PIX_FMT_RGB565BE,
AV_PIX_FMT_RGB565LE,
AV_PIX_FMT_RGB555BE,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IME,
AV_PIX_FMT_OPENCL,
AV_PIX_FMT_GRAY14BE,
AV_PIX_FMT_GRAY14LE,
AV_PIX_FMT_GRAYF32BE,
AV_PIX_FMT_GRAYF32LE,
AV_PIX_FMT_YUVA422P12BE,
AV_PIX_FMT_YUVA422P12LE,
AV_PIX_FMT_YUVA444P12BE,
AV_PIX_FMT_YUVA444P12LE,
AV_PIX_FMT_NV24,
AV_PIX_FMT_NV42,
AV_PIX_FMT_VULKAN,
AV_PIX_FMT_Y210BE,
AV_PIX_FMT_Y210LE,
AV_PIX_FMT_X2RGB10LE,
AV_PIX_FMT_X2RGB10BE,
AV_PIX_FMT_NB
};
enum AVColorPrimaries {
AVCOL_PRI_RESERVED0 = 0,
AVCOL_PRI_BT709 = 1,
AVCOL_PRI_UNSPECIFIED = 2,
AVCOL_PRI_RESERVED = 3,
AVCOL_PRI_BT470M = 4,
AVCOL_PRI_BT470BG = 5,
AVCOL_PRI_SMPTE170M = 6,
AVCOL_PRI_SMPTE240M = 7,
AVCOL_PRI_FILM = 8,
AVCOL_PRI_BT2020 = 9,
AVCOL_PRI_SMPTE428 = 10,
AVCOL_PRI_SMPTEST428_1 = AVCOL_PRI_SMPTE428,
AVCOL_PRI_SMPTE431 = 11,
AVCOL_PRI_SMPTE432 = 12,
AVCOL_PRI_EBU3213 = 22,
AVCOL_PRI_JEDEC_P22 = AVCOL_PRI_EBU3213,
AVCOL_PRI_NB
};
enum AVColorTransferCharacteristic {
AVCOL_TRC_RESERVED0 = 0,
AVCOL_TRC_BT709 = 1,
AVCOL_TRC_UNSPECIFIED = 2,
AVCOL_TRC_RESERVED = 3,
AVCOL_TRC_GAMMA22 = 4,
AVCOL_TRC_GAMMA28 = 5,
AVCOL_TRC_SMPTE170M = 6,
AVCOL_TRC_SMPTE240M = 7,
AVCOL_TRC_LINEAR = 8,
AVCOL_TRC_LOG = 9,
AVCOL_TRC_LOG_SQRT = 10,
AVCOL_TRC_IEC61966_2_4 = 11,
AVCOL_TRC_BT1361_ECG = 12,
AVCOL_TRC_IEC61966_2_1 = 13,
AVCOL_TRC_BT2020_10 = 14,
AVCOL_TRC_BT2020_12 = 15,
AVCOL_TRC_SMPTE2084 = 16,
AVCOL_TRC_SMPTEST2084 = AVCOL_TRC_SMPTE2084,
AVCOL_TRC_SMPTE428 = 17,
AVCOL_TRC_SMPTEST428_1 = AVCOL_TRC_SMPTE428,
AVCOL_TRC_ARIB_STD_B67 = 18,
AVCOL_TRC_NB
};
enum AVColorSpace {
AVCOL_SPC_RGB = 0,
AVCOL_SPC_BT709 = 1,
AVCOL_SPC_UNSPECIFIED = 2,
AVCOL_SPC_RESERVED = 3,
AVCOL_SPC_FCC = 4,
AVCOL_SPC_BT470BG = 5,
AVCOL_SPC_SMPTE170M = 6,
AVCOL_SPC_SMPTE240M = 7,
AVCOL_SPC_YCGCO = 8,
AVCOL_SPC_YCOCG = AVCOL_SPC_YCGCO,
AVCOL_SPC_BT2020_NCL = 9,
AVCOL_SPC_BT2020_CL = 10,
AVCOL_SPC_SMPTE2085 = 11,
AVCOL_SPC_CHROMA_DERIVED_NCL = 12,
AVCOL_SPC_CHROMA_DERIVED_CL = 13,
AVCOL_SPC_ICTCP = 14,
AVCOL_SPC_NB
};
enum AVColorRange {
AVCOL_RANGE_UNSPECIFIED = 0,
AVCOL_RANGE_MPEG = 1,
AVCOL_RANGE_JPEG = 2,
AVCOL_RANGE_NB
};
enum AVChromaLocation {
AVCHROMA_LOC_UNSPECIFIED = 0,
AVCHROMA_LOC_LEFT = 1,
AVCHROMA_LOC_CENTER = 2,
AVCHROMA_LOC_TOPLEFT = 3,
AVCHROMA_LOC_TOP = 4,
AVCHROMA_LOC_BOTTOMLEFT = 5,
AVCHROMA_LOC_BOTTOM = 6,
AVCHROMA_LOC_NB
};
void avpriv_report_missing_feature(void *avc,
const char *msg, ...) __attribute__((__format__(__printf__, 2, 3)));
void avpriv_request_sample(void *avc,
const char *msg, ...) __attribute__((__format__(__printf__, 2, 3)));
static __attribute__((always_inline)) inline __attribute__((const)) int64_t ff_rint64_clip(double a, int64_t amin, int64_t amax)
{
int64_t res;
if (a >= 9223372036854775808.0)
return amax;
if (a <= -9223372036854775808.0)
return amin;
res = llrint(a);
if (res > amax)
return amax;
if (res < amin)
return amin;
return res;
}
__attribute__((warn_unused_result))
int avpriv_open(const char *filename, int flags, ...);
int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt);
static __attribute__((always_inline)) inline __attribute__((const)) int avpriv_mirror(int x, int w)
{
if (!w)
return 0;
while ((unsigned)x > (unsigned)w) {
x = -x;
if (x < 0)
x += 2 * w;
}
return x;
}
void ff_check_pixfmt_descriptors(void);
int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp);
static inline void *av_x_if_null(const void *p, const void *x)
{
return (void *)(intptr_t)(p ? p : x);
}
unsigned av_int_list_length_for_size(unsigned elsize,
const void *list, uint64_t term) __attribute__((pure));
FILE *av_fopen_utf8(const char *path, const char *mode);
AVRational av_get_time_base_q(void);
char *av_fourcc_make_string(char *buf, uint32_t fourcc);
void av_assert0_fpu(void);
enum AVSampleFormat {
AV_SAMPLE_FMT_NONE = -1,
AV_SAMPLE_FMT_U8,
AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_S32,
AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_DBL,
AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_DBLP,
AV_SAMPLE_FMT_S64,
AV_SAMPLE_FMT_S64P,
AV_SAMPLE_FMT_NB
};
const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);
enum AVSampleFormat av_get_sample_fmt(const char *name);
enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar);
enum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt);
enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt);
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt);
int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
enum AVSampleFormat sample_fmt, 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);
int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
int nb_samples, enum AVSampleFormat sample_fmt, int align);
int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,
int nb_samples, enum AVSampleFormat sample_fmt, int align);
int av_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 av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples,
int nb_channels, enum AVSampleFormat sample_fmt);
typedef struct AVBuffer AVBuffer;
typedef struct AVBufferRef {
AVBuffer *buffer;
uint8_t *data;
int size;
} AVBufferRef;
AVBufferRef *av_buffer_alloc(int size);
AVBufferRef *av_buffer_allocz(int size);
AVBufferRef *av_buffer_create(uint8_t *data, int size,
void (*free)(void *opaque, uint8_t *data),
void *opaque, int flags);
void av_buffer_default_free(void *opaque, uint8_t *data);
AVBufferRef *av_buffer_ref(AVBufferRef *buf);
void av_buffer_unref(AVBufferRef **buf);
int av_buffer_is_writable(const AVBufferRef *buf);
void *av_buffer_get_opaque(const AVBufferRef *buf);
int av_buffer_get_ref_count(const AVBufferRef *buf);
int av_buffer_make_writable(AVBufferRef **buf);
int av_buffer_realloc(AVBufferRef **buf, int size);
int av_buffer_replace(AVBufferRef **dst, AVBufferRef *src);
typedef struct AVBufferPool AVBufferPool;
AVBufferPool *av_buffer_pool_init(int size, AVBufferRef* (*alloc)(int size));
AVBufferPool *av_buffer_pool_init2(int size, void *opaque,
AVBufferRef* (*alloc)(void *opaque, int size),
void (*pool_free)(void *opaque));
void av_buffer_pool_uninit(AVBufferPool **pool);
AVBufferRef *av_buffer_pool_get(AVBufferPool *pool);
void *av_buffer_pool_buffer_get_opaque(AVBufferRef *ref);
enum AVMatrixEncoding {
AV_MATRIX_ENCODING_NONE,
AV_MATRIX_ENCODING_DOLBY,
AV_MATRIX_ENCODING_DPLII,
AV_MATRIX_ENCODING_DPLIIX,
AV_MATRIX_ENCODING_DPLIIZ,
AV_MATRIX_ENCODING_DOLBYEX,
AV_MATRIX_ENCODING_DOLBYHEADPHONE,
AV_MATRIX_ENCODING_NB
};
uint64_t av_get_channel_layout(const char *name);
int av_get_extended_channel_layout(const char *name, uint64_t* channel_layout, int* nb_channels);
void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
struct AVBPrint;
void av_bprint_channel_layout(struct AVBPrint *bp, int nb_channels, uint64_t channel_layout);
int av_get_channel_layout_nb_channels(uint64_t channel_layout);
int64_t av_get_default_channel_layout(int nb_channels);
int av_get_channel_layout_channel_index(uint64_t channel_layout,
uint64_t channel);
uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index);
const char *av_get_channel_name(uint64_t channel);
const char *av_get_channel_description(uint64_t channel);
int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
const char **name);
enum AVFrameSideDataType {
AV_FRAME_DATA_PANSCAN,
AV_FRAME_DATA_A53_CC,
AV_FRAME_DATA_STEREO3D,
AV_FRAME_DATA_MATRIXENCODING,
AV_FRAME_DATA_DOWNMIX_INFO,
AV_FRAME_DATA_REPLAYGAIN,
AV_FRAME_DATA_DISPLAYMATRIX,
AV_FRAME_DATA_AFD,
AV_FRAME_DATA_MOTION_VECTORS,
AV_FRAME_DATA_SKIP_SAMPLES,
AV_FRAME_DATA_AUDIO_SERVICE_TYPE,
AV_FRAME_DATA_MASTERING_DISPLAY_METADATA,
AV_FRAME_DATA_GOP_TIMECODE,
AV_FRAME_DATA_SPHERICAL,
AV_FRAME_DATA_CONTENT_LIGHT_LEVEL,
AV_FRAME_DATA_ICC_PROFILE,
AV_FRAME_DATA_QP_TABLE_PROPERTIES,
AV_FRAME_DATA_QP_TABLE_DATA,
AV_FRAME_DATA_S12M_TIMECODE,
AV_FRAME_DATA_DYNAMIC_HDR_PLUS,
AV_FRAME_DATA_REGIONS_OF_INTEREST,
AV_FRAME_DATA_VIDEO_ENC_PARAMS,
AV_FRAME_DATA_SEI_UNREGISTERED,
};
enum AVActiveFormatDescription {
AV_AFD_SAME = 8,
AV_AFD_4_3 = 9,
AV_AFD_16_9 = 10,
AV_AFD_14_9 = 11,
AV_AFD_4_3_SP_14_9 = 13,
AV_AFD_16_9_SP_14_9 = 14,
AV_AFD_SP_4_3 = 15,
};
typedef struct AVFrameSideData {
enum AVFrameSideDataType type;
uint8_t *data;
int size;
AVDictionary *metadata;
AVBufferRef *buf;
} AVFrameSideData;
typedef struct AVRegionOfInterest {
uint32_t self_size;
int top;
int bottom;
int left;
int right;
AVRational qoffset;
} AVRegionOfInterest;
typedef struct AVFrame {
uint8_t *data[8];
int linesize[8];
uint8_t **extended_data;
int width, height;
int nb_samples;
int format;
int key_frame;
enum AVPictureType pict_type;
AVRational sample_aspect_ratio;
int64_t pts;
__attribute__((deprecated))
int64_t pkt_pts;
int64_t pkt_dts;
int coded_picture_number;
int display_picture_number;
int quality;
void *opaque;
__attribute__((deprecated))
uint64_t error[8];
int repeat_pict;
int interlaced_frame;
int top_field_first;
int palette_has_changed;
int64_t reordered_opaque;
int sample_rate;
uint64_t channel_layout;
AVBufferRef *buf[8];
AVBufferRef **extended_buf;
int nb_extended_buf;
AVFrameSideData **side_data;
int nb_side_data;
int flags;
enum AVColorRange color_range;
enum AVColorPrimaries color_primaries;
enum AVColorTransferCharacteristic color_trc;
enum AVColorSpace colorspace;
enum AVChromaLocation chroma_location;
int64_t best_effort_timestamp;
int64_t pkt_pos;
int64_t pkt_duration;
AVDictionary *metadata;
int decode_error_flags;
int channels;
int pkt_size;
__attribute__((deprecated))
int8_t *qscale_table;
__attribute__((deprecated))
int qstride;
__attribute__((deprecated))
int qscale_type;
__attribute__((deprecated))
AVBufferRef *qp_table_buf;
AVBufferRef *hw_frames_ctx;
AVBufferRef *opaque_ref;
size_t crop_top;
size_t crop_bottom;
size_t crop_left;
size_t crop_right;
AVBufferRef *private_ref;
} AVFrame;
__attribute__((deprecated))
int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
__attribute__((deprecated))
int64_t av_frame_get_pkt_duration (const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_pkt_duration (AVFrame *frame, int64_t val);
__attribute__((deprecated))
int64_t av_frame_get_pkt_pos (const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_pkt_pos (AVFrame *frame, int64_t val);
__attribute__((deprecated))
int64_t av_frame_get_channel_layout (const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_channel_layout (AVFrame *frame, int64_t val);
__attribute__((deprecated))
int av_frame_get_channels (const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_channels (AVFrame *frame, int val);
__attribute__((deprecated))
int av_frame_get_sample_rate (const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_sample_rate (AVFrame *frame, int val);
__attribute__((deprecated))
AVDictionary *av_frame_get_metadata (const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_metadata (AVFrame *frame, AVDictionary *val);
__attribute__((deprecated))
int av_frame_get_decode_error_flags (const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_decode_error_flags (AVFrame *frame, int val);
__attribute__((deprecated))
int av_frame_get_pkt_size(const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_pkt_size(AVFrame *frame, int val);
__attribute__((deprecated))
int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type);
__attribute__((deprecated))
int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type);
__attribute__((deprecated))
enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val);
__attribute__((deprecated))
enum AVColorRange av_frame_get_color_range(const AVFrame *frame);
__attribute__((deprecated))
void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val);
const char *av_get_colorspace_name(enum AVColorSpace val);
AVFrame *av_frame_alloc(void);
void av_frame_free(AVFrame **frame);
int av_frame_ref(AVFrame *dst, const AVFrame *src);
AVFrame *av_frame_clone(const AVFrame *src);
void av_frame_unref(AVFrame *frame);
void av_frame_move_ref(AVFrame *dst, AVFrame *src);
int av_frame_get_buffer(AVFrame *frame, int align);
int av_frame_is_writable(AVFrame *frame);
int av_frame_make_writable(AVFrame *frame);
int av_frame_copy(AVFrame *dst, const AVFrame *src);
int av_frame_copy_props(AVFrame *dst, const AVFrame *src);
AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane);
AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
enum AVFrameSideDataType type,
int size);
AVFrameSideData *av_frame_new_side_data_from_buf(AVFrame *frame,
enum AVFrameSideDataType type,
AVBufferRef *buf);
AVFrameSideData *av_frame_get_side_data(const AVFrame *frame,
enum AVFrameSideDataType type);
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type);
enum {
AV_FRAME_CROP_UNALIGNED = 1 << 0,
};
int av_frame_apply_cropping(AVFrame *frame, int flags);
const char *av_frame_side_data_name(enum AVFrameSideDataType type);
enum AVHWDeviceType {
AV_HWDEVICE_TYPE_NONE,
AV_HWDEVICE_TYPE_VDPAU,
AV_HWDEVICE_TYPE_CUDA,
AV_HWDEVICE_TYPE_VAAPI,
AV_HWDEVICE_TYPE_DXVA2,
AV_HWDEVICE_TYPE_QSV,
AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
AV_HWDEVICE_TYPE_D3D11VA,
AV_HWDEVICE_TYPE_DRM,
AV_HWDEVICE_TYPE_OPENCL,
AV_HWDEVICE_TYPE_MEDIACODEC,
AV_HWDEVICE_TYPE_VULKAN,
};
typedef struct AVHWDeviceInternal AVHWDeviceInternal;
typedef struct AVHWDeviceContext {
const AVClass *av_class;
AVHWDeviceInternal *internal;
enum AVHWDeviceType type;
void *hwctx;
void (*free)(struct AVHWDeviceContext *ctx);
void *user_opaque;
} AVHWDeviceContext;
typedef struct AVHWFramesInternal AVHWFramesInternal;
typedef struct AVHWFramesContext {
const AVClass *av_class;
AVHWFramesInternal *internal;
AVBufferRef *device_ref;
AVHWDeviceContext *device_ctx;
void *hwctx;
void (*free)(struct AVHWFramesContext *ctx);
void *user_opaque;
AVBufferPool *pool;
int initial_pool_size;
enum AVPixelFormat format;
enum AVPixelFormat sw_format;
int width, height;
} AVHWFramesContext;
enum AVHWDeviceType av_hwdevice_find_type_by_name(const char *name);
const char *av_hwdevice_get_type_name(enum AVHWDeviceType type);
enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev);
AVBufferRef *av_hwdevice_ctx_alloc(enum AVHWDeviceType type);
int av_hwdevice_ctx_init(AVBufferRef *ref);
int av_hwdevice_ctx_create(AVBufferRef **device_ctx, enum AVHWDeviceType type,
const char *device, AVDictionary *opts, int flags);
int av_hwdevice_ctx_create_derived(AVBufferRef **dst_ctx,
enum AVHWDeviceType type,
AVBufferRef *src_ctx, int flags);
int av_hwdevice_ctx_create_derived_opts(AVBufferRef **dst_ctx,
enum AVHWDeviceType type,
AVBufferRef *src_ctx,
AVDictionary *options, int flags);
AVBufferRef *av_hwframe_ctx_alloc(AVBufferRef *device_ctx);
int av_hwframe_ctx_init(AVBufferRef *ref);
int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags);
int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags);
enum AVHWFrameTransferDirection {
AV_HWFRAME_TRANSFER_DIRECTION_FROM,
AV_HWFRAME_TRANSFER_DIRECTION_TO,
};
int av_hwframe_transfer_get_formats(AVBufferRef *hwframe_ctx,
enum AVHWFrameTransferDirection dir,
enum AVPixelFormat **formats, int flags);
typedef struct AVHWFramesConstraints {
enum AVPixelFormat *valid_hw_formats;
enum AVPixelFormat *valid_sw_formats;
int min_width;
int min_height;
int max_width;
int max_height;
} AVHWFramesConstraints;
void *av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx);
AVHWFramesConstraints *av_hwdevice_get_hwframe_constraints(AVBufferRef *ref,
const void *hwconfig);
void av_hwframe_constraints_free(AVHWFramesConstraints **constraints);
enum {
AV_HWFRAME_MAP_READ = 1 << 0,
AV_HWFRAME_MAP_WRITE = 1 << 1,
AV_HWFRAME_MAP_OVERWRITE = 1 << 2,
AV_HWFRAME_MAP_DIRECT = 1 << 3,
};
int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags);
int av_hwframe_ctx_create_derived(AVBufferRef **derived_frame_ctx,
enum AVPixelFormat format,
AVBufferRef *derived_device_ctx,
AVBufferRef *source_frame_ctx,
int flags);
enum AVCodecID {
AV_CODEC_ID_NONE,
AV_CODEC_ID_MPEG1VIDEO,
AV_CODEC_ID_MPEG2VIDEO,
AV_CODEC_ID_H261,
AV_CODEC_ID_H263,
AV_CODEC_ID_RV10,
AV_CODEC_ID_RV20,
AV_CODEC_ID_MJPEG,
AV_CODEC_ID_MJPEGB,
AV_CODEC_ID_LJPEG,
AV_CODEC_ID_SP5X,
AV_CODEC_ID_JPEGLS,
AV_CODEC_ID_MPEG4,
AV_CODEC_ID_RAWVIDEO,
AV_CODEC_ID_MSMPEG4V1,
AV_CODEC_ID_MSMPEG4V2,
AV_CODEC_ID_MSMPEG4V3,
AV_CODEC_ID_WMV1,
AV_CODEC_ID_WMV2,
AV_CODEC_ID_H263P,
AV_CODEC_ID_H263I,
AV_CODEC_ID_FLV1,
AV_CODEC_ID_SVQ1,
AV_CODEC_ID_SVQ3,
AV_CODEC_ID_DVVIDEO,
AV_CODE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
AV_CODEC_ID_DVB_SUBTITLE,
AV_CODEC_ID_TEXT,
AV_CODEC_ID_XSUB,
AV_CODEC_ID_SSA,
AV_CODEC_ID_MOV_TEXT,
AV_CODEC_ID_HDMV_PGS_SUBTITLE,
AV_CODEC_ID_DVB_TELETEXT,
AV_CODEC_ID_SRT,
AV_CODEC_ID_MICRODVD = 0x17800,
AV_CODEC_ID_EIA_608,
AV_CODEC_ID_JACOSUB,
AV_CODEC_ID_SAMI,
AV_CODEC_ID_REALTEXT,
AV_CODEC_ID_STL,
AV_CODEC_ID_SUBVIEWER1,
AV_CODEC_ID_SUBVIEWER,
AV_CODEC_ID_SUBRIP,
AV_CODEC_ID_WEBVTT,
AV_CODEC_ID_MPL2,
AV_CODEC_ID_VPLAYER,
AV_CODEC_ID_PJS,
AV_CODEC_ID_ASS,
AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
AV_CODEC_ID_TTML,
AV_CODEC_ID_ARIB_CAPTION,
AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,
AV_CODEC_ID_TTF = 0x18000,
AV_CODEC_ID_SCTE_35,
AV_CODEC_ID_EPG,
AV_CODEC_ID_BINTEXT = 0x18800,
AV_CODEC_ID_XBIN,
AV_CODEC_ID_IDF,
AV_CODEC_ID_OTF,
AV_CODEC_ID_SMPTE_KLV,
AV_CODEC_ID_DVD_NAV,
AV_CODEC_ID_TIMED_ID3,
AV_CODEC_ID_BIN_DATA,
AV_CODEC_ID_PROBE = 0x19000,
AV_CODEC_ID_MPEG2TS = 0x20000,
AV_CODEC_ID_MPEG4SYSTEMS = 0x20001,
AV_CODEC_ID_FFMETADATA = 0x21000,
AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001,
};
enum AVMediaType avcodec_get_type(enum AVCodecID codec_id);
const char *avcodec_get_name(enum AVCodecID id);
enum AVFieldOrder {
AV_FIELD_UNKNOWN,
AV_FIELD_PROGRESSIVE,
AV_FIELD_TT,
AV_FIELD_BB,
AV_FIELD_TB,
AV_FIELD_BT,
};
typedef struct AVCodecParameters {
enum AVMediaType codec_type;
enum AVCodecID codec_id;
uint32_t codec_tag;
uint8_t *extradata;
int extradata_size;
int format;
int64_t bit_rate;
int bits_per_coded_sample;
int bits_per_raw_sample;
int profile;
int level;
int width;
int height;
AVRational sample_aspect_ratio;
enum AVFieldOrder field_order;
enum AVColorRange color_range;
enum AVColorPrimaries color_primaries;
enum AVColorTransferCharacteristic color_trc;
enum AVColorSpace color_space;
enum AVChromaLocation chroma_location;
int video_delay;
uint64_t channel_layout;
int channels;
int sample_rate;
int block_align;
int frame_size;
int initial_padding;
int trailing_padding;
int seek_preroll;
} AVCodecParameters;
AVCodecParameters *avcodec_parameters_alloc(void);
void avcodec_parameters_free(AVCodecParameters **par);
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src);
enum AVPacketSideDataType {
AV_PKT_DATA_PALETTE,
AV_PKT_DATA_NEW_EXTRADATA,
AV_PKT_DATA_PARAM_CHANGE,
AV_PKT_DATA_H263_MB_INFO,
AV_PKT_DATA_REPLAYGAIN,
AV_PKT_DATA_DISPLAYMATRIX,
AV_PKT_DATA_STEREO3D,
AV_PKT_DATA_AUDIO_SERVICE_TYPE,
AV_PKT_DATA_QUALITY_STATS,
AV_PKT_DATA_FALLBACK_TRACK,
AV_PKT_DATA_CPB_PROPERTIES,
AV_PKT_DATA_SKIP_SAMPLES,
AV_PKT_DATA_JP_DUALMONO,
AV_PKT_DATA_STRINGS_METADATA,
AV_PKT_DATA_SUBTITLE_POSITION,
AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
AV_PKT_DATA_WEBVTT_IDENTIFIER,
AV_PKT_DATA_WEBVTT_SETTINGS,
AV_PKT_DATA_METADATA_UPDATE,
AV_PKT_DATA_MPEGTS_STREAM_ID,
AV_PKT_DATA_MASTERING_DISPLAY_METADATA,
AV_PKT_DATA_SPHERICAL,
AV_PKT_DATA_CONTENT_LIGHT_LEVEL,
AV_PKT_DATA_A53_CC,
AV_PKT_DATA_ENCRYPTION_INIT_INFO,
AV_PKT_DATA_ENCRYPTION_INFO,
AV_PKT_DATA_AFD,
AV_PKT_DATA_PRFT,
AV_PKT_DATA_ICC_PROFILE,
AV_PKT_DATA_DOVI_CONF,
AV_PKT_DATA_S12M_TIMECODE,
AV_PKT_DATA_NB
};
typedef struct AVPacketSideData {
uint8_t *data;
int size;
enum AVPacketSideDataType type;
} AVPacketSideData;
typedef struct AVPacket {
AVBufferRef *buf;
int64_t pts;
int64_t dts;
uint8_t *data;
int size;
int stream_index;
int flags;
AVPacketSideData *side_data;
int side_data_elems;
int64_t duration;
int64_t pos;
__attribute__((deprecated))
int64_t convergence_duration;
} AVPacket;
typedef struct AVPacketList {
AVPacket pkt;
struct AVPacketList *next;
} AVPacketList;
enum AVSideDataParamChangeFlags {
AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,
AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004,
AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008,
};
AVPacket *av_packet_alloc(void);
AVPacket *av_packet_clone(const AVPacket *src);
void av_packet_free(AVPacket **pkt);
void av_init_packet(AVPacket *pkt);
int av_new_packet(AVPacket *pkt, int size);
void av_shrink_packet(AVPacket *pkt, int size);
int av_grow_packet(AVPacket *pkt, int grow_by);
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);
__attribute__((deprecated))
int av_dup_packet(AVPacket *pkt);
__attribute__((deprecated))
int av_copy_packet(AVPacket *dst, const AVPacket *src);
__attribute__((deprecated))
int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src);
__attribute__((deprecated))
void av_free_packet(AVPacket *pkt);
uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
int size);
int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
uint8_t *data, size_t size);
int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
int size);
uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type,
int *size);
__attribute__((deprecated))
int av_packet_merge_side_data(AVPacket *pkt);
__attribute__((deprecated))
int av_packet_split_side_data(AVPacket *pkt);
const char *av_packet_side_data_name(enum AVPacketSideDataType type);
uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size);
int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict);
void av_packet_free_side_data(AVPacket *pkt);
int av_packet_ref(AVPacket *dst, const AVPacket *src);
void av_packet_unref(AVPacket *pkt);
void av_packet_move_ref(AVPacket *dst, AVPacket *src);
int av_packet_copy_props(AVPacket *dst, const AVPacket *src);
int av_packet_make_refcounted(AVPacket *pkt);
int av_packet_make_writable(AVPacket *pkt);
void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);
typedef struct AVBSFInternal AVBSFInternal;
typedef struct AVBSFContext {
const AVClass *av_class;
const struct AVBitStreamFilter *filter;
AVBSFInternal *internal;
void *priv_data;
AVCodecParameters *par_in;
AVCodecParameters *par_out;
AVRational time_base_in;
AVRational time_base_out;
} AVBSFContext;
typedef struct AVBitStreamFilter {
const char *name;
const enum AVCodecID *codec_ids;
const AVClass *priv_class;
int priv_data_size;
int (*init)(AVBSFContext *ctx);
int (*filter)(AVBSFContext *ctx, AVPacket *pkt);
void (*close)(AVBSFContext *ctx);
void (*flush)(AVBSFContext *ctx);
} AVBitStreamFilter;
const AVBitStreamFilter *av_bsf_get_by_name(const char *name);
const AVBitStreamFilter *av_bsf_iterate(void **opaque);
int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx);
int av_bsf_init(AVBSFContext *ctx);
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt);
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt);
void av_bsf_flush(AVBSFContext *ctx);
void av_bsf_free(AVBSFContext **ctx);
const AVClass *av_bsf_get_class(void);
typedef struct AVBSFList AVBSFList;
AVBSFList *av_bsf_list_alloc(void);
void av_bsf_list_free(AVBSFList **lst);
int av_bsf_list_append(AVBSFList *lst, AVBSFContext *bsf);
int av_bsf_list_append2(AVBSFList *lst, const char * bsf_name, AVDictionary **options);
int av_bsf_list_finalize(AVBSFList **lst, AVBSFContext **bsf);
int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf);
int av_bsf_get_null_filter(AVBSFContext **bsf);
typedef struct AVProfile {
int profile;
const char *name;
} AVProfile;
typedef struct AVCodecDefault AVCodecDefault;
struct AVCodecContext;
struct AVSubtitle;
struct AVPacket;
typedef struct AVCodec {
const char *name;
const char *long_name;
enum AVMediaType type;
enum AVCodecID id;
int capabilities;
const AVRational *supported_framerates;
const enum AVPixelFormat *pix_fmts;
const int *supported_samplerates;
const enum AVSampleFormat *sample_fmts;
const uint64_t *channel_layouts;
uint8_t max_lowres;
const AVClass *priv_class;
const AVProfile *profiles;
const char *wrapper_name;
int priv_data_size;
struct AVCodec *next;
int (*update_thread_context)(struct AVCodecContext *dst, const struct AVCodecContext *src);
const AVCodecDefault *defaults;
void (*init_static_data)(struct AVCodec *codec);
int (*init)(struct AVCodecContext *);
int (*encode_sub)(struct AVCodecContext *, uint8_t *buf, int buf_size,
const struct AVSubtitle *sub);
int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt,
const struct AVFrame *frame, int *got_packet_ptr);
int (*decode)(struct AVCodecContext *, void *outdata, int *outdata_size, struct AVPacket *avpkt);
int (*close)(struct AVCodecContext *);
int (*receive_packet)(struct AVCodecContext *avctx, struct AVPacket *avpkt);
int (*receive_frame)(struct AVCodecContext *avctx, struct AVFrame *frame);
void (*flush)(struct AVCodecContext *);
int caps_internal;
const char *bsfs;
const struct AVCodecHWConfigInternal **hw_configs;
const uint32_t *codec_tags;
} AVCodec;
const AVCodec *av_codec_iterate(void **opaque);
AVCodec *avcodec_find_decoder(enum AVCodecID id);
AVCodec *avcodec_find_decoder_by_name(const char *name);
AVCodec *avcodec_find_encoder(enum AVCodecID id);
AVCodec *avcodec_find_encoder_by_name(const char *name);
int av_codec_is_encoder(const AVCodec *codec);
int av_codec_is_decoder(const AVCodec *codec);
enum {
AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX = 0x01,
AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX = 0x02,
AV_CODEC_HW_CONFIG_METHOD_INTERNAL = 0x04,
AV_CODEC_HW_CONFIG_METHOD_AD_HOC = 0x08,
};
typedef struct AVCodecHWConfig {
enum AVPixelFormat pix_fmt;
int methods;
enum AVHWDeviceType device_type;
} AVCodecHWConfig;
const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index);
typedef struct AVCodecDescriptor {
enum AVCodecID id;
enum AVMediaType type;
const char *name;
const char *long_name;
int props;
const char *const *mime_types;
const struct AVProfile *profiles;
} AVCodecDescriptor;
const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id);
const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev);
const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name);
enum AVDiscard{
AVDISCARD_NONE =-16,
AVDISCARD_DEFAULT = 0,
AVDISCARD_NONREF = 8,
AVDISCARD_BIDIR = 16,
AVDISCARD_NONINTRA= 24,
AVDISCARD_NONKEY = 32,
AVDISCARD_ALL = 48,
};
enum AVAudioServiceType {
AV_AUDIO_SERVICE_TYPE_MAIN = 0,
AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,
AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,
AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,
AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,
AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,
AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,
AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,
AV_AUDIO_SERVICE_TYPE_NB ,
};
typedef struct RcOverride{
int start_frame;
int end_frame;
int qscale;
float quality_factor;
} RcOverride;
typedef struct AVPanScan {
int id;
int width;
int height;
int16_t position[3][2];
} AVPanScan;
typedef struct AVCPBProperties {
int max_bitrate;
int min_bitrate;
int avg_bitrate;
int buffer_size;
uint64_t vbv_delay;
} AVCPBProperties;
typedef struct AVProducerReferenceTime {
int64_t wallclock;
int flags;
} AVProducerReferenceTime;
struct AVCodecInternal;
typedef struct AVCodecContext {
const AVClass *av_class;
int log_level_offset;
enum AVMediaType codec_type;
const struct AVCodec *codec;
enum AVCodecID codec_id;
unsigned int codec_tag;
void *priv_data;
struct AVCodecInternal *internal;
void *opaque;
int64_t bit_rate;
int bit_rate_tolerance;
int global_quality;
int compression_level;
int flags;
int flags2;
uint8_t *extradata;
int extradata_size;
AVRational time_base;
int ticks_per_frame;
int delay;
int width, height;
int coded_width, coded_height;
int gop_size;
enum AVPixelFormat pix_fmt;
void (*draw_horiz_band)(struct AVCodecContext *s,
const AVFrame *src, int offset[8],
int y, int type, int height);
enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
int max_b_frames;
float b_quant_factor;
__attribute__((deprecated))
int b_frame_strategy;
float b_quant_offset;
int has_b_frames;
__attribute__((deprecated))
int mpeg_quant;
float i_quant_factor;
float i_quant_offset;
float lumi_masking;
float temporal_cplx_masking;
float spatial_cplx_masking;
float p_masking;
float dark_masking;
int slice_count;
__attribute__((deprecated))
int prediction_method;
int *slice_offset;
AVRational sample_aspect_ratio;
int me_cmp;
int me_sub_cmp;
int mb_cmp;
int ildct_cmp;
int dia_size;
int last_predictor_count;
__attribute__((deprecated))
int pre_me;
int me_pre_cmp;
int pre_dia_size;
int me_subpel_quality;
int me_range;
int slice_flags;
int mb_decision;
uint16_t *intra_matrix;
uint16_t *inter_matrix;
__attribute__((deprecated))
int scenechange_threshold;
__attribute__((deprecated))
int noise_reduction;
int intra_dc_precision;
int skip_top;
int skip_bottom;
int mb_lmin;
int mb_lmax;
__attribute__((deprecated))
int me_penalty_compensation;
int bidir_refine;
__attribute__((deprecated))
int brd_scale;
int keyint_min;
int refs;
__attribute__((deprecated))
int chromaoffset;
int mv0_threshold;
__attribute__((deprecated))
int b_sensitivity;
enum AVColorPrimaries color_primaries;
enum AVColorTransferCharacteristic color_trc;
enum AVColorSpace colorspace;
enum AVColorRange color_range;
enum AVChromaLocation chroma_sample_location;
int slices;
enum AVFieldOrder field_order;
int sample_rate;
int channels;
enum AVSampleFormat sample_fmt;
int frame_size;
int frame_number;
int block_align;
int cutoff;
uint64_t channel_layout;
uint64_t request_channel_layout;
enum AVAudioServiceType audio_service_type;
enum AVSampleFormat request_sample_fmt;
int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
__attribute__((deprecated))
int refcounted_frames;
float qcompress;
float qblur;
int qmin;
int qmax;
int max_qdiff;
int rc_buffer_size;
int rc_override_count;
RcOverride *rc_override;
int64_t rc_max_rate;
int64_t rc_min_rate;
float rc_max_available_vbv_use;
float rc_min_vbv_overflow_use;
int rc_initial_buffer_occupancy;
__attribute__((deprecated))
int coder_type;
__attribute__((deprecated))
int context_model;
__attribute__((deprecated))
int frame_skip_threshold;
__attribute__((deprecated))
int frame_skip_factor;
__attribute__((deprecated))
int frame_skip_exp;
__attribute__((deprecated))
int frame_skip_cmp;
int trellis;
__attribute__((deprecated))
int min_prediction_order;
__attribute__((deprecated))
int max_prediction_order;
__attribute__((deprecated))
int64_t timecode_frame_start;
__attribute__((deprecated))
void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
__attribute__((deprecated))
int rtp_payload_size;
__attribute__((deprecated))
int mv_bits;
__attribute__((deprecated))
int header_bits;
__attribute__((deprecated))
int i_tex_bits;
__attribute__((deprecated))
int p_tex_bits;
__attribute__((deprecated))
int i_count;
__attribute__((deprecated))
int p_count;
__attribute__((deprecated))
int skip_count;
__attribute__((deprecated))
int misc_bits;
__attribute__((deprecated))
int frame_bits;
char *stats_out;
char *stats_in;
int workaround_bugs;
int strict_std_compliance;
int error_concealment;
int debug;
int err_recognition;
int64_t reordered_opaque;
const struct AVHWAccel *hwaccel;
void *hwaccel_context;
uint64_t error[8];
int dct_algo;
int idct_algo;
int bits_per_coded_sample;
int bits_per_raw_sample;
int lowres;
__attribute__((deprecated)) AVFrame *coded_frame;
int thread_count;
int thread_type;
int active_thread_type;
int thread_safe_callbacks;
int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
int nsse_weight;
int profile;
int level;
enum AVDiscard skip_loop_filter;
enum AVDiscard skip_idct;
enum AVDiscard skip_frame;
uint8_t *subtitle_header;
int subtitle_header_size;
__attribute__((deprecated))
uint64_t vbv_delay;
__attribute__((deprecated))
int side_data_only_packets;
int initial_padding;
AVRational framerate;
enum AVPixelFormat sw_pix_fmt;
AVRational pkt_timebase;
const AVCodecDescriptor *codec_descriptor;
int64_t pts_correction_num_faulty_pts;
int64_t pts_correction_num_faulty_dts;
int64_t pts_correction_last_pts;
int64_t pts_correction_last_dts;
char *sub_charenc;
int sub_charenc_mode;
int skip_alpha;
int seek_preroll;
int debug_mv;
uint16_t *chroma_intra_matrix;
uint8_t *dump_separator;
char *codec_whitelist;
unsigned properties;
AVPacketSideData *coded_side_data;
int nb_coded_side_data;
AVBufferRef *hw_frames_ctx;
int sub_text_format;
int trailing_padding;
int64_t max_pixels;
AVBufferRef *hw_device_ctx;
int hwaccel_flags;
int apply_cropping;
int extra_hw_frames;
int discard_damaged_percentage;
int64_t max_samples;
int export_side_data;
} AVCodecContext;
__attribute__((deprecated))
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
__attribute__((deprecated))
void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val);
__attribute__((deprecated))
const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);
__attribute__((deprecated))
void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc);
__attribute__((deprecated))
unsigned av_codec_get_codec_properties(const AVCodecContext *avctx);
__attribute__((deprecated))
int av_codec_get_lowres(const AVCodecContext *avctx);
__attribute__((deprecated))
void av_codec_set_lowres(AVCodecContext *avctx, int val);
__attribute__((deprecated))
int av_codec_get_seek_preroll(const AVCodecContext *avctx);
__attribute__((deprecated))
void av_codec_set_seek_preroll(AVCodecContext *avctx, int val);
__attribute__((deprecated))
uint16_t *av_codec_get_chroma_intra_matrix(const AVCodecContext *avctx);
__attribute__((deprecated))
void av_codec_set_chroma_intra_matrix(AVCodecContext *avctx, uint16_t *val);
struct AVSubtitle;
__attribute__((deprecated))
int av_codec_get_max_lowres(const AVCodec *codec);
struct MpegEncContext;
typedef struct AVHWAccel {
const char *name;
enum AVMediaType type;
enum AVCodecID id;
enum AVPixelFormat pix_fmt;
int capabilities;
int (*alloc_frame)(AVCodecContext *avctx, AVFrame *frame);
int (*start_frame)(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 (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
int (*end_frame)(AVCodecContext *avctx);
int frame_priv_data_size;
void (*decode_mb)(struct MpegEncContext *s);
int (*init)(AVCodecContext *avctx);
int (*uninit)(AVCodecContext *avctx);
int priv_data_size;
int caps_internal;
int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx);
} AVHWAccel;
typedef struct AVPicture {
__attribute__((deprecated))
uint8_t *data[8];
__attribute__((deprecated))
int linesize[8];
} AVPicture;
enum AVSubtitleType {
SUBTITLE_NONE,
SUBTITLE_BITMAP,
SUBTITLE_TEXT,
SUBTITLE_ASS,
};
typedef struct AVSubtitleRect {
int x;
int y;
int w;
int h;
int nb_colors;
__attribute__((deprecated))
AVPicture pict;
uint8_t *data[4];
int linesize[4];
enum AVSubtitleType type;
char *text;
char *ass;
int flags;
} AVSubtitleRect;
typedef struct AVSubtitle {
uint16_t format;
uint32_t start_display_time;
uint32_t end_display_time;
unsigned num_rects;
AVSubtitleRect **rects;
int64_t pts;
} AVSubtitle;
__attribute__((deprecated))
AVCodec *av_codec_next(const AVCodec *c);
unsigned avcodec_version(void);
const char *avcodec_configuration(void);
const char *avcodec_license(void);
__attribute__((deprecated))
void avcodec_register(AVCodec *codec);
__attribute__((deprecated))
void avcodec_register_all(void);
AVCodecContext *avcodec_alloc_context3(const AVCodec *codec);
void avcodec_free_context(AVCodecContext **avctx);
int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec);
const AVClass *avcodec_get_class(void);
const AVClass *avcodec_get_frame_class(void);
const AVClass *avcodec_get_subtitle_rect_class(void);
__attribute__((deprecated))
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
int avcodec_parameters_from_context(AVCodecParameters *par,
const AVCodecContext *codec);
int avcodec_parameters_to_context(AVCodecContext *codec,
const AVCodecParameters *par);
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
int avcodec_close(AVCodecContext *avctx);
void avsubtitle_free(AVSubtitle *sub);
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
int linesize_align[8]);
int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
__attribute__((deprecated))
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
int *got_frame_ptr, const AVPacket *avpkt);
__attribute__((deprecated))
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
const AVPacket *avpkt);
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
int *got_sub_ptr,
AVPacket *avpkt);
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt);
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt);
int avcodec_get_hw_frames_parameters(AVCodecContext *avctx,
AVBufferRef *device_ref,
enum AVPixelFormat hw_pix_fmt,
AVBufferRef **out_frames_ref);
enum AVPictureStructure {
AV_PICTURE_STRUCTURE_UNKNOWN,
AV_PICTURE_STRUCTURE_TOP_FIELD,
AV_PICTURE_STRUCTURE_BOTTOM_FIELD,
AV_PICTURE_STRUCTURE_FRAME,
};
typedef struct AVCodecParserContext {
void *priv_data;
struct AVCodecParser *parser;
int64_t frame_offset;
int64_t cur_offset;
int64_t next_frame_offset;
int pict_type;
int repeat_pict;
int64_t pts;
int64_t dts;
int64_t last_pts;
int64_t last_dts;
int fetch_timestamp;
int cur_frame_start_index;
int64_t cur_frame_offset[4];
int64_t cur_frame_pts[4];
int64_t cur_frame_dts[4];
int flags;
int64_t offset;
int64_t cur_frame_end[4];
int key_frame;
__attribute__((deprecated))
int64_t convergence_duration;
int dts_sync_point;
int dts_ref_dts_delta;
int pts_dts_delta;
int64_t cur_frame_pos[4];
int64_t pos;
int64_t last_pos;
int duration;
enum AVFieldOrder field_order;
enum AVPictureStructure picture_structure;
int output_picture_number;
int width;
int height;
int coded_width;
int coded_height;
int format;
} AVCodecParserContext;
typedef struct AVCodecParser {
int codec_ids[5];
int priv_data_size;
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);
struct AVCodecParser *next;
} AVCodecParser;
const AVCodecParser *av_parser_iterate(void **opaque);
__attribute__((deprecated))
AVCodecParser *av_parser_next(const AVCodecParser *c);
__attribute__((deprecated))
void av_register_codec_parser(AVCodecParser *parser);
AVCodecParserContext *av_parser_init(int codec_id);
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);
int av_parser_change(AVCodecParserContext *s,
AVCodecContext *avctx,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size, int keyframe);
void av_parser_close(AVCodecParserContext *s);
__attribute__((deprecated))
int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr);
__attribute__((deprecated))
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr);
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
const AVSubtitle *sub);
__attribute__((deprecated))
int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height);
__attribute__((deprecated))
void avpicture_free(AVPicture *picture);
__attribute__((deprecated))
int avpicture_fill(AVPicture *picture, const uint8_t *ptr,
enum AVPixelFormat pix_fmt, int width, int height);
__attribute__((deprecated))
int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt,
int width, int height,
unsigned char *dest, int dest_size);
__attribute__((deprecated))
int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
__attribute__((deprecated))
void av_picture_copy(AVPicture *dst, const AVPicture *src,
enum AVPixelFormat pix_fmt, int width, int height);
__attribute__((deprecated))
int av_picture_crop(AVPicture *dst, const AVPicture *src,
enum AVPixelFormat pix_fmt, int top_band, int left_band);
__attribute__((deprecated))
int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt,
int padtop, int padbottom, int padleft, int padright, int *color);
__attribute__((deprecated))
void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt);
int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
int has_alpha);
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);
enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
__attribute__((deprecated))
enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
__attribute__((deprecated))
size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
const char *av_get_profile_name(const AVCodec *codec, int profile);
const char *avcodec_profile_name(enum AVCodecID codec_id, int profile);
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
enum AVSampleFormat sample_fmt, const uint8_t *buf,
int buf_size, int align);
void avcodec_flush_buffers(AVCodecContext *avctx);
int av_get_bits_per_sample(enum AVCodecID codec_id);
enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be);
int av_get_exact_bits_per_sample(enum AVCodecID codec_id);
int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);
int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes);
typedef struct AVBitStreamFilterContext {
void *priv_data;
const struct AVBitStreamFilter *filter;
AVCodecParserContext *parser;
struct AVBitStreamFilterContext *next;
char *args;
} AVBitStreamFilterContext;
__attribute__((deprecated))
void av_register_bitstream_filter(AVBitStreamFilter *bsf);
__attribute__((deprecated))
AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
__attribute__((deprecated))
int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
AVCodecContext *avctx, const char *args,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size, int keyframe);
__attribute__((deprecated))
void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
__attribute__((deprecated))
const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f);
__attribute__((deprecated))
const AVBitStreamFilter *av_bsf_next(void **opaque);
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
__attribute__((deprecated))
void av_register_hwaccel(AVHWAccel *hwaccel);
__attribute__((deprecated))
AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel);
enum AVLockOp {
AV_LOCK_CREATE,
AV_LOCK_OBTAIN,
AV_LOCK_RELEASE,
AV_LOCK_DESTROY,
};
__attribute__((deprecated))
int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
int avcodec_is_open(AVCodecContext *s);
AVCPBProperties *av_cpb_properties_alloc(size_t *size);
extern const uint8_t ff_reverse[256];
extern const uint32_t ff_inverse[257];
extern const uint8_t ff_sqrt_tab[256];
extern const uint8_t ff_crop_tab[256 + 2 * 1024];
extern const uint8_t ff_zigzag_direct[64];
extern const uint8_t ff_zigzag_scan[16+1];
static __attribute__((always_inline)) inline int MULH(int a, int b){
return ((int64_t)(a) * (int64_t)(b)) >> 32;
}
static __attribute__((always_inline)) inline unsigned UMULH(unsigned a, unsigned b){
return ((uint64_t)(a) * (uint64_t)(b))>>32;
}
static inline __attribute__((const)) int mid_pred(int a, int b, int c)
{
if(a>b){
if(c>b){
if(c>a) b=a;
else b=c;
}
}else{
if(b>c){
if(c>a) b=c;
else b=a;
}
}
return b;
}
static inline __attribute__((const)) int median4(int a, int b, int c, int d)
{
if (a < b) {
if (c < d) return (((b) > (d) ? (d) : (b)) + ((a) > (c) ? (a) : (c))) / 2;
else return (((b) > (c) ? (c) : (b)) + ((a) > (d) ? (a) : (d))) / 2;
} else {
if (c < d) return (((a) > (d) ? (d) : (a)) + ((b) > (c) ? (b) : (c))) / 2;
else return (((a) > (c) ? (c) : (a)) + ((b) > (d) ? (b) : (d))) / 2;
}
}
static inline __attribute__((const)) int sign_extend(int val, unsigned bits)
{
unsigned shift = 8 * sizeof(int) - bits;
union { unsigned u; int s; } v = { (unsigned) val << shift };
return v.s >> shift;
}
static inline __attribute__((const)) unsigned zero_extend(unsigned val, unsigned bits)
{
return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits);
}
static inline __attribute__((const)) unsigned int ff_sqrt(unsigned int a)
{
unsigned int b;
if (a < 255) return (ff_sqrt_tab[a + 1] - 1) >> 4;
else if (a < (1 << 12)) b = ff_sqrt_tab[a >> 4] >> 2;
else if (a < (1 << 14)) b = ff_sqrt_tab[a >> 6] >> 1;
else if (a < (1 << 16)) b = ff_sqrt_tab[a >> 8] ;
else {
int s = (31 - __builtin_clz((a >> 16)|1)) >> 1;
unsigned int c = a >> (s + 2);
b = ff_sqrt_tab[c >> (s + 8)];
b = ((uint32_t)((((uint64_t)c) * ff_inverse[b]) >> 32)) + (b << s);
}
return b - (a < b * b);
}
static inline __attribute__((const)) float ff_sqrf(float a)
{
return a*a;
}
static inline int8_t ff_u8_to_s8(uint8_t a)
{
union {
uint8_t u8;
int8_t s8;
} b;
b.u8 = a;
return b.s8;
}
static __attribute__((always_inline)) inline uint32_t bitswap_32(uint32_t x)
{
return (uint32_t)ff_reverse[ x & 0xFF] << 24 |
(uint32_t)ff_reverse[(x >> 8) & 0xFF] << 16 |
(uint32_t)ff_reverse[(x >> 16) & 0xFF] << 8 |
(uint32_t)ff_reverse[ x >> 24];
}
typedef struct CELPMContext {
float (*dot_productf)(const float* a, const float* b, int length);
}CELPMContext;
void ff_celp_math_init(CELPMContext *c);
void ff_celp_math_init_mips(CELPMContext *c);
int ff_exp2(uint16_t power);
int ff_log2_q15(uint32_t value);
int64_t ff_dot_product(const int16_t *a, const int16_t *b, int length);
static inline int bidir_sal(int value, int offset)
{
if(offset < 0) return value >> -offset;
else return value << offset;
}
float ff_dot_productf(const float* a, const float* b, int length);
static const uint16_t exp2a[]=
{
0, 1435, 2901, 4400, 5931, 7496, 9096, 10730,
12400, 14106, 15850, 17632, 19454, 21315, 23216, 25160,
27146, 29175, 31249, 33368, 35534, 37747, 40009, 42320,
44682, 47095, 49562, 52082, 54657, 57289, 59979, 62727,
};
static const uint16_t exp2b[]=
{
3, 712, 1424, 2134, 2845, 3557, 4270, 4982,
5696, 6409, 7124, 7839, 8554, 9270, 9986, 10704,
11421, 12138, 12857, 13576, 14295, 15014, 15734, 16455,
17176, 17898, 18620, 19343, 20066, 20790, 21514, 22238,
};
int ff_exp2(uint16_t power)
{
unsigned int result= exp2a[power>>10] + 0x10000;
((void)0);
result= (result<<3) + ((result*exp2b[(power>>5)&31])>>17);
return result + ((result*(power&31)*89)>>22);
}
static const uint16_t tab_log2[33] =
{
4, 1459, 2870, 4240, 5572, 6867, 8127, 9355,
10552, 11719, 12858, 13971, 15057, 16120, 17158, 18175,
19170, 20145, 21100, 22036, 22954, 23854, 24738, 25605,
26457, 27294, 28116, 28924, 29719, 30500, 31269, 32025, 32769,
};
int ff_log2_q15(uint32_t value)
{
uint8_t power_int;
uint8_t frac_x0;
uint16_t frac_dx;
power_int = (31 - __builtin_clz((value)|1));
value <<= (31 - power_int);
frac_x0 = (value & 0x7c000000) >> 26;
frac_dx = (value & 0x03fff800) >> 11;
value = tab_log2[frac_x0];
value += (frac_dx * (tab_log2[frac_x0+1] - tab_log2[frac_x0])) >> 15;
return (power_int << 15) + value;
}
int64_t ff_dot_product(const int16_t *a, const int16_t *b, int length)
{
int i;
int64_t sum = 0;
for (i = 0; i < length; i++)
sum += ((a[i]) * (b[i]));
return sum;
}
float ff_dot_productf(const float* a, const float* b, int length)
{
float sum = 0;
int i;
for(i=0; i