[Pixman] [PATCH 0/2] 7-bit bilinear interpolation precision

Bill Spitzak spitzak at gmail.com
Thu Jul 5 12:25:55 PDT 2012


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.


More information about the Pixman mailing list