-
This uses libplacebo's rendering helpers for all video output, on top of the vulkan graphics API. Some notes: - The existing fourcc/chroma helpers don't really line up with what the libplacebo API expects, or in some cases return values that just don't seem to make sense. I was advised against touching them for fear of breaking the rest of VLC - so we add our own helpers that give us the information in the format we need for libplacebo. - Not all libplacebo options are mapped. There's no ability to create custom filter functions (which libplacebo/mpv support), and there's also no support for ICC profiles / 3DLUTs (which libplacebo supports) nor for the new color blindness simulation parameters in libplacebo v0.6. We also don't map the VLC brightness/hue/gamma/etc. options to the libplacebo structs - we could do it for free as part of the video decode matrix, rather than needing to insert a CPU filter for it. - How to create the vulkan surface will depend on the platform (much like in opengl), so we move context, surface and device creation into a single module (`vulkan/surface.c`) which will be conditionally compiled depending on the platform in order to provide support for multiple surfaces side-by-side (e.g. x11 and wayland). This does mean that the context/device-related options end up being separate per platform, but OTOH this is not that bad since different platforms might want different e.g. swapchain modes (an example being wayland, which can make better use of mailbox rather than fifo). - libplacebo doesn't have a "configure" step, instead all rendering parameters are fully dynamic. So we could call UpdateParams() in our module at any point in time when the config values change. Unfortunately, there's no easy way for us to find out when this is the case, so right now changing the vulkan module options requires a module reinit to take effect. In theory we could change this. (As an aside: calling var_Inherit* per frame does work to get us the changes in "realtime", as soon as the user clicks "save", but this may block for arbitrary amounts of time so I was advised against doing it) Due to the new functions, structs and enum members used, the minimum libplacebo version has been bumped up to v0.5.0. In theory we could also try and support v0.4.0 with some #ifdefs, but v0.5.0 has been out for several months now so it should be a safe requirement.
1386b850