[Pixman] [PATCH 3/3] BILINEAR->NEAREST filter optimization for simple rotation and translation

Bill Spitzak spitzak at gmail.com
Mon May 23 10:45:25 PDT 2011


If I understand this right, I also think the "simple" test is all that 
is needed. The only interesting matrixes are 1:1 scale with integer 
translations. There are exactly eight arrangements of the upper-left 
corner: with ±1 in location 0,0 and 1,1, and with ±1 in locations 0,1 
and 1,0. I think this is what the simple existing test is indicating.

It is true that bilinear scaling will reduce to point sampling for 
scales of 1/N with appropriate translations. However I very very much 
recommend against trying to optimize this:

1. The translation will have to be various fractions (don't forget that 
the centers of pixels are at .5 coordinates!!!).

2. All these scales look BAD with bilinear filtering. You guys have to 
realize that scales less than one REQUIRE more than 2 pixels of input 
for each output pixel. There is NO WAY AROUND THIS, stop pretending 
otherwise!

3. I would expect the optimization will be far faster if it can assume 
the source pixels it is copying are 1 apart.


More information about the Pixman mailing list