[FFmpeg-devel] [PATCH V6 4/6] lavu: add side data AV_FRAME_DATA_BOUNDING_BOXES

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Wed Apr 7 12:59:19 EEST 2021

Nicolas George:
> Hendrik Leppkes (12021-04-07):
>> Unfortunately, this is not correct. I don't know about optimization
>> problems, but I do know that compilers we do support, which are C11
>> compliant (where VLAs are optional), do not implement them (just
>> confirmed this with a test, as well, to make sure).
> Too bad.
> Can you document which compilers they are? This is an information that
> should be centralized.
> We will have have a backup implementation.
Why a backup implementation? Why not just avoid VLAs altogether (I don't
like using features that are optional in modern standards)? All one
needs to calculate a suitable offset is the alignment of AVBoundingBox.
This can be done via _Alignof for C11 compilers and via compiler
extensions for lots of other compilers (e.g. GCC supports __alignof__
since at least 3.1). And a generic alignment of (say) 8 can be used as a

- Andreas

More information about the ffmpeg-devel mailing list