2007/10/8, Phil Endecott <[EMAIL PROTECTED]>: > Olivier DAVID wrote: > > Phil, > > > > What kind of algorithm did you use in software? I think a 90° rotate should > > be something much easier than any rotation. I saw a piece of code in > > xfree86, I hope it is optimised, but I didn't check it yet. > > Nested loops, the obvious way. (No, I wasn't doing arbitrary-angle > rotation; just multiples of 90 degrees.) It could probably be > optimised a bit, but the fundamental problem is that you are passing a > lot of data through the CPU that would otherwise only go through the > graphics system.
I'm sorry, but I have a small note - some GPUs have commands to rotate data (90-180-270) e.g SM501 from Silicon Motion Inc. And they do it fast, of course. > > Of course it all depends on your application: if all the data is going > through the CPU anyway then it won't make as much difference. In my > case, most of the content is either solid rectangles or blits from > cached images, so the graphics system is doing most of the work. > > You might be able to estimate the slowdown: measure the bandwidth in > pixels/second to and from the framebuffer (being careful to allow for > the cache) and estimate how long a rotate will take from that. Then > add a sleep() somewhere in your program and see if it is still usable. > Maybe you will be lucky! > > > Regards, > > Phil. > > > > > > > _______________________________________________ > directfb-dev mailing list > [email protected] > http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev > > -- Best Regards Nikita Egorov [EMAIL PROTECTED] [EMAIL PROTECTED] _______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
