Skip to content

This is a major release, bumping up the major version to v5 and dropping
all APIs deprecated in v3.x. The other major breaking change of this
release is a switch away from the external `libepoxy` and `mako`
dependencies in favor of the (optionally bundled) `glad2` and `jinja2`.
These are now included, along with various other build-time dependencies,
as git submodules. Users are advised to clone with `git clone
--recursive` in order to satisfy these dependencies automatically, while
distros maintainers are nonetheless encouraged to continue packaging

In addition, this release brings with it a number of new features and
changes - including support for fully automatic GPU deinterlacing, error
diffusion dithering, gamma-aware dithering, and a number of improvements
to the handling of HDR sources and output displays, as well as several
notable bug fixes and performance enhancements.

- add `pl_gpu_limits.array_size_constants` to indicate whether or not
  push constants can be used to size arrays
- add PL_HANDLE_MTL_TEX, PL_HANDLE_IOSURFACE and `pl_shared_mem.plane`
  to improve interop with MoltenVK
- add the informational fields `pl_opengl.major, `pl_opengl.minor`,
  `pl_opengl_extensions` and the `pl_opengl_has_ext` utility function
- add `pl_opengl_params.get_proc_addr` and `get_proc_addr_ex`
- add `pl_deband_params.grain_neutral`, the effect of which is to scale
  down / disable adding noise near this value
- add <libplacebo/shaders/deinterlacing.h>, containing a basic
  implementation of yadif, bob and weave
- add support for deinterlacing metadata to `pl_render_params`,
  `pl_frame`, and `pl_source_frame`
- add <libplacebo/shaders/dithering.h>, splitting this off from its
  previous location inside <libplacebo/shaders/colorspace.h>
- add `pl_shader_error_diffusion` and related helper functions, as well
  as `pl_render_params.error_diffusion`
- add `pl_dither_params.transfer` to support gamma-aware dithering
- add `pl_icc_params.force_bpc` to help work around black point
  compensation issues on "broken" v4 and v2 profiles

- fields and functions deprecated in libplacebo v3 have been removed
- `python3-mako` is now bundled as a submodule to make resolving this
  dependency easier
- drop `libepoxy` as a dependency, and require `glad` v2 instead, the
  latter of which is added as a submodule to make building easier
- drop the `PL_STRUCT` transitional macro, and switch to a consistent
  API where e.g. `pl_tex` is a typedef of `const struct pl_tex_t *`.
- `PL_LUT_CONVERSION` now explicitly overrides ICC profiles as well
- HDR color spaces no longer default to having a black point of 0.005
  nits, instead now defaulting to "true" black (1e-7 nits)
- BT.1886 sources are now automatically tuned to match the swapchain /
  detected target contrast, rather than defaulting to 1000:1
- move `pl_queue_params.frame_duration` to `pl_source_frame.duration`
- the `vulkan-link` and `opengl-loader` boolean meson options have been
  removed in favor of the `vk-proc-addr` and `gl-proc-addr` feature
  flags, defaulting to `auto` instead of `yes`
- a copy of `vulkan.h` and `vk.xml` have been bundled as submodules to
  make satisfying these dependencies easier
- `<libplacebo/opengl.h>`, `<libplacebo/vulkan.h>` and
  `<libplacebo/d3d11.h`> are now installed unconditonally, with stubs
  for `pl_vulkan_create` etc. available even if these features are
  disabled at compile time
- `pl_render_info.index` no longer indicates the number of frames being
  mixed on PL_RENDER_STAGE_BLEND, instead being relegated to the new
  field `pl_render_info.count`

Fixes and performance enhancements:
- fix a bug where shaders with dynamically sized arrays would fail to
  compile on MoltenVK
- reduce the frequency at which polar compute shaders need to be
- fix compilation issues with MSVC
- fix an issue where vulkan portability extensions were not correctly
- fix a possible deadlock when using a multi-threaded opengl context
- specify the correct calling convention for EGL debug callbacks
- fix a bug where PL_INTENT_ABSOLUTE_COLORIMETRIC broke ICC profiles
- improve the handling of perceptual ICC profiles, especially on
  "broken" v4 or v2 profiles
- fix undefined behavior on 32-bit vulkan systems
- fix bugs in the vulkan swapchain recreation
- fix an issue where HDR metadata was not correctly reflected back to
  the renderer on vulkan swapchains
- fix a bug where d3d11 swapchains failed being created on older
  versions of windows where high-bit-depth swapchains are unavailable
- fix a bug where HDR metadata sent to the swapchain was not correctly
  inferred to valid values
- `pl_shader_deband` has been rewritten to slightly improve performance,
  especially when the texture has more channels than necessary
- `pl_shader_deband` no longer raises the black point due to clipping
- fix build issues on GCC < 6
- improve validity of partially set `pl_color_space` structs
- fix `pl_find_tone_map_function` not having an implementation
- fix a bug where cubic spline frame mixing did not work in `plplay`
- fix a memory leak in `pl_queue_destroy`
- fix a bug where changing `pl_icc_params.max_luma` or `intent` did not
  correctly invalidate the ICC 3DLUT and renderer cache
- greatly improve the performance and accuracy of 3DLUTs (ICC, .cube)
- fix compilation on newer glslang and make this code forward-compatible
- fix an issue where `pl_shader_dither` raised the apparent brightness
  of the image when dithering to low bit depths
- fix compilation on vulkan systems with `vulkan.h` available but no
  vulkan loader
- fix an issue where DV metadata requiring an EL was partially applied
- fix an issue where PQ HDR sources were incorrectly assumed to have a
  black point scaled to the mastering display, rather than absolute zero
- fix an issue where disabling `async_compute` led to undefined behavior
  on systems with async compute queues available
- fix an issue where debanding was applied *after* user shaders, causing
  massive performance/quality loss in the case of user shaders that
  upscaled the input planes somehow - in exchange for a slight
  performance penalty when rendering a heavily cropped source image with
  debanding enabled
- fix an issue where plane shaders were sometimes not correctly merged
  with the following image combination shader
- fix an issue where inverse tone mapping did not work with
- fix a massive performance regression in the non-compute fallback polar
  shader, especially on nvidia and apple systems - in exchange for a
  slight performance penalty on AMD systems
- slightly boost the performance of shader LUTs in some very specific
- fix an issue where nonlinear shader LUTs did not work on GLSL < 130
- fix an issue where libdl was incorrectly required on windows
- fix an issue where fullscreen exclusive mode triggered freezes on
  certain platforms (e.g. AMD+Windows), by disabling fs exclusive mode
- fix an issue where the wrong (GLES) extension was used for EGL image
  imports on desktop GL