From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 2/4 v6] avformat: add a Tile Grid stream group type
Date: Wed, 31 Jan 2024 19:33:14 +0100
Message-ID: <AS8P250MB07445FF5C83F7BD4ED0A31C28F7C2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <7f7d8c22-da5b-4647-8935-ddc6e37685e4@gmail.com>
James Almer:
> On 1/31/2024 3:08 PM, Andreas Rheinhardt wrote:
>> James Almer:
>>> This will be used to support tiled image formats like HEIF.
>>>
>>> Signed-off-by: James Almer<jamrial@gmail.com>
>>> ---
>>> libavformat/avformat.c | 5 +++
>>> libavformat/avformat.h | 100 +++++++++++++++++++++++++++++++++++++++++
>>> libavformat/dump.c | 29 ++++++++++++
>>> libavformat/options.c | 32 +++++++++++++
>>> 4 files changed, 166 insertions(+)
>>>
>>> diff --git a/libavformat/avformat.c b/libavformat/avformat.c
>>> index 8e8c6fbe55..32ef440207 100644
>>> --- a/libavformat/avformat.c
>>> +++ b/libavformat/avformat.c
>>> @@ -100,6 +100,11 @@ void ff_free_stream_group(AVStreamGroup **pstg)
>>>
>>> av_iamf_mix_presentation_free(&stg->params.iamf_mix_presentation);
>>> break;
>>> }
>>> + case AV_STREAM_GROUP_PARAMS_TILE_GRID:
>>> + av_opt_free(stg->params.tile_grid);
>>> + av_freep(&stg->params.tile_grid->offsets);
>>> + av_freep(&stg->params.tile_grid);
>>> + break;
>>> default:
>>> break;
>>> }
>>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
>>> index 5d0fe82250..6577f13ef1 100644
>>> --- a/libavformat/avformat.h
>>> +++ b/libavformat/avformat.h
>>> @@ -1018,10 +1018,109 @@ typedef struct AVStream {
>>> int pts_wrap_bits;
>>> } AVStream;
>>> +/**
>>> + * AVStreamGroupTileGrid holds information on how to combine several
>>> + * independent images on a single grid for presentation. None of the
>>> tiles may
>>> + * overlap inside the grid.
>>> + *
>>> + * The following is an example of a simple grid with 3 rows and 4
>>> columns:
>>> + *
>>> + * +---+---+---+---+
>>> + * | 0 | 1 | 2 | 3 |
>>> + * +---+---+---+---+
>>> + * | 4 | 5 | 6 | 7 |
>>> + * +---+---+---+---+
>>> + * | 8 | 9 |10 |11 |
>>> + * +---+---+---+---+
>>> + *
>>> + * Assuming all tiles have a dimension of 512x512, the
>>> + * @ref AVStreamGroupTileGrid.offsets "offset" of the topleft pixel of
>>> + * the first @ref AVStreamGroup.streams "stream" in the group is
>>> "0,0", the
>>> + * @ref AVStreamGroupTileGrid.offsets "offset" of the topleft pixel of
>>> + * the second @ref AVStreamGroup.streams "stream" in the group is
>>> "512,0", the
>>> + * @ref AVStreamGroupTileGrid.offsets "offset" of the topleft pixel of
>>> + * the fifth @ref AVStreamGroup.streams "stream" in the group is
>>> "0,512", the
>>> + * @ref AVStreamGroupTileGrid.offsets "offset", of the topleft pixel of
>>> + * the sixth @ref AVStreamGroup.streams "stream" in the group is
>>> "512,512",
>>> + * etc.
>>> + *
>>> + * sizeof(AVStreamGroupTileGrid) is not a part of the ABI. No new
>>> fields may be
>>> + * added to this struct without a major version bump.
>> This is inconsistent. I think you mean that sizeof is part of the ABI.
>
> No? It's not a part of the ABI because AVStreamGroupTileGrid must not be
> ever used on stack, or allocated by anything other than AVStreamGroup.
> That way we can add fields to it without waiting for a major bump.
"No new fields may be added to this struct without a major version bump"
- Andreas
_______________________________________________
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-31 18:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 17:47 [FFmpeg-devel] [PATCH 1/4 v3] avformat/mov: ignore item boxes for animated heif James Almer
2024-01-31 17:47 ` [FFmpeg-devel] [PATCH 2/4 v6] avformat: add a Tile Grid stream group type James Almer
2024-01-31 18:08 ` Andreas Rheinhardt
2024-01-31 18:21 ` James Almer
2024-01-31 18:33 ` Andreas Rheinhardt [this message]
2024-01-31 18:33 ` James Almer
2024-01-31 17:47 ` [FFmpeg-devel] [PATCH 3/4 v4] avformat/mov: add support for tiled HEIF still images James Almer
2024-01-31 17:47 ` [FFmpeg-devel] [PATCH 4/4 v3] fate/mov: test remuxing all stream heif items James Almer
2024-01-31 18:06 ` [FFmpeg-devel] [PATCH 1/4 v3] avformat/mov: ignore item boxes for animated heif Andreas Rheinhardt
2024-01-31 18:12 ` 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=AS8P250MB07445FF5C83F7BD4ED0A31C28F7C2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.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