Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Releases: LoganDark/stackblur-iter

Bump imgref-iter to pass Miri

13 Aug 11:30
9531280
Compare
Choose a tag to compare
Pre-release

This is a breaking change because of the huge MSRV hike. stackblur-iter now requires the very latest stable (1.63) for the latest version of imgref-iter. But it should now pass Miri.

Fixes #11

Fix UB in blur methods

13 Aug 11:28
bf2cae4
Compare
Choose a tag to compare
Pre-release

Obtaining the column reader before writing to the rows is UB because writing to the rows invalidates the column reader's borrow.

This release fixes that. It does not update imgref-iter yet because that will be a breaking change (due to the huge MSRV hike). The version of imgref-iter used here does not pass Miri yet (the latest version does).

fix rustdoc build

18 Jul 14:58
1c42723
Compare
Choose a tag to compare
fix rustdoc build Pre-release
Pre-release

:( sad I let this slip

Add SIMD and Rayon support

18 Jul 13:29
de8f78b
Compare
Choose a tag to compare
Pre-release

Using the new SIMD iterators in imgref-iter, it's possible to implement SIMD version of stackblur. Right now SIMD doesn't offer too much of a benefit, but it is still a benefit nonetheless, and rayon definitely offers a huge benefit.

This has been sitting around in PR hell for far too long, and I don't like managing multiple disparate branches, so it's about time this gets merged and released.

Fix radius zero

18 Jun 06:51
844ea7f
Compare
Choose a tag to compare
Fix radius zero Pre-release
Pre-release

I actually have fixed this before, but it was lost in a commit that I decided not to push (the precursor to imgref-iter). I forgot that it included this fix, and therefore forgot to test radius zero again before publishing.

Quite upset about this one, honestly.

Correctness

18 Jun 04:55
820db6a
Compare
Choose a tag to compare
Correctness Pre-release
Pre-release

Small optimization/cleanup release here.

  • Fixed StackBlur behavior with repeating iterators. It used to just continue without returning a None. Now it properly returns a None before continuing.

  • Switched to new imgref-iter iterators. These are relatively immature (I made them in about 4 hours) but they simplify the implementation of blur_horiz, blur_vert and blur massively, as well as possibly benefitting the ecosystem of crates that use imgref, since anyone can use the crate.

  • blur has been optimized slightly to avoid allocating more than one deque. It used to allocate two because it called blur_horiz and blur_vert individually.

The perf increase is barely anything. Larger increases are planned from things like rayon and SIMD.

Optimizations

16 Jun 13:48
f5ff5c3
Compare
Choose a tag to compare
Optimizations Pre-release
Pre-release

All internal changes and optimizations. The library is now almost as fast as the original stackblur, and additionally it no longer violates borrowing rules and no longer requires nightly.

  • The internal Argb struct (which is used by methods like blur_argb and blur_srgb) has been changed to use an array instead of SIMD, due to portable_simd being an unstable feature that also generates very inefficient code.

    Additionally, it now uses unsigned (but explicitly wrapping) arithmetic for another small performance boost.

  • StackBlur will now only initialize itself if it receives at least one item from the contained iterator, for a small performance boost when the end has been reached.

  • Usage of the internal deque has been optimized slightly for another small performance boost.

  • StackBlur::next is now inlineable.

  • blur_horiz and blur_vert now use optimized iterators internally which are much faster than their old versions, especially blur_vert.

The library is now approaching the speed of the original stackblur, and already outperforms it for large blur radii.

Initial release

15 Jun 07:39
afd4f5d
Compare
Choose a tag to compare
Initial release Pre-release
Pre-release
v0.1.0

Exclude .idea from crate