On 07/05/2012 12:22 AM, Siarhei Siamashka wrote:

Separable scaling is good idea, but it is not a silver bullet.
Downscaling is still a valid use case, and separable scaling would
provide no reduction for the number of arithmetic operations for it.

This is not true. In fact 2-pass scaling is a much *bigger* win for downscaling if you use filters of size greater than 1. And filters larger than 1 are absolutely required to fix the artifacts that are in current downscaling.

Single-pass bilinear is *not* a big loss for upscaling, because as you noticed there is overhead of the intermediate values. It is pretty much equivalent to stretching the image in one direction, and then in the other. You need to store this intermediate stretched image, which is bigger than the original.

What I propose is that an integer down-scale be selected and used to box-filter which can be computed extremely fast (there are no varying weights). This resulting image, which will always be smaller, and could be cached, can then be bilinear interpolated using the current code.
_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to