Double precision pixel coordinate interpolation was added in 3a65d2f591
to fix an issue of "wobbly" resulting image at very high scale factors.
But the root cause of that was the fact that the scanline loop was
repeatedly adding the floating point step for each pixel, instead of
doing multiplication by pixel index (repeated floating point additions
can "drift" due to imprecision, whereas multiplications are much more
accurate).
Change all that math back to use single precision floats. I checked the
original issue the commit was fixing, it is still fine. Also added a
gtest to cover this situation: imbuf_transform, nearest_very_large_scale
This makes IMB_transform a tiny bit faster, on Windows/VS2022/Ryzen5950X
scaling an image at 4K resolution:
- Bilinear: 5.92 -> 5.83 ms
- Subsampled3x3: 53.6 -> 52.7 ms