Radzivon Bartoshyk
Radzivon Bartoshyk
Only decoding is supported. ICC profiles and HDR images not supported in encoding
To retrieve pixel data in iOS/macos we have to redraw image on the other surface, at this stage image are being drawing ‘as is’ and metadata is lost. I don’t...
> Paper on fast alpha blending without divisions: https://arxiv.org/pdf/2202.02864 Here is ready method if needed https://github.com/awxkee/pic-scale-safe/blob/7f1066e006aac5eea4c1474f5bbe81cae837b2b7/src/alpha.rs#L43 Division by alpha if required much less straightforward.
`min` was accidentally added when I was trying to force auto-vectorization. You're correct that the division is exact, so clamping is unnecessary. I think your `rounding_div` will be incredibly slow...
And also it is possible to make special branch for numbers power of 2 for even faster division: ```rust fn is_power_of_two(n: u32) -> bool { n != 0 && (n...
Here is table to try out: https://gist.github.com/awxkee/b8df92e4f97346fb56ae91dc4dcca779 You can benchmark if it worth it on your CPU, because I'm actually not sure that it'll be better.
You could perhaps replace their 'approximate division by 255' with exact division? I think this is the main inaccuracies producer. Also here should be nice work division by reduction table,...
Actually if you're using `u32` instead of `u16` there will be a shorter reach for `division by 255 = (a * 32897) >> 23`. This method in `u16` makes more...
> I can compare the result to that crate, but it only uses u8 representation instead of f32 representation as far as I know. yuvutils supports 10/12 sometimes 14 and...
> To be honest, I didn't know which range and matrix correspond to the implementation in kornia that I was testing against. I used this combination of range and matrix...