diff options
author | James Almer <jamrial@gmail.com> | 2024-01-22 14:35:55 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-02-26 12:21:12 -0300 |
commit | 41e349c24a726d0c3bac5830eec9f6940ea41c63 (patch) | |
tree | ef767f4ad259f223364715a4594db3cb05b72276 /libavformat/isom.h | |
parent | 25a10677d12c3c9def7cb22514662ac149c05fc6 (diff) | |
download | ffmpeg-41e349c24a726d0c3bac5830eec9f6940ea41c63.tar.gz |
avformat/mov: add support for tile HEIF still images
Export each tile as its own stream, and the grid information as a Stream Group
of type TILE_GRID.
This also enables exporting other stream items like thumbnails, which may be
present in non tiled HEIF images too. For those, the primary stream will be
tagged with the default disposition.
Based on a patch by Swaraj Hota
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r-- | libavformat/isom.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h index 25025e4cee..07f09d6eff 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -271,15 +271,23 @@ typedef struct MOVStreamContext { typedef struct HEIFItem { AVStream *st; + char *name; int item_id; int64_t extent_length; int64_t extent_offset; - int64_t size; int width; int height; int type; + int is_idat_relative; } HEIFItem; +typedef struct HEIFGrid { + HEIFItem *item; + HEIFItem **tile_item_list; + int16_t *tile_id_list; + int nb_tiles; +} HEIFGrid; + typedef struct MOVContext { const AVClass *class; ///< class for private options AVFormatContext *fc; @@ -343,6 +351,10 @@ typedef struct MOVContext { int cur_item_id; HEIFItem *heif_item; int nb_heif_item; + HEIFGrid *heif_grid; + int nb_heif_grid; + int thmb_item_id; + int64_t idat_offset; int interleaved_read; } MOVContext; |