Closed mikeversteeg closed 3 years ago
Hi! I think that: 1) yuv to bgr and backward conversion is linear operation, 2) alpha blending is also linear operation. It seems that it is possible to skip conversion operation and apply alpha blending directly to yuv image.
Yes, I considered that too. But Windows' AlphaBlend takes handles to bgra bitmaps so I'm not sure if I can fake that. At the very least I still have to convert to/from yuva420 non-planar. Of course it is easy to write the algorithm myself, but that would be even slower as it is not SIMD.
Oh, I now see there is an alpha blend function in your library, cool! I did not find it even though I used the documentation's search function with proper keywords.. I will give it a try.
There is no way to set the alpha used to blend the two images? If I understand correctly I need to create a 3rd image where every pixel has same alpha value? Seems like overkill?
Did you mean the blending with constant alpha? I can add this function.
Yes, to blend two yuv images and create dissolve effect (see my original post).
I have done it. It gives up to 30% gain.
Wow, that was fast. Thank you! I'm looking forward to the release!
Did not want to wait until September so downloaded your "master" and can confirm your SimdAlphaBlendingUniform does exactly what I needed, thank you! Here's another virtual donation 🎁 :).
Hi Ihar! I need to blend two images together to create a dissolve effect. My bitmaps are yuv420p, all same size. Doing a conversion to bgr, use AlphaBlend, and convert back to yuv420p, is too slow. I've gone over the documentation but see no function for this. Any chance you add this function to your library?
Thanks.