55 #if FF_API_DECLARE_ALIGNED 108 #if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C) 109 #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v 110 #define DECLARE_ASM_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v 111 #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v 112 #elif defined(__DJGPP__) 113 #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v 114 #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v 115 #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v 116 #elif defined(__GNUC__) || defined(__clang__) 117 #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v 118 #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v 119 #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v 120 #elif defined(_MSC_VER) 121 #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v 122 #define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v 123 #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v 125 #define DECLARE_ALIGNED(n,t,v) t v 126 #define DECLARE_ASM_ALIGNED(n,t,v) t v 127 #define DECLARE_ASM_CONST(n,t,v) static const t v 151 #if AV_GCC_VERSION_AT_LEAST(3,1) 152 #define av_malloc_attrib __attribute__((__malloc__)) 154 #define av_malloc_attrib 172 #if AV_GCC_VERSION_AT_LEAST(4,3) 173 #define av_alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) 175 #define av_alloc_size(...) 309 void *
av_realloc_f(
void *ptr,
size_t nelem,
size_t elsize);
329 av_alloc_size(2, 3)
void *
av_realloc_array(
void *ptr,
size_t nmemb,
size_t size);
413 void av_fast_malloc(
void *ptr,
unsigned int *size,
size_t min_size);
479 char *
av_strdup(const
char *
s) av_malloc_attrib;
500 void *
av_memdup(const
void *p,
size_t size);
680 if ((a | b) >= ((
size_t)1 << (
sizeof(
size_t) * 4)) && a && t / a != b)
void * av_realloc_f(void *ptr, size_t nelem, size_t elsize)
Allocate, reallocate, or free a block of memory.
void av_max_alloc(size_t max)
Set the maximum size that may be allocated in one block.
void * av_realloc(void *ptr, size_t size) 1(2)
Allocate, reallocate, or free a block of memory.
#define av_malloc_attrib
Function attribute denoting a malloc-like function.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Convenience header that includes libavutil's core.
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
Macro definitions for various function/variable attributes.
void * av_calloc(size_t nmemb, size_t size) av_malloc_attrib
Non-inlined equivalent of av_mallocz_array().
void av_memcpy_backptr(uint8_t *dst, int back, int cnt)
Overlapping memcpy() implementation.
av_warn_unused_result int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem)
Add an element to a dynamic array.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
void av_freep(void *ptr)
Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family...
Libavutil version macros.
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
Allocate, reallocate, or free an array through a pointer to a pointer.
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
void * av_malloc_array(size_t nmemb, size_t size)
void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size)
Allocate and clear a buffer, reusing the given one if large enough.
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
Reallocate the given buffer if it is not large enough, otherwise do nothing.
av_warn_unused_result int av_reallocp(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory through a pointer to a pointer.
char * av_strdup(const char *s) av_malloc_attrib
Duplicate a string.
void * av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size, const uint8_t *elem_data)
Add an element of size elem_size to a dynamic array.
void av_free(void *ptr)
Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family...
#define av_warn_unused_result
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
#define av_alloc_size(...)
Function attribute used on a function that allocates memory, whose size is given by the specified par...
static int av_size_mult(size_t a, size_t b, size_t *r)
Multiply two size_t values checking for overflow.
void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem)
Add the pointer to an element to a dynamic array.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions
char * av_strndup(const char *s, size_t len) av_malloc_attrib
Duplicate a substring of a string.
void * av_mallocz_array(size_t nmemb, size_t size)