Jonathan Behrens
Jonathan Behrens
The dynamic of having a contributor say "let's do X!" and then expecting the maintainers to figure out what impact the change would have on downstream users, future compatibility, etc....
Based on the increasing number of users and how many code changes would be needed, I think this would likely be the **single most disruptive change this crate has ever...
With [`slice::as_chunks`](https://doc.rust-lang.org/std/primitive.slice.html#method.as_chunks) now stable, going from `&[P::Subpixel]` to `&[[P::Subpixel; P::CHANNEL_COUNT]]` shouldn't be too difficult for user code.
Our JPEG decoder is supposed to return an error when attempting to encode >8-bit per channel images: https://github.com/image-rs/image/blob/56898e0ac18fa8389b627408ffde90b85ea69899/src/codecs/jpeg/encoder.rs#L458-L475 I don't know exactly what's going wrong, but I believe it is...
The core question around basisu is how to simultaneously support both desktop GPUs (which only support BCn) and non-Qualcomm mobile GPUs (which only support ASTC). There's a few possible approaches...
There's also https://github.com/JakubValtar/basisu_rs which does pure-Rust UASTC transcoding, and thus should be wasm compatible
There's already the `PixelWithColorType` trait that gives access to the `ExtendedColorType` associated with a pixel. Though looks like we might be missing a way to convert from `ExtendedColorType` -> `ColorType`
Sorry for the delay. I think this would be better to expose by adding a method on `ExtendedColorType` that returns an `Option`.
[Rustc 1.87.0 upgraded to LLVM 20](https://releases.rs/docs/1.87.0/#internal-changes) so there's a good chance that's related to the slowdown. If it is the unfiltering that's the problem, the [unfilter benchmark](https://github.com/image-rs/image-png/blob/master/benches/unfilter.rs) should show that....
On Linux with an AMD Ryzen 5600X, I'm seeing a performance drop in the paeth4 unfiltering code. Not as severe as OP, but still significant: ``` unfilter/filter=Paeth/bpp=4 time: [11.177 µs...