-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vo_placebo #8799
vo_placebo #8799
Conversation
Bug:
Edit: Fixed. |
Frame-stepping still behaves weirdly when transitioning from a paused playback frame to a frame-stepped frame. I suspect this is partly due to how framestepping is implemented in mpv as basically pausing-and-unpausing playback, and I'm not sure what a good solution is. |
685ba58
to
5a78c03
Compare
Can you clarify which parts of
This is actually not the case. Edit: It's also worth pointing out that the re-use of the AVFrame helpers is only to avoid me having to write more code than necessary to get this PR off its feet. The existing AVFrame helper already deals with a lot of the intricacies of proper format mapping, side data (ICC profiles, mastering metadata) etc., and rewriting that all would, if anything, be a minor optimization (save some memcpy). |
If I understand this part correctly: I'd be fine with moving haasn/libplacebo to mpv-player/libplacebo. I already accept issues and merge requests on both code.videolan.org and github.com, and I don't think this causes me any extra developer burden. (As for what it means to be "developed in a place", other than a github repo existing and accepting issues/MRs, I'm not sure) |
Well what would the resolution be? Moving the options to some common file, maybe as part of Edit: Also, I don't see any reused utility functions besides
For what it's worth, libplacebo's abstractions are also designed for the needs of libplacebo. Since you perhaps seem to have gotten that impression, it's not a candidate for a It sounds like the technical resolution here is to just bite the bullet and write In terms of code complexity, having a line of code taking Rather than Edit: It's also worth pointing out that
This is an understandable concern, since I fully appreciate that you want to avoid outsourcing such a big component to something you don't have the ability to synchronize refactors with. That is indeed a technical problem with no immediate solutions. But I also don't think this is as big a deal as you make it out to be. The amount of backwards-incompatible API changes I've had to make the libplacebo API over the years was, to me, astonishingly small given the scope of the refactors I've undergone since then. Most of the API is designed in a way that permits obvious extensions of functionality (e.g. new struct members, for which I, as a rule, insist on making To perhaps make a point: VLC's (The one single breaking change in this period of time was a switch from
Out of curiosity, what kinds of cowboy changes to |
FWIW, right now this is more so the other way around. |
That seems like an awful UI, given the number of options. Personally my goal is for If anything, the only way this would make sense is for libplacebo's option to be prefixed, like
Oh, yeah, that. To be honest the better way to design that would be to have the parse_3dlut_size somehow be part of the option itself, so the consumer of the opts struct just gets the int[3]. I think what I'll probably do is lift And if it makes you happy, I could also split
The AVFrame helpers are just helpers. I'm not sure why you keep stressing on about But anyway, I'll update the PR to use
OTOH, if Personally, I always thought you'd be happy to delete ~20k lines of complexity and baggage from mpv?
Ah, yes. When I mean API break, I mean API break - not ABI break. I encode the API version into the SONAME as a deliberate choice. When I speak about API backwards comapatiblity, I mean the ability to recompile the same code against newer versions of libplacebo without modification.
I meant after |
What exactly are you worried about will happen if
The last mpv-licensed code was removed from libplacebo with version v3.120, except for a few helper functions (e.g. dither generation code) that I have received permission from the respective original authors to use under a permissive license. So the only sense in which anything in libplacebo could even remotely be considered "stolen" is in the sense that I have re-used my own algorithms and designs, for which I don't remember signing any CLA that would prevent me from doing exactly that.
I've written (not yet pushed) a version without any Edit: Pushed |
Something I noticed while implementing The Now, if somebody were to extend the Anyway, not a huge deal, just pointing it out. |
one point is probably to minimise the work that has to be done. otherwise it would be twice the work. |
I have no interest in extending I might as well
It is obviously a joke, at least that was obvious to me. In the same commit you can see clearly that the And anyway, that's beside the point, because I went out of my way to rewrite all of the code that I took from mpv initially.
By that same argument mpv should be GPLv2 licensed and you are therefore engaging in willful copyright infringement by claiming to have relicensed it under LGPLv2. So I think we can both agree that it's a retarded argument and probably doesn't apply in Europe. And besides, by the draconian US copyright laws I would be physically unable to write libplacebo because I have seen mpv code and therefore my brain is permanently tainted with knowledge of its algorithms. So yeah, I don't see that discussion getting anywhere.
What do you mean? I pushed a commit that avoids the usage of AVFrame. How is that "forgetting" about your points? Is this not evidence of me taking your points into consideration? |
From the point of
For that point, it doesn't. Notice that this PR does not remove
I didn't claim it had to be.
I disagree with both halves of that statement. Not only did I not take a "huge chunk of mpv code" (that commit mostly consists of talloc, bstr, and matrix/filter math - hardly components central to libplacebo's functionality), but the intent at the time also wasn't to eventually replace it. The idea of rewriting tainted code came up years later, when I realized how small a part of libplacebo that actually applied to. (It was still essentially talloc and bstr that had to be replaced - neither of which are particularly core to libplacebo's functioning.) (As a side note, you'll also notice that libplacebo is still LGPLv2.1, so what a lawyer thinks about it only matters in as much as determining whether or not you referring to my code as "stolen" technically qualifies as defamation or not.)
I'd say the second half of that describes mpv more accurately than libplacebo, but whatever. In the interest of coming to a conclusion here (lest we spend the rest of this thread listening to your rationalizations about why everything not under your direct control is shit), do I sense correctly that your remaining issue with this PR is of political, not technical, nature? In which case, a resolution is impossible, and the only possible outcome ends in either you being re-removed from the mpv organization or in me forking it for good? |
Your proposed solution being to hide all of the vo_placebo options behind a suboption namespace, the only justification for which is that it will prevent |
As you yourself pointed out, what you want (i.e. the ability to freely refactor) is impossible because libplacebo already has other users besides mpv. You'd still need to maintain API compatibility even if it was under mpv control. If your issue is merely about keeping the mpv code base in sync with changes to libplacebo, git submodules could solve that. |
I specifically don't think it's a problem. I am mirroring your concern from earlier with regards to not wanting to lose the ability to make API changes without making sure to keep VLC/FFmpeg/etc. happy. If that's not the concern, then what exactly is the advantage you hope to gain from having the code in a different place on your hard drive?
Which part are you concerned about? The OpenGL format list, and the corresponding extensions that enable them, are baked into the OpenGL specification, so the end result is necessarily similar. I'm not sure how I could possibly come up with a different table of formats without violating the OpenGL spec. For what it's worth, my implementation even chooses an entirely different mechanism of choosing which formats to enable - splitting them up into a list of formats provided per-extension, rather than having a big list with extension bits. (Also, for what it's worth, even had I gone through with relicensing
Perhaps to avoid giving people the impression that libplacebo is "stolen code", when the reality is that I essentially authored >95% of it, if not more - including the code in Clearly I was unsuccessful.
While your copyright expertise is certainly appreciated, dare I ask - out of curiosity - why you care so much, especially given your own history of relicensing others' code so you can monetize it? (Something I haven't actually done) (Or is this business about copyright just a ploy to detract the conversation away from anything that would undermine your ability to NAK this PR on technical grounds?) |
As somebody who has written much of (if not the majority of) the code in
You're placing me in a very strange double bind. If I preserve your contributions, it's "stealing code". If I remove your contributions, it's discrediting you? But anyways, it seems we've reached the point of fully venting out whatever emotional disagreements we had about the state of libplacebo/vo_gpu development, or at least not wanting to continue this pointless debate / insulting about meta-issues that miss the point. While I appreciate that you're frustrated by your lack of involvement in the project, you surely also appreciate that I think it's very reasonable not to delete a project I've been working on for 3 years just to merge it into a different project run by a benevolent dictator whose decisions I clearly have little ability to overturn.
Well, I feel like lifting the And I'm fine with it being low priority. The whole intent of this PR was mostly to get testing and feedback in. |
Well if we agree that everybody's opinion deserves weight, why can't we settle this with a vote?
I don't know, as I don't really have much to compare. The few contributions I've received to libplacebo have gone over smoothly, so I don't have a negative precedent for what a more invasive change could look like.
It's possible to read ill intent into anything. It's also possible to do the opposite. The choice on that particular matter is yours. Personally I'm confused about what this "timeline" you're talking about is referring to. Perhaps you also understand the libplacebo history better than I do?
The point your oh-so-clever copy/paste of my argument completely misses is that there is a difference between a lack of involvement and a lack of an ability to become involved. I am clearly frustrated by my lack of an ability to have a voice in the mpv project. As far as I can tell, you have not even attempted to make any changes to libplacebo, so the reverse does not even make sense. This is an asymmetric situation, one in which you appear primarily worried about what could happen. But in either case, I'm also not enjoying any second of needing to convince a needlessly antagonistic maintainer, especially given that this is not the first time we've had this sort of argument, and I don't see the cycle ever stopping.
If that's the way it'll be, I suppose I really do have no choice but to go do my own thing (again). I'm sorry to have wasted your precious time. an "epic win" for the mpv project, as I'm sure the peanut gallery will agree |
Don't shoot the messenger 🔫 <Quote removed by effective request of @decent-name > |
Now that it's a new day and I'm less underslept, I wouldn't mind re-opening discussion to seek a different resolution. Can you please clarify - what is it you were hoping would happen? Edit: Never mind, I guess. I just saw your decision to leave (as well as your kind words about me) and all I have to say, I'm... confused. I already said I wouldn't try getting this merged further. So I'm not just compromising, I'm effectively giving you exactly what you want - the ability to dictate mpv without my influence. Given that, I would still like some clarification on what exactly it is you were hoping would happen, since apparently even me being gone isn't enough to make you happy. Edit 2: Oh, I just realized you can't reply to the issue, as it has been locked (not by me). |
haasn, I think you should continue working on libplacebo integration in mpv. Your work in the multimedia community has been truly excellent, and getting broader libplacebo support in mpv would be great. I wish you all the good luck of the world in this regard! :D |
As discussed in #8799, this will eventually replace vo_gpu. However, it is not yet complete. Currently missing: - OpenGL contexts - hardware decoding - blend-subtitles=video - VOCTRL_SCREENSHOT However, it's usable enough to cover most use cases, and as such is enough to start getting in some crucial testing.
Found some bugs related to subtitles:
|
As discussed in #8799, this will eventually replace vo_gpu. However, it is not yet complete. Currently missing: - OpenGL contexts - hardware decoding - blend-subtitles=video - VOCTRL_SCREENSHOT However, it's usable enough to cover most use cases, and as such is enough to start getting in some crucial testing.
As discussed in #8799, this will eventually replace vo_gpu. However, it is not yet complete. Currently missing: - OpenGL contexts - hardware decoding - blend-subtitles=video - VOCTRL_SCREENSHOT However, it's usable enough to cover most use cases, and as such is enough to start getting in some crucial testing.
Minor annoyance:
|
So I can re-use them for vo_gpu_next.
So I can reuse it in vo_gpu_next.
A lot of people seem to do something like --tscale=box --tscale-window=<function>. Just let them use --tscale=<function> directly, by also accepting raw windows. Kinda hacky but needed for feature parity with vo_gpu_next, which no longer has `--tscale=box`. Note that because the option struct is still shared, vo_gpu_next inherits the same option handling code, so we have to export this feature for vo_gpu as well.
This can be used to do things like query the values of preprocessor defines like version macros, among other potential uses.
This seems to work on gcc, clang and mingw as-is, but I made it conditional on __GNUC__ just in case, even though I can't figure out which compilers we care about that don't export this define. Also replace all instances of assert(0) in the code by MP_UNREACHABLE(), which is a strict improvement.
This one got me debugging for quite a while. Assert it for the future.
As discussed in #8799, this will eventually replace vo_gpu. However, it is not yet complete. Currently missing: - OpenGL contexts - hardware decoding - blend-subtitles=video - VOCTRL_SCREENSHOT However, it's usable enough to cover most use cases, and as such is enough to start getting in some crucial testing.
Used this for about a week now with no more issues in my own testing. Except that earlier today I managed to trigger a mixer-related assertion ( Anyway, I'm happy merging as-is, so we can get more testing in, unless somebody objects. |
Hmm, the bug fix to the last issue seems to have introduced a regression when seeking backwards. I'll look into it tomorrow. (Though this should be easy to fix) Edit: Oops, its was trivial, I just accidentally omitted the |
As discussed in #8799, this will eventually replace vo_gpu. However, it is not yet complete. Currently missing: - OpenGL contexts - hardware decoding - blend-subtitles=video - VOCTRL_SCREENSHOT However, it's usable enough to cover most use cases, and as such is enough to start getting in some crucial testing.
As discussed in #8799, this will eventually replace vo_gpu. However, it is not yet complete. Currently missing: - OpenGL contexts - hardware decoding - blend-subtitles=video - VOCTRL_SCREENSHOT However, it's usable enough to cover most use cases, and as such is enough to start getting in some crucial testing.
The deed is done. It is time to atone for our sins. |
By the way, it seems there is an additional benefit to this placebo/gpu-next vo: legacy 'gpu' vo triggers some kind of bug (which upstream just ignores for years) on firmware or driver of my Radeon RX580 which makes it stuck on max voltage until reboot but with gpu-next it seems fine. mpv is the only app that triggers it, that I know. Therefore, in fact, you have already atoned for that sin ;] |
All of the commits will be squashed before merging. But I wanted to get some testing/reviews in, since it's pretty much feature-complete for the most part.
Major missing components: (won't be part of this PR)
blend-subtitles=video
Options which cannot (currently) be supported due to having no libplacebo analog:
interpolation-threshold
Edit: libplacebo's rewritten interpolation logic makestscale=linear
tscale=linear
redundant, astscale=bilinear
is already as efficient astscale=linear
could possibly be - thus invalidating its reason for existencescale=oversample
--alpha=blend-tiles
yuv420pf
libplacebo exclusive options that I still need to hook up:
disable_builtin_scalers
preserve_mixing_cache
allow_delayed_peak_detect
Known issues:
DOCS/interface-changes.md
for new optionOther TODO:
mp_image
directly instead of theAVFrame
helpersVOCTRL_SCREENSHOT
Some stuff could also probably be done way better. Like the source crop stuff. But it works for now.
Also, as of right now this requires a pretty high version of libplacebo (>=4.130), which we should probably split up and relax to some capacity to allow vo_gpu's vulkan backend to continue working on lower versions.Edit: Done splitting up the check.