mirror of
https://github.com/storytold/filmcraft.git
synced 2026-10-25 07:29:49 +00:00
7faece80f0
Problem: the interpolation filters took their taps as an array of T slices built per block row with `array::from_fn`. The array went through the stack and was read back with wider loads than it was written with (store-forwarding stalls): about 10 % of the 8-tap luma interpolation time, plus the per-tap Option handling. Fix: the filters take the taps as a function (row shifted by k, or k-th row from x), inlined into the multiply-add loop, so the tap addresses stay in registers. Same arithmetic, same samples. Tests: the interpolation unit tests (16-bit lanes against the 32-bit filter, in-place against copied windows), conformance suite, identical YUV on the five bench streams. User instructions -1 to -4 % on all five; cycles -2 to -5 % except g250_500 (within the run-to-run noise of the shared machine). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>