by raphlinus · 8y ago · 0 comments
The world is very different today, bilinear texture sampling is built into GPU hardware and is lightning fast. The idea that a sequence of skews might be more efficient is a curious relic of when CPU was considered a reasonable place to do image transformation.
[0]: https://www.amazon.com/Digital-Image-Warping-George-Wolberg/...
Real time graphics is of course a different matter.
And the scaling also requires interpolation. So I'm not sure if it's better or worse in terms of bluriness.
Back in the day, the "rotozoom" coefficients were chosen at a nearest integer to avoid interpolation. This of course means that you can't continuously choose the value of the angle. Interpolation doesn't play nice with a palette-based image with a fixed number of colors anyway.
When palette and integers are not a restriction, higher quality interpolation (bicubic, etc) is also an option. Comes with tradeoffs, of course.
Using integer coefficients will also enable all kinds of opportunities for assembly-level optimization.