26 #ifndef AVUTIL_INTERNAL_H
27 #define AVUTIL_INTERNAL_H
29 #if !defined(DEBUG) && !defined(NDEBUG)
42 #ifndef attribute_align_arg
43 #if ARCH_X86_32 && AV_GCC_VERSION_AT_LEAST(4,2)
44 # define attribute_align_arg __attribute__((force_align_arg_pointer))
46 # define attribute_align_arg
50 #if defined(_MSC_VER) && CONFIG_SHARED
51 # define av_export __declspec(dllimport)
57 # define INT_BIT (CHAR_BIT * sizeof(int))
60 #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
63 if (p == NULL && (size) != 0) {\
64 av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
69 #define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)\
71 p = av_mallocz(size);\
72 if (p == NULL && (size) != 0) {\
73 av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
86 # define NULL_IF_CONFIG_SMALL(x) NULL
88 # define NULL_IF_CONFIG_SMALL(x) x
109 #if HAVE_SYMVER_ASM_LABEL
110 # define FF_SYMVER(type, name, args, ver) \
111 type ff_##name args __asm__ (EXTERN_PREFIX #name "@" ver); \
113 #elif HAVE_SYMVER_GNU_ASM
114 # define FF_SYMVER(type, name, args, ver) \
115 __asm__ (".symver ff_" #name "," EXTERN_PREFIX #name "@" ver); \
116 type ff_##name args; \
126 # define ONLY_IF_THREADS_ENABLED(x) x
128 # define ONLY_IF_THREADS_ENABLED(x) NULL
139 __asm__
volatile (
"emms" :::
"memory");
141 #elif HAVE_MMX && HAVE_MM_EMPTY
142 # include <mmintrin.h>
143 # define emms_c _mm_empty
Macro definitions for various function/variable attributes.
high precision timer, useful to profile code
Replacements for frequently missing libm functions.