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 6931247C20 for ; Fri, 6 Oct 2023 03:03:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A17F668CBAB; Fri, 6 Oct 2023 06:03:32 +0300 (EEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04olkn2074.outbound.protection.outlook.com [40.92.74.74]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E8BE868C9B5 for ; Fri, 6 Oct 2023 06:03:26 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XhqW6AongfxOLjhz1jpXSfAbnyBSYeClH6WIWPFeUVz8IPAtQxyUn7NOm4M7wo42nfx9ciMLLKNikz13WwEuWYdVxfDW9WYMQ9BHNgZhyrT/9wJWL/Uy2NGeiwceio2IAdKuLci0nAo5o040PBnGVUSWm5Hj1rULp5D/8ww5xb3TNsMCKmyAma2WXFF4TF2j0ZnIhZ5jjxGwPWepMRcGH9/R8CHgwLqel+I/vWPuFjlXd/k06S36aUL8QoC/c12ClNMB7iaHQbGAA2CeiBwSAkKRVDhODvStLh5gVy3FM4IAjsn7Th8qEmeT3gdSKrBxwGWiRVIcgwmZkKNOeDyCmQ== 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=ef9ju+PFOXUTJRyIlR8pB0VSkgwAuC8vGycqooKPpOw=; b=bdwu3WYz0mSskqz0eCPwFXgYsq7AUd3TkoG3C1ict1f8XJEiO3JKZX9Wve1bPeWGPrr378sr6Dg4D0H4Kkhkuih2cwZ41pMG2Z4+QmZ67rcO/3hsGKO1znzrTZjvMCyjkXU8T12sJlhJceofo5Mhr72lTxwcgc+PfyPzAKY8ctNPagLw+UkWGByo4u3IkmJK8kfUU1yMQ9LkdJKNCx9T49SljuObZPw3oe9YjOrvYYNYmlEPg7ASmrrY0QPm1icNW0GoROfUgMFjo5nieSAN/+lJxV3mJ4TF0VE55+njoDTIpOuXOZLZXt5hTRh4v1CHfMS+tgaSeHNrr2qzksE3Ug== 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=ef9ju+PFOXUTJRyIlR8pB0VSkgwAuC8vGycqooKPpOw=; b=ghlWMQYgpGlhwDEbitihzaNiV0c8rOkxDtr5cpMyrTs6XUTeTsYtB/4Uj6lKGHHKOXPLc9s3Rm4fk/ZIl05GvuhJuF7+eiWunAzosUQxxmTEylZQeZI3EpWatetF1Qz4rz2iQ7bhi5xkXefHT8oiRLi7nOwlQxwasYz4Qj5IJmZFgdn+g0hzZblPA2YrHtU0k9T7/O4VQHzC9etX40l6WIP2Bu21xA7YKTjcJSvoQeBAOsigGKzKJRqXVtb4QsCQhJXDHm5xNbhR73kHvnFvCHeVui1jLhJHB95uLQcqpDkz2u+0ADNPlVUpOJlsl7cUtPKHNb6sNtLDkb6sFtaajw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0061.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.33; Fri, 6 Oct 2023 03:03:24 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Fri, 6 Oct 2023 03:03:24 +0000 Message-ID: Date: Fri, 6 Oct 2023 05:04:38 +0200 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20231004122849.56604-1-jamrial@gmail.com> <20231004122849.56604-4-jamrial@gmail.com> Content-Language: en-US From: Andreas Rheinhardt In-Reply-To: <20231004122849.56604-4-jamrial@gmail.com> X-TMN: [KR14HZNRr7910vwRs+CNlSEH5OtW5iQ5] X-ClientProxiedBy: ZRAP278CA0016.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::26) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <9691a5fa-d83a-4028-a804-074f964b1958@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0061:EE_ X-MS-Office365-Filtering-Correlation-Id: f2d85c11-09b3-48f3-9d68-08dbc618cdd1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nWXwUODq6/yuFOapgJb6LvzVFz1XlgAELxJZ/T7riQ9pRbZgOQttIXXuh+jlEyDO/593rFbcoA5ww5sj8/AVg93IEDXD5wU+orHBndJ4yRa0EOr1wVPevQtfrz5QjK9F8HF7rnFcmb2K6QWGIy/LXSatUj3JqhYAyotQV+0Ofdq8UbczL4sqyqOngoY4Gqp66HFeSMiGQQFkI3HDY5CrR5YtpDenv5xUmJB8PJIn4vQyId11xwWpH/mJ4ICks1PLWN9qyMvnMRv5bXuidMy/EDw4JS3rpCmJIEy44sxl3JPaj+TgEYPrBrNzHFxlpJFDOYv9gQOf5oc/LWjR8xZENY55mnDG/mPYQP+HB7L83Nha9WiA/l4nw5PSSOG8N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-8?B?eEpITHlMWFZrK1hPdUg5SFJ2Qzh6MXJKMnQxbmhwYzAxQ2prRGxMU2hXVkZl?= =?utf-8?B?WHhVN2JBVnVTNHdobTRjbDlJck5CenM0eGFJTlZ2ZmNuZDRCbWZFb3pxRnBT?= =?utf-8?Q?KYB23bKeRUlZED9e/AFF?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2d85c11-09b3-48f3-9d68-08dbc618cdd1 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2023 03:03:24.0072 (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: DU2P250MB0061 Subject: Re: [FFmpeg-devel] [PATCH 03/11] avformat/avformat: use the side data from AVStream.codecpar 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: > Deprecate AVStream.side_data and its helpers in favor of the AVStream's > codecpar.side_data. > > This will considerably simplify the propagation of global side data to decoders > and from encoders. Instead of having to do it inside packets, it will be > available during init(). > Global and frame specific side data will therefore be distinct. > > Signed-off-by: James Almer > --- ... > diff --git a/libavformat/avformat.h b/libavformat/avformat.h > index a8e245000f..8a3fe137fa 100644 > --- a/libavformat/avformat.h > +++ b/libavformat/avformat.h > @@ -940,6 +940,7 @@ typedef struct AVStream { > */ > AVPacket attached_pic; > > +#if FF_API_AVSTREAM_SIDE_DATA > /** > * An array of side data that applies to the whole stream (i.e. the > * container does not allow it to change between packets). > @@ -956,13 +957,20 @@ typedef struct AVStream { > * > * Freed by libavformat in avformat_free_context(). > * > - * @see av_format_inject_global_side_data() > + * @deprecated use AVStream's @ref AVCodecParameters.side_data > + * "codecpar side data". > */ > + attribute_deprecated > AVPacketSideData *side_data; > /** > * The number of elements in the AVStream.side_data array. > + * > + * @deprecated use AVStream's @ref AVCodecParameters.side_data > + * "codecpar side data". > */ > + attribute_deprecated > int nb_side_data; > +#endif > > /** > * Flags indicating events happening on the stream, a combination of > @@ -1720,11 +1728,18 @@ typedef struct AVFormatContext { > int (*io_close2)(struct AVFormatContext *s, AVIOContext *pb); > } AVFormatContext; > > +#if FF_API_AVSTREAM_SIDE_DATA > /** > * This function will cause global side data to be injected in the next packet > * of each stream as well as after any subsequent seek. > + * > + * @deprecated global side data is always available in every AVStream's > + * @ref AVCodecParameters.side_data "codecpar side data" array. > + * @see av_packet_side_data_get() > */ > +attribute_deprecated > void av_format_inject_global_side_data(AVFormatContext *s); > +#endif This is not a "helper" of AVStream.side_data at all. Whereas porting code to the new API is straightforward for the other deprecated functions, this one is not. In fact, removing it adds complications for users, because a user could simply inject global side data via this function and then only look at packets, the user now has to add special code to also inspect the global side data. One example affected by this is my current patch for the Matroska demuxer to output the palette as stream side data and not as packet side data as the other demuxers do. Without av_format_inject_global_side_data(), this will break every user searching for palette data only in packet side data and not in stream side data. In fact, one such user is libavformat itself, because all muxers (nut and avi and mov (the latter two via rawutils)) only search for this type of side data in packets. As you can see in that patch, it fixes an issue with seeking where the palette is attached to a packet read during avformat_find_stream_info() that is discarded afterwards due to a seek. The same issue also exists in avi, yet the solution is not so simple there because avi has a second way to export palettes and due to the requirement that global and packet-specific side data is supposed to be distinct one can't simply attach the palette extracted from extradata as stream side-data. Which makes me think that this requirement is not really reasonable. - 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".