v0.5.0 This release brings with it greatly improved support for HDR (including HDR-in-SDR emulation, native HDR passthrough and improvements to the HDR->SDR tone mapping algorithm), as well as support for ICC profiles and external VkImage interop (needed for e.g. hardware decoding). Additions: - Add support for treating an SDR curve as an HDR curve by overriding/providing the true target peak. This essentially allows you to calibrate a true HDR device to a typical SDR curve and use it to display HDR media, at the cost of bit precision - Add more values to enum pl_chroma_location - Add a scale factor to struct pl_sample_src, which is useful for e.g. debanding on bit-shifted inputs - Add a new function to infer/guess unknown pl_color_space fields - Add support for 3DLUTs / ICC profiles (via LittleCMS), including support for assigning ICC profiles to the `pl_render_image` and `pl_render_target` structs - Allow enabling optional extra vulkan device/instance extensions, as well as listing what extensions were actually loaded - Add an API for VkImage interop with user code, e.g. to wrap mapped hardware decoding planes into `pl_tex`, plus all synchronization code and extra metadata necessary to make this interop safe - Implement support for native HDR output on supported platforms Changes: - Separate the texture from the plane data struct in `pl_upload_plane` - Swapchain FBOs are now guaranteed to be blittable (e.g. pl_tex_clear) - Tone mapping is no longer done for desaturation steps. Users wanting high quality desaturation should use ICC profiles - Change the types of various fields in struct pl_gpu_limits - Slightly relax the sizing requirements of pl_tex_transfer - Change the default value for pl_tex_transfer_params.stride_w/h. Instead of defaulting to the image size, they now default to the rect to be transferred - Texture transfer buffer offsets must (now) be aligned to the texel size, in addition to being a multiple of 4 - Change the API of `pl_color_space_equal` to be consistent with the rest of the colorspace APIs - Allow the `pl_upload_plane` helpers to upload from buffers as well - Switch the type of mapped buffer pointers from char* to uint8_t* - Rename DCI_P3 to Display_P3, and add DCI_P3 (using the actual DCI white point) Fixes and performance improvements: - Fix some compatibility issues with GLSL 120 - Prevent desaturation from exploding when tone mapping to HDR, or when tone mapping a very bright HDR scene to SDR - Implement the fully parametrized BT.2100 (HLG) OOTF in both directions, based on the tagged/inferred signal peak - Fix an issue preventing the out-of-gamut feature from working correctly on HDR displays - Fix a segfault that occurs when instance creation fails - Fix an issue where `peak_detect_frames` was sometimes too low - Allow debanding to take care of implicit bilinear sampling in cases where no other scaler is requested, thus avoiding an unnecessary FBO indirection - Only run the debanding algorithm on the parts of the image we will actually be displaying. This is relevant when cropping - Fix an issue where PL_TONE_MAPPINg_MOBIUS could fail in certain (unrealistic) scenarios involving HDR-in-SDR emulation - Fix an issue where vulkan could sometimes modify commands after submitting them, when recreating vertex buffers - Make an effort to reuse the same vertex buffer when the contents don't change from the previous invocation - Fix the glslang locale work-arounds on windows - Fix an issue where trying to upload from a too-large texel buffer results in an assertion failure rather than a clean error - Fix an issue where the usage of VkEvents prevented libplacebo from working on platforms where they were unsupported (e.g. MoltenVK) - Support and use vulkan push descriptors where supported. This avoids having to maintain, update and synchronize descriptor sets - Correctly disable signal linearization on low-bit depth FBOs - Prevent a crash on the (pathological) case of a shader with no descriptors - Fix a bug in the size limit calculations for 2D/3D LUTs - Use optimization level "performance" instead of "size" for shader compilation - Fix an abort() when trying to render to a non-storable FBO when using a final pass that requires compute shaders (e.g. HDR peak detection)