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 95E9343A44 for ; Wed, 6 Jul 2022 14:18:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 23E8B68A4CD; Wed, 6 Jul 2022 17:18:31 +0300 (EEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073031.outbound.protection.outlook.com [40.92.73.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2E2AC68BA07 for ; Wed, 6 Jul 2022 17:18:24 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GVA3vCDB4XFu1jmd1U4HvK4fKX1oauCTdbfbbtPsr1qQOe03e5AWNR+Ays6LR6uf6RuEq2B18LEsryzlvcef4P5N9jOzM2zzZpOZtAkoCDp+JcF9f1GQ4BtoXGAbfWcpGXdZtIGLN7vTP9NXlPFmGXMDvcWLI9kw4n73MDCdrYyIBmzriQgRrGa5DD/NBfvZE9i9Vi+Elv9jyPpfpjCDugawN4pNiSLP8HOTHmxHq0KMHWEvgsdIJyx99XjS0+p7sHH/EqWBD4CQmmHSgwcwMrpxE35lBIVZhKUlSclm12PjnkrafiaXpbA24gbXOFNd9+NYsUwDNhS2Ok4aXwNnmA== 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=L0O9HZn4wCQoLi0SqdwyWhrVCf8fPUXkRyURGf1C9p0=; b=GRsRJ2UwKhCSZYxEwHulNuZ7X4kmgFFR7GKUM4UwXm5B2XZOUGDdqN5wGlphRf9nRYgIKjUnFpcitPTuRQvTlUhYE8F0dJDdqjyLdblN+oLSLpAXY+oIcJuPQTZSRjaWGIBcTdT9WRMBu8NbTjGTvTY6lOxqse9akwl9gRORte1fGTVjYqGwwjSuOP+bm4+tAiXJ1OBSgA7FkHHVFyHMzNAL+9yEN6zVswJycKlbiH+lVhZegep6Jk7DoekyEDBPG5xykznOdxd7jPPvEkHA+u5EMCNodiaLgvM50KRYD6s2lsPprctH58wptiiz8MMtWa73NfJN2MaKiS4q3TQm4Q== 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=L0O9HZn4wCQoLi0SqdwyWhrVCf8fPUXkRyURGf1C9p0=; b=hu/+jh6LR1qR9bOd5rFREHcFGagiG8iBuwpv2EXe8Kuew79pwUQcdPPOj1W/6s30HVZ9A+KUd2zCpezMzecZjaBU3QDWDhSDhnoojg56/Vlnv4TSFP76LOLZcfAd3RgUJXX8qCsT9Bl8rTDSVrgTiuN99vTUthAgWK43Dt7C2ALRT/2PROUJbzj8k0LuPfT+rTsL6b1AuG65IyxHpo4xiHS7uFEW73JvA2oYQzTFr2whkVIUx1OLQHfROH8eeAtZ7pG8NbKlbGSN1aD2tpR+UxqcKZq3zQgsD1YOov4vEYc/xy5ZfpcJaK1IHburRG4WufqOA2RWS/2tcYHlwlPaDA== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by AM6PR01MB5303.eurprd01.prod.exchangelabs.com (2603:10a6:20b:96::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.17; Wed, 6 Jul 2022 14:18:22 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c%10]) with mapi id 15.20.5395.021; Wed, 6 Jul 2022 14:18:22 +0000 Message-ID: Date: Wed, 6 Jul 2022 16:18:21 +0200 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220629101251.13236-1-ffmpeg@haasn.xyz> <20220629101251.13236-2-ffmpeg@haasn.xyz> From: Andreas Rheinhardt In-Reply-To: <20220629101251.13236-2-ffmpeg@haasn.xyz> X-TMN: [YjAp+RGMYr+NS8QPRYKDtdc8dZ38JD0S] X-ClientProxiedBy: AS9PR06CA0022.eurprd06.prod.outlook.com (2603:10a6:20b:462::14) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <2b75362f-44da-0d96-fe92-464120357233@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8718de4a-dbf9-423c-16d4-08da5f5a6206 X-MS-TrafficTypeDiagnostic: AM6PR01MB5303:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IZB8qnFKzZcQVdTVjYf2YxciPVcWxF5J5MFZomGSbaFAUXUtTPzZGJ1QehmGt+Ag8VE2VJxFCBW5BNtb1G4/s6L73diH9kXBM2+aG3mJTNcd00y9MM53GkFT34kuYrC0zg9YCLpNCOAfqfgj32YbUbTQfNsuOO2uIzlr+d54BP4jWAF1q3lR8ZwqqUJ3hxfwrmri8LlkBVbIgBSY8gOcCSPO+VSrFpK1wK+7I7NfJpSP4jDrbvtbgk/dbyvAegYSNSCucutIRyk07DXWsCgUQ1AqptAYhmjFPATTepZNiBe+u3KR9GCP+OZiWQjX6e7hTgLP9GCO95Lfv1dz2PwEYZmww9ztvFq9xS/OA14ShhpK56ZiCr3Xa53618y14MK1WYj5tC2QMUWrWESLbkrpmrmQDjrFw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nFOMW9jVmpramk3akVnMmE4NEwra2YvUmlq?= =?utf-8?B?OTVucFczS05KYnBoYU1pWS9wdXdkZUFYUSt2YllhclZZQ2hjQWE3blZLRlBW?= =?utf-8?B?TjJHMkRoYTE0NVhaSzFLeENBbHlNVTVKcDZsVm8zdURwR2pGcllPWE5xZVhU?= =?utf-8?B?eGxOeTBnNGJEajdNTldCYy9oMHJwZHFDY0NvbzhIZitxc0JOL1VocGw4MG8z?= =?utf-8?Q?kYeYIOslhdT3MPAS20=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8718de4a-dbf9-423c-16d4-08da5f5a6206 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2022 14:18:22.5321 (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: AM6PR01MB5303 Subject: Re: [FFmpeg-devel] [PATCH v2 1/6] fflcms2: move to libavcodec 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: > From: Niklas Haas > > We will need this helper inside libavcodec in the future, so move it > there, leaving behind an #include to the raw source file in its old > location in libvfilter. This approach is inspired by the handling of > vulkan.c, and avoids us needing to expose any of it publicly (or > semi-publicly) in e.g. libavutil, thus avoiding any ABI headaches. This is only correct if you work under the assumption that when building with static libraries, all the static libraries come from the same commit. If you e.g. allow to build with an older libavfilter and a newer libavcodec (like with shared libs), this assumption breaks down: if the newer version of this file exports another function, you get linker (ODR) errors because both versions might be pulled in. Behaviour/signature changes by any function or modifications to any of the structs would be similarly catastrophic. A way out of this mess would be to version everything in the header like so: #define FFLCMS2_VERSION 1 void AV_JOIN(ff_icc_context_uninit, FFLCMS2_VERSION)(FFIccContext *s); (of course, there should be a dedicated macro for this to reduce typing.) A patch that makes any of the "catastrophic" modifications described above would need to bump the version. If one uses compatible versions, the files would be deduplicated for static builds. It would of course have the downside that these macros would be everywhere where it is used, not only in fflcms2.[ch]. > > It's debatable whether the actual code belongs in libavcodec or > libavfilter, but I decided to put it into libavcodec because it > conceptually deals with encoding and decoding ICC profiles, and will be > used to decode embedded ICC profiles in image files. > > Signed-off-by: Niklas Haas > --- > libavcodec/Makefile | 1 + > libavcodec/fflcms2.c | 311 ++++++++++++++++++++++++++++++++++++++++++ > libavcodec/fflcms2.h | 87 ++++++++++++ > libavfilter/fflcms2.c | 294 +-------------------------------------- > libavfilter/fflcms2.h | 65 +-------- > 5 files changed, 401 insertions(+), 357 deletions(-) > create mode 100644 libavcodec/fflcms2.c > create mode 100644 libavcodec/fflcms2.h > _______________________________________________ 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".