From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 00C3D4903D for ; Wed, 31 Jan 2024 18:18:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1070C68D08F; Wed, 31 Jan 2024 20:18:41 +0200 (EET) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03olkn2043.outbound.protection.outlook.com [40.92.58.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D300A68C2A8 for ; Wed, 31 Jan 2024 20:18:33 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OIpIV/AC4lO7pAbDpCUn8CTAFn86oriGIhPaivzJ3nII0m7C/NTdbKAUdA83vFTm6/q05Aq9YmY/SvyUOWfBRyIwhIUl1+ERyliVcxv+8qPcyi9iGABSNlrsZs+mmv8E6kWpjpvwxwvkdKOXoaUW9ReAUfE2opuSHcYrAQN0qlS4l1pGyJoGltQfEFYiV0UNqVrkjSW1PoXLzp1HqhLkMaUxqYP8QyT0239rn1FlJybLoksuLRbM9wQ7xu/zyZ9JmDAAFP7aR9R7ZL8HdpoGlDKK/xZr2U5/Pfr0MzmESNcrf4A9FoWVwYW2Vla91t9DWBwGUyQ6NDqmoTOZjnLwXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yVG05rUamNFChaUmXdU9QPL1GZWYPXuqxyOuBRKJNx4=; b=GnmWhCjgLRIFIuAyGGCjbmReviaUXL9u4Txf/3NayziWJsHZqztmM7AmxVeS26eAIa51vIpHg1UVQA6FijVnOEhmCqwaZwVhvY9OkdL5xIQ01siuf3bmqLpgne1B5IDt/f1Azwa3eGjb70UxUPb5K75ZuqnVbtyTbgW/ZowMNOIFad0TaE0P56pEUj1BYRNXgFhYI7Xjuz9lJ3BG2y16OBGORxDt6BIE4/6CpJHOFxv0Q03ALhByFsnc6heIAWpdqiWbsq8mzkwskFo0D8u/B/1fnR6Wm5sspskdAfA4BHN0BewOe1YsPmrwW32WULtZd6oNjuIf/WuwEmTZz4HYFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yVG05rUamNFChaUmXdU9QPL1GZWYPXuqxyOuBRKJNx4=; b=Tvp2sIO5jiJSoY/7wJOSMcc1/PO7rpKZlBGGRLMN35rN2FgB0fZxd4rghsqKBVRrEmf9poK2zO+irhUjC3CdUNRny7Z7jOdRLq6jn76BAWY8Cb7IiJwbX8wEi8qgT2WUUneu3xO39Wy2GiPGiU1BFMjh7W5MbMxwucQRXgqDssQ1+S4ZB+n/yxgmP02rqqcJSkmsm4GkzKYY7EFVxE2cK6AR25uWCGyl9G04f2/GPb7LwfyetFW/3+1xC5ffoQp/3PDD1X3+Gq5h5DVZRR6Y+yfcmfknqxgmDxKtO8tnSqJIo8qHdkWgVt2m6ZRWy4LDRT0Nbjo8RXK81T9RwkL9dA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AM8P250MB0341.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:328::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.23; Wed, 31 Jan 2024 18:06:42 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::65aa:deb0:a18e:d48d]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::65aa:deb0:a18e:d48d%5]) with mapi id 15.20.7202.031; Wed, 31 Jan 2024 18:06:42 +0000 Message-ID: Date: Wed, 31 Jan 2024 19:08:35 +0100 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20240131174718.17829-1-jamrial@gmail.com> <20240131174718.17829-2-jamrial@gmail.com> From: Andreas Rheinhardt In-Reply-To: <20240131174718.17829-2-jamrial@gmail.com> X-TMN: [FZBjfhKzGblo5IdVSlTSAj6zURfd7SePZ7IxthyzVUY=] X-ClientProxiedBy: ZR2P278CA0025.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:46::15) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <9feb2d2a-aa96-4c06-bd6f-8cb081b2ee2a@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AM8P250MB0341:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e3f8f53-22f4-4505-4036-08dc22876109 X-MS-Exchange-SLBlob-MailProps: 9IecXKUgicCdh7p5dSsauvfy9AcpGHe5BgtGWxsbypZCH/bhu8u5Y2l2JttQtTw+X0mDFO0VMccKwXa+ObDAy1Y92BoT0nQ6nUrNoCQcRmXk7/jWNMU64F3rM3ZP9xe4uBkRfPvoiykBxh5Yxfk1zPNveYfSvolkAEFTbkN2jq+hRsiwLbEAWq83ufGZDncIH8Ltu9beiYYiZW5mNVzEw3eU05U2GZoGIFTF/GTww+qDQsx35coLEZRyys960uITroPwZvtSC/fN24xXlJfzZV0ustHUmD3Tdjb5MzqlIBREAe8f8E1h5VWwghki3jX7qkNX18+cBvSn04HchUoqdHXPJKpIJcMF4PzEVcHxLa7VbhjUvctX1Y5njS1tJCd/jJgumiZxqG+djkjmuGlovq2obx8t6pzGRPCasuuBAlc7t9L+OR/R948ekHwCBMp0OcRFxZuSk1X2jvuJgZ+INf5WRF/Mz1+n0q85rw5q7Vg1ConvhNSbDsKF//ZU2ZqiCOrPnPetJ0a8zp1LuF/1k4ZsG362CgrTli8xFDDka5lXrxzuO887fONBT1XHXJfwJGDqqldCK/ROkqP70LSxLwspSpjuWJjzr1/mCHsvLfZ2UvznLSGwkKIQdH0T6VWMTGeZj0vrm3lNRPGvc0xIC08H76njtzeLLyqdJTUiOIeXRwBR5wRt+2ejI5sb7hv5kH5ge5Ndlzu2nFmrD8zFApxXIjH0tVgCzvYdUpy8yUHguWhurt+Q2A== X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PyHrm0AJDfl1Za0CutKW/uE5RMCllHvyzbFpGHeUEyZyojvmNvCnpJiQ5l0zFMSmQeo+4f0lzlTNt4/oSFNxRtH2sdpgq15uc5JsJEoMBREDu/6x3HPZNz6KAqvQZXrYtZgw14bUCHNvsRWQLOb4pyteWf5Ti41ES24qRIY8646zVolRKR+ZTNrtQ3Z1uilI4XbwpG7yv4ywFgqnbwiG8320iW9lpV2PBEr9RTB365KJSMONYmPf7r9UTnyFEEV+cV/SaUNE1NrlSycIFlA5UFHxJSO+i+Qi0RjVZnTIZ9lSEWd22ryy7wg0iqUbmIPCN51x1jHGoN7uF786u/Hp0RZHC+jchaerPwWpeFn9alMdH0zMmct1ZkVhmDGq7rKcuaRWqB2uBQspIH7U4t/2oFdb9Pt60I8uv+8UY7s2OtcjVjsqGFnnvp/D3cBgQxvAVdzikuMpdCRnU/4NhyU1dnYulBnQgucJAK+BAO6a9VT7E5bui3gJchjQcazCriSaoAoQk90KWXSxzyffgtt2BV1fWeOXdYNSQvK9SzwxagvX7XZ+Wikyo6FegucgxI6i X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eko3cFJHbFpZM0pPMjFialYyL1FuZXhlRFZXMldVK1QzaDgycnVHM2NIalN5?= =?utf-8?B?bitRTTdLOU9tUDJBTnJNUm9wbXNxcmNXb1p5emNieGpNOTJNRTBteG8zWWU1?= =?utf-8?B?NFV2amlEK3lrbGZLZ210MnVIUUpXNFJDTUZMRnl6WVlISWRvS0tUTWJyNnVB?= =?utf-8?B?VnVzSlVGeUo5Y0V5dU5XbVE3NVZpUU9iU1RQT1RVWE9XcUhPWTRjU2VobVRz?= =?utf-8?B?Yy9ObHlJYXNNVXFxUkFrcmtBeFRmeXZOQVhhVkYwUEVNSTBWV2VnQncrbmIv?= =?utf-8?B?cktFQllKeHY1ZjRzVXluWXRDQzVZVS83WWV5MjQvSXNKS01zSDhiS2ZFMS9G?= =?utf-8?B?ZXhodW5YbjlBWTRlMTBXVVR3ZHZVTG96V0dJUU1RQVFzVUdNcDFIN0RQSHVM?= =?utf-8?B?VHZRYitKWDNmMDBTQ3NZOUpDSnFKdTVvSDBGaUVtU2t5SWFCUkN0a0REbGlX?= =?utf-8?B?Qk9ZWUQ5M3YvNFhaMUtwUjlWZXNqamF5MHdXYjRrUlEwQzIwMXU4WVZoVmZ1?= =?utf-8?B?ZnJlYnhSZmpBak5rUVl0SW12M2hnRW9OcEx0V3R5c0xPajcvT1FjRnpmVmta?= =?utf-8?B?bEE3RExWeHdnN3pYVTEwb1FmL3ZEbE1SVCtmbE10STVCcTFESE42K0hRbG5U?= =?utf-8?B?blppSnBoSXVFZHVMdEJuTGZxT3FseTd6NE9uS25ualljc2tVc29PZWNrYzl2?= =?utf-8?B?eXRGcFluWmEveFJnaXFmbHFXQnJHam52SDBHRnByNTBxQ0JreWtSVnhjNEYx?= =?utf-8?B?MWZwNnpuTUFaeDErKy9PYzViSDJZb1RJMjNsL1B1b0hZQTFsd0VZajdmNmNr?= =?utf-8?B?RkdkaUlZQ3dzQ216MkJsK3AyQzNaNlpYTmc2cDB2aDR3NjZEN1VSZ05WcVo4?= =?utf-8?B?RElydWJaY2JFa3VQaFJ4VHc1OVFWMUxJNURselk0M01XYnUyUnB2Um9HTklL?= =?utf-8?B?emw2eXd5YXBrYXdGZnF2eGVlZ0xvKzlEYmpzcWZnTk95Rkp3Q1MxampTWjZ6?= =?utf-8?B?aGxJdjhnQlVYb2JmRGcvNUEvalIzUFhuODBBVHEvT3VwVGp5MGlKUXd6Rmsy?= =?utf-8?B?U0NyOTE3V1RwYlkzRFVRWkU3L2dsWmpwdkMxTUtvNW1mZkhoUmhmSG4rTHEy?= =?utf-8?B?RG52aXJCMyszQy9wbCtxbTZ5cXZkbjRBdUVmOW4wTnJCdENUWitVamtOZklC?= =?utf-8?B?Y045eDRwdHpIUkVoeUNkVTJFTzhpdTJyb3RiK1U5ZGdEQzJGNy8xeEJMQWxy?= =?utf-8?B?VXI3Y1VSbWRvSXgwZVc5SFlEL1NRWjRHd0Q5OVJqT05MODVQeVArbnFMcWR4?= =?utf-8?B?VE93YWFEaW52UTU2Vk5Xa3VBcmI1azc1d1JJUG9Wa3JEOG10bWlmSDFyTVIy?= =?utf-8?B?OTJ0dHhGb2JITXhIM1hkMmswRXd6b3A4VFNzSzlaT3FmdVBpK2wyZWJ2RnJQ?= =?utf-8?B?c0F1bDZoY2p4WTNGZmtPOHlYOU5wbjczS3pLdVNray9ISDZPcHlXc1cyT1hI?= =?utf-8?B?VHYyWVZXSE0rOVFLNmVjdmU4R2FqUkhmbHl1S3RMREhZYWJpR05vNkU0eFRk?= =?utf-8?B?S3N6bjg5UmtVdW1zM2loUE83UkZKdjBxdXJXVGZ6YWppVkZWMjdLcUI2SlVa?= =?utf-8?B?UzhkVTJ1bFVQZ1l4cFZYckpYejIyS1NEM2FiZ05FUTFRcU5WaGNsOGN2N1Qw?= =?utf-8?Q?9nXYMfleBezEkJq1r900?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e3f8f53-22f4-4505-4036-08dc22876109 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2024 18:06:42.4965 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8P250MB0341 Subject: Re: [FFmpeg-devel] [PATCH 2/4 v6] avformat: add a Tile Grid stream group type X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: James Almer: > This will be used to support tiled image formats like HEIF. > > Signed-off-by: James Almer > --- > 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. > + */ > +typedef struct AVStreamGroupTileGrid { > + const AVClass *av_class; > + > + /** > + * Width of the final image in the grid. > + * > + * Must be > 0. > + */ > + int coded_width; > + /** > + * Width of the final image in the grid. > + * > + * Must be > 0. > + */ > + int coded_height; > + > + /** > + * An @ref AVStreamGroup.nb_streams "nb_streams" sized array of offsets in > + * pixels from the topleft edge of the grid, indicating where each stream > + * should be placed. > + * It must be allocated with the av_malloc() family of functions. > + * > + * - demuxing: set by libavformat, must not be modified by the caller. > + * - muxing: set by the caller before avformat_write_header(). > + * > + * Freed by libavformat in avformat_free_context(). > + */ > + struct { > + int x; > + int y; > + } *offsets; > + > + /** > + * Offset in pixels from the left edge of the grid where the actual image > + * meant for presentation starts. > + * > + * This field must be >= 0 and <= @ref coded_width. > + */ > + int horizontal_offset; > + /** > + * Offset in pixels from the top edge of the grid where the actual image > + * meant for presentation starts. > + * > + * This field must be >= 0 and <= @ref coded_height. > + */ > + int vertical_offset; > + > + /** > + * Width of the final image for presentation. > + * > + * Must be > 0 and <= (@ref coded_width - @ref horizontal_offset). > + * When it's not equal to (@ref coded_width - @ref horizontal_offset), the > + * result of (@ref coded_width - width - @ref horizontal_offset) is the > + * amount amount of pixels to be cropped from the right edge of the > + * final image before presentation. > + */ > + int width; > + /** > + * Height of the final image for presentation. > + * > + * Must be > 0 and <= (@ref coded_height - @ref vertical_offset). > + * When it's not equal to (@ref coded_height - @ref vertical_offset), the > + * result of (@ref coded_height - height - @ref vertical_offset) is the > + * amount amount of pixels to be cropped from the bototm edge of the > + * final image before presentation. > + */ > + int height; > +} AVStreamGroupTileGrid; > + > enum AVStreamGroupParamsType { > AV_STREAM_GROUP_PARAMS_NONE, > AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT, > AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION, > + AV_STREAM_GROUP_PARAMS_TILE_GRID, > }; > > struct AVIAMFAudioElement; > @@ -1062,6 +1161,7 @@ typedef struct AVStreamGroup { > union { > struct AVIAMFAudioElement *iamf_audio_element; > struct AVIAMFMixPresentation *iamf_mix_presentation; > + struct AVStreamGroupTileGrid *tile_grid; > } params; > > /** > diff --git a/libavformat/dump.c b/libavformat/dump.c > index aff51b43f6..c9b7369bcd 100644 > --- a/libavformat/dump.c > +++ b/libavformat/dump.c > @@ -22,6 +22,7 @@ > #include > #include > > +#include "libavutil/avstring.h" > #include "libavutil/channel_layout.h" > #include "libavutil/display.h" > #include "libavutil/iamf.h" > @@ -721,6 +722,34 @@ static void dump_stream_group(const AVFormatContext *ic, uint8_t *printed, > } > break; > } > + case AV_STREAM_GROUP_PARAMS_TILE_GRID: { > + const AVStreamGroupTileGrid *tile_grid = stg->params.tile_grid; > + AVCodecContext *avctx = avcodec_alloc_context3(NULL); > + const char *ptr = NULL; > + av_log(NULL, AV_LOG_INFO, " Tile Grid:"); > + if (avctx && stg->nb_streams && !avcodec_parameters_to_context(avctx, stg->streams[0]->codecpar)) { > + avctx->width = tile_grid->width; > + avctx->height = tile_grid->height; > + avctx->coded_width = tile_grid->coded_width; > + avctx->coded_height = tile_grid->coded_height; > + if (ic->dump_separator) > + av_opt_set(avctx, "dump_separator", ic->dump_separator, 0); > + buf[0] = 0; > + avcodec_string(buf, sizeof(buf), avctx, is_output); > + ptr = av_stristr(buf, " "); > + } > + avcodec_free_context(&avctx); > + if (ptr) > + av_log(NULL, AV_LOG_INFO, "%s", ptr); > + av_log(NULL, AV_LOG_INFO, "\n"); > + dump_metadata(NULL, stg->metadata, " ", AV_LOG_INFO); > + for (int i = 0; i < stg->nb_streams; i++) { > + const AVStream *st = stg->streams[i]; > + dump_stream_format(ic, st->index, i, index, is_output, AV_LOG_VERBOSE); > + printed[st->index] = 1; > + } > + break; > + } > default: > break; > } > diff --git a/libavformat/options.c b/libavformat/options.c > index 75ec86ce05..ed96ba4afb 100644 > --- a/libavformat/options.c > +++ b/libavformat/options.c > @@ -337,6 +337,26 @@ fail: > return NULL; > } > > +#define FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM > +#define OFFSET(x) offsetof(AVStreamGroupTileGrid, x) > +static const AVOption tile_grid_options[] = { > + { "grid_size", "size of the output image", OFFSET(coded_width), > + AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, INT_MAX, FLAGS }, > + { "horizontal_offset", NULL, OFFSET(horizontal_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS }, > + { "vertical_offset", NULL, OFFSET(vertical_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS }, > + { "output_size", "size of valid pixels in output image meant for presentation", OFFSET(width), > + AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, INT_MAX, FLAGS }, > + { NULL }, > +}; > +#undef FLAGS > +#undef OFFSET > + > +static const AVClass tile_grid_class = { > + .class_name = "AVStreamGroupTileGrid", > + .version = LIBAVUTIL_VERSION_INT, > + .option = tile_grid_options, > +}; > + > static void *stream_group_child_next(void *obj, void *prev) > { > AVStreamGroup *stg = obj; > @@ -346,6 +366,8 @@ static void *stream_group_child_next(void *obj, void *prev) > return stg->params.iamf_audio_element; > case AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION: > return stg->params.iamf_mix_presentation; > + case AV_STREAM_GROUP_PARAMS_TILE_GRID: > + return stg->params.tile_grid; > default: > break; > } > @@ -368,6 +390,9 @@ static const AVClass *stream_group_child_iterate(void **opaque) > case AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION: > ret = av_iamf_mix_presentation_get_class(); > break; > + case AV_STREAM_GROUP_PARAMS_TILE_GRID: > + ret = &tile_grid_class; > + break; > default: > break; > } > @@ -429,6 +454,13 @@ AVStreamGroup *avformat_stream_group_create(AVFormatContext *s, > if (!stg->params.iamf_mix_presentation) > goto fail; > break; > + case AV_STREAM_GROUP_PARAMS_TILE_GRID: > + stg->params.tile_grid = av_mallocz(sizeof(*stg->params.tile_grid)); > + if (!stg->params.tile_grid) > + goto fail; > + stg->params.tile_grid->av_class = &tile_grid_class; > + av_opt_set_defaults(stg->params.tile_grid); > + break; > default: > goto fail; > } _______________________________________________ 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".