|
|
@ -57,6 +57,32 @@ |
|
|
|
# define INT_BIT (CHAR_BIT * sizeof(int)) |
|
|
|
# define INT_BIT (CHAR_BIT * sizeof(int)) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Some broken preprocessors need a second expansion
|
|
|
|
|
|
|
|
// to be forced to tokenize __VA_ARGS__
|
|
|
|
|
|
|
|
#define E(x) x |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define LOCAL_ALIGNED_A(a, t, v, s, o, ...) \ |
|
|
|
|
|
|
|
uint8_t la_##v[sizeof(t s o) + (a)]; \
|
|
|
|
|
|
|
|
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define LOCAL_ALIGNED_D(a, t, v, s, o, ...) \ |
|
|
|
|
|
|
|
DECLARE_ALIGNED(a, t, la_##v) s o; \
|
|
|
|
|
|
|
|
t (*v) o = la_##v |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define LOCAL_ALIGNED(a, t, v, ...) E(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if HAVE_LOCAL_ALIGNED_8 |
|
|
|
|
|
|
|
# define LOCAL_ALIGNED_8(t, v, ...) E(LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,)) |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
# define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__) |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if HAVE_LOCAL_ALIGNED_16 |
|
|
|
|
|
|
|
# define LOCAL_ALIGNED_16(t, v, ...) E(LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,)) |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
# define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__) |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define FF_ALLOC_OR_GOTO(ctx, p, size, label)\ |
|
|
|
#define FF_ALLOC_OR_GOTO(ctx, p, size, label)\ |
|
|
|
{\
|
|
|
|
{\
|
|
|
|
p = av_malloc(size);\
|
|
|
|
p = av_malloc(size);\
|
|
|
|