summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavutil/internal.h
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-10-02 00:21:32 +0200
committerGitHub <noreply@github.com>2018-10-02 00:21:32 +0200
commit69d83c8fbe47b89d1d14f75ee99e638cbfb5dc31 (patch)
treece4b486ac8e13e1f5a8a918e532826c3ae09415d /media/ffvpx/libavutil/internal.h
parent8e8fcee4a55de171303ebe526d3cf051522111bf (diff)
parent41ccd52bfd7f3604d3ad3917af5f030994e13762 (diff)
downloadUXP-69d83c8fbe47b89d1d14f75ee99e638cbfb5dc31.tar
UXP-69d83c8fbe47b89d1d14f75ee99e638cbfb5dc31.tar.gz
UXP-69d83c8fbe47b89d1d14f75ee99e638cbfb5dc31.tar.lz
UXP-69d83c8fbe47b89d1d14f75ee99e638cbfb5dc31.tar.xz
UXP-69d83c8fbe47b89d1d14f75ee99e638cbfb5dc31.zip
Merge pull request #806 from trav90/ffvpx-resync
Update ffvpx code to 4.0.2 (take 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 a2d73e3cc..06bd561e8 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 */