A theory about this that may also affect other older solid software: the assumptions made on where to optimally "split" a problem for multi-threading/processing has likely changed over time. It wasn't that long ago that reading, processing, and rendering the contents of a single image took a noticeable amount of time. But both hardware and software techniques have gotten significantly faster. What may have made sense…
FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
141–150 of 186 posts
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#142It’s nuts to think that in the near future LLM will be able to do that refactoring in seconds. All we need is enough context window.
Parent post is getting down voted to oblivion but it seems a reasonable belief for someone who is not highly engaged with AI. I have only the vaguest understanding of how it works (and it's probably wrong) and to my layman mind it also seems like a totally fair assumption, based on experience as a user and the constant flood of news. Please explain why the suggestion that a future AI / sufficiently advanced LLM could…
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#143It’s nuts to think that in the near future LLM will be able to do that refactoring in seconds. All we need is enough context window.
I see that you got some responses from people who may have not even used gpt-4 as a coding assistant, but I absolutely agree with you. A larger context window, a framework like Aider, and slightly-better tooling so the AI can do renames and other high-level actions without having to provide the entire changeset as patches, and tests. Lots of tests. Then you can just run the migration 15 times, pick from the one which…
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#144Earlier quoted context omitted.
Refactoring is really rather well defined. It's " just transformations that are invariant w.r.t. the outcome". The reason they are hard to automate is that 'invariant w.r.t. the outcome' is a lot more lenient than most semantic models van handle. But this kind of well-defined task with a slight amount of nuance (and decently checkable) seems pretty well-suited to an LLM.
At least for the linux kernel, qemu and other large c projects, this is a solved problem with coccinelle[1]. Compared to AI, it has the added benefit of not doing incorrect changes and/or hallucinating stuff or promt injections or ... I guess you could use AI to help create a coccinelle semantic patch. [1] https://en.wikipedia.org/wiki/Coccinelle_(software)
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#145Earlier quoted context omitted.
It seems ffmpeg uses the mailing list patch way of doing "PRs", which is... well it is what it is. It doesn't help me understand the process unless I just go through all the mailing list archives, I guess.
Ugh why? That is so old school
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#146I've always wondered if better multi-core performance can come from processing different keyframe segments separately. IIUC all current encoders that support parallelism work by multiple threads working on the same frame at the same time. Often times the frame is split into regions and each thread focuses on a specific region of the frame. This approach can have a (usually small) quality/efficiency cost and requires…
your idea also doesn't work with live streaming, and may also not work with inter-frame filters (depending on implementation). nonetheless, this exists already with those limitations: av1an and I believe vapoursynth work more or less the way you describe, except you don't actually need to load every chunk into memory, only the current frames. as I understand, this isn't a major priority for mainstream encoding pipeli…
It's one of several reasons why live streams of this type are often 10-30 seconds behind live.
* Of course it also depends on where in the pipeline they hook in - some take the feed directly, in which case every frame is essentially a key frame.
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#147Earlier quoted context omitted.
> Haven't you tried refactoring with gpt-4 yet? I most certainly have not. At work, I do greenfield development in a specialized problem domain, and I would not trust a model (or, for that matter, a junior developer) to do any kind of refactor in an acceptable manner. (That aside, there's no way I'm goingto expose company code to any sort of outside party without the approval of upper management). At home, I program…
Oh yea your work is far too sophisticated for a llm, got it
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#148I wonder why did it took so long for FFmpeg?
BTW, MS Media foundation is a functional equivalent of FFmpeg. It was released as a part of Windows Vista in 2006, and is heavily multithreaded by design.
Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#149Re: FFmpeg lands CLI multi-threading as its "most complex refactoring" in decades
#150Earlier quoted context omitted.
https://www.youtube.com/watch?v=9kaIXkImCAM
That was one of the funniest things I've seen in a while!!!! I had to stop drinking my decaf for fear of spitting it all over my computer I was laughing out loud so much! (ps: and no, it's not Rick Astley/Never Gonna Give You Up)