Re: gdk_pixbuf_rotate_simple



Hi,

Lars Wirzenius <liw iki fi> writes:

> The code is at http://liw.iki.fi/liw/gdk-pixbuf-rotate/ (separate files
> and a tarball). Unfortunately, I'm not now able to compile CVS versions
> of Gtk+, but the code should drop in easily. It consists of a new file
> (gdk-pixbuf-rotate.c) and a few new lines to be inserted into
> gdk-pixbuf/gdk-pixbuf.h.

I'd suggest to replace the calls to memcpy() by direct assignments;
this should give a significant speed improvement. You should also
consider to write separate functions for the 3 and 4 byte per channel
cases in order to move the if-clause out of the inner loop. The 4-byte
case can then be rewritten using 32bit access to the pixel data.


Salut, Sven



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