Skip to content

perf(vision): accelerate bilinear resize - #43

Merged
rsasaki0109 merged 1 commit into
mainfrom
agent/resize-fast-path
Jul 15, 2026
Merged

perf(vision): accelerate bilinear resize#43
rsasaki0109 merged 1 commit into
mainfrom
agent/resize-fast-path

Conversation

@rsasaki0109

Copy link
Copy Markdown
Owner

Summary

  • add reusable BilinearResizeU8Plan with precomputed Q11 half-pixel coordinates and coefficients
  • add an exact row-parallel packed RGB8 half-scale path and route Python bilinear resize through it
  • preserve packed/strided input and output, metadata, padding, and Python out= identity
  • add Criterion coverage, a focused OpenCV harness, dated receipt, README table, ROADMAP, and GitHub Pages updates

Measured results

  • Native reuse vs previous SpatialRust: 35.6x VGA, 47.8x 1080p, 37.3x 4K
  • VGA 640x480 -> 320x240 Python reuse: SpatialRust 0.120 ms vs OpenCV 0.133 ms (1.10x faster)
  • OpenCV still leads reuse at 1080p/4K/8K by 2.40x/2.01x/1.85x
  • Canonical half-scale output is bit-exact; 300 arbitrary-dimension cases have maximum absolute error 1

Validation

  • 9 focused resize tests, including strided input/output and plan validation
  • 118 full vision unit tests + 11 property tests
  • 8 spatialrust-image tests
  • vision all-target clippy with -D warnings
  • Python binding suite and Python crate clippy (excluding one pre-existing argument-count lint)
  • release extension build, rustfmt, rustdoc, focused OpenCV harness, and diff checks

@rsasaki0109
rsasaki0109 marked this pull request as ready for review July 15, 2026 22:00
@rsasaki0109
rsasaki0109 merged commit d3691b8 into main Jul 15, 2026
86 of 92 checks passed
@rsasaki0109
rsasaki0109 deleted the agent/resize-fast-path branch July 15, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant