Go to the documentation of this file.
26 #ifndef AVUTIL_INTERNAL_H
27 #define AVUTIL_INTERNAL_H
29 #if !defined(DEBUG) && !defined(NDEBUG)
46 #ifndef attribute_align_arg
47 #if ARCH_X86_32 && AV_GCC_VERSION_AT_LEAST(4,2)
48 # define attribute_align_arg __attribute__((force_align_arg_pointer))
50 # define attribute_align_arg
54 #if defined(_WIN32) && CONFIG_SHARED && !defined(BUILDING_avutil)
55 # define av_export_avutil __declspec(dllimport)
57 # define av_export_avutil
60 #if HAVE_PRAGMA_DEPRECATED
61 # if defined(__ICL) || defined (__INTEL_COMPILER)
62 # define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:1478))
63 # define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop))
64 # elif defined(_MSC_VER)
65 # define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:4996))
66 # define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop))
68 # define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
69 # define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic pop")
72 # define FF_DISABLE_DEPRECATION_WARNINGS
73 # define FF_ENABLE_DEPRECATION_WARNINGS
77 #define FF_MEMORY_POISON 0x2a
82 #define AV_CHECK_OFFSET(s, m, o) struct check_##o { \
83 int x_##o[offsetof(s, m) == o? 1: -1]; \
87 #define FF_ALLOC_TYPED_ARRAY(p, nelem) (p = av_malloc_array(nelem, sizeof(*p)))
88 #define FF_ALLOCZ_TYPED_ARRAY(p, nelem) (p = av_calloc(nelem, sizeof(*p)))
90 #define FF_PTR_ADD(ptr, off) ((off) ? (ptr) + (off) : (ptr))
95 #define FF_FIELD_AT(type, off, obj) (*(type *)((char *)&(obj) + (off)))
104 # define NULL_IF_CONFIG_SMALL(x) NULL
106 # define NULL_IF_CONFIG_SMALL(x) x
131 #include <crtversion.h>
132 #if defined(_VC_CRT_MAJOR_VERSION) && _VC_CRT_MAJOR_VERSION < 14
133 #pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_strtod")
134 #pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_snprintf")
137 #define PTRDIFF_SPECIFIER "Id"
138 #define SIZE_SPECIFIER "Iu"
140 #define PTRDIFF_SPECIFIER "td"
141 #define SIZE_SPECIFIER "zu"
145 # define ff_dlog(ctx, ...) av_log(ctx, AV_LOG_DEBUG, __VA_ARGS__)
147 # define ff_dlog(ctx, ...) do { if (0) av_log(ctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
151 # define ff_tlog(ctx, ...) av_log(ctx, AV_LOG_TRACE, __VA_ARGS__)
153 # define ff_tlog(ctx, ...) do { } while(0)
160 #define SUINT32 int32_t
162 #define SUINT unsigned
163 #define SUINT32 uint32_t
173 while ((
unsigned)x > (
unsigned)
w) {
AVPixelFormat
Pixel format.
int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt)
static enum AVPixelFormat pix_fmt
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
#define av_printf_format(fmtpos, attrpos)
static av_always_inline av_const int avpriv_mirror(int x, int w)
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.