[Pixman] [PATCH 1/7] Main loop template for fast single pass bilinear scaling

Siarhei Siamashka siarhei.siamashka at gmail.com
Sat Feb 26 06:24:35 PST 2011

On Saturday 26 February 2011 14:41:38 Soeren Sandmann wrote:
> Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:
> > +/*
> > + * Identify 5 zones in each scanline for bilinear scaling. Depending on
> > + * whether 2 pixels to be interpolated are fetched from the image
> > itself, + * from the padding area around it or from both image and
> > padding area. + */
> > +static force_inline void
> > +bilinear_pad_repeat_get_scanline_bounds (int32_t        
> > source_image_width, +					 pixman_fixed_t  
> > +					 pixman_fixed_t  unit_x,
> > +					 int32_t *       left_pad,
> > +					 int32_t *       left_tz,
> > +					 int32_t *       width,
> > +					 int32_t *       right_tz,
> > +					 int32_t *       right_pad)
> What does "tz" stand for in these names? Presumably, the z is for zone,
> but what about the t?

It stands for 'transition zone' (I could not come up with a better name). This
is mentioned in some of the other places in the code. Using shorter variable
names is an attempt to break 80 columns limit a bit less often. I agree that
the comments and the general readability of code is still lacking in some
places, but it's still being developed and I don't have a totally clear vision
about what it is going to look like in the end. Anyway, more about it in
another e-mail.

These 'transition zones' are the areas in the destination image, where the
color of each pixel is obtained by interpolating 2x2 block of pixels in the
source image so that they are partially fetched from the image itself and
partially from the outside. Hence they need special treatment in the main loop.

Best regards,
Siarhei Siamashka

More information about the Pixman mailing list