[Scummvm-devel] Bitdepth/pixel format API concerns

Kostas Nakos knakos at phys.uoa.gr
Sun Jun 14 18:06:46 CEST 2009


Hello,

On Sun, 14 Jun 2009 17:18:10 +0200
Rafa__ Rzepecki <divided.mind at gmail.com> wrote:
> This boils down to 522 vs. 573 FPS for swizzling vs. palette lookup,
> respectively. Hardly a lifesaver, and that's for the most simple code
> there is, ie. replacing outcolor = palette[incolor] with outcolor =
> (incolor >> 10) | ((incolor & 0x3e0) << 1) | ((incolor & 0x1f) << 11);
> this means platform-specific hacks (or, heck, even compiler
> optimizations, above was with -O0) could easily snip away the
> difference.

While I have no experimental data to support this, I strongly believe
that performing 4 shift ops, 3 and ops and 2 or ops per pixel is far
from efficient, even taking into account the data cache thrashing of a
color LUT. And gfx usually accounts for the bulk of computational power
a gfx app requires. I'd hate to see less capable devices slow down to a
crawl, since scummvm tries to be as lean as possible to help ports.

Best,
Kostas




More information about the Scummvm-devel mailing list