v6.337.0-rc1 This release focuses on several major "quality of life" improvements for downstream users. These include an all-new options system, a new unified cache layer, and a new filter configuration API, as well as improvements to tone and gamut mapping, scaling and HDR peak detection. The new options system greatly simplifies usage of the pl_render_params API, and allows saving/loading parameter presets at runtime, as well as exposing advanced options in a programmatic way. The new cache layer unifies the old dispatch/renderer/icc cache systems into a single file which can be more easily saved/loaded at runtime, and also includes support for internal size limits, book-keeping and garbage collection. The new filter API greatly simplifies the process of configuring custom filter kernels, and also augments each filter entry by extra metadata which can be used to make this API more understandable and simpler for end users. The default scalers have also been overhauled, and multiple scalers have been fixed, made faster, or otherwise improved. In addition to this, libplacebo now uses a custom GLSL preprocessor to significantly speed up the runtime generation of complex shaders, faster built-in functions for parsing and printing numbers, as well as a significantly faster generic hash routine. Additions: - add pl_test_pixfmt_caps to test AVPixelFormat<->GPU capabilities - add pl_vulkan_swapchain_params.disable_10bit_sdr to work around bugs - add pl_queue_estimate_fps/vps, pl_queue_num_frames and pl_queue_peek - add pl_tone_map_linear_light - add pl_gamut_map_softclip (equivalent to old pl_gamut_map_perceptual) - add pl_primaries_compatible and pl_primaries_clip - add pl_gamut_map_params.gamut_expansion - add helper macros to struct pl_color_adjustment and pl_icc_profile - add pl_filter_function.name and pl_filter_config.name/description - add pl_filter_config.radius/params/wparams/antiring - add pl_filter_config.allowed/recommended usage hints - add pl_filter_functions and pl_filter_configs - add pl_filter.radius_zero (size of main lobe) - add pl_filter_ewa_lanczossharp and pl_filter_ewa_lanczos4sharpest - add pl_hook_par.names and TYPE ENUM named parameters - add new options system in <libplacebo/options.h> - add pl_gamut_map_params.constants and pl_color_map_params.gamut_constants - add pl_tone_map_params.constants and pl_color_map_params.tone_constants - add pl_renderer_get_hdr_metadata - add new unified cache system in <libplacebo/cache.h> - add pl_gpu_set_cache - add pl_render_params.correct_subpixel_offsets - add pl_icc_update to update pl_icc_object more efficiently - add pl_frame.icc to eventually replace pl_frame.profile - add pl_frame_mix_nearest/current - add pl_frames_infer and pl_frames_infer_mix - add pl_shader_sample_hermite/gaussian - add pl_tex_transfer_params.no_import to bypass host pointer import Changes: - pl_source_frame.pts and pl_queue_params.pts are now `double` - anti-ringing now works for polar (EWA) filters - pl_deband_default_params.threshold lowered to 2.0 (TODO) - pl_icc_params.size_r/g/b are now `int` - pl_filter_config and pl_filter_function have been substantially refactored - deprecate/remove pl_filter_function_preset and pl_filter_preset - pl_peak_detect_params.smoothing_period == 0 now disables smoothing - deprecate pl_color_map_params.tone_mapping_param and pl_tone_map_params.param - remove pl_peak_detect_params.minimum_peak - pl_tone_map_auto is now an alias for pl_tone_map_spline - change pl_peak_detect_params.scene_threshold_low/high and smoothing_period default values to make peak detection much more responsive - remove pl_filter_config.filter_scale (set filter blur instead) - default to pl_filter_ewa_lanczossharp in high quality preset - default to pl_filter_lanczos in default preset - default to pl_filter_hermite for downscaling - make pl_render_high_quality_params.frame_mixer consistent with default - require C++20 for building - remove pl_pass_params.cached_program (use pl_cache instead) - deprecate pl_dispatch_save/load (use pl_cache instead) - deprecate pl_renderer_save/load (use pl_cache instead) - depreciate pl_frame.profile in favor of pl_frame.icc - remove pl_render_params.icc_params and ignore_icc_profiles - remove the redundant pl_filter_function_{bcspline,catmull_rom,mitchell, robidoux,robidouxsharp,bicubic} family of cubic splines, and instead add a single tunable pl_filter_function_cubic to replace them - remove pl_{render,sample_filter}_params.{lut_entries,polar_cutoff} - pl_filter.radius now always holds the true radius (after blurring/cutoff) - slightly adjust pl_deband_default_params.threshold/grain Fixes and performance enhancements: - shader stripping is now enabled by default - greatly improve performance of complex shader generation - fix some bugs related to pl_swapchain_colorspace_hint - fix meson picking wrong python version sometimes - fix contrast recovery sometimes producing illegal values - fix pl_filter_function_box radius to be more useful, and make pl_filter_nearest radius 0.5 instead - fix error using vulkan on system with broken synchronization2 layers - fix AV1 film grain for 4:4:4 files - fix build issues with UCRT on windows - fix allocation of large pages (e.g. very large images) on vulkan - fix runtime checks on windows 8+ - fix CHROMA/ALPHA_SCALED hooks not working - fix pl_tex_transfer_params.buf_offset in texel fallback path - automatically split large texture transfers into slices - fix overly strict garbage collection on high FPS displays - fix crash on pl_queue_update with no frames - fix peak detection not working for files with buggy HDR10 metadata - fix peak detection not applying when HDR10+ metadata is present - fix peak detection luma coefficients - make peak detection ignore entirely black pixels (e.g. black bars) - fix calculation of filter blurs not correctly scaling the window - fix leaking vulkan headers path in pkg-config file - improve performance and correctness of numerical parsing/printing - fix textureLod error when using external or rectangle samplers - greatly improve performance of built-in hashing function - improve LUT generation performance by caching all shader LUTs - halve in-memory size of gamut mapping 3DLUTs - fix rendering of overlays when target has an ICC profile set - fix incorrect subpixel offset on multi-pass prescalers (e.g. NNEDI3) - fix pl_filter_function_hermite and pl_filter_hermite values - fix scaling of kaiser/quadratic/bicubic windows - improve performance of ortho scaling with all-positive filter kernels - improve performance and LUT accuracy when scaling with prematurely windowed (or heavily sharpened) filters - improve performance of gaussian and hermite scaling - improve accuracy of all scaler LUTs