From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 326DE4BB1B for <ffmpegdev@gitmailbox.com>; Fri, 28 Mar 2025 22:50:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 15B65687C57; Sat, 29 Mar 2025 00:50:30 +0200 (EET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02olkn2081.outbound.protection.outlook.com [40.92.15.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 39BA9687C42 for <ffmpeg-devel@ffmpeg.org>; Sat, 29 Mar 2025 00:50:23 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VOrQP/vtASl0p8AIimN04ZROf5DA/WcshMewE2ytYxxXZ0gLJ6t7l3DZUQLW/asg5qbOJznVg4cgR2E6mX7FjeDprZnQNm1YAQYiPb3twrHvGJLHPjhVIC+nniY04vcAyWsTJ5hcCaX/v1eFBHCyHN5906OwMAlzzX2lo2/6AYbD3xXCki5LAjqYrw5ASqXGEOeisyp/ExVRC5gUm6eobdNx5O1RfAvSaSy34P6xDhkSsePC8aYF5cCcaBa0/YJ3Q/6IN4W8Ta9K1mDFxFHwRp7XnBDNQAQqhLGyyDsYQUihClpqrpCWxv7ixk7wXjBTMx5PDNdT/1cfXhYu5gjg3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=WmFioipRba+WguKyaD9EVOKQ+11akOEVA4NhtIxmJfE=; b=HX7oXd4NQY0n85QzvXTcNMr8aHqjb0PC0ZizJn28F2y4w4tFP/gdfoPKAm+TRSX4D5dFqluRnniIU6a1VMwZ2gC8A9AZydImhgIcd4nodLkosZEZ0XzG8aQiB2SEdzqzakLgvyHjXwk/N28xDrzVTtwm/ig7dsiKgYkpVzIXHxUrP3H7vy8BVd5m8dfsCxuUdY57axMwhhjV77pOj4mAtReqUOvVEEzk4VDUaLR1TT8nrVH2kr+oW/XLo4cZn4kST0rVY79SVffXtPL692ulnDR1us+wp9IRJ1rnXzdrPTrFob4zN/KqndwE+BOsCcsQNkhlf4ks0+Mym1DH+L+eLQ== 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=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WmFioipRba+WguKyaD9EVOKQ+11akOEVA4NhtIxmJfE=; b=H4EfwkRnrhpB8jmMtRWmzLt2DA8P4PS0GPUclR8vEPDx4bBAACje/C3LiwCAMsAV5bnd/ety8AAo3gUj+iZ1jkNxCHOVDID0gv3H9SrQJka9f+ZhCQnnxQNTFV/z7GaGZgIYDizA94UiEYIauG98AoGh6eoT9RzVazRgl4sb/87JH5v1iSUIYqUNU492FKrzmfCk0NGiy/jOcfFfvkfmrfL2A/xGIexJ3z9z9/WZHT5Hj30z/bExFsTbEUz+S/c5mohyWDwpIKBqAS4Hc3wHIVc5tf84DcE+HkstUl4c1zu/51RhnfGT4ryRNBZNSg6K0JAx6MIFMAiNnTKFs80WSw== Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM (2603:10b6:8:b::20) by BN0P223MB0232.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:144::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.28; Fri, 28 Mar 2025 22:50:20 +0000 Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM ([fe80::bf09:8e9:b07f:98a7]) by DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM ([fe80::bf09:8e9:b07f:98a7%7]) with mapi id 15.20.8534.043; Fri, 28 Mar 2025 22:50:20 +0000 From: "softworkz ." <softworkz-at-hotmail.com@ffmpeg.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Thread-Topic: [FFmpeg-devel] Proposal: extract DNN filters code to a different repository and rewrite it in C++ Thread-Index: AQHbnyGJfuoxg9y6P0Cx7HAuJULGDrOJJNnA Date: Fri, 28 Mar 2025 22:50:20 +0000 Message-ID: <DM8P223MB036539CC66A75E9C0B1F96BEBAA02@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM> References: <5912ca0f-2a2d-497d-9747-bb630b6ec2d6@gmail.com> In-Reply-To: <5912ca0f-2a2d-497d-9747-bb630b6ec2d6@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM8P223MB0365:EE_|BN0P223MB0232:EE_ x-ms-office365-filtering-correlation-id: 8f12ee76-c9a1-48f5-ff10-08dd6e4aeacc x-microsoft-antispam: BCL:0; ARA:14566002|461199028|8062599003|8060799006|7092599003|15080799006|19110799003|56899033|440099028|3412199025|12091999003|102099032; x-microsoft-antispam-message-info: =?iso-8859-1?Q?hOFTbPEI0L9SnH/clseMwHcrXPgFgtixgu67VkdHC5zfyfKOxQF3ntlSCL?= =?iso-8859-1?Q?gIWgLfv10VD51ZUv0kbom1IHdkFFnS+DVBEnesZDAkpH1u47o5bHHRmase?= =?iso-8859-1?Q?C0w8cPqnvkzTJKTLJIrBiCYG0+NHVo5BmeJ4Xb7p/IBbnw/qn68/UaH4iJ?= =?iso-8859-1?Q?spQrOOTVTVpzm7Ii2mB8maTEhcIcxxblxmmKz15ymerUghmpTCWrId5qI9?= =?iso-8859-1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mFjQWR?= =?iso-8859-1?Q?Ib/R0u/PjeG+53awPXp7QLpB/zUtx4ZN8hpjKtP9c7Q19zcvKV/AK0J4zs?= =?iso-8859-1?Q?olDcSZj5o+soAA=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?V7qHh3yxvSVXpMqe0EdhRJjabY0nD4YlOR1FEplWByzznOzaamzyX6zitx?= =?iso-8859-1?Q?lZ4WriSBvTE/L+MnbXcad3Hg3ZZxWQuxnd0mgMr3sl8zYwL6KRVh488pC3?= =?iso-8859-1?Q?Nv2OioLsZo9E+IJ1l7nS44e+BGHWyuLwOz3JzdrRkE4mRiaDzFQQjI5KgI?= =?iso-8859-1?Q?7A5TGD1wbZWYQRvYTVpaUEy/Z/SMag7bWAllg28Udo+cSfo6V/nsq/i1OJ?= =?iso-8859-1?Q?pEsKhXf2mC1HB+e0e+0OcwGA/YDQkASzDqs/MBYMEg7YlSRp7W33Zf0qgK?= =?iso-8859-1?Q?evm0c4i65qiHUi/DThkrbw+AUQObmw7DwcGH4Gt41XzHofQXFOq+ooemjv?= =?iso-8859-1?Q?z89FmgUJSw04beNadciB+6KEaeJ4cNm/84fSv8+CTYdaNr8o6wZbbQEooe?= =?iso-8859-1?Q?0YCZWPLVXA8RVq9ZUhyXvzlhm8Y16kD0Lr1JXwXb7UsurufcdNqlf1oH7B?= =?iso-8859-1?Q?Jell+wDpY7zpMI70FcpSgkyN1S9duBq2MbY4Uae/opjC6dyjfzdEpe+qIX?= =?iso-8859-1?Q?gNfyPYGnk9ls3omwt3+DHhnClUh3Wf/hlC4TdI2bz3B9lbRmkbESTMYKCZ?= =?iso-8859-1?Q?Fnkdij9s3AY/wdPnIs2NbStSePa8+3mD3KYraa7GQZGECLjERW2QTmQNcN?= =?iso-8859-1?Q?SatcWHis0BF9M2zAMMH8u+Lt581odDpsRjYIvtU9tKn6yb2v2b5yjxEhJp?= =?iso-8859-1?Q?4XLTF1n8XURw7ek1ne0MFb2PjpiWYjTvPW02ApVCmSLkGdxrkgZgsVuf9i?= =?iso-8859-1?Q?ICJZd/iy0WC2Vj/EXilR/JSpIhk961nxzqMExgQiPyEeAC35GtIeeJrrFT?= =?iso-8859-1?Q?uXdtheDd5VgKBSDZcGt0i/s4xqm5G6zZvWNer8964xRVqDeNGsf6Qi5vJp?= =?iso-8859-1?Q?NxlLqxnp8aGO9HtM6wsCMGObq4otcwE8er2tFjq7w7lg5EpyQvZvOshdB8?= =?iso-8859-1?Q?f5JGIkjVc/eGOS7qmx9QRM6wtT07Kn3BMQqaAs/NSfBn1g5N6RXhuLKz8e?= =?iso-8859-1?Q?6sAE39nA+5CIfB5FqX9M+Ky8AJYIo1c1Mq0vunzJnZAnFDg+5VKdfNtugc?= =?iso-8859-1?Q?+oDQ18do+PtoYq7cRhRz/Hyd2LiosBwsBDtj8NVTbHWhJv/8foYt+ldLax?= =?iso-8859-1?Q?/PRwiVZUnOfFy2yvWyS0ymE4wd0AsBrSis6k7DlmNHVhdHLGFiQiMfoFDC?= =?iso-8859-1?Q?MwGlvBzFcuwZ+L9XfL0Nqm5+wqMaKB/7OLEZWsK+VMZTcfOSnsi7j0P/Fv?= =?iso-8859-1?Q?37qDe85KTidnlwUsvDSRyG0CpcZ+DT+boDJUXdwAY=3D?= MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-92255.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 8f12ee76-c9a1-48f5-ff10-08dd6e4aeacc X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2025 22:50:20.2168 (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: BN0P223MB0232 Subject: Re: [FFmpeg-devel] Proposal: extract DNN filters code to a different repository and rewrite it in C++ X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/DM8P223MB036539CC66A75E9C0B1F96BEBAA02@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> > -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of > Leandro Santiago > Sent: Donnerstag, 27. M=E4rz 2025 15:07 > To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> > Subject: [FFmpeg-devel] Proposal: extract DNN filters code to a > different repository and rewrite it in C++ > = > Dear FFmpeg developers, I've been doing some experiments with out-of- > tree filters [1] and I start feeling confident that the approach works > well enough and, besides a "demo" filter written in C [2], I've > implemented a filter in Rust [3]. > = > That said, I propose: > = > - extracting the DNN filters (dnn_detect, dnn_classify, dnn_processing) > to another repository, within the ffmpeg umbrella, to be integrated to > ffmpeg at build time by the users who require this feature. > = > - rewriting those filters in C++. > = > My rationale is: > = > - the DNN code is quite niche, not used by most people. > = > - There are some files on it written in C++, namely the libtorch > backend, so moving it out would reduce the C++ code in the ffmpeg > repository. > = > - Besides the libtorch backend, the other backends (openvino and > tensorflow) use C APIs which are essentially wrappers around C++ APIs > (as both openvino and tensorflow base APIs are C++). I don't see much > benefits on using C wrappers when the C++ API could be used directly, > making the code cleaner and more reliable, as the C++ APIs offer more > type safety than the C ones and, well, RAII. > = > Outcomes: > = > - Less C++ code on ffmpeg codebase. > = > - Less ~6k LOC from the ffmpeg codebase, reducing a little maintenance > burden. > = > - The DNN filters can evolve separately, and even have a different > release cycle, ownership and collaboration model. > = > - After the C++ rewrite, the DNN code will be type safer, likely > shorter, and with less dependencies, as it'll use the original C++ APIs > instead of the C wrappers. Hi Leandro, it was about three years ago but it's one of the things that have burnt int= o memory: there was an interesting submission for something related to AI a= nd filtering. It appeared to be done well, but the only response the submit= ter got was like: "We don't need something using once another AI framework,= we have enough already". All the effort of the submitter - destroyed by a single sentence. Now, of course many frameworks exist and even more to come, so it's also cl= ear that these cannot all go into the ffmpeg core code. But I think we shou= ld have a clear path for such contributions and that's why I think your pro= posal is a very good direction. Moving out existing AI code also make sense to me, because not all of the c= urrently supported ones are among the top choices one would make these days= . AI is progressing fast and faster than FFmpeg can be. Moving out existing AI code with an easy method to include them would not o= nly slim down the code base but it would also serve as a blueprint for othe= rs who refrained from contributing, assuming these contributions wouldn't b= e accepted anyway. sw _______________________________________________ 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".