summaryrefslogtreecommitdiff
path: root/media/ffvpx/libavutil/internal.h
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2018-10-01 10:27:24 -0500
committertrav90 <travawine@protonmail.ch>2018-10-01 10:27:24 -0500
commit2e7de1476e9d541bb622bbb119df7096d6653dc6 (patch)
tree9e3115f44e9a09b9c71d40d72c7d5c939b2278e2 /media/ffvpx/libavutil/internal.h
parenta4e54616c3869d0381774a237cdf2770d6f04d67 (diff)
downloaduxp-2e7de1476e9d541bb622bbb119df7096d6653dc6.tar.gz
[ffvpx] Update ffvp9/ffvp8 to release 4.0.2
Diffstat (limited to 'media/ffvpx/libavutil/internal.h')
-rw-r--r--media/ffvpx/libavutil/internal.h40
1 files changed, 28 insertions, 12 deletions
diff --git a/media/ffvpx/libavutil/internal.h b/media/ffvpx/libavutil/internal.h
index a2d73e3cc6..06bd561e82 100644
--- a/media/ffvpx/libavutil/internal.h
+++ b/media/ffvpx/libavutil/internal.h
@@ -43,6 +43,7 @@
#include "cpu.h"
#include "dict.h"
#include "macros.h"
+#include "mem.h"
#include "pixfmt.h"
#include "version.h"
@@ -62,10 +63,10 @@
#endif
#endif
-#if defined(_MSC_VER) && CONFIG_SHARED
-# define av_export __declspec(dllimport)
+#if defined(_WIN32) && CONFIG_SHARED && !defined(BUILDING_avutil)
+# define av_export_avutil __declspec(dllimport)
#else
-# define av_export
+# define av_export_avutil
#endif
#if HAVE_PRAGMA_DEPRECATED
@@ -76,8 +77,8 @@
# define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:4996))
# define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop))
# else
-# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
+# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic pop")
# endif
#else
# define FF_DISABLE_DEPRECATION_WARNINGS
@@ -110,24 +111,30 @@
DECLARE_ALIGNED(a, t, la_##v) s o; \
t (*v) o = la_##v
-#define LOCAL_ALIGNED(a, t, v, ...) E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))
+#define LOCAL_ALIGNED(a, t, v, ...) LOCAL_ALIGNED_##a(t, v, __VA_ARGS__)
-#if HAVE_LOCAL_ALIGNED_8
+#if HAVE_LOCAL_ALIGNED
+# define LOCAL_ALIGNED_4(t, v, ...) E1(LOCAL_ALIGNED_D(4, t, v, __VA_ARGS__,,))
+#else
+# define LOCAL_ALIGNED_4(t, v, ...) E1(LOCAL_ALIGNED_A(4, t, v, __VA_ARGS__,,))
+#endif
+
+#if HAVE_LOCAL_ALIGNED
# define LOCAL_ALIGNED_8(t, v, ...) E1(LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,))
#else
-# define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
+# define LOCAL_ALIGNED_8(t, v, ...) E1(LOCAL_ALIGNED_A(8, t, v, __VA_ARGS__,,))
#endif
-#if HAVE_LOCAL_ALIGNED_16
+#if HAVE_LOCAL_ALIGNED
# define LOCAL_ALIGNED_16(t, v, ...) E1(LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,))
#else
-# define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
+# define LOCAL_ALIGNED_16(t, v, ...) E1(LOCAL_ALIGNED_A(16, t, v, __VA_ARGS__,,))
#endif
-#if HAVE_LOCAL_ALIGNED_32
+#if HAVE_LOCAL_ALIGNED
# define LOCAL_ALIGNED_32(t, v, ...) E1(LOCAL_ALIGNED_D(32, t, v, __VA_ARGS__,,))
#else
-# define LOCAL_ALIGNED_32(t, v, ...) LOCAL_ALIGNED(32, t, v, __VA_ARGS__)
+# define LOCAL_ALIGNED_32(t, v, ...) E1(LOCAL_ALIGNED_A(32, t, v, __VA_ARGS__,,))
#endif
#define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
@@ -353,4 +360,13 @@ void ff_check_pixfmt_descriptors(void);
*/
int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp);
+// Helper macro for AV_PIX_FMT_FLAG_PSEUDOPAL deprecation. Code inside FFmpeg
+// should always use FF_PSEUDOPAL. Once the public API flag gets removed, all
+// code using it is dead code.
+#if FF_API_PSEUDOPAL
+#define FF_PSEUDOPAL AV_PIX_FMT_FLAG_PSEUDOPAL
+#else
+#define FF_PSEUDOPAL 0
+#endif
+
#endif /* AVUTIL_INTERNAL_H */