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 ESMTP id BA3FC4917A for <ffmpegdev@gitmailbox.com>; Wed, 5 Jun 2024 12:52:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EB1DD68D6C3; Wed, 5 Jun 2024 15:52:04 +0300 (EEST) Received: from alt2.a-painless.mh.aa.net.uk (unknown [81.187.30.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8E81068D52A for <ffmpeg-devel@ffmpeg.org>; Wed, 5 Jun 2024 15:51:58 +0300 (EEST) Received: from 5.5.7.4.0.7.d.2.a.7.f.9.b.e.1.b.0.5.8.0.9.1.8.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:819:850:b1eb:9f7a:2d70:4755] helo=andrews-2024-laptop.sayers) by painless-a.thn.aa.net.uk with smtp (Exim 4.96) (envelope-from <ffmpeg-devel@pileofstuff.org>) id 1sEq7R-008lFD-2N for ffmpeg-devel@ffmpeg.org; Wed, 05 Jun 2024 13:51:58 +0100 Date: Wed, 5 Jun 2024 13:51:57 +0100 From: Andrew Sayers <ffmpeg-devel@pileofstuff.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Message-ID: <ZmBfbWS4UX1HJO1k@andrews-2024-laptop.sayers> References: <20240418150614.3952107-1-ffmpeg-devel@pileofstuff.org> <20240604144919.213799-1-ffmpeg-devel@pileofstuff.org> <20240604144919.213799-4-ffmpeg-devel@pileofstuff.org> <171757516715.28895.16875988658038638823@lain.khirnov.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <171757516715.28895.16875988658038638823@lain.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH v6 3/4] all: Link to "context" from all public contexts with documentation 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="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/ZmBfbWS4UX1HJO1k@andrews-2024-laptop.sayers/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> Note: I somehow managed to send this message directly to Anton before - sorry Anton for the message spam, please reply to this one if you want the list to see it! On Wed, Jun 05, 2024 at 10:12:47AM +0200, Anton Khirnov wrote: > Quoting Andrew Sayers (2024-06-04 16:47:23) > > The goal of putting these links in "@see" blocks is to provide hooks > > for future developers to add links to other useful parts of the codebase. > > --- > > libavcodec/avcodec.h | 3 +++ > > libavcodec/bsf.h | 3 +++ > > libavcodec/d3d11va.h | 3 +++ > > libavcodec/mediacodec.h | 2 ++ > > libavcodec/qsv.h | 3 +++ > > libavcodec/vdpau.h | 3 +++ > > libavcodec/videotoolbox.h | 3 +++ > > libavfilter/avfilter.h | 7 ++++++- > > libavformat/avformat.h | 3 +++ > > libavformat/avio.h | 3 +++ > > libavutil/audio_fifo.h | 3 +++ > > libavutil/hwcontext.h | 6 ++++++ > > libavutil/hwcontext_cuda.h | 3 +++ > > libavutil/hwcontext_d3d11va.h | 6 ++++++ > > libavutil/hwcontext_d3d12va.h | 6 ++++++ > > libavutil/hwcontext_drm.h | 3 +++ > > libavutil/hwcontext_dxva2.h | 6 ++++++ > > libavutil/hwcontext_mediacodec.h | 3 +++ > > libavutil/hwcontext_opencl.h | 6 ++++++ > > libavutil/hwcontext_qsv.h | 6 ++++++ > > libavutil/hwcontext_vaapi.h | 6 ++++++ > > libavutil/hwcontext_vdpau.h | 3 +++ > > libavutil/hwcontext_vulkan.h | 6 ++++++ > > libavutil/lfg.h | 3 +++ > > 24 files changed, 98 insertions(+), 1 deletion(-) > > IMO this is pointless churn. That's like saying caches are pointless bloat - it's not about correctness, it's about performance. Actually, I've been talking about "performance" a lot round here, but not really explained what I mean... Imagine a smart young developer who learned C at university and is now dipping their toe in the world of actual C development. They've come up with an idea for a little app that's different enough from the examples to force themselves not to just copy/paste example code. It's simple enough that an experienced developer like you would only need half a day for the whole project, so they allow themselves a weekend to get it done. "Performance" in this case means "can they finish the project in their ~16 hour time budget?" Assuming they're half as productive as you would be, 8 of their 16 hours go on programming, leaving 8 hours to learn FFmpeg. They've never written real-world C before, so they don't know what a context is. And they only have a narrow understanding of OOP, so as soon as they see words like "object" and "class", they assume you're referring to the precise version of OOP their Java lecturer taught them about. So the longer they spend poking round looking for information, the more misconceptions they're going to develop. Even if we assume they find the context document after one hour of searching, they fully understand the document with no reading time, and only need one extra hour to unlearn the misconceptions they developed, that's still cost a quarter of their remaining time budget. To an expert, these links are unnecessary verbiage pointing to a document that explains things that are blindingly obvious. But to a newbie, they're an important optimisation that can make the difference between finishing a project or having to give up on FFmpeg altogether. _______________________________________________ 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".