Re: [FFmpeg-devel] [PATCH v2] avutil/mem: limit alignment to maximum simd align

2024-02-11 Thread Timo Rothenpieler
On 11.02.2024 15:00, Andreas Rheinhardt wrote: Timo Rothenpieler: FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs, which then end up heap-allocated. By declaring any variable in a struct, or tree of structs, to be 32 byte aligned, it allows the compiler to safely assume the

Re: [FFmpeg-devel] [PATCH v2] avutil/mem: limit alignment to maximum simd align

2024-02-11 Thread Timo Rothenpieler
On 11.02.2024 15:22, Rémi Denis-Courmont wrote: Le perjantaina 9. helmikuuta 2024, 21.22.17 EET Timo Rothenpieler a écrit : On 13.01.2024 16:46, Timo Rothenpieler wrote: FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs, which then end up heap-allocated. By declaring any

Re: [FFmpeg-devel] [PATCH v2] avutil/mem: limit alignment to maximum simd align

2024-02-11 Thread Rémi Denis-Courmont
Le perjantaina 9. helmikuuta 2024, 21.22.17 EET Timo Rothenpieler a écrit : > On 13.01.2024 16:46, Timo Rothenpieler wrote: > > FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs, > > which then end up heap-allocated. > > By declaring any variable in a struct, or tree of structs,

Re: [FFmpeg-devel] [PATCH v2] avutil/mem: limit alignment to maximum simd align

2024-02-11 Thread Sam James
Timo Rothenpieler writes: > On 13.01.2024 16:46, Timo Rothenpieler wrote: >> FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs, >> which then end up heap-allocated. >> By declaring any variable in a struct, or tree of structs, to be 32 byte >> aligned, it allows the compiler

Re: [FFmpeg-devel] [PATCH v2] avutil/mem: limit alignment to maximum simd align

2024-02-11 Thread Andreas Rheinhardt
Timo Rothenpieler: > FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs, > which then end up heap-allocated. > By declaring any variable in a struct, or tree of structs, to be 32 byte > aligned, it allows the compiler to safely assume the entire struct > itself is also 32 byte

Re: [FFmpeg-devel] [PATCH v2] avutil/mem: limit alignment to maximum simd align

2024-02-09 Thread Timo Rothenpieler
On 13.01.2024 16:46, Timo Rothenpieler wrote: FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs, which then end up heap-allocated. By declaring any variable in a struct, or tree of structs, to be 32 byte aligned, it allows the compiler to safely assume the entire struct itself

[FFmpeg-devel] [PATCH v2] avutil/mem: limit alignment to maximum simd align

2024-01-13 Thread Timo Rothenpieler
FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs, which then end up heap-allocated. By declaring any variable in a struct, or tree of structs, to be 32 byte aligned, it allows the compiler to safely assume the entire struct itself is also 32 byte aligned. This might make the