Page 1 of 1

Pixel by Pixel performance-

PostPosted: Jan 13, 2005 @ 3:56am
by Joseph

PostPosted: Jan 13, 2005 @ 12:04pm
by Johan
You should avoid the multiplication on each pixel - i.e. "backBuffer[jj * pitch + ii]" is bad.

Also, depending on the pocket pc you use, the backbuffer might be aligned in a way that pitch is much larger than one pixel. So you would have to check the pitch value and if it's larger than one pixel you would have to go in the column direction instead of row-direction.

If you do the right optimizations your performance would increase at least 4-5 times, probably more.

PostPosted: Jan 13, 2005 @ 3:54pm
by fast_rx

Thanks

PostPosted: Jan 13, 2005 @ 5:05pm
by Joseph
Thanks for the tips. I implemented the above optimizations (using prefix instead of postfix decrementing in the for loop; I've heard it makes a difference, but haven't ever noticed if it does). It's slick-looking code, but I'm still sitting at 6 fps. I think that the video capture is, by far, the biggest bottleneck. I'm going to try tucking it away into its own thread so that the program doesn't block while it's capturing. Hopefully that will restore performance.
Thanks again for your help.
Joseph

PostPosted: Jan 13, 2005 @ 9:58pm
by drgoldie

PostPosted: Jan 15, 2005 @ 6:20pm
by Guest

PostPosted: Jan 15, 2005 @ 6:28pm
by drgoldie