[Scummvm-devel] BS2 cutscenes

Marcus Comstedt marcus at mc.pp.se
Tue Jan 6 14:54:01 CET 2004


"LavosSpawn" <LavosSpawn at scummvm.org> writes:

> as mpeg is a lossy compression, based on YCbCr color space and discrete
> cosine transformation, it outputs a variety of different colors which are
> more or less close to the original ones.
> It'd take a hell of arithmetics to force a given decompressed image into a
> 256 color palette again. I think it's impossible and those handheld devices
> are nowhere near the necessary CPU time.

Not really.  You can make an YCC indexed palette, using e.g. 4 bits Y,
2 bits Cb and 2 bits Cr.  Then it's just a matter of shifting some
bits to convert the DCT outputs to a linear palette index.  It won't
be very pretty, but it won't be too shabby either, given the 256
colour limit. And you can use ordered dithering to improve it a bit
without much extra overhead.


  // Marcus






More information about the Scummvm-devel mailing list