This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Pixel by Pixel performance-


Pixel by Pixel performance-

Postby Joseph » Jan 13, 2005 @ 3:56am

Joseph
 


Postby Johan » Jan 13, 2005 @ 12:04pm

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.
Johan Sanneblad, M.Sc, Ph.D
GapiDraw Systems Architect
[]
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby fast_rx » Jan 13, 2005 @ 3:54pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Thanks

Postby Joseph » Jan 13, 2005 @ 5:05pm

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
Joseph
 


Postby drgoldie » Jan 13, 2005 @ 9:58pm

drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Postby Guest » Jan 15, 2005 @ 6:20pm

Guest
 


Postby drgoldie » Jan 15, 2005 @ 6:28pm

drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum