Jump to content
  • Advertisement
Sign in to follow this  
sambsp

Need fast transparent (color key) blit arithmetic!

This topic is 4849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi experts, I found my transparent (color key, not alpha blending) blit was too slow since I need to compare each word (since I was writting the 16 bit version) one by one. Is there any optimization article about this? Really appericiated if you can tell me how to tackle such a problem on ARM7 platform. But any related information will be welcomed!

Share this post


Link to post
Share on other sites
Advertisement
Does the ARM support conditional moves or predicated opcodes in general? If so, make sure you do CMOVs instead of branching on the test. I can't, offhand, think of a way to compare more than a word at a time with the color key.

Share this post


Link to post
Share on other sites
Well, if you have a 32 bit bus it may be faster to write a complicated algorithm where you read 32 bits of source data, test for any color keyed pixels and combine with destination data if necessary. That would be fairly complex but might save you half the memory read/write ops. It may be possible that some processors can combine 2 16-bit writes into one 32-bit one, I'm not an expert on processor architecture, but it seems unlikely they'd bother on an embedded RISC processor. I couldn't tell from the ARM7 site whether you'd have a 32 bit bus or not; it seemed to be optional.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!