[Pixman] [PATCH 3/7] C variant of bilinear scaled 'src_8888_8888' fast path

Soeren Sandmann sandmann at cs.au.dk
Sat Feb 26 04:33:02 PST 2011


Most of this series looks good to me, except that this:

>  static force_inline uint32_t
> +bilinear_interpolation (uint32_t tl, uint32_t tr,
> +			uint32_t bl, uint32_t br,
> +			int distx, int wt, int wb)
> +{

is a duplication of the code from pixman-bits-image, except that disty
has been split into wt and wb so that it can deal with the top and
bottom edges of the image.

The bits_image_fetch_bilinear_no_repeat_8888() function handles the same
problem by simply passing 0 for tl/tr or bl/br. Could it be done the
same way here? Alternatively, if there is a good reason for the split,
presumably that same reason applies to the code in pixman-bits-image.c.

The pixman-fast-path.h file also contains a duplicated version of
"repeat" where the only difference is that the order of the arguments is
reversed and one uses MOD(), the other while() to do repeating. This
duplication was not introduced by you, but it would be useful to share
that code as well.

Maybe the file pixman-fast-path.h should be renamed to pixman-common.h
or pixman-inlines.h since it would no longer be specific to


More information about the Pixman mailing list