[Scummvm-devel] BS2 cutscenes

Andreas Röver andreas_roever at web.de
Tue Jan 6 05:36:01 CET 2004

> 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.
> Besides, it's taking the point out of using mpeg compression from the
> beginning.
> We'd even have to use very high bitrates for the mpeg encoding to have the
> playback colors accurate enough to do a transformation back to 256 colors.

Then mpeg2 is completely outside the limit as it's relatively expensive if it comes to
CPU power. But BS already requires quite a bit of cpu and a high resulution which already
makes them hard to implement on handhelds.

Finally the color reduction will not be more cpu intensive then the conversion to RGB if we use a
predefined palette that is fixed for the whole movie. Just imagine a 3d array with Y Cb and Cr and
indices into this array and the palette index a value. This requires quite a bit of memory (Maybe
2Mb) but it's fast and it is just as much as the libmpeg2 color conversion requires (if I understand
that code right). This process might even hide some of the mp2 artefacts.

The alternative is another an palettized codec. But I don't know one and I also have no idea how one could look like that is lossy and allows us to treat size for quality.

Anyway I wont discuss this any more until I have some results. 

Erdbeben im Iran: Zehntausende Kinder brauchen Hilfe. UNICEF hilft den
Kindern - helfen Sie mit! https://www.unicef.de/spe/spe_03.php

More information about the Scummvm-devel mailing list