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
libplacebo v6 updates #11952
libplacebo v6 updates #11952
Conversation
This is probably blocked by VLC 3 being incompatible with libplacebo v6, as well as ffmpeg 6.0 (6.1 will have a fix for it) |
Well, this breaks CI, which expects mpv to build with whatever versions of libplacebo are available on the CI image. Maybe we should hold off on requiring v6 for the time being? Thoughts? |
Without v6 Downgrading HDR peak detection seems reasonable, but I don't know how slow we're talking of. |
Is it really a blocker for mpv? Distributions can provide libplacebo5 and libplacebo6 packages.
CI can be fixed by introducing a meson subproject. However this requires disabling waf. Should this be removed too? Line 79 in fbd392b
|
I suggest waiting for the release at least, so that distributions can support vulkan for vo_gpu. |
I think distributions can ship multiple versions of libplacebo, I don't know how long you can keep waiting for VLC since both mpv and ffmpeg 6.1 do want latest libplacebo. But if we aren't bumping libplacebo to v6, then I think it makes sense to also put #11875 behind preprocessors, since this one change is the only reason why libplacebo v5 can't have libplacebo-next |
With your latest optimisations, it became much more usable (4k60 worked on a UHD770 for the first time) but ie: I think that going into the future, hardware that is too slow for peak detection is going away while hardware that can do peak detection but cannot do gpu-hq will be the more common low end combination. |
Theoretically? Maybe. It would require extensive and invasive changes to the libplacebo pipeline to actually do properly - you can't achieve identical results using vaapi/qsv filters as-is, as steps will happen in the wrong order. You'd also be giving up the superior algorithms in libplacebo for whatever the hardware gives you. You can take that to the logical conclusion and just use the hardware tone-mapping and offload everything and be happy with whatever that gives you. Of course, the Intel iGPUs with hardware tone mapping are also the ones that can do peak detection anyway, so... |
There's not much point in that, the UHD 770 is good enough to do 4k60 peak detection on a DDR5 system, but lags when I underclock the same memory to DDR4 speeds. The bottleneck here is purely due to the igpu not having fast enough dedicated memory. Even if you used the hardware better you can't make the memory bus go faster |
(also in response to #11991, but I don't want to split discussion) When is the plan to release stable mpv? Maybe we could wait until dust settles? And release it once all new fancy features are available out of the box, at least in Arch. Currently neither new HDR Tone Mapping, nor Vulkan decoding would be available. With stable versions of available packages. Of course this works only if it would be relatively short time frame. I'm not suggesting blocking release indefinitely. |
I was thinking today or early next week. |
Rebased and re-introduced the pl_dispatch_info_move commit. |
The CI issues still need to be resolved, we can't merge this until libplacebo6 exists on the appropriate platforms, unless we can somehow vendor it in as a meson subproject / git submodule. |
could probably add libplacebo into https://github.com/mesonbuild/wrapdb and then the wrapdb fallback would easily work. since waf is dropped that makes it much easier to maintain |
most distros don't have a v6 yet, so this is needed for mpv-player#11952
alternatively just a wrapfile, like in the referenced mr |
most distros don't have a v6 yet, so this is needed for mpv-player#11952
Here is my view on this topic. While it is important to test against latest master of libplacebo, which ironically only mingw build do. It is also important that mpv is buildable on some common or maybe not so common platforms. And compatible with latest stable packages they provide. If the idea, moving forward, is that mpv supports only libplacebo6 it is fine, gpu-next and vulkan support will not be available on platforms that does not package libplacebo6. It is not a CI issue, it is just something that CI shows. I understand libplacebo is close to mpv, but I don't like the idea of coupling them together with wraps. Otherwise why not do the same for ffmpeg or libass? Package maintainers will not use wrap/submodules anyway, so I don't see added value of them. If you want to use newer libplacebo just build it yourself. Maybe we should just wait a bit until libplacebo6 is available... anywhere. As I see we are locked on vlc3. We can push maintainers to package libplacebo6 as separate package, I can do that for msys2. |
Packaging an older libplacebo version for VLC is the way to go here, I think. I've already sent a request for TW, it's up to others to push their distro to do it as well. This shouldn't be hard considering there are already distros that package multiple versions of fast moving libraries, like wlroots. The Linux CI at the very least will work once TW updates their libplacebo, since we use TW for the CI. |
speaking as a distro maintainer (though one that's a little biased, because i maintain this stack there): having a different-version-but-the-same-library with a distinct filename/soname isn't extremely rare (not preferred, but not insurmountable). the only risk that occurs is:
overall this is a chicken-and-egg problem. nobody will update libplacebo if they have no reason to duplicate it, since it's preferred to have one library. if you don't want to require 'v6 only' (as opposed to the ifdefs allowing both), then every distro will probably just keep v5-only for as long as vlc needs it (theoretically vlc3 can't even use v5 without a patch..). you can very easily give them a gentle nudge to use the newer one by making it the only compatible one- and this would only happen on master, as 0.36 was released without these changes. the only actual negative effect that would probably happen, is people building mpv themselves while relying on their own distro packages for the deps (as opposed to using e.g. mpv-build). those might suddenly show up wanting support :)
another solution- i'm not aware of any libplacebo users in distro packages aside from mpv, vlc, and ffmpeg. the former is this, the latter is just two small patches, and the middle one is the odd one out. if someone ported the 3.x vlc branch to v6 (i tried once actually, but that is not a small change :D), then everyone could just use that patch and then that solves the whole issue here too. |
This is a good point actually, I hadn't thought about it but fortunately this shouldn't be a problem considering VLC3 already requires ffmpeg-4 to build which doesn't even have libplacebo while mpv can build with ffmpeg-6. Nearly all distros already carry both ffmpeg-4 and ffmpeg-6 already.
ffmpeg 6.1 should be very soon so those patches won't be needed anymore.
This would be very not trivial, you may as well just build off the master branch for VLC 4 at that point, or build VLC 3 without libplacebo |
I don't agree with this assessment. Right now big feature that some people want to try is Vulkan decoding. Also ffmpeg is quite a bigger library, used ubiquitously. There is much more effort put to keep API/ABI compatible and rules when the API/ABI can be broken and so on. And in fact ffmpeg4.4 is still packaged for projects that weren't updated to newer version and likely will never be.
vlc3 is indeed build with ffmpeg4.4 on Arch, but I just taken a look at msys2 and they seem to build it with ffmpeg6. |
To remove a bunch of #ifdef templating.
LIBPLACEBO_NEXT is now implied by libplacebo being available
Now implied by the minimum libplacebo version.
v6.292 implied by minimum dependency.
Instead copy the data on-demand when VOCTRL_PERFORMANCE_DATA is requested.
Blocked upstream. See-Also: msys2/MINGW-packages#17974
Judging by discussion on IRC it seems disabling CI on MSYS2 (to unblock this PR) is not a big deal, because we already test building libplacebo on mingw. With that out of the way, any last objections to this PR? |
Instead of `quarterly`, to get access to recent packages.
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for mpv-player#11952
most distros don't have a v6 yet, so this is needed for #11952
Also includes the new HDR contrast recovery option. I included it by default in the
gpu-hq
profile.Question: Should we "downgrade" HDR peak detection from on-by-default to on-in-gpu-hq as well? It's really punishing for slower devices, even after libplacebo v6's optimizations.