Skip to content

filters: refactor filter configuration

Niklas Haas requested to merge haasn/libplacebo:filter_refactor into master

The old (deprecated) way of configuring filters was to make your own copy of pl_filter_function, modify the parameters directly in the struct, and then link that modified function into your pl_filter_config.

This was needlessly verbose and clumsy, and made configuring filters a nightmare. Fix it by instead moving configuration of the radius and parameters to the pl_filter_config, alongside a few miscellaneous changes aimed at making this struct more self-contained (e.g. by including the description there as well).

This, unfortunately, comes with the downside of breaking existing code that relied on the v1 params configuration interface, which fortunately is limited to just mpv, so patching around it is easy.

One notable consequence of the new configuration API is that we now configured the parameters for different bcspline presets directly in the pl_filter_config, rather than referencing the altered functions. They are preserved for backwards compatibility, but no longer really needed.

Merge request reports