Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2024-01-12 Thread Timo Rothenpieler
On 09.12.2023 06:23, Andreas Rheinhardt wrote: Timo Rothenpieler: On 08.12.2023 11:01, 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

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-08 Thread Andreas Rheinhardt
Timo Rothenpieler: > On 08.12.2023 11:01, 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

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-08 Thread Nicolas George
Timo Rothenpieler (12023-12-08): > Is mixing the libraries really a scenario we need to care about/support? No. We should merge all the libraries into a single libffmpeg.so. Having separate libraries brings us no end of hassle and drawbacks, starting with all the avpriv symbols and backward

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-08 Thread Timo Rothenpieler
On 08.12.2023 11:01, 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] avutil/mem: always align by at least 32 bytes

2023-12-08 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] avutil/mem: always align by at least 32 bytes

2023-12-07 Thread Martin Storsjö
On Fri, 8 Dec 2023, Timo Rothenpieler wrote: On 06.12.2023 14:25, Martin Storsjö wrote: On Sun, 3 Dec 2023, 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

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-07 Thread Timo Rothenpieler
On 06.12.2023 14:25, Martin Storsjö wrote: On Sun, 3 Dec 2023, 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

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-06 Thread Martin Storsjö
On Wed, 6 Dec 2023, Timo Rothenpieler wrote: On 06/12/2023 14:25, Martin Storsjö wrote: On Sun, 3 Dec 2023, 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

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-06 Thread Timo Rothenpieler
On 06/12/2023 14:25, Martin Storsjö wrote: On Sun, 3 Dec 2023, 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

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-06 Thread Martin Storsjö
On Sun, 3 Dec 2023, 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

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-06 Thread Timo Rothenpieler
On 06/12/2023 13:31, James Almer wrote: On 12/3/2023 5:10 PM, 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] avutil/mem: always align by at least 32 bytes

2023-12-06 Thread James Almer
On 12/6/2023 9:50 AM, Ronald S. Bultje wrote: Hi, On Sun, Dec 3, 2023 at 3:10 PM Timo Rothenpieler wrote: So if the compiler does a copy in decode_cpe() with avx instructions, but ffmpeg is built with --disable-avx Ehm... What? That seems like the core bug then? --disable-avx will

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-06 Thread Ronald S. Bultje
Hi, On Sun, Dec 3, 2023 at 3:10 PM Timo Rothenpieler wrote: > So if the compiler does a copy > in decode_cpe() with avx instructions, but ffmpeg is built with > --disable-avx > Ehm... What? That seems like the core bug then? Ronald ___ ffmpeg-devel

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-06 Thread James Almer
On 12/3/2023 5:10 PM, 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

Re: [FFmpeg-devel] [PATCH] avutil/mem: always align by at least 32 bytes

2023-12-06 Thread Timo Rothenpieler
On 03/12/2023 21:10, 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] avutil/mem: always align by at least 32 bytes

2023-12-03 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