From: Kieran Kunhya <kierank@obe.tv> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] SWS cleanup / SPI Funding Suggestion Date: Sat, 14 Oct 2023 18:41:37 +0100 Message-ID: <CAK+ULv6wN6t5tobgX80LkrVmMR_4+V_Ek5SZ3jqcyGNDoVfSKg@mail.gmail.com> (raw) In-Reply-To: <20231014170036.GV3543730@pb2> On Sat, 14 Oct 2023, 18:00 Michael Niedermayer, <michael@niedermayer.cc> wrote: > On Sat, Oct 14, 2023 at 03:19:49PM +0100, Kieran Kunhya wrote: > > On Sat, 14 Oct 2023 at 00:17, Cosmin Stejerean via ffmpeg-devel < > > ffmpeg-devel@ffmpeg.org> wrote: > > > > > > > > > > > > On Oct 13, 2023, at 4:00 PM, Vittorio Giovara < > > > vittorio.giovara@gmail.com> wrote: > > > > > > > > TBF this is in part why i was suggesting a new library - I feel like > sws > > > is > > > > affected by bad brading because of these caching issues and imprecise > > > > conversion, and a new clean api in a new library would make a lot of > > > sense > > > > in my opinion. > > > > > > I think the branding issue would solve itself in short order if the > actual > > > implementation of swscale started to be good. My concern with adding a > new > > > library is that we'd end up in a situation where we have both swscale > and a > > > new library side by side for some extended period of time. > > > > > > By comparison adding cleaner APIs to swscale and then slowly strangling > > > the old APIs (along the lines of Niklas' proposal) would allow for a > more > > > gradual transition that has a higher likelihood of success compared to > a > > > full rewrite IMO. > > > > > > > The issue is not the API, the issue is that swscale is astonishingly > > complex and difficult to understand internally, there are lots of > different > > codepaths > > > and randomly you'll end up with a buggy or slow one > > randomly ? > code in general doesnt give you randomly something very different. > Come on, there's no need to be facetious. Change the PIX_FMT to a the same sampling but a different packing and you a get totally different codepath, sometimes just decides to use C. Likewise with any of the lightly documented flags, you can have drastic changes in speed and quality unless you pre-test all the code paths. > So, why do i complain? because swscale has real issues and needs > to be improved. And these comments point in the wrong direction > > > > and have no > > idea how to fix it. > > If you dont know how to fix it yourself, sending me a bug report is > probably a good start. > Covered in here: https://trac.ffmpeg.org/wiki/swscale Yuv422p10 to yuv420p10 has forced and useless and CPU costly scaling of the luma channel with 32 bit intermediates last time I looked. All to be shifted back to the original values. > > > > > > It's probably easier to start from scratch than to try and understand and > > then fix swscale (years of work). > > Well there are 2 further aspects with that. > > The first one is bluntly put. If you dont understand the old code, then > you probably are not qualified to write better code. > People tend not to successfully improve things they dont understand. > I'm pretty sure you don't need to understand self-modifying code to write a scaler. The rest is covered here: https://trac.ffmpeg.org/wiki/swscale > The 2nd issue is, ATM, i maintain swscale. If iam involved in the new > effort and understand it either because of that or because it has some > similarity then i can continue to maintain swscale. If its totally > different and i was totally not involded then i also will not maintain > it obviously. > This is something to be especially aware of in case the cleanup/new > code would be done by someone who comes, does it and leaves. you > could end up with nicer code thats then unmaintained. > Nicer code can be understood by more than one person. Let's be honest you would block any attempt to even start removing cruft in swscale like mmx, self-modifying code etc. > PS: whats the real issue with sws ? > it evolved out of a piece yuv->rgb converter from a video player. > It evolved from that and stuff was added into it. > This is a similar situation to why ffmpeg.c needed cleanup > Hmmm, building a simple thing for something and then "stuff being added", that sounds like the arguments a few of us have been making in another thread. Regards, Kieran Kunhya > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Dictatorship: All citizens are under surveillance, all their steps and > actions recorded, for the politicians to enforce control. > Democracy: All politicians are under surveillance, all their steps and > actions recorded, for the citizens to enforce control. > _______________________________________________ > 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". > _______________________________________________ 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".
next prev parent reply other threads:[~2023-10-14 17:42 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-13 19:19 Michael Niedermayer 2023-10-13 20:30 ` Vittorio Giovara 2023-10-13 21:23 ` Lynne 2023-10-13 22:02 ` Michael Niedermayer 2023-10-13 22:34 ` Niklas Haas 2023-10-13 22:42 ` James Almer 2023-10-13 22:54 ` Niklas Haas 2023-10-13 23:00 ` Vittorio Giovara [not found] ` <8A960BE2-8364-4AF8-A9B5-E0551C19F9DF@cosmin.at> 2023-10-13 23:16 ` Cosmin Stejerean via ffmpeg-devel 2023-10-14 14:19 ` Kieran Kunhya 2023-10-14 17:00 ` Michael Niedermayer 2023-10-14 17:24 ` Niklas Haas 2023-10-15 14:36 ` Michael Niedermayer 2023-10-14 17:41 ` Kieran Kunhya [this message] 2023-10-14 19:38 ` Vittorio Giovara 2023-10-14 17:26 ` Anton Khirnov 2023-10-14 15:45 ` Michael Niedermayer 2023-10-14 17:53 ` Stefano Sabatini 2023-10-17 14:36 ` Michael Niedermayer [not found] ` <430D0C5B-53A8-4920-B99A-D8BAD816D715@cosmin.at> 2023-10-17 16:58 ` Cosmin Stejerean via ffmpeg-devel 2023-10-18 21:53 ` Stefano Sabatini 2023-10-17 18:33 ` James Almer 2023-10-17 18:50 ` Rémi Denis-Courmont 2023-10-17 21:57 ` Michael Niedermayer 2023-10-17 22:10 ` Michael Niedermayer 2023-10-18 16:30 ` Rémi Denis-Courmont 2023-10-18 22:12 ` Stefano Sabatini
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAK+ULv6wN6t5tobgX80LkrVmMR_4+V_Ek5SZ3jqcyGNDoVfSKg@mail.gmail.com \ --to=kierank@obe.tv \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git