Is interpolation of image-border specified by Render?

Maarten Maathuis madman2003 at gmail.com
Fri Oct 17 16:24:04 PDT 2008


On Sat, Oct 18, 2008 at 12:58 AM, Clemens Eisserer <linuxhippy at gmail.com> wrote:
> Hi,
>
> I am compositing a transformed source with RepeatPad (and billinear
> interpolation) and a mask (nearest) to get sharp edges.
> What I do for now is I draw a rect in the mask as large as the source
> and apply the same transformation.
>
> However this requires me to have a mask as large or larger as the
> source and fillrects touching a large area.
> I've experimented with having a smaller mask and appling an additional
> scale to the mask and it seems to work fine when using nearest
> interpolation.
> It seems the mask-border is exactly as if the image would be as large
> as the source, and only the content of the mask is interpolated with
> nearest, the upper image shows the result (with a 2x2 mask scaled up):
> http://picasaweb.google.com/linuxhippy/Transformations#5229203425413416738
>
> However I am worried how consistent this is across different drivers,
> can I rely on this behaviour if I handle rouding errors caused by the
> fixed-point transformation matrix?
> Is it specified which pixels may be touched?
> How hard is it for drivers to have a mask with nearest and a source
> with billinear?
>
> Thank you in advance, Clemens
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
>

Bilinear and nearest are standard texture unit properties, this should
pose no difficulty for drivers. As far as the mask goes, nearest
should guarantee a sharp border. I'd expect things to go ok with the
size if you keep in mind it's fixed point transformation, but i'm not
a 100% sure.

Maarten.



More information about the xorg mailing list