GSoC 2018 Project + Results
by Niklas Haas on August 21, 2018
Tagged as: vlc, libplacebo.
This summer I participated in GSoC, working on libplacebo and its integration into VLC.
Project Goal
The idea was to implement a new video output module (vout_placebo) based on both libplacebo and the Vulkan graphics API. The ultimate aim was rough feature compatibility with mpv’s vo_gpu renderer, upon which libplacebo is based, but the end was essentially open as far as libplacebo features were concerned.
Current State
All of the major essentials are implemented (including direct rendering), and the video output works without any major issues on setups I’ve tested. The current known limitations include:
Support for subtitles is implemented in libplacebo but still needs to be hooked up to VLC’s module. (easy)
Not all libplacebo settings are hooked up to GUI options in VLC, specifically the advanced upscaling options are still missing. (easy)
Frame interpolation / temporal mixing, an attractive vo_gpu feature, is still missing in libplacebo. (hard)
Missing performance optimizations in some code paths (e.g. plane merging for more efficient debanding / chroma upscaling)
The features I cared about most (debanding, HDR tone mapping, upscaling, dithering) are all implemented and working.
Using it
libplacebo
libplacebo, which has been developed as an independent library, can be obtained and built by following the build instructions, summarized as follows:
$ git clone https://github.com/haasn/libplacebo && cd libplacebo
$ meson build
$ ninja -Cbuild
This will build the libplacebo shared library. If you want to install it system wide, you can use ninja install
(however it’s recommended to use proper system packages instead). Refer to the meson
documentation for more information about how to customize e.g. the target install directory.
Make sure you have a working Vulkan loader library and driver on your system. There is currently no OpenGL support in libplacebo, nor any immediate plans of adding it.
VLC module
The VLC module I have been working on is available as a WIP branch on GitHub. It will be merged into VLC upstream once the last bits (subtitle support, missing GUI options) are added and the code has undergone a final evaluation / inspection / cleanup pass.
You can build it the same way you build VLC. To make sure vulkan and libplacebo are supported and enabled, use ./configure --enable-libplacebo --enable-vulkan
when building.
To use it, simply choose the “Vulkan” video output option in the VLC settings. All of the video quality settings for customizing the use of libplacebo’s features are found in the advanced options dialog in VLC.