Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2021-06-18 00:11:29 +0300
committerHenrik Gramner <henrik@gramner.com>2021-08-19 22:29:46 +0300
commit3bae53c0b684b7fedf2f5b0b662a3bbd84631aaf (patch)
tree979765688321745b7d86cca3c13628eab34678ed /include
parent12156a507b6e4c045e74bdef1dbd9447e666b232 (diff)
refmvs: Pack the refmvs_block struct
Reduces size from 16B to 12B, while maintaining a 4-byte alignment.
Diffstat (limited to 'include')
-rw-r--r--include/common/attributes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/common/attributes.h b/include/common/attributes.h
index 64df445..4ccc421 100644
--- a/include/common/attributes.h
+++ b/include/common/attributes.h
@@ -178,4 +178,10 @@ static inline int clzll(const unsigned long long mask) {
static_assert(name == offsetof(type, field), #field)
#endif
+#ifdef _MSC_VER
+#define PACKED(...) __pragma(pack(push, 1)) __VA_ARGS__ __pragma(pack(pop))
+#else
+#define PACKED(...) __VA_ARGS__ __attribute__((__packed__))
+#endif
+
#endif /* DAV1D_COMMON_ATTRIBUTES_H */