Re: gdk_pixbuf interpolation tables

On Thu, 2003-03-20 at 10:54, Brian Cameron wrote:

> After a long discussion with Owen on this topic, we agreed that the
> vectors should total to 1.0 rather than overall_alpha.  overall_alpha
> is now included in the 2-d table that is computed in the
> convert_vector_to_table function.  So now sqrt(overall_alpha)
> is no longer computed and the need for the x_constant and y_constant
> stack variables went away.  Other than these changes, the patch is
> the same as the previous one.
> The scale.c test program has also been updated with the same change.

I've gone ahead and committed a variant of your patch to GTK+
HEAD; if no problems show up before I do 2.2.2, I'll probably
backport it to gtk-2-2, since it is a reasonable performance increase
for some cases.

The main difference from your patch is that I've gone ahead and
used the fact that the math for the X and Y filter vectors are
the same to further simplify the code ... I added a 
PixbufFilterDimension structure to contain the fields for X 
or Y for PixbufFilter and made the *_make_weights() function fill 
in a single PixbufFilterDimension.

There are also various name differences and a few coding-style

I haven't committed scale.c, since I don't think a test case with
cut-and-paste copies of the filter functions is that useful
for future maintenance.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]