Re: Concerns about using filters for downscaling
[email protected] (Søren Sandmann)
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
Owen Taylor <[email protected]> writes: >> Also, the pixman convolution filter is designed to be implemented in a >> separable way, but the current code doesn't do that. This optimization >> should be another major speedup for filters with wide support such as as >> Lanczos. > > What's the idea? Just an optimization of the per-pixel convolution? > creating an intermediate image that is a 1D convolution of the source > image and then convolving that the other way? (That seems only be > possible for strict scales.) Yes, in principle, but done in one pass. Instead of creating a full intermediate image, just maintain k 1D convolved scanlines if the filter has size k x k. It is indeed only possible for pure scalings. That is a quite important case though, and the standard BILINEAR filter is already doing this optimization (See fast_fetch_bilinear_cover() and ssse3_fetch_bilinear_cover()). Søren -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo