Files
Tanish Manku c354445f40 Surface Blur: 4x to 20x faster on 16-bit and 32-bit layers (ranked window sums)
The 8-bit sliding histogram (#631) can't serve 16-bit or float layers: a 16-bit threshold spans
thousands of levels and floats have none. The weight `1 - |v - v0| / t` is linear on each side of
the centre value, so the weighted window sum only needs the count, Σv and Σv² of the samples within
the threshold below and above it. A Fenwick tree over the window's distinct values holds those and
slides along the row, so a pixel costs O(radius · log n) instead of O(radius²), for any depth,
with the direct sum's own weight test deciding which samples count. Used from radius 10, where it
overtakes the direct sum; non-finite samples keep the direct sum.
2026-10-08 00:18:38 -07:00
..
2026-10-07 10:20:40 -04:00
2026-10-07 17:12:55 -04:00