WebAssembly ABI 2: neighbouring frames for effect plug-ins (#2773) (#3329)

* WebAssembly ABI 2: neighbouring frames for effect plug-ins (#2773)

A wasm plug-in can export ec_api_version 2 and ec_render2 to receive the layer's previous and next frames, their layer times and validity flags. Neighbours come from PluginHost::input_at, are resampled onto the current grid, and are zeroed when absent. ABI 1 modules (ec_render) load and render unchanged; the manifest api stays independent. A layer with an ABI 2 plug-in keys the render cache on layer time; the Plug-in Library accepts ABI 1-2 releases. Docs, help text and tests updated.

* Fix ABI 2 neighbour times on NTSC frame boundaries

	ime * fps is often a few ulps off an integer at rates such as 24000/1001. The old boundary test then took the bracket branch and passed the current frame back as prev (or
ext). Treat a near-integer as a frame boundary within 1e-6 frames, and test 2400 frames at 24000/1001: every boundary must get the frames either side. Also document the loader helpers for the docstring coverage check.

---------

Co-authored-by: justanshh <294019246+justanshh@users.noreply.github.com>
This commit is contained in:
just_anshh
2026-11-09 10:49:53 +01:00
committed by GitHub
co-authored by justanshh
parent 81a12ffffc
commit 544eebf904
16 changed files with 741 additions and 92 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "posterize-bands"
description = "Example EffectCraft effect plug-in (WebAssembly, plug-in API v1): posterizes luminance into tinted bands"
description = "Example EffectCraft effect plug-in (WebAssembly ABI 1): posterizes luminance into tinted bands"
version = "1.0.0"
edition = "2024"
license = "MIT OR Apache-2.0"
+1 -1
View File
@@ -1,4 +1,4 @@
//! Posterize Bands: an example EffectCraft effect plug-in (plug-in API v1, see
//! Posterize Bands: an example EffectCraft effect plug-in (WebAssembly ABI 1, see
//! `docs/plugins.md`). It quantizes each pixel's luminance into `levels` bands and mixes a tint
//! colour in by `mix` percent, optionally only above a `threshold`.
//!