From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API
Date: Thu, 25 Jan 2024 14:31:29 -0300
Message-ID: <048ee5dc-cccc-4b48-a27a-2c2bb3eec501@gmail.com> (raw)
In-Reply-To: <170620283537.8914.1891653835599841819@lain.khirnov.net>
On 1/25/2024 2:13 PM, Anton Khirnov wrote:
> Quoting James Almer (2024-01-22 12:59:52)
>>>
>>> I don't see how is that supposed to work. E.g. consider the following
>>> partitioning:
>>> ┌─┬────┬─┐
>>> │ │ ├─┤
>>> ├─┤ │ │
>>> │ ├────┤ │
>>> └─┴────┴─┘
>>>
>>> How would you represent it in this API?
>>
>> That's two rows and three columns. Lets assume the smallest rectangle
>> there is 1x1:
>>
>> 1x2 2x3 1x1
>> 1x2 2x1 1x3
>>
>> Meaning
>>
>> tile_width[] = { 1, 2, 1, 1, 2, 1 };
>> tile_height[] = { 2, 3, 1, 2, 1, 3 };
>>
>> As long as the sum of widths on every row and the sum of heights on
>> every column is the same (To ensure you get a rectangle), it can be
>> represented.
>>
>> If what you're trying to say is "What about offsets?", they can be
>> inferred based on dimensions and position of previous tiles within the grid.
>> I don't think adding yet another array to store offsets is worth it. But
>> maybe a helper function that will build it?
>
> This seems horribly obfuscated to me. Why do the users of this API have
> to deal with all this? Why are the notions of "tile rows", "tile
> columns", and "tiles" necessary?
It aligns with how HEIF (and even bitstream codecs like AV1 internally)
define a grid of images put together. Since this will be mainly used for
the former, it seems like the best way to propagate such information.
Strictly speaking, the "tile" dimensions are available as part of each
stream in the group, so now that i made the struct not be generic for
lavu, i can remove the arrays. But how to place the images in a grid
still requires the concept of rows and columns.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-01-25 17:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-20 22:04 James Almer
2024-01-20 22:04 ` [FFmpeg-devel] [PATCH 2/2 v2] avformat: add a Tile Grid stream group type James Almer
2024-01-21 6:27 ` [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API Anton Khirnov
2024-01-21 12:06 ` James Almer
2024-01-21 17:29 ` Anton Khirnov
2024-01-21 17:47 ` James Almer
2024-01-21 18:29 ` Anton Khirnov
2024-01-21 18:38 ` James Almer
2024-01-21 19:02 ` Anton Khirnov
2024-01-21 19:29 ` James Almer
2024-01-21 21:03 ` James Almer
2024-01-22 10:38 ` Anton Khirnov
2024-01-22 12:12 ` James Almer
2024-01-22 10:32 ` Anton Khirnov
2024-01-22 11:59 ` James Almer
2024-01-25 17:13 ` Anton Khirnov
2024-01-25 17:31 ` James Almer [this message]
2024-01-22 12:08 ` James Almer
2024-01-25 17:17 ` Anton Khirnov
2024-01-25 17:26 ` James Almer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=048ee5dc-cccc-4b48-a27a-2c2bb3eec501@gmail.com \
--to=jamrial@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git