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 1F1D5429A6 for ; Fri, 8 Apr 2022 15:27:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A8CA168B234; Fri, 8 Apr 2022 18:27:20 +0300 (EEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam08olkn2032.outbound.protection.outlook.com [40.92.47.32]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0183368A2F6 for ; Fri, 8 Apr 2022 18:27:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ja0F/I+JppNq0XnDwAimR8BUbkY+De6Qk/es6Of050ZCGusZCETYjv2JE1ZGMc74gWdDq5IahCkgJLnchUaqNJBMTJeHyh2CLJHCmuuQjPXsfHDMa/3eHHR2qKGgnXz/FnpmluqvWIV73OEPobtBIss6XljC+YWTtcyxUDiatYwXiwyr/RRYhoftQvsoJk3g+hFFnKiziXKXnekaAn3E902k6oICn64eEsqSGvK8HkrGnqvRO7cXKWUnCpZIJPMulmLpLSl3p2dF8gWH/R1Ftze9gkiftoIK4pwEFI2XhNWZli80h/6RLOvAmwLRDD5/IEnmKq2jd+UKah13bi/TKg== 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=5B/nV8jt+TXSryadhpz6zKHPP1Lfc7L8DyH/bm8FxjQ=; b=GnZI++/Jl1KnE0S5KnvGg11WWhJHGsI+u2FP/EMduqrnKp/TO8PRPbleK+rzJPcg3FDGCoTFkmB0BbNXOEwlMDD0Skz05ExyHuj6J8OlM4xWS9qgHz6TjsTgyKrcdNqWaT5lTQaqEYpVHZXJzg5VnQA7yktPxKMZC95t7pu8zkGQKwxV7H10nFgMafXe5nb9rscyKPbt0mdOKYDPbzkwERZ87Id++KJqYU49mGWTI6jKCfCnoaGenfuJTq39XS+Gv0FHnXwEjrP6sM0vA0SGqrsFEMJs+NYaTDdCsTVo8lLVJH+z0HFayXhhDAMF3ImLblKsHKo3YCqX6hgfgRtW8g== 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=5B/nV8jt+TXSryadhpz6zKHPP1Lfc7L8DyH/bm8FxjQ=; b=gZfIT6uQCmBcjoiEfbUhzgGAyGKQfTvp7UO+QdOPrEt99yK0KSdLQrpJ9djs/8Ng5Fq9KVxXx6shOtPOd6+rGGBEJnU19vIohggjTz9GHtvvVg1nsE/0ppFbvZp89dG1Z2qeGUYkknDwju7cSXqUkEUZcQjFZ9o6A0yrieWw24T1DLajGQZOB03ENTsNQXXwqU2qFae92WPz81Vlei6zdElv2mGfmCN3wIwtwlb/XFE5dOrVMIusq8ezavEhhxZ4EBFudMQUdNM10P54p0fT5UqYEwnYWk0WDmh51Zl7ek4bReEId+mTZtEXf88OuajO5YD2U+IfAh1cltcWOGlcZw== Received: from BN0P223MB0358.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:145::16) by BL3P223MB0082.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:34f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.19; Fri, 8 Apr 2022 15:27:10 +0000 Received: from BN0P223MB0358.NAMP223.PROD.OUTLOOK.COM ([fe80::ac80:535a:6742:2519]) by BN0P223MB0358.NAMP223.PROD.OUTLOOK.COM ([fe80::ac80:535a:6742:2519%3]) with mapi id 15.20.5144.026; Fri, 8 Apr 2022 15:27:10 +0000 From: Soft Works To: FFmpeg development discussions and patches Thread-Topic: [FFmpeg-devel] [RFC] Switching ffmpeg.c to a threaded architecture Thread-Index: AQHYSBeuHAE+RPuGxESL7bK+MVIG+KzhsuYAgAAIfACAANjoZ4ABj6plgAHtZQA= Date: Fri, 8 Apr 2022 15:27:10 +0000 Message-ID: References: <20220404113037.13070-1-anton@khirnov.net> <20220405191542.GV2829255@pb2> <164918796468.24258.6158464741625303482@lain.red.khirnov.net> =?utf-8?q?=3C?= =?utf-8?q?DM8P223MB036517C3185EE467B97EF6B6BAE49=40DM8P223MB0365=2ENAMP223?= =?utf-8?q?=2EPROD=2EOUTLOOK=2ECOM=3E?= <164923451378.24258.12863595879743109558@lain.red.khirnov.net> =?utf-8?q??= =?utf-8?q?=3CDM8P223MB0365578F1CE056F4081C563EBAE79=40DM8P223MB0365=2ENAMP2?= =?utf-8?q?23=2EPROD=2EOUTLOOK=2ECOM=3E?= <164932035193.21047.13588447156789154824@lain.red.khirnov.net> In-Reply-To: <164932035193.21047.13588447156789154824@lain.red.khirnov.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-tmn: [f/RVix90NlXxLXbmfGAf46RcC1Emg/R5] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c478463b-dcfb-4f08-c270-08da19743fc0 x-ms-traffictypediagnostic: BL3P223MB0082:EE_ x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SPu2gmWES2BGtM/ITNsjGoN1kh7PxXor8RvgdMGNvu1wtuVmsDESSh6Q0ggK62Hvo/pCdcFHLKZCaANeOv8DczNp63TZSoD/S9e7we8+gBM3K9lJjS73YVtIrtnwDIzP/HFRsb51X6n7Cn+FV4va19Ryq55QA9fFSImU6mWJNEQQ7B7hOmDb+Kp/MXjcnlKZxPRafR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Ycmc3NlQ5dWx1ZzAxc0JSdWZiZHNUL0F6VFVXbUdpanh5?= =?utf-8?B?a0dhd0RaOGM2Tkk0SEZrQmJOWmVvL0FsZWRoaEE3QjJOdjdpVUkrUTBRcmdU?= =?utf-8?B?QURWckZuVEZzNTM3blR0eXpJR2J1Tmw2YjNIVFNMMStzUkZ6dU0rRkIxQkVr?= =?utf-8?B?QmEzaGljUWxrNlREQmNOdk42cFdyaEwzVjFnVElRUFluWUZ4Q1IvZkFCa1R1?= =?utf-8?B?S3F6WUpVeUhIaE5yMjZZLy9kViswT0FodHluKy9ZM2pFbC9pSlRJK1JNVkZn?= =?utf-8?B?ZXAyVmY1WFdwZEtxM2g1RytsVk02Z1FCVkV0RHhsZHp6dWhWRmxOVG5POGx6?= =?utf-8?B?YUJyNHhpZjN0WHlGWU5sczN0anF3Y2dDN2NTUllza0wxaVJvUE92elVpZ0dW?= =?utf-8?B?N01rbFU4Qmdoc2NVM09ZSTNjbm1iSDNYeXNzNTh5Tnl4MGJna0pDVHdOeFhw?= =?utf-8?B?ZktReWZaUjVtMHNvcFhqcmVLdUNyUkxkdHpqZTZReXliQ2dRZHlOU1Jaa05s?= =?utf-8?Q?5oIZxf01+uI=3D?= MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-1ff67.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN0P223MB0358.NAMP223.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: c478463b-dcfb-4f08-c270-08da19743fc0 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2022 15:27:10.2532 (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: BL3P223MB0082 Subject: Re: [FFmpeg-devel] [RFC] Switching ffmpeg.c to a threaded architecture 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: > -----Original Message----- > From: ffmpeg-devel On Behalf Of > Anton Khirnov > Sent: Thursday, April 7, 2022 10:33 AM > To: FFmpeg development discussions and patches devel@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [RFC] Switching ffmpeg.c to a threaded > architecture > > Quoting Soft Works (2022-04-06 18:29:53) > > > > > > > -----Original Message----- > > > From: ffmpeg-devel On Behalf Of > > > Anton Khirnov > > > Sent: Wednesday, April 6, 2022 10:42 AM > > > To: FFmpeg development discussions and patches > > devel@ffmpeg.org> > > > Subject: Re: [FFmpeg-devel] [RFC] Switching ffmpeg.c to a threaded > > > architecture > > > > > > Quoting Soft Works (2022-04-05 23:05:57) > > > > do I understand it right that there won't be a single-thread > > > > operation mode that replicates/corresponds the current behavior? > > > > > > Correct, maintaining a single-threaded mode would require massive > > > amounts of extra effort for questionable gain. > > > > The gain is not to be seen in having an alternate run-mode in > > longer-term term perspective. It is about avoiding a single > > point-of-no-return change which may have fundamental consequences > > and impose debt on other developers when it would no longer be > possible > > to compare to the previous mode of operation. > > I don't understand where your apocalyptic language is coming from. > Yes, > overall this will be a very big change. Should it turn out that the switch will go smoothly and easily without (minimal) issues, then I'll sincerely admit that my concerns were exaggerated and unjustified. > > Threads are not magic. It is ubiquitous well-understood technology > that > has been around for decades. Yes, they do involve their own > challenges, > but so does everything else, including the status quo. > > The current architecture of ffmpeg.c is, in my opinion, unsustainable. Agreed. > There is barely any separation of responsibilities. E.g. filtering > code > will modify muxer state, etc. It is very hard to understand the code > behaviour in various scenarious (we have SO MANY options), and how > will > some code change affect it. This makes adding new major features much > more painful than it should be. I am firmly convinced that these > patches > will make the code significantly easier to understand. No doubt about that. > Sorry, this does not seem a reasonable request to me. For one thing, > the > only advantage you claim involve highly hypothetical doomsday > scenarios > where you cannot compare to the old code and so ALL IS LOST. That > smells > like a cargo cult. The current code is not holy scripture determining > how things should work for all eternity. It has bugs, inconsistencies, > and poorly handled corner cases (some of which are fixed by this very > patchset). As mentioned, the concern is about the transition not about carrying this for a long time. > Furthermore, remember that this is just the first step. There will be > further patchsets converting the other components. I intend to > upstream > them gradually one after the other. Your suggestion would require me > to > instead write the whole thing at once, fighting rebase conflicts all > the > way, and then submit it as a giant utterly unreviewable patchset. That's not what I meant, but anyway it's not worth discussing when it's a minority opinion. Just a practical question instead for planning purposes: Which timeframe do you expect for the whole process? When do you plan to start and for how long do you think it will take until all further patchsets will be submitted/applied? Thanks, 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".