[FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API

James Almer jamrial at gmail.com
Mon Jan 22 14:12:46 EET 2024


On 1/22/2024 7:38 AM, Anton Khirnov wrote:
> Quoting James Almer (2024-01-21 22:03:10)
>> I could remove the types and the union altogether and leave only the
>> array even for uniform tiles if you think that simplifies the API, but
>> seems like a waste of memory to allocate a rows x cols array of ints
>> just to have the same value written for every entry.
> 
> My point is that the API can abstract away the details of how the data
> is stored. You could have it always behave like a list of N rectangles,
> while only storing as much information as is needed.

The struct needs tile rows, tile columns, tile dimensions, output 
dimensions, and cropping information. I don't see how it could get smaller.


More information about the ffmpeg-devel mailing list