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 18C984A1E8 for ; Sun, 24 Mar 2024 12:26:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 34D3068D3CA; Sun, 24 Mar 2024 14:26:06 +0200 (EET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2079.outbound.protection.outlook.com [40.92.90.79]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D961968D345 for ; Sun, 24 Mar 2024 14:25:58 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qo52b5zj3VTDA/87l0/leMIVUdJ1LFSl2U7X7z+C1RyKwgVEWWwerxNy+7XcsSeHCBUAU7i0yiRuzJ7A1wVNXM2FXqQSQKMkQzenCA9O8/8NB5dgRQvZbGpIJJpWFJXQe0o3/YgznEitBGoDIGgUP2o9mCKoQPQ/OwdBuBCZEkFbB57GSNvCvMEU1v0sc9mH+iswytxkDpq1Gkic5i9/gAoP9UvIox3Z+VC1iWF5wH0DSf2QX3DmA/MMiHYPwCyuyEzY+ckmuXXgvdy3aXa2+s4Lnrag2JUHjV241dG8chytSGfSpNJAOVAgYu1B8hRTZ22oAQBZ0RT9bYfb/UumWg== 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=xfeFNJDgXIwo/gYEcdOSe3gh8gr9epwmLJwXkB4THpQ=; b=F/bSkgx9/MoIAZw88Krtoa+Ey0gBj0nbWFsQb9O7UAEfomUJTpqq4MIlgKWXPUM3ZN4A7V8VbU0wQ+PBH43E37EVwlpF+3vlb95w1FY5rqjOEA2IPJHY3D5yIwFvHbX45SYjC26tXljaSU30V15GhhmYU/uLvhIbSI5at6kc5+z44yvbXEGA7jZe2rQv7Zht+CGohu9b1kE9+E7xD3zLUhpr8YfO59JKO+vTSEmX9+hY17kwZRcrXG3Nq8kzaNRudaIN7NFysssuZurDixOMs2X3Zvvsl8O2+5TLpU6zxEc+Lhx81NttLeCfQNqNcLfZNoimyw4WwSPfPznHFPGosg== 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=xfeFNJDgXIwo/gYEcdOSe3gh8gr9epwmLJwXkB4THpQ=; b=vFTVuGsBLOCbovvszwwkRPwRvO5kjxTzmLBAfCe9+5s/Z/pGYcRosLqISmyyNxZnN8ikbGjZHqGnvTt2BAYqXdpQnxGuysycLRK0199SlFxDIIpVvCbiOwXxB1h3OkpcLm/S9tP+JIH0HnUOJzZ8nt3GHO2lo1dtp/ytk/BGqSEKO7v95L9UMQO54Z/4YA/GRGlvEYy32OYd193nR8gp0q8DA3oaN/cKzVc4nbLR7OdxDKMLqT1b4lVbueITcu/vj1FL2BvVSXMSZrPmZwqE1oZlROLjmUe5az4c17vafGeNQ1d6aGw6ki84KyUokE//jqMFIO/PSHD6ryM/B3cnxQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PR3P250MB0051.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:14e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Sun, 24 Mar 2024 12:25:57 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.026; Sun, 24 Mar 2024 12:25:57 +0000 Message-ID: Date: Sun, 24 Mar 2024 13:25:55 +0100 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20240205174413.92730-1-ffmpeg@haasn.xyz> <20240205193748.GB37488@haasn.xyz> <20240208123001.GD8023@haasn.xyz> <20240208213223.GC52345@haasn.xyz> From: Andreas Rheinhardt In-Reply-To: <20240208213223.GC52345@haasn.xyz> X-TMN: [2kbgI/YQON1hYMBIMH4AzQohgxJ5PG3Dr/gPR6RDxbk=] X-ClientProxiedBy: ZR2P278CA0068.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::11) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <7e81d4d7-4ccd-497f-8c32-505b105b8b9f@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|PR3P250MB0051:EE_ X-MS-Office365-Filtering-Correlation-Id: 79ca2f28-7093-4b5a-895c-08dc4bfd8e9b X-MS-Exchange-SLBlob-MailProps: Cq7lScuPrnqkjmXb1vlddM5aSa/Epk3ADevWbgKDCmYQEHFUs0eofbU3w3Exrt3ZVcr94I4i39QA9U/BRMaAqq9qKj7zOkZAFkz9pnMo7uEGrAEXE1k+iW1jteGtOAdNIauJ3HMlztVGVwGso3KpV/TklmevNCWBqjPlWJIfUpoVdA+bm7hI9BQk6s6SCATXMIa9+nuQJJhigROWou0f/s1DlRVkpmGqw6jPnd0zi3k10g5COWIjsgyYWGg3M14l18sH24mbBHcNtXyQELic+PvIX9KUu4Cz+/jzpZrdEqb55zQIgROAHZ5C11z8fSvw7qFeEUqxGylPLnbEbFjCTcm9YP6SlQ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OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79ca2f28-7093-4b5a-895c-08dc4bfd8e9b X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2024 12:25:57.2862 (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: PR3P250MB0051 Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add YUV color space metadata to AVCodec 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: Niklas Haas: > On Thu, 08 Feb 2024 13:33:51 +0100 Andreas Rheinhardt wrote: >> Sorry for not answering earlier. >> My intention is to allow users who only want to deal with the common >> case of a cartesian product to continue to do so, but to also support >> other usecases. >> The public function would look like >> >> int avcodec_get_supported_config(const AVCodecContext *avctx, const >> AVCodec *codec, int **supported_configs, unsigned desired_configs, >> unsigned flags, void *logctx); >> >> avctx can be NULL (in which case this allows to return all potential >> configurations, irrespective of e.g. the level of strictness). >> codec can be omitted if avctx->codec is set, but if both are supplied >> and avctx->codec is set, they have to match (like in avcodec_open2()). >> desired_configs is a bitfield of configs that the user wants to get >> information about; your patch would have to add flags for color_ranges >> and color_spaces. >> supported_configs will on return point to something like an array of >> struct { int desired_config0, desired_config1,...;}. The order of the >> entries will be fixed (say coincide with the order of the bits in the >> desired_configs bitfields). >> If one member is the unspec value for its type, then this means that it >> works with everything. >> supported_configs will be allocated; ownership passes to the user. >> Using a multidimensional sentinel (that would depend on desired_configs) >> is clumsy, so there will be two supported ways for this (depends upon a >> flag to be supplied in flags): One method that really adds a >> multidimensional sentinel, the other method that writes the number of >> entries into **supported_configs, so that the first entry starts at >> (*supported_configs)[1]. This allows users that only want to deal with >> the factors of a cartesian product separately to continue to do so. > > OTOH this design will necessarily either result in exponential > explosion, or end up requiring the caller to make assumptions about > which fields are independent (and should thus be queried separately), > the moment a codec imposes *any* restriction (cartesian or not) on > multiple fields at the same time. > > I also think that a `test()` callback, as I previously proposed, is also > overkill and doesn't actually solve anything. Codecs can already error > out on invalid configurations at open() time, and any practical use of > such an API would also end up having to make the cartesian assumption > one way or the other. > > So in summary, I still think that we should enforce the assumption that > these fields form a cartesian set - it's simple, fast, useful and > doesn't overengineer for hypothetical constraints that we couldn't realistically > address one way or the other. Afaict, all current codecs support > a cartesian set of metadata, but feel free to correct me if I'm wrong. Ok, the gain of non-cartesian sets don't warrant the complexity incurred. - 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".