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

Scaling an Image to Half-Res


Postby StephC » Dec 14, 2004 @ 6:45pm

Stephane Cocquereaumont / Game Developer at <a href=http://int13.net>int13 production</a> (code monkey)
User avatar
StephC
pm Insider
 
Posts: 442
Joined: Jun 12, 2003 @ 10:41am
Location: Bordeaux - France


Postby drgoldie » Dec 14, 2004 @ 7:55pm

hi stephC,

thanks for that hint.
strange thing is that using the _Preload function the code actually becomes slower.
i changed my previous code to not add, but just read from memory and the time went down to 2.04ms. on the other hand the PLD version takes 3.71ms.

the problem seems to be that in the LDR case the compiler creates the following:

ldr r0, [r2]
ldr lr, [r2, #0x20]
ldr r11, [r2, #0x40]
ldr r10, [r2, #0x60]

while in the PLD case it updates the address register all the time which prevents it from being used for PLD next clock circle.

any ideas on this? i'd still be interested to see how fast an optimal PLD solution would be. maybe somebody could create a 'precompiled' assembler function that can preload x bytes using PLD (i'm not an assembler programmer). i'd love to check how fast that would be...

besides that i'm happy to see that this code now got more than 3x faster than the original implementation that looked already fully optimized...

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


Postby Tala » Dec 15, 2004 @ 6:35pm

Tala
pm Member
 
Posts: 125
Joined: Feb 6, 2004 @ 4:32pm


Postby drgoldie » Dec 15, 2004 @ 6:57pm

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


Postby Tala » Dec 15, 2004 @ 7:05pm

Tala
pm Member
 
Posts: 125
Joined: Feb 6, 2004 @ 4:32pm


Postby drgoldie » Dec 15, 2004 @ 7:08pm

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


Postby Tala » Dec 16, 2004 @ 12:35am

Tala
pm Member
 
Posts: 125
Joined: Feb 6, 2004 @ 4:32pm


Postby drgoldie » Dec 16, 2004 @ 10:40am

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


Postby Tala » Dec 17, 2004 @ 12:31am

Tala
pm Member
 
Posts: 125
Joined: Feb 6, 2004 @ 4:32pm


Postby drgoldie » Dec 18, 2004 @ 2:38pm

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


Postby pappaxray » Sep 8, 2005 @ 4:13pm

pappaxray
pm Member
 
Posts: 23
Joined: Jul 28, 2004 @ 4:57pm
Location: UK


Postby joshbu [MSFT] » Sep 16, 2005 @ 10:38pm

joshbu AT microsoft dot-you-know-where
Windows CE Software Design Engineer

“This posting is provided “AS IS” with no warranties, and confers no rights.”
joshbu [MSFT]
pm Member
 
Posts: 60
Joined: Apr 10, 2004 @ 12:28am
Location: Redmond, WA


Postby drgoldie » Sep 16, 2005 @ 11:12pm

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


Postby Kzinti » Sep 16, 2005 @ 11:38pm

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby pappaxray » Sep 19, 2005 @ 6:46pm

pappaxray
pm Member
 
Posts: 23
Joined: Jul 28, 2004 @ 4:57pm
Location: UK


PreviousNext

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

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

cron