[Pixman] performance of bilinear_interpolation

Maksim Lin maks at manichord.com
Wed Oct 9 14:19:40 PDT 2013


Hi Søren,

Thanks very much for that.

Unfortunately the version I'm using of pixman inside Firefox has only
been updated to 0.30.2 by xunxun's patch, so the macros that are fixed
by that commit are still in pixman-bits-image.c and look like this
without that "ITER_NARROW | ITER_SRC" parameter:

#define SEPARABLE_CONVOLUTION_AFFINE_FAST_PATH(name, format, repeat)   \
    { PIXMAN_ ## format,                                               \
      GENERAL_SEPARABLE_CONVOLUTION_FLAGS | FAST_PATH_ ## repeat ## _REPEAT, \
      bits_image_fetch_separable_convolution_affine_ ## name,          \
      _pixman_image_get_scanline_generic_float                   \
    },

#define BILINEAR_AFFINE_FAST_PATH(name, format, repeat)            \
    { PIXMAN_ ## format,                        \
      GENERAL_BILINEAR_FLAGS | FAST_PATH_ ## repeat ## _REPEAT,        \
      bits_image_fetch_bilinear_affine_ ## name,            \
      _pixman_image_get_scanline_generic_float                \
    },

#define NEAREST_AFFINE_FAST_PATH(name, format, repeat)            \
    { PIXMAN_ ## format,                        \
      GENERAL_NEAREST_FLAGS | FAST_PATH_ ## repeat ## _REPEAT,        \
      bits_image_fetch_nearest_affine_ ## name,                \
      _pixman_image_get_scanline_generic_float                \
    },


Do you think this could also be an issue in preventing the
fetch_bilinear_affine() functions from being called and so also
Siarhei's patches new sse2 optimised function from being called?

thanks,
Maks.

On Thu, Oct 10, 2013 at 2:16 AM, Søren Sandmann <sandmann at cs.au.dk> wrote:
> Maksim Lin <maks at manichord.com> writes:
>
>> and also strangely (compared to profiler traces for arm devices) I'm
>> *not* seeing bits_image_fetch_bilinear_affine being called either:
>
> It's still possible that the page is being scaled on some devices, but
> not on x86. If the ARM device supports pinch-to-zoom, it's pretty easy
> to end up with a slightly zoomed page.
>
>> static force_inline void
>> bits_image_fetch_bilinear_affine (pixman_image_t * image,
>>                   int              offset,
>>                   int              line,
>>                   int              width,
>>                   uint32_t *       buffer,
>>                   const uint32_t * mask,
>>
>>                   convert_pixel_t    convert_pixel,
>>                   pixman_format_code_t    format,
>>                   pixman_repeat_t    repeat_mode)
>> {
>>     __android_log_print(ANDROID_LOG_DEBUG,"MAKS", "bilinear_fetch");
>
> Is this with the latest master, including c89f4c826695dbb5df0? That
> commit fixed a bug that prevented the fetch_bilinear_affine() functions
> from being called.
>
>
> Søren


More information about the Pixman mailing list