On Thu Aug 10 22:58:33 2023 +0000, Nikolay Sivov wrote:
What difference does this make?
In previous implementation we calculated `src_color` position every time: ``` for (x=0; x<src_width; x++) { ARGB dst_color, src_color; src_color = ((ARGB*)(src + src_stride * y))[x]; ```
With new implementation we are calculating `src_color` position only once (before `x` loop), and we just iterating the `src_color++`: ``` ARGB *src_color = ((ARGB*)(src + src_stride * y)); for (x=0; x<src_width; x++) { ...
src_color++; } ``` It is much faster (avoiding not needed multiplications), especially for wide images.