[ scummvm-Patches-1155731 ] Less memory-hungry MPEG playback

SourceForge.net noreply at sourceforge.net
Thu Mar 3 11:42:54 CET 2005


Patches item #1155731, was opened at 2005-03-03 11:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1155731&group_id=37116

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Torbjörn Andersson (eriktorbjorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: Less memory-hungry MPEG playback

Initial Comment:
This is an attempt to adapt some code from SDL to make
the MPEG cutscene player less memory hungry.

With our current code, we allocate a lookup table of
256 * (BITDEPTH + 1)^2 OverlayColor entries. I believe
this comes out to about 8 MB of data; data that is
shared between all instances of the cutscene player, so
it's not freed between cutscenes. With the new code,
two lookup tables are allocated. One that's 4 KB
(assuming an int is four bytes) and one that's 9 KB.

I haven't touched the 8-bit case, but I think the
lookup table for that one is around 70 KB so it's not
too bad.

Note that this is still fairly untested code. There
could be out-of-bounds memory access, and I haven't had
much time to compare the output or the performance to
the current version yet. And I've probably only tried
the 555 case, not the 565 case. So if anyone else wants
to try it, I'd be grateful.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1155731&group_id=37116




More information about the Scummvm-tracker mailing list