diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2021-06-18 00:11:29 +0300 |
---|---|---|
committer | Henrik Gramner <henrik@gramner.com> | 2021-08-19 22:29:46 +0300 |
commit | 3bae53c0b684b7fedf2f5b0b662a3bbd84631aaf (patch) | |
tree | 979765688321745b7d86cca3c13628eab34678ed /include | |
parent | 12156a507b6e4c045e74bdef1dbd9447e666b232 (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.h | 6 |
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 */ |