Rotating bitmaps, fast..



Hello all!

I have written a routine in C++ that rotates bitmaps 90 degrees.
(I call it from VB6)
Optionally, it will also perform a "flip" (mirroring).

Now, I want to squeeze as much performance as possible out of this code.
(I rotate a number of live video streams)

At http://www.lightweightvideo.com/rotate90/Rotate90_code.htm I have put up the C++ code, and also a disassembly listing.

Is there anything obvious in the disassembly that indicates that the compiler has done a bad job? (and that could be corrected in some way...)

Or (perhaps more likely...) is there anything obvious in the C++ code that indicates that *I* have done a bad job?

Is there perhaps even someone, well experienced in Intel assembler, who would like to write the necessary code to perform the rotation loop in the most efficient way?
(Given of course that the disassembly listing shows that it *can* be done more efficient...) Myself, I can' determine that..

Tia,

Johan Stäck
Skellefteå
Sweden
.