This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 29fb58619272be6f8ed797c6d0d1e1910f32bdeb Author: Niklas Haas <[email protected]> AuthorDate: Sun Nov 1 18:31:17 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Sun Nov 8 01:48:12 2026 +0000 swscale/ops_chain: drop explicit alignment from SwsOpPriv No kernel needs its private data to be 16-byte aligned. This drops the alignment down to the implicit pointer alignment (8 bytes on most platforms). SwsOpImpl goes from 32 bytes to 24 bytes. This does require dropping the alignment assertions inside a guard for the specific architectures that we have SIMD for, since on 32-bit platforms, the C code now packs this struct more tightly (at offset=4). Signed-off-by: Niklas Haas <[email protected]> --- libswscale/aarch64/ops.c | 1 + libswscale/aarch64/ops_impl.h | 4 ++-- libswscale/ops_chain.h | 13 ++++++++----- libswscale/x86/ops_include.asm | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/libswscale/aarch64/ops.c b/libswscale/aarch64/ops.c index d0412909ad..19d0330a52 100644 --- a/libswscale/aarch64/ops.c +++ b/libswscale/aarch64/ops.c @@ -39,6 +39,7 @@ static_assert(offsetof_exec_in_bump == offsetof(SwsOpExec, in_bump), "SwsOpExe static_assert(offsetof_exec_out_bump == offsetof(SwsOpExec, out_bump), "SwsOpExec layout mismatch"); static_assert(offsetof_impl_cont == offsetof(SwsOpImpl, cont), "SwsOpImpl layout mismatch"); static_assert(offsetof_impl_priv == offsetof(SwsOpImpl, priv), "SwsOpImpl layout mismatch"); +static_assert(sizeof_impl == sizeof(SwsOpImpl), "SwsOpImpl layout mismatch"); /*********************************************************************/ /* Forward-declare exported functions. */ diff --git a/libswscale/aarch64/ops_impl.h b/libswscale/aarch64/ops_impl.h index ff3181f396..2553805967 100644 --- a/libswscale/aarch64/ops_impl.h +++ b/libswscale/aarch64/ops_impl.h @@ -92,7 +92,7 @@ static inline int linear_num_vregs(const SwsAArch64OpImplParams *params) #define offsetof_exec_in_bump 128 #define offsetof_exec_out_bump 160 #define offsetof_impl_cont 0 -#define offsetof_impl_priv 16 -#define sizeof_impl 32 +#define offsetof_impl_priv 8 +#define sizeof_impl 24 #endif /* SWSCALE_AARCH64_OPS_IMPL_H */ diff --git a/libswscale/ops_chain.h b/libswscale/ops_chain.h index 14b59bd03c..b2dfd3f3ad 100644 --- a/libswscale/ops_chain.h +++ b/libswscale/ops_chain.h @@ -21,6 +21,7 @@ #ifndef SWSCALE_OPS_CHAIN_H #define SWSCALE_OPS_CHAIN_H +#include "libavutil/avconfig.h" #include "libavutil/cpu.h" #include "libavutil/mem.h" @@ -44,7 +45,7 @@ typedef struct SwsUOpTable SwsUOpTable; * Private data for each kernel. */ typedef union SwsOpPriv { - DECLARE_ALIGNED_16(char, data)[16]; + char data[16]; /* Common types */ void *ptr; @@ -70,12 +71,14 @@ static_assert(sizeof(SwsOpPriv) == 16, "SwsOpPriv size mismatch"); */ typedef void (*SwsFuncPtr)(void); typedef struct SwsOpImpl { - SwsFuncPtr cont; /* [offset = 0] Continuation for this operation. */ - SwsOpPriv priv; /* [offset = 16] Private data for this operation. */ + SwsFuncPtr cont; /* Continuation for this operation. */ + SwsOpPriv priv; /* Private data for this operation. */ } SwsOpImpl; -static_assert(sizeof(SwsOpImpl) == 32, "SwsOpImpl layout mismatch"); -static_assert(offsetof(SwsOpImpl, priv) == 16, "SwsOpImpl layout mismatch"); +#if ARCH_X86_64 || ARCH_AARCH64 +static_assert(sizeof(SwsOpImpl) == 24, "SwsOpImpl layout mismatch"); +static_assert(offsetof(SwsOpImpl, priv) == 8, "SwsOpImpl layout mismatch"); +#endif /** * Compiled "chain" of operations, which can be dispatched efficiently. diff --git a/libswscale/x86/ops_include.asm b/libswscale/x86/ops_include.asm index a71255ea87..b8f41ca07b 100644 --- a/libswscale/x86/ops_include.asm +++ b/libswscale/x86/ops_include.asm @@ -134,7 +134,7 @@ struc SwsOpExec endstruc struc SwsOpImpl - .cont resb 16 + .cont resq 1 .priv resb 16 .next resb 0 endstruc -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
